The IBM Bamba for Java applet can be placed in an HTML page using
the following syntax. All the attributes (code, codebase...)
immediately following the opening APPLET tag shown below in the figure
are needed. Of the params "src" is mandatory and "cabbase" is needed,
all others are optional and their default values are explained below.
<APPLET code = "BambaPlayer.class" codebase = "/JavaBamba" archive = "BambaPlayer.zip" width = 250 height = 50 > <param name="src" value="sample.iba"> <param name="cabbase" value="BambaPlayer.cab"> <param name="autostart" value="false"> <param name="showcontrols" value="true"> <param name="bkcolor" value="c0c0c0"> <param name="border" value="frame"> <param name="colornw" value="404040"> <param name="colorse" value="FFFFFF"> </APPLET> |
The following sections now describe in further detail the elements of the syntax
These are the attributes of the applet tag interpreted by the browser itself.
Mandatory
This refers to the main IBM Bamba for Java player class. It should not be altered. The same player code can handle either .iba audio clips or .iba video/audio clips.
Highly recommended
This refers to server location in which the IBM Bamba for Java player code is installed. In the above syntax it is assumed that the player is installed in the JavaBamba subdirectory - directly off the root directory on the server. When the installation procedure was followed the JavaBamba directory tree was created. If you placed the JavaBamba inside another directory, eg in an applets subdirectory then modify the codebase accordingly. The .. is permitted in the codebase eg ../applets/JavaBamba
The clients browser will re-use the code from the same codebase when traversing pages. So after downloading the applet code, from the first page encountered, having all the IBM for Java applets refer to the same codebase will mean that the downloaded cached code will be used for all subsequent pages coded that way. This makes for a much happier client whose browser doesn't need to continually re-download the code.
Highly recommended
Some browsers, Netscape Navigator 3.0 and above in particular, can download the applet code when stored in a zip. This means only one HTTP Get versus several Gets for the individual classes. The ZIP contains the same code and will be used instead of these individual class files for those browsers that recognize it. See also cabbase param for Microsoft Internet Explorer.
Mandatory
This is the width and height of the space given to the applet by the browser. For audio only clips width=250 height=50 is a reasonable size to choose that is enough space for the controls and status. The slide-bar will shrink/expand to fit the available width - provided its not too small of course.
For video clips the space required by the video itself needs to be taken into consideration. The video will be positioned above the controls and centered in the area. It will always be displayed in its original size, eg a 160x120 clip will need 160x120 for its display. An additional 5 pixel border space is needed if a frame is used -see border param. So for 160x120 it needs 170x130 with the border. Extra space surrounding the video drawn in the background param color. So as an example, for a video whose size is 176x144 (QCIF) a width=250 and height=240 gives space for the controls plus a background colored region outside of the video frame. Some experiments with the sizes however will soon lead you to the most visually pleasing aspect ratios for your clips.
Other attributes of the applet tag may be specified as required. Refer to an HTML reference for the meaning of these and any others which are supported.
These are elements of the applet tag interpreted by the applet code - with the exception of the cabbase param for Microsoft Internet Explorer.
Mandatory
This is the URL for the .iba clip. It is either a full URL eg http://videos/animals/groundhog.iba or URL relative to the DOCBASE for the HTML pages. You may like to keep the clips together or place them in the directory with the html page.
Highly recommended
Like the archive value cabbase refers to a file in which all the class files are store. In the case of the CAB (CABinet) file this is used by Microsoft Internet Explorer. For further information see the Archive tag above.
Optional - defaults to "false".
May be set to "false" or "true". This parameter determines whether the clip will start playing automatically or wait for the user to press the play button. Note that is showcontrols is set to false then autostart is forced true since the user has no way of starting the clip in that case.
Optional - defaults to "true".
May be set to "false" or "true". When set "true" (default) controls for pause, play, rewind, seek etc are displayed along with status information. For video we have allowed the controls to be disabled in order that the applet can be placed seamlessly inside other graphics etc for specialized visual effects. The clip will start playing automatically, see autostart above, if controls are disabled.
Optional - defaults to light gray.
Changes the background color for the applet. The value should be a 6 digit hex code for the colors in the form RRGGBB. By default the color is light gray ie a value "c0c0c0"
Optional - defaults to "frame".
For a video clip this allows the author to choose whether or not there is any border surrounding the video clip.
Optional - defaults to dark gray.
Color for video nw border in RRGGBB form. See border param above.
Optional - defaults to white.
Color for video nw border in RRGGBB form. See border param above.
<APPLET code = "BambaPlayer.class" codebase = "/Applets/JavaBamba" archive = "BambaPlayer.zip" width = 250 height = 240 > <param name="src" value="videosample.iba"> <param name="cabbase" value="BambaPlayer.cab"> </APPLET>
<APPLET code = "BambaPlayer.class" codebase = "/Applets/JavaBamba" archive = "BambaPlayer.zip" width = 250 height = 200 > <param name="src" value="videosample.iba"> <param name="cabbase" value="BambaPlayer.cab"> <param name="autostart" value="true"> <param name="showcontrols" value="false"> <param name="bkcolor" value="FF0000"> <param name="border" value="frame"> <param name="colornw" value="F0F0F0"> <param name="colorse" value="202020"> </APPLET>
<APPLET code = "BambaPlayer.class" codebase = "/Applets/JavaBamba" archive = "BambaPlayer.zip" width = 250 height = 50 > <param name="src" value="audiosample.iba"> <param name="cabbase" value="BambaPlayer.cab"> <param name="bkcolor" value="00FF00"> </APPLET>