Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

Forums

/

javascript / getplaylist /duration

3 replies [Last post]

I want my playlist (my player is serving up just audio) to display the duration of the tracks in the playlist. I am using the javascript/css interface for displaying the playlist.

I looked at the javascript provided by longtailvideo and figured that I could easily customize it to add a div with the duration. However, it looks like getPlaylist is always returning 0 for the duration.

Is there a way to get the duration of playlist items when the playlist loads -- or does getPlaylist always return duration 0?

getPlaylist doesn't always return duration 0, however, until you've played the file, the duration is 0 unless you've specified it in your playlist XML.

Add a duration value to your playlist XML and you should be good to go.

I mistakenly thought that the player would read the duration from the RSS enclosure tag. If I add a duration tag to an RSS style XML file, will it look for the duration tag? Or will it only do that if the format is declared as XSPF?

The RSS format has no provision for duration.

You can use the jwplayer namespace for the duration in a RSS playlist.

ref: http://developer.longtailvideo.com/trac/wiki/FlashFormats#XMLPlaylists