Oct. 23, 2009Edward Spiegel
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?
Oct. 23, 2009Zachary Ozer
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.
Oct. 23, 2009Edward Spiegel
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?
Oct. 23, 2009hobbs
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
Here are some helpful links to learn more about the JW Player™:
Earn money with ads from LongTail's AdSolution. Watch our demos and sign up now!
If you don’t buy a commercial license, you cannot use a JW Player™ on (i) a site that has ads; (ii) a corporate site; or a (iii) CMS. Our licenses are very inexpensive, so what are you waiting for? Buy a license today.