Actionscript 3 :: Stop Video And Detach NetStream?
Oct 5, 2011
i have video streaming from the server, and later on i want to add another one just side by side. thats all good, i done that. Now my problem comes when i want to remove video. I manage to remove it from display, but i can hear that video is still playing in the background. So how do i can stop streaming that video?here is my code for setting up the video:
ns = new NetStream(connection);
ns.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler);
ns.play(item[1].toString() + ".flv");
Video broadcast using VLC to flv file. I am using the NetConnection, NetStream and Video to play it in a flash. In Chrome and IE everything works fine, but in Firefox and Opera NetStream often dispatch event NET_STATUS with info.code = NetStream.Buffer.Flush and NetStream.Play.Stop and video is a slowdown.
The stop button plays as expected. The play/pause button plays as expected. The issue is when you press pause which will cause the play button to appear, then press stop. the video automatically plays and it shouldn't. I have bolded the control button script for convenience.
I'm able to attach a webcam and get video, but I can't turn it off via code, or at least what I'm trying doesn't turn off the webcam light on my MacBook.[code]...
I have a website that plays video1 when it opens. When you navigate to next page the video stops. One of the buttons on the second page plays video2. The problem is that video 2 won't stop using the same command that made video1 stop.
i have a video object on my stage and i make it play by using ns.play();However, when i want to stop playing by ns.close(), i see from httpfox that streaming doesnt stop but continues.is there any way to really stop steaming anytime i want?it is same when i use FLVPlayback component. when i assign path to its source attribute, it starts streaming without saying it to play..
I'm streaming mp3 on flash media server 3.5 on linux version, and very often come accross with that problem, when the buffer.length become 0 on client side, the streaming will stop with NetStream.Play.Stop event, and will not be continued. I think this case it should wait always till the data arrives and never should stopping. Some more info : I tested on applications/live folder, and the mp3 files are created dynamically during the playing, and the creation speed is almost the same like the playing speed, so those are not fix files.
Is anyone having trouble with Chrome getting NetStream.Play.Stop early in Chrome? Seems to fire around the time the buffer has filled. Same code is and has been working fine in all other browsers for some time.
i have application that streams videos from fms .i try to play video of 240 seconds, but when playback reaches 180 seconds i got NetStream. play. stop . it happens regularly at the same time.why does it happen? is it encoding of the video??
I'm making a video player in AS3 and was wondering how to find out how much of the video is currently cached/buffered. I'm not sure what the correct terminology is, so I haven't been able to find it in the documentation.
NetStream.time gives me the current location of the video, so based on that I can display a progressbar.
Underneath the progressbar, I want to display how much of the video has been loaded already. How do I find this value?
Using netstream to load in a video and have the buffer to basically load the entire video before it starts playing. So the video doesn't begin to play until the buffer is full but while the buffer is filling up, the cue points are being read and triggering actions.
my website contained some flvīs netstream. everything works fine!now i want to switch between some external swf and my netstream.. but it doessnīt work!.[code]
I am new in AS3.I am using net stream video player with xml. How can i get videos dimension (Width and Height).if suppose i get the dimension of the video and i will change the video size with aspect ratio.
I am trying to load video using NetStream. I am able to do this by using the Video Class, but is it possible with the FLV Playback? I would like to add a seek bar so people can scroll the video if they want to.
I know the FLV Playback Component has this built in so I would use it BUT I can't load a stream to the FLV Playback, I can only set it's source. This works fine, but it doesn't allow me to unload it, the sound keeps playing, which is why I ended up using the NetStream instead.
So I have 2 questions. 1) Is it possible to load the NetStream to the FLV Playback component? 2) If not, how do I add the seek functionality to my Video Class?
Is there something i can check to see if a NetStream Video is a live stream? I have a DVR app, need the player to snap to live point (if it is live - seek(100000) ? or start from the begining if a recorded video - Ideall a boolean if the stream is live or not...
I'm using the netstream and video object to play a video in flash. Specifically a mp4 video.
What I'm trying to do is start playing the file from a specific position (Ex. 20seconds).
However with netstreamObject.seek(20) doesn't work unless the stream has been loaded past 20seconds. Is there a way to specify starting to load at 20s? Or any other way of accomplishing this?
I'm loading flv file using Video and Netstream (trivial example from docs). On Flash player 10.1 everything works fine. On 10.0.2.54 everything stops on NetStream.Play.Start.
I am using Flash Pro CS5.5 to create a video player for the iPad. I can get it to work locally, but when I test it on the iPad, it cannot open the video file. The video file is included in the package file. Is there a trick to referencing a video in the package? Here's what I am trying:
var nc:NetConnection = new NetConnection(); nc.connect(null); var ns:NetStream = new NetStream(nc); ns.play("myvideo.mp4");
just wondering if it is possible to play an FLV and attach the video from that netstream to another and publish it to FM2.
is there a a way to attach video and audio from one netstream to another? i have tried everything so far that i know of. when i think its attaching and publish it, i see nothing. publshing my cam and mic work flawlessly.
here's my code:
Quote:
nec = new NetConnection(); nec.connect(null); nes = new NetStream(nec); nes.play("http://testbox/transformers.flv");
I need help creating a video player which will load only 60 seconds of video from an external flv file which can be of any length (more than 60 seconds). I am able to play only 60 seconds of video but the player buffers the entire video which results in loss of bandwidth.
I am doing video.attachNetstream(ns) in the videoContainer's parent movieclip. How do I access the netstream object of the video inside the container. Basically, I want something like this : video.getNetstream(). Does any equivalent exist?
I'm sure this is a simple question, but I just can't crack it. In my video player I want to detect if the current status is playing or paused. But I can't figure out where this info comes from. Is it a property of the ns object?
I am experiencing an issue with playback on RTMPE streams. after investigation it seems that the FMS server is firing the NetStream.Play.Complete message at random points, indicating that a stream has ended. This is happening and random points during the stream, not even close to the end.[code]As you can see roughly 17mins into playback...although the stream is 1 hour 24mins long.I have tested this numerous times, and each time it is at a different point in the stream.Intermittently the NetStream.Play.InsufficientBW warning is being fired prior to NetStream.Play.Stop.I am using a player built on OSMF 1.5
I have an external video that I have attached through NetStream and it works okay, however I have another one that is longer and not working at all. That file is set up exactly the same as the one that is working, so I don't know what's wrong with it other than perhaps the file is too large to handle that way?
I simply want to move a video forward and backword when it is already playing, but the seek method is not working properly. I can't figure out, where the problem is.I have two buttons (pluz_btn and minus_btn). Plus button is used to move half second forward and Minus button is used to go back half seconds.The plus button is working but it is showing about is moving the video to about 3 seconds.The minus button should move video backword. But it is also moving it forward.[code]......