Custom seek bar
WMPTalk.com Forum Index WMPTalk.com
Discuss Windows Media Player
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web wmptalk.com
Custom seek bar

 
Post new topic   Reply to topic    WMPTalk.com Forum Index -> Windows Media on Web
Author Message
Jeremiah Morrill
Guest





Posted: Sat Jun 19, 2004 1:52 am    Post subject: Custom seek bar Reply with quote

I have WMP embedded within a web page and it reads an asx for the playlist.
The seek bar shows the status of the current clip and lets you seek the
current clip. Is it possible to make the seek bar show the status of its
current time position of the playlist as a whole? It put it simply, I'd
like to virtually create one giant clip with several clip elements.

Back to top
Jim Travis [ms]
Guest





Posted: Fri Jun 25, 2004 11:10 am    Post subject: Re: Custom seek bar Reply with quote

Sounds doable, sure. You'd have to write code to do it. There's no native
support for that.

--
Jim Travis
Microsoft Corp.
Windows Media Player SDK

Download:
http://msdn.microsoft.com/library/default.asp?url=/downloads/list/winmedia.asp

Latest online:
http://msdn.microsoft.com/library/en-us/wmplay/mmp_sdk/windowsmediaplayer9seriessdk.asp

Please do not send email directly to this alias as this alias is for
newsgroup purposes only. This posting is provided "AS IS" with no
warranties, and confers no rights. You assume all risk for your use. © 2004
Microsoft Corporation. All rights reserved.

"Jeremiah Morrill" <jmorrill@smartconnect.net> wrote in message
news:u2CbB6XVEHA.3512@TK2MSFTNGP12.phx.gbl...
Quote:
I have WMP embedded within a web page and it reads an asx for the
playlist.
The seek bar shows the status of the current clip and lets you seek the
current clip. Is it possible to make the seek bar show the status of its
current time position of the playlist as a whole? It put it simply, I'd
like to virtually create one giant clip with several clip elements.

Back to top
Neil Smith [MVP Digital M
Guest





Posted: Fri Jun 25, 2004 10:08 pm    Post subject: Re: Custom seek bar Reply with quote

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.


Back to top
 
Post new topic   Reply to topic    WMPTalk.com Forum Index -> Windows Media on Web All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Microsoft Office Forum New Topics
Powered by phpBB