A reference to a media resource. Object allows a variety of media resources to be placed on the rendered page. The resource may be specified as an image policy or a device dependent mime type. Object also allows the control of media transcoding to ensure the resource will render on the requesting agent. See References to media for details.
The srctype attribute allows the authors to specify content types. If srctype contains device independent types, then the src attribute must be an MCS policy name with the extensions .mauc or .mimg. They must also all be of the same family, that is all video, all audio, all image, or all application/x-shockwave-flash. If no srctype attribute is provided then MCS will attempt to infer the type based on the file extension, e.g. .mimg will be treated as a device independent image policy, .gif will be treated as device dependent. However, this mechanism should not be relied upon in general, it is recommended that srctype is used.
The mcs-transcode parameter controls whether or not an image is transcoded. Possible values are: 'true' (default for device dependent mime types) and 'false'.
The mcs-media-style style property determines whether an object element should be treated as part of a page or an external resource that a user will explicitly retrieve. The mcs-external-label parameter provides the content for a link that will activate the display of an external resource.
The mcs-watermark-url parameter allows authors to specify that a transparent watermark should be overlaid on an image. The value of the parameter specifies the URL of the watermarking image to use.
The mcs-preferred-image-type parameter allows page authors to specify the preferred output format for the selected image. The value of the parameter accepts a space-separated list of the image formats, in order of preference. If a format from the list is invalid or is not supported by the device, then the next format will be examined. If the parameter is not specified, or the list does not contain any formats supported by the device, then the type specified by the device repository will be used.
To provide an alternative text, you can place the text in the object content after param elements, if there are any.
Attribute | Description | Type | Default | Options | Use |
---|---|---|---|---|---|
src | The URI of the resource. When a URI to an image policy is used, then MCS will process the image using information within the policy itself. In this case all parameters are ignored. Refer to Policies and variants for information on how MCS processes policies. MAP will be used to transcode the image when a device dependent mime type (as distinct from a policy name) is used and mcs-transcode is set to 'true'. MCS will not transcode the image when a device dependent mime type is used and mcs-transcode is set to 'false'. |
xs:anyURI | none | required | |
srctype | A list of the allowable content types referenced by the src attribute | xs:string | none | optional |
The jive_logo.mimg image policy defines two image variants, one image to use on PC devices, and a second for smart phones. Refer to 2.2. Adding an image policy in the 1.1. Getting started tutorial for further information.
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/2002/06/xhtml2">
<head>
<title>object</title>
</head>
<body>
<div>
<object src="http://localhost:8080/mcs/tutorial/WebContent/mcs-policies/images/jive_logo.mimg">
Jive logo </object>
</div>
</body>
</html>
When a device dependent mime type, .gif in the following examples, is used and mcs-transcode is set to 'true', then MAP will be used to transcode the image to a version that is most suitable for the device requesting that image.
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/2002/06/xhtml2">
<head>
<title>object</title>
</head>
<body>
<div>
<object src="http://localhost:8080/mcs/welcome/images/logo_sys_r_rgb_150.gif"
srctype="image/gif">
<param name="mcs-transcode" value="true"/>
Antenna Software logo
</object>
</div>
</body>
</html>
When a device dependent mime type is used and mcs-transcode is set to 'false', MCS will display the image as is, i.e. it will not be transcoded.
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/2002/06/xhtml2">
<head>
<title>object</title>
</head>
<body>
<div>
<object src="http://localhost:8080/mcs/welcome/images/logo_sys_r_rgb_150.gif"
srctype="image/gif">
<param name="mcs-transcode" value="false"/>
Antenna Software logo
</object>
</div>
</body>
</html>