EditLive! for Java supports the embedding of multimedia content through the use of <object> tags. This section provides information on how the multimedia support of EditLive! for Java functions and how to configure multimedia support within EditLive! for Java.
Multimedia support within EditLive! for Java is achieved by embedding content via <object> tags and their associated <param> tags. EditLive! for Java supports the embedding of any form of multimedia content via the <object> tag provided that the relevant configuration information has been provided for the format. Multimedia objects can be inserted either using local files or files within a WebDAV repository. If a local file is used then this file will be uploaded when the content from EditLive! for Java is submitted.
Multimedia objects embedded within EditLive! for Java are presented to the user as icon within a resizable area. The icon can be seen below:
While most of the parameters and properties for the multimedia type are configured, to some extent, via the EditLive! for Java configuration file the height, width and data attributes of the <object> tag must be specified by the user. The height and width are used to provided the dimensions, if any, for the object while the data attribute contains the URL for the location of the object source file.
Configuration information of multimedia content is provided via the <multimedia> element within the configuration file. For each multimedia file type to be used with EditLive! for Java a separate <type> configuration element must be provided. Types are differentiated by their unique name attribute.
The <type> element serves a dual purpose. Some of the settings within the <type> element are used to configure the Insert Object and Object Properties dialogs while others are used to configure the attributes of the <object> tag to be inserted into EditLive! for Java. The section below provides definitions of the behaviors of each attribute:
The name is presented to the user within the Insert Object dialog's File Type drop down.
The file extension associated with this object type. When EditLive! for Java detects an object that has a source file that has the specified extension the Object Properties dialog will be displayed accordingly when displayed.
This attribute specifies which <param> element is to contain the URL for the source file for the object if required. EditLive! for Java will automatically assign the URL for the source file to be the value for the <param> tag with the name specified via this attribute.
The URL for the source file will be stored in the data attribute of the <object> tag irrespective of this setting.
This attribute indicates whether users can add custom parameters to the list of available parameters for the object. When set to false users are restricted to providing values for the parameters specified by the EditLive! for Java configuration file.
This attribute maps directly to the <object> tag's type attribute. While the meaning of this attribute is browser dependant it is often used to specify the MIME type of object.
This attribute maps directly to the <object> tag's codebase attribute. While the meaning of this attribute is browser dependant it is often used to specify the download URL for the program or plug-in used to render this object type in the browser.
This attribute maps directly to the <object> tag's classid attribute. The meaning of this attribute is browser dependant.
A list of possible <param> tags to be used with the <object> can be configured via the <param> elements associated with the <type> element within the EditLive! for Java. Each <param> element allows a name attribute to be specified for the parameter. The user will then be able to choose a parameter with this name in the Object Properties dialog in EditLive! for Java and provide an associated value. This can be seen in the following figure:
The dialog options shown above could be generated by the following XML configuration settings:
<editLive>
...
<mediaSettings>
...
<multimedia>
<types>
...
<type
name="Macromedia Flash"
type="application/x-shockwave-flash"
extension="swf"
allowCustomParams="true"
urlParam="movie"
>
<param name="movie" />
<param name="quality" />
<param name="bgcolor" />
</type>
...
</types>
</multimedia>
</mediaSettings>
...
</editLive>The name-value pairs specified in the Parameters tab of the Object Properties dialog are inserted into EditLive! for Java as <param> tags associated with the relevant <object> tag.
This example demonstrates how to configure EditLive! for Java in the following way:
The following multimedia types will be available for inserting with the listed configuration:
Associated with the extension .swf, the MIME type application/x-shockwave-flash and the parameter with the name movie will be used to specify the source URL for the object in addition to the data attribute.
Associated with the extension .mp3, the MIME type application/x-mplayer2 and as no parameter is specified for the urlParam only the data attribute will be used to store the location of the object source file.
Associated with the extension .avi, the MIME type application/x-mplayer2 and as no parameter is specified for the urlParam only the data attribute will be used to store the location of the object source file.
Associated with the extension .wav, the MIME type application/x-mplayer2 and as no parameter is specified for the urlParam only the data attribute will be used to store the location of the object source file.
The Macromedia Flash type will have the following parameters available and will not permit users to enter custom parameters:
movie
quality
bgcolor
The three other types will not have any predefined parameters, but users may specify any custom parameters.
The configuration used to achieve these settings is as follows:
...
<types>
<type
name="Macromedia Flash"
type="application/x-shockwave-flash"
extension="swf"
allowCustomParams="false"
urlParam="movie"
>
<param name="movie" />
<param name="quality" />
<param name="bgcolor" />
</type>
<type
name="MP3 Audio"
type="application/x-mplayer2"
extension="mp3"
allowCustomParams="true"
/>
<type
name="AVI"
type="application/x-mplayer2"
extension="avi"
allowCustomParams="true"
/>
<type
name="WAV Audio"
type="application/x-mplayer2"
extension="wav"
allowCustomParams="true"
/>
</types>
...The Object Properties dialog would appear as follows for these settings:
Objects can be inserted either from the file system of the client machine or from a WebDAV repository.
In order for local files to be inserted as multimedia objects in EditLive! for Java the file upload properties of EditLive! for Java must be correctly configured. For more information on this please see the article on Using HTTP for Image and Object Upload in Ephox EditLive! for Java.
EditLive! for Java can be configured to enable multimedia files to be inserted from a WebDAV repository. This is achieved by configuring the <webdav> child element of the <multimedia> element. For more information on how to configure WebDAV support for EditLive! for Java see the chapter on Using WebDAV with EditLive! for Java.
Copyright 2001-2005 Ephox Corporation. All Rights Reserved.