Neil Smith [MVP Digital M
Guest
|
Posted:
Fri Jun 25, 2004 10:08 pm Post subject:
Re: Custom seek bar |
|
|
I think the difficulty would be knowing in advance the overall length
of the playlist.... WMP can tell you the length of the clip a few
moments after it begins (poll the clip to check for play/pause
isAvailable).
The way I see it it's a great idea, but your ASX file doesn't contain
duration information.... thats not to say you can't use it :
Lets say you create a dynamic ASX file (one created on the server from
a scripting language like ASP(.NET), C# or PHP).
You can add custom values to that ASX file if desired, but my route
would be to use existing syntax, and add the <DURATION
VALUE="hh:mm:ss.fract" /> tag to each REF / ENTRYelement in the ASX
file.
Now with a bit of luck, you can use scripting to extract those values
form the ASX file you have loaded, and sum them to get an overall
value for the length of the playlist. Let's say you're using
javascript client side :
To do this you would load the ASX file into the player, check for
success then iterate the nodes in the ASX file using
player.currentPlaylist.item(i)
You'd get the length of the playlist using (standard):
player.currentPlaylist.length
So lets say, another loop (use j this time) :
var attribname=player.currentPlaylist.attributeCount
var attribname=player.currentPlaylist.attributeName(j)
then get the value using
var durationstring=player.currentPlaylist.getItemInfo(attribname)
Finally, convert the string to a duration in seconds using the usual
strong / date techniques in javascript
That should give you a head start, let us know how you get on !
Cheers - Neil
On Fri, 25 Jun 2004 00:10:45 -0700, "Jim Travis [ms]"
<jtravis@online.microsoft.com> wrote:
| Quote: | Sounds doable, sure. You'd have to write code to do it. There's no native
support for that. |
|
|