playList Collection | Internet Development Index |
Retrieves a collection of playItem objects.
Syntax
[ oColl = ] object.playList [ oObject = ] object.playList(iIndex)
Possible Values
oColl Array of elements contained by the object. oObject Reference to an individual item in the array of elements contained by the object. iIndex Required. Integer that specifies the zero-based index of the item to be returned.
Members Table
Attribute Property Description activeTrack Sets or retrieves the track, or playItem object, that is currently active in the playList collection. Banner Retrieves the Banner content of an entry in an Advanced Stream Redirector (ASX) file. BannerAbstract Retrieves the BannerAbstract content of an entry in an ASX file. BannerMoreInfo Retrieves the BannerMoreInfo content of an entry in an ASX file. DUR dur Sets or retrieves a value indicating the amount of time the element remains active or displayed. length Retrieves the number of objects in a collection.
Method Description item Retrieves an object from the specified collection. nextTrack Advances the media-playing container to the next track, or playItem object, in the playList collection, and begins playing that track. prevTrack Sets the media-playing container to the previous track, or playItem object, in the playList collection and begins playing that track.
Object Description playItem Represents an individual media file in a playList collection.
Remarks
Some media file formats contain several individual media files, such as an MPEG-Layer 3 (MP3) playlist that contains several MP3 files. This collection provides access to those individual media files.
The playList collection is available only while the parent element is active on the timeline. When the parent element's timeline ends, this collection is no longer available.
Example
This example demonstrates how to retrieve a collection of playItem objects using the playList collection.
<HTML XMLNS:t="urn:schemas-microsoft-com:time"> <HEAD> <?IMPORT namespace="t" implementation="#default#time2"> <STYLE> .time{ behavior: url(#default#time2);} </STYLE> <SCRIPT LANGUAGE="JavaScript"> function updateBtns() { if(m1.currTimeState.isActive){ b0.disabled=true; b1.disabled=false; b2.disabled=false; b3.disabled=false; }else{ b0.disabled=false; b1.disabled=true; b2.disabled=true; b3.disabled=true; } } function updateFields(){ title1.innerText = 'Title: ' + m1.playList.activeTrack.title; author1.innerText = 'Author: ' + m1.playList.activeTrack.author; abstract1.innerText = 'Abstract: ' + m1.playList.activeTrack.abstract; copyright1.innerText = 'Copyright: ' + m1.playList.activeTrack.copyright; } function emptyFields(){ title1.innerText = 'Title: '; author1.innerText = 'Author: '; abstract1.innerText = 'Abstract: '; copyright1.innerText = 'Copyright: '; } </SCRIPT> </HEAD> <BODY onload="updateBtns()" TOPMARGIN=0 LEFTMARGIN=0 BGPROPERTIES="FIXED" BGCOLOR="#FFFFFF" LINK="#000000" VLINK="#808080" ALINK="#000000"> ... <t:media id="m1" src="../../common/samples/author/behaviors/media/media.asx" onmediacomplete="updateFields();updateBtns();"/> <SPAN id="title1">Title:</SPAN><BR> <SPAN id="author1">Author:</SPAN><BR> <SPAN id="abstract1">Abstract:</SPAN><BR> <SPAN id="copyright1">Copyright</SPAN><BR><BR> <BUTTON id="b0" onclick="m1.beginElement();updateFields();updateBtns();">Start</BUTTON> <BUTTON id="b1" onclick="m1.playList.nextTrack();updateFields();">Next Track</BUTTON> <BUTTON id="b2" onclick="m1.playList.prevTrack();updateFields();">Previous Track</BUTTON> <BUTTON id="b3" onclick="m1.endElement();emptyFields();updateBtns();">Stop</BUTTON> <BR><BR> </BODY> </HTML>
Standards Information
This collection is a Microsoft extension to Synchronized Multimedia Integration Language (SMIL) .
Applies To
t:AUDIO, t:MEDIA, t:REF, t:VIDEO
See Also
Introduction to HTML+TIME