-
NetStream seek fails, any idea what's up?
So i've got a short video clip that users can navigate with a standard scrub bar:
http://www.chron.com/common/mm/07/iss/index_1.html
(please forgive the loading time, it doesn't display until the whole 4MB flv is loaded)
But often seeking fails and the whole thing breaks. I've tried to detect an error using NetStatusEvent.NET_STATUS, but I don't get any errors about seeking failing. Just NetStream.Buffer.Full and NetStream.Buffer.Flush. Has anyone else run into this? I tried encoding the FLV with fewer keyframes, and while it reduces the problem the piece still encounters the same breaking eventually.
I've traced the scrub's position, and it's not passing NaN or anything of the sort to ns.seek.
Thanks!
Jared
-
Still struggling with the same problem. I'm able to get it to throw an error when seek fails. After the error I tried to get it to clear video child and start fresh, but it doesn't work:
PHP Code:
private function replayFLV():void{
removeChild(getChildByName('myVideo'));
_video = null;
_video = new Video();
_video.name = "myVideo";
_stream = null;
_stream = new NetStream(connection);
_stream.play(_file);
Client = null;
Client = new Object();
Client.onMetaData = onMetaData;
_stream.client = Client;
_video.attachNetStream(_stream);
_stream.addEventListener(NetStatusEvent.NET_STATUS, onNetStatus);
_stream.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
_stream.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
addChild(_video);
}
-
I'm able to return an error from NetConnection:
PHP Code:
NetStream.Seek.InvalidTime
NetStream.Play.Stop
So you'd think I could just restart the steam with _stream.play("file.flv"); or _stream.seek(0). But neither (or the combination) works, it just freezes on the last frame that worked. If someone can figure out how to get the stream to restart I will happily PayPal you some cash.
-
Senior Member
I'm assuming this same function is what's being called from your metaData handler method? Or how is this being called? Is there a reason you're setting the video and netstream to null and re-instantiating them rather than just using an Event.COMPLETE handler on the video and seeking back to zero when that event fires?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|