Is it possible to tell what file to play from the playlist other than the order in the XML file?
I need to play a specific file, index number would be fine.
Is it possible to tell what file to play from the playlist other than the order in the XML file?
I need to play a specific file, index number would be fine.
The playlist is an object with track objects in it, each of which has an index number. So it seems that index number would be the same as the order in the playlist.
How about something else, like title. Grab the playlist from the player, look through it until you find a match, play that item.
API Documentation. http://developer.longtailvideo.com/trac/wiki/FlashApi
Lots of code already posted on the Forum. Google "site:longtailvideo.com play item by title"
Something like this.
// play item by Titlefunction playIt(playItem)
{
playlist = player.getPlaylist();
for(var j in playlist)
{
if(playItem == playlist[j].title)
{
player.sendEvent('ITEM', j);
}
}
};