prevTrack Method (playList, t:MEDIA, t:PAR, ...)

HTML (DHTML)

prevTrack Method

Internet Development Index

Sets the media-playing container to the previous track, or playItem object, in the playList collection and begins playing that track.

Syntax

object.prevTrack()

Return Value

No return value.

Remarks

Using this method on the first track in the playList causes that track to restart.

Example

<HTML XMLNS:t="urn:schemas-microsoft-com:time">
<HEAD>
<TITLE>nextTrack and prevTrack Methods</TITLE>
<?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" begin="0;indefinite;"
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>
</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 method is a Microsoft extension to Synchronized Multimedia Integration Language (SMIL) Non-Microsoft link.

Applies To

playList, t:MEDIA, t:PAR, t:REF, t:SEQ

See Also

Introduction to HTML+TIME, activeTrack, nextTrack