(logo)  Browser settings: Viewers

Purpose

For objects that cannot be displayed directly in the browser window, AWeb starts an external program, called a viewer. In spite of the name "viewer", this is not limited to graphical files. The external viewer for an audio file, for example, will play the audio file. For other objects, you may want to make use of an external plugin module, either because AWeb doesn't handle the object internally, or the plugin module offers more features. Finally, you may know that you always want to save certain type of objects to disk (Lha archives, for example).

The type of the object, and thereby the particular action to take, is determined by the MIME type of the object.

For each MIME type you want to be recognized by AWeb, there should be an entry on this page with the appropriate action and viewer or plugin module name defined.

Changing MIME types

Select the MIME type you want to modify from the listview. Use the Add button to add a new blank row. Use the Del button to remove the selected row. Note that the TEXT/HTML and TEXT/PLAIN types cannot be removed.

MIME type and subtype

In these string gadgets, you specify the MIME type and subtype. See the About MIME types chapter for more information on MIME types.

You can use an asterisk to specify a wildcard subtype. AWeb will use the external viewer defined in this row for files with the same type but a subtype for which no external viewer is defined. See the example.

Extensions

Most servers send the MIME type together with the data. AWeb will then use this MIME type, unless Ignore server MIME type is selected. If the server doesn't specify the MIME type (or if it is ignored), AWeb tries to determine the MIME type from the file name extension. If that fails, AWeb looks at the data to see if it is HTML text or plain text.

The extensions are especially important when looking at local files. As there is no server for local files, there is only the extension that tells AWeb about the type of the file.

In this string gadget, you type the extensions that could identify this MIME type. Separate multiple extensions by spaces or commas. The extensions are not case sensitive.

Action

Use this chooser to select the action to perform for the MIME type.
Default Specifying default for a "TYPE/SUBTYPE" entry means: use the action specified for "TYPE/*". For "TYPE/*" entries, default is the same as internal.
Internal For TEXT/HTML, TEXT/PLAIN, IMAGE/* and AUDIO/* types, AWeb has built-in drivers. The image and audio drivers are based on datatypes, and therefore somewhat limited in their features.
AWeb Plugin AWeb supports the use of external plugin modules. Plugin modules act as a replacement or addition to the internal drivers.

Use the Name field to select the name of the plugin module to be used. Use the Arguments field to specify any additional arguments that the plugin module may need. Refer to the documentation of the plugin module for the arguments allowed.

NOTE: These plugin modules should not be confused with external ARexx scripts, sometimes also called "plugins".

External program An external program will be started for this file.

Use the Command and Arguments fields to specify the viewer command to execute for this MIME type. Argument parameters are:
%f file name to "view"
%n screen name that AWeb is running on, in case your external viewer supports opening on a public screen. Use this only if you want it to open on the same screen as AWeb.
%u original URL of this object.
%m the MIME type of the object.

External program with PIPE As with External program, an external program is started. The difference is that using a PIPE the program is started as soon as data for the file arrives, and the data is sent to the program through a PIPE: file. This speeds up the process, because you don't have to wait until all data has arrived before the program is started.
Note that datatype based programs do not work with PIPEs.
Save to disk The file is not processed, but always saved to disk instead.

If AWeb can't determine the MIME type, or if the MIME type is known but not in the list, or if the MIME type is in the list but there is no valid action defined, AWeb will pop up a save requester. You can than save the file, and try to process it later.

NOTE that these MIME settings are used for every file. Especially embedded images in a HTML document will be shown by an external viewer if you define one for images. To display the images in the HTML document itself, set the action to internal, or configure an appropriate plugin module. You can define a separate image viewer to be used for standalone images.

Example

Suppose you want to play MIDI audio files using the GMPlay program, and other audio files using the (hypothetical) PowerEars program that can take a PIPE (streaming input). It should open its window on the same screen as AWeb. Since you have a WAV datatype, WAV sounds should be played by AWeb internally.

Then you would configure the following MIME types:

AUDIO/BASICauD
This row specifies that AU files can be recognized by their .au extension. You specify the default action (D) because you want to use the default player, defined in the AUDIO/* row.

AUDIO/MIDImidi midEGMPlay:GMPlay %f
This row defines the possible extensions .midi and .mid for MIDI files. It also specifies that MIDI files should be played using the external (E) GMPlay program.

AUDIO/WAVwavI
This row specifies that WAV files can be recognized by their .wav extension, and that they should be played by AWeb internally (I).

AUDIO/X-8SVX8svx svxD
This row defines an extension MIME type for 8SVX files. Note that the subtype starts with X- because it is not an official MIME type. This line is important when accessing at 8SVX files on your local computer, as AWeb has no way to identify them as 8SVX files other than the extensions given here.

AUDIO/*PPE:PowerEars %f PUBSCREEN %n
This row defines what player (the hypothetical Powerears program) to use for all other audio files but MIDI and WAV. Even files with different subtypes than BASIC (but main type AUDIO) will be played using this player.
There are no extensions defined here, because all extensions are given in the different subtype rows. As an alternative, you could remove the AUDIO/BASIC and AUDIO/X-8SVX rows, and specify all extensions (au 8svx svx) here.

<-Colours   ^Settings requesters   ->Options