-
pausing the buffer on flash video
Hi guys here's the problem, I have a video streaming in with a 10 second buffer. I have a button on the player that opens up a side panel and loads in some images. When the user clicks on this button i need to pause the buffering to free up bandwidth.
What ever is currently buffered will continue to play but nothing new will buffer until i'm done loading the images.
so how do I pause the buffering? I can't figure it out pls help!
-
Senior Member
can't you write an if statement to change the number of seconds on the buffer to drop down to zero or pause the video untill the pictures load? I mean its definately possible to pause the video if its truly streaming with netStream.pause();
-
That's the problem, setting the buffer to 0 just means the movie plays immediately as it streams in and netStream.pause(); stops the playhead while the movie still streams in.
do u know a way to stop the movie from streaming in while what ever is buffered continues to play?
-
Senior Member
well what i mean is after it buffers for say the first 10 seconds then after the 10 seconds you set the buffer to zero it will continue to play then after the pictures load set it back to a 10 second buffer.....I think it can be done with some result but if you don't pause it I have a feeling you will still be using bandwidth because it will just directly stream without buffering I think the only way to stop using bandwidth is to actually stop the netstream.......I could be wrong though tell the buffer to goto 0 then to go back to 10 after the pictures have loaded and pay attention to the bandwidth the entire time then let me know what happened ....defiantely be intresting to know......there is a remote chance that you could cache the video too and then play the cache while the pictures load <<<<really not sure about that though.
-
I'm not sure if you really need to stop the buffering, Flash will try to load the movie and the images at the same time, and unless they're huge images or the user is on a really slow connection, it shouldn't make a huge difference.
That being said, you could try using Netstream.close() and then when you resume play do Netstream.play (to resume downloading the clip) and then Netstream.seek() to jump back to where you were in the video.
-
Flashmatics
sometimes even closing the netstream object does'nt stop it from continuing to download... there's a trick u can use to stop it i.e try to play a non-existent flv e.g
Code:
ns.play("thismoviedoesntexist.flv");
-
Flashmatics
sometimes even closing the netstream object does'nt stop it from continuing to download... there's a trick u can use to stop it i.e ask it to play a non-existent flv e.g
Code:
ns.play("thismoviedoesntexist.flv");
-
Senior Member
thats a good idea silent!
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
|