locked
markerReached Event Firing RRS feed

  • Question

  • I would be interested to know how markerReached Event firing is designed to work in connection with audio and video files. If I’m correct in my view that there’s a problem with it as it works now I would also be interested to have ideas for best practices for avoiding that problem. 

    I have an .wma file, which I load into Silverlight 1.0 Beta. This file is encoded with a number of markers using Expression Media Encoder of course. If I (as a user) allows the audio file to run unstopped from start to finish, the markerReached event is fired exactly as I expect them to fire. Each event is fired when the marker is reached, and it’s fired only once. I'm using the progressive download method.

     

    If I (as a user) have the playback paused after reaching say one or two markers, and then continue to play it, the markers that have already been reached before the pause are fired again, and the actions (animations) I have programmed for each event are repeated. This looks awkward to the user, and I have a hard time accepting that this is as designed. To me it rather looks like a bug. Can someone tell me if I’m right or wrong in this.

     

    If this is as designed, I need a method to avoid this repetition of markerReached events. (Of course, this is also true if it is a bug, at least as long as the bug remains.) My present solution is to set up a global boolean variable (ex: markerReached1Done) with false as its default value for each of these events, changing the value to true when the event has fired for the first time and the event handler has performed the action. Of course, the actions are performed only if the value of the variable is set to false.

     

    Is there a better way which I haven’t found yet? And, most important, is this a bug or as designed?

     

    Regards

    /Per

     

    Wednesday, July 18, 2007 11:47 AM

Answers

  • Per and I have been chatting offline -- providing me with a repro (sadly one of our own samples :-)).  I've tested on more recent builds and the problem does not exist, so right now it appears to be a bug that was identified and fixed...i'll monitor it after the release candidate comes out.

    Thursday, July 19, 2007 5:10 PM

All replies

  • hi per, i just tried a quick repro and couldn't -- do you have a sample hosted somewhere we could look at to see?

    Wednesday, July 18, 2007 12:47 PM
  • Per and I have been chatting offline -- providing me with a repro (sadly one of our own samples :-)).  I've tested on more recent builds and the problem does not exist, so right now it appears to be a bug that was identified and fixed...i'll monitor it after the release candidate comes out.

    Thursday, July 19, 2007 5:10 PM