stop() function seems to have changed
Last post 05-09-2008 4:25 PM by VariousArtist. 4 replies.
Sort Posts:
05-01-2008 7:12 PM
stop() function seems to have changed

The javascript stop() function seems to behave differently now with the new Silverlight player than it used to. Previously, using the command to stop a MediaElement would return a video stream to the beginning (in the case of a finite non-live stream) and leave it in a stopped state. Now the command returns the stream to the beginning and RESTARTS the stream.

Is this really a change in the Silverlight player or is there another explanation for my perception of this new behavior?

How can I return a finite non-live stream to the beginning without also restarting it?

Thanks!

rumremix

Joined on 10-19-2007
Posts 41
05-02-2008 6:27 AM
Re: stop() function seems to have changed

I expect something else is going on like you have an event (likely something like a Completed event on a Storyboard) that is firing after you've stopped it.  Silvelright 2 hasn't changed thie behavior.

(If this has answered your question, please "Mark as Answer")

Shawn Wildermuth
C# MVP, MCSD, Speaker and Author

Silverlight 2 Workshop
May 12-14, 2008 - Atlanta, GA
May 28-30, 2008 - San Francisco, CA
http://www.silverlight-tour.com

swildermuth

Joined on 10-13-2003
Atlanta, GA
Posts 1,058
05-02-2008 1:54 PM
Re: stop() function seems to have changed

That is possible but I will say this...an application I launched in January behaved correctly until recently, that is, the "stop" button returned the stream to the beginning in a stopped state. Then recently, hitting the "stop" button instead restarted the stream from the beginning. I made no changes to the code in the interim and I A-B'd my original code with that on the server to confirm no one else did. I since went in and changed the player.stop(); function to player.pause(); Now at least users can stop the stream without refreshing, closing the browser, or navigating away.

And if there is another process that is restarting the stream, I've not yet been able to discover what it might be. In any case, something changed other than the code. Is it possible that a property of the stream itself changed?

And just to confirm...stop(); should NOT restart the stream. Correct?

rumremix

Joined on 10-19-2007
Posts 41
05-03-2008 4:11 AM
Marked as Answer
Re: Re: stop() function seems to have changed

It shouldn't but the behavior might be bugged in streams (versus downloaded media). I couldn't get this to happen with my streams so I am not sure what to say.

(If this has answered your question, please "Mark as Answer")

Shawn Wildermuth
C# MVP, MCSD, Speaker and Author

Silverlight 2 Workshop
May 12-14, 2008 - Atlanta, GA
May 28-30, 2008 - San Francisco, CA
http://www.silverlight-tour.com

swildermuth

Joined on 10-13-2003
Atlanta, GA
Posts 1,058
05-09-2008 4:25 PM
Re: Re: stop() function seems to have changed

Something has definitely changed, outside of my application, because I'm getting different behaviour on on something that works differently now when I have not made any changes to it.  That is, if the media element points to an ASX file that has an issue (e.g. the video is unavailable) it just gets stuck in "Opening" and never returns an error nor timeouts.

 See this thread for more on this:   http://silverlight.net/forums/p/15147/52309.aspx

VariousArtist

Joined on 10-16-2007
Posts 23