Note that there are some explanatory texts on larger screens.

plurals
  1. POBug? Netstream won't resume after an inital pause then seek
    primarykey
    data
    text
    <p>I'm experiencing some strange behavior for which I can't find any documented knowledge.</p> <p>Here's what is happening:</p> <p>After calling the play() method, a netstream is paused when the NetStatus code is "NetStream.Play.Start". This disables the default behavior of automatically playing. Before resuming with <em>either</em> togglePause() OR resume(), perform a seek operation. When you attempt to resume with togglePause() or resume(), the netstream will not start playing again.</p> <p>If you just immediately pause() then resume() without a seek() in between, it resumes fine.</p> <p>Also, if you delay the initial pause by about 250ms, you can then seek() and subsequently resume() with no problems.</p> <p>I posted a demo and source here: <a href="http://drinkspiller.cannonballinteractive.com/temp/ResumeAfterPauseAndSeek/" rel="nofollow noreferrer">http://drinkspiller.cannonballinteractive.com/temp/ResumeAfterPauseAndSeek/</a></p> <p>The code is the example code directly from the AS3 docs for NetStream with minor additions to handle the initial pause and handle the seek and resume buttons. There's not much to it.</p> <p>Note that I am pausing by calling stream.seek(0) then stream.pause(); This ensures the first frame shows in the Video instance instead of nothing. The same behavior occurs without stream.seek(0) and only using stream.pause() to stop playback.</p> <p>I've also tried delaying the call to startPaused(); until the buffer full event code but the behavior is the same.</p> <p>Can anyone help me find a sensible workaround or confirm for me that this is a bug? Many thanks!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload