onmediacomplete Event (t:ANIMATION, t:AUDIO, t:IMG, ...)

HTML (DHTML)

onmediacomplete Event

Internet Development Index

Fires when the element's associated media finish loading.

Syntax

Inline HTML<ELEMENT onmediacomplete = "handler" ... > All platforms
Event propertyobject.onmediacomplete = handlerJScript only
object.onmediacomplete = GetRef("handler")Visual Basic Scripting Edition (VBScript) 5.0 or later only
Named script <SCRIPT FOR = object EVENT = onmediacomplete> Internet Explorer only

Event Information

BubblesNo
CancelsNo
To invoke Open a page in the browser that contains a media file affected by HTML+TIME.
Default action Calls the associated event handler.

Available Properties

Available Properties

Remarks

When a streaming media file is used, this event could fire before the file starts playing.

Example

This example demonstrates the onmediacomplete event. When the media element finishes loading, the onmediacomplete event fires and updates the status.

<HTML XMLNS:t ="urn:schemas-microsoft-com:time">
<HEAD>
<TITLE>onmediacomplete Event</TITLE>
<?IMPORT namespace="t" implementation="#default#time2">
<STYLE>
.time {behavior: url(#default#time2);}
</STYLE>
</HEAD>
<BODY TOPMARGIN=0 LEFTMARGIN=0 BGPROPERTIES="FIXED" BGCOLOR="#FFFFFF"
LINK="#000000" VLINK="#808080" ALINK="#000000">
<t:video id="m1" src="../../common/samples/author/behaviors/media/shuttle3.wmv"
onmediacomplete="s1.innerText +=' Media Loaded'"/>
<BR><BR>
<SPAN id="s1">Status:</SPAN>
</BODY>
</HTML>
This feature requires Microsoft?Internet Explorer 5.5 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

Standards Information

This event is a Microsoft extension to Synchronized Multimedia Integration Language (SMIL) Non-Microsoft link.

Applies To

t:ANIMATION, t:AUDIO, t:IMG, t:MEDIA, t:PAR, t:REF, t:SEQ, time2, t:VIDEO

See Also

Introduction to HTML+TIME