t:MEDIA Element | media Behavior?deprecated) | Internet Development Index |
Defines a generic, timed media element in an HTML document.
Syntax
XML <t:MEDIA ID=sID STYLE="behavior:url('#default#time')" /> HTML N/A Scripting N/A
Possible Values
sID String that specifies a unique identifier for the object.
Members Table
Attribute Property Description t:ACCELERATE accelerate Sets or retrieves a value that applies an acceleration to the element's local timeline. t:AUTOREVERSE autoReverse Sets or retrieves whether the timeline on an element immediately begins playing in reverse after completing in the forward direction. t:BEGIN begin Sets or retrieves the delay time before the timeline begins playing on the element. t:BEGINAFTER beginAfter Sets or retrieves a value indicating that the timeline of an element starts when the referenced element ends. t:BEGINEVENT beginEvent Sets or retrieves a value that starts the timeline of an element when the referenced event occurs. t:BEGINWITH beginWith Sets or retrieves a value that starts an element's timeline at the same time as the referenced element. t:CLIPBEGIN clipBegin Sets or retrieves the beginning point of a sub-clip of a continuous media object. t:CLIPEND clipEnd Sets or retrieves the end point of a sub-clip of a continuous media object. t:CLOCKSOURCE clockSource Sets or retrieves whether all the elements within the local time scope are synchronized with this element's timeline. currTime Retrieves a value indicating the current time along the simple duration as defined by the element's t:DUR or t:END attribute. t:DECELERATE decelerate Sets or retrieves a value that applies a deceleration to the end of a simple duration. t:DUR dur Sets or retrieves a value indicating the amount of time the element remains active or displayed. t:END end Sets or retrieves a value indicating the end time for the element, or the end of the simple duration when the element is set to repeat. t:ENDEVENT endEvent Sets or retrieves a value indicating that the timeline of an element ends immediately when the referenced event occurs, regardless of the element's repeat count or repeatDur property. t:ENDHOLD endHold Sets or retrieves whether an element remains active if its timeline ends before the timeline on its parent element ends. t:EVENTRESTART eventRestart Sets or retrieves whether the element should restart if a beginEvent call occurs while the local timeline is already running. t:IMG img Sets or retrieves the URL of an alternate image to display if the MIME type is not supported on the user's computer. localTime Retrieves a value indicating the current time along the local duration, as defined by the element's t:REPEAT or t:REPEATDUR attribute. t:PLAYER player Sets or retrieves the object used to render the media associated with this element. playerObject Retrieves the object that plays media files. t:REPEAT repeat Sets or retrieves the number of times an element's timeline repeats. t:REPEATDUR repeatDur Sets or retrieves the number of seconds an element's timeline repeats. t:SRC src Sets or retrieves the source URL of the media. t:SYNCBEHAVIOR syncBehavior Sets or retrieves the synchronization rules for the element's timeline. syncTolerance Retrieves the time variance allowed on a timeline with locked synchronization. t:TIMEACTION timeAction Sets or retrieves what action is taken on the element while the timeline is active. t:TYPE type Sets or retrieves the MIME type of the media object referenced by the t:SRC attribute.
Event Description onbegin Fires when the timeline starts on an element. onend Fires when the timeline stops on an element. onmediacomplete Fires when the element's associated media is finished loading. onmedialoadfailed Fires when an element's media file fails to load for any reason. onmediaslip Fires when an element's media file fails to keep up with the defined timeline. onpause Fires when the timeline on an element pauses. onrepeat Fires when the timeline repeats on an element, beginning with the second iteration. onresume Fires when an element's timeline resumes from a paused state. onresync Fires when the element's associated media synchronization is interrupted. onreverse Fires when the timeline on an element begins to play backward. onscriptcommand Fires when the Microsoft?Windows Media?Player control receives a synchronized command or URL.
Method Description beginElement Starts the element on the timeline. endElement Stops the element on the timeline.
Remarks
The members listed in the preceding table might not be accessible through scripting until the window.onload event fires. Waiting for this event to fire ensures that the page is completely loaded, that all behaviors have been applied to corresponding elements on the page, and that all the behavior's properties, methods, and events are available for scripting. Using any of the behavior-defined members before the window.onload event fires could result in a scripting error, indicating that the object does not support that particular member.
Although different media-based elements exist, there is no functional difference in their current implementation. However, you are encouraged to use elements such as t:AUDIO, t:IMG, t:MEDIA, and t:VIDEO for improved document readability and enhanced support.
The prefix t is used to associate this element with an XML namespace. You must include the following line of code in the head section of your HTML document when using this element.
<XML:NAMESPACE PREFIX="t"/>The t:MEDIA element is available as of Microsoft Internet Explorer 5, only in the Microsoft?Win32?platform.
See Also
Introduction to DHTML Behaviors, Introduction to HTML+TIME, time, time2, Using DHTML Behaviors