Documentation

Search 

Contents

  1. Introduction
  2. Getting Started
  3. Trinidad Concepts
  4. Code View Support
  5. Design View Support
  6. Tag Object Toolbars
  7. Server Behaviors
  8. Property Inspectors
Selected 9. Trinidad Tag Reference

10. Trinidad Core Tag Reference

Contents > Trinidad Core Tag Reference > tr:media

tr:media

The tr:media tag is used to display the media that is specified in the player attribute with the default being the "link" player. If not specified, this tag will try to choose the appropriate size to display and player to use based on the content.

Example

<tr:media source="/components/images/seattle.wmv" innerWidth="160" innerHeight="112" autostart="true" controls="all" shortDesc="Visit Seattle"></tr:media>

Rendered Output

Rendered tr:media tag

Tag Attributes

attributeChangeListener Text
 
The attributeChangeListener attribute contains the reference to a method that is invoked when the renderer changes a property without the application’s request.
autostart Boolean
 
The autostart attribute is a boolean value that when set to "true" loads and plays the media resource without user intervention.
binding Expression
 
The value-binding expression linking this component tag to a backing bean property.
contentType Text
 
The contentType attribute sets the MIME type of the media resource, which is used to determine the type, size and control layout of the media player. If the contentType is not specified, then the MIME type will be derived based on the source URI extension.
controls Enumerated
 
The controls attribute sets the list of controls available to the user. Valid values are "all", "minimal", "none", "noneVisible", and "typical". The default is "typical". The value "all" will display all available media controls. The value "typical" will display the most common controls for the media player. The value "minimal" will display only the most important controls. The value "noneVisible" will not display any controls, but allows for control through a context menu. The value "none" also does not display any controls. The last two non-visible values are used with the attribute autoStart set to "true" and the attribute playCount set to "0" so that the media resource will play immediately and then loop.
height Text
 
The height attribute sets the height in pixels for the media resource. The innerHeight attribute is preferable to the height attribute because of the differences in media players. If both attributes are set, then the height attribute takes precendence. If no height is set, then the required space is calculated.
id Text
 
The unique identifier value for this component. The value must be unique within the closest naming container.
inlineStyle Text
 
The inlineStyle attribute contains inline style information, such as background color.
innerHeight Text
 
The innerHeight attribute sets the height in pixels for the media resource. The innerHeight attribute is preferable to the height attribute because of the differences in media players. If both attributes are set, then the height attribute takes precendence. If no height is set, then the required space is calculated.
innerWidth Text
 
The innerWidth attribute sets the width in pixels for the media resource. The innerWidth attribute is preferable to the width attribute because of the differences in media players. If both attributes are set, then the width attribute takes precendence. If no width is set, then the required space is calculated.
onclick Text
 
The onclick attribute sets the JavaScript code to execute when the mouse pointer is clicked over this element.
ondblclick Text
 
The ondblclick attribute sets the JavaScript code to execute when the mouse pointer is double-clicked over this element.
onkeydown Text
 
The onkeydown attribute sets the JavaScript code to execute when a key is pressed down over this element.
onkeypress Text
 
The onkeypress attribute sets the JavaScript code to execute when a key is pressed and released over this element.
onkeyup Text
 
The onkeyup attribute sets the JavaScript code to execute when a key is released over this element.
onmousedown Text
 
The onmousedown attribute sets the JavaScript code to execute when the mouse pointer is pressed down over this element.
onmousemove Text
 
The onmousemove attribute sets the JavaScript code to execute when the mouse pointer is moved within this element.
onmouseout Text
 
The onmouseout attribute sets the JavaScript code to execute when the mouse pointer is moved away from this element.
onmouseover Text
 
The onmouseover attribute sets the JavaScript code to execute when the mouse pointer is moved onto this element.
onmouseup Text
 
The onmouseup attribute sets the JavaScript code to execute when the mouse button is released over this element.
partialTriggers Text
 
The partialTriggers attribute sets the ids of components that cause a partial update. Use single colon for components that are in naming containers and multiple colons to search through parent and grandparent containers.
playCount Text
 
The playCount attribute sets the number of times the resource will play. A value of "0" allows the player to loop until the user stops the player.
player Enumerated
 
The player attribute sets the type of media player to use. Valid values are "link", "none", "quicktime", "real" and "windows". The default is "link". The value of "none" displays a link to launch the media resource. The value of "quicktime" launches the Apple QuickTime player, the value of "windows" launches the Windows Media Player, and the value of "real" launches the Real Player.
rendered Boolean
 
A value-binding expression that evaluates to a Boolean condition indicating if this component should be rendered.
shortDesc Text
 
The shortDesc attribute displays help text you hover over the component.
source Text
 
The source attribute sets the URI for the location of the resource.
standbyText Text
 
The standbyText attribute sets the message to display while the player is loading.
styleClass CSS Class
 
The styleClass attribute sets the CSS class to apply to this component when it is rendered.
width Text
 
The width attribute sets the width in pixels for the media resource. The innerWidth attribute is preferable to the width attribute because of the differences in media players. If both attributes are set, then the width attribute takes precendence. If no width is set, then the required space is calculated.