Actionscript 3.0 :: Detect If NetStream Video Is Playing Or Not

Feb 11, 2010

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?

View 4 Replies


Similar Posts:


ActionScript 3.0 :: Detect If A NetStream Video Is Live?

Jul 29, 2010

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...

View 9 Replies

NetStream Class - How To Detect If Working Video Attached

Jul 31, 2011

I'm building a video chat in flash and everything works really well, except for the part where I'm trying to detect if the other user is sending a working video stream. There's a couple of reasons why the other user isn't sending video.
-The other user got no camera
-The other user got a camera, but the camera is currently being occupied by another application(Skype, Photo Booth, Google Talk, etc.)
-The other user got a camera but hasn't allowed the use of his/hers camera.
(Other unexpected problems I guess...)

So how do I detect if the stream I receive from the other user is a black stream(because of the reasons above) using the NetStream class? The closest thing I have came up with is by adding a timer that polls the currentFps() function from the stream I receive from the other user. But so far this seems pretty unreliable because I might get currentFps() == 0 and show an error because of this even though I actually got video from the stream in some cases. The reason for this is because I poll the API every 4 seconds for the currentFPS function and let's say at 00:00:04 I get "no video" according to the poll but at 00:00:05 the video kicks in, and therefor I need to wait until the next tick until the error message disappears

This is what my current poll looks like
function subscribingStatusPoll(e:TimerEvent):void {
if (subscribingStream.currentFPS == 0){
error.text = "No video found from the other user...
} else {
error.text = "";
}}

This is the only hack I that I can come up with to detect this, but this is unreliable and I actually would prefer a way to instantly detect if the stream I receive got a working video attached to it.

View 2 Replies

AS3 :: Flash - Detect NetStream Events With Video Object (not Component)

Jan 11, 2010

I have created a FLV video player using the AS3 flash.media.Video object (not the FLV playback component) and I am trying to listen for meta events and Cue Points embedded in the FLV video but I am not receiving any when I trace the movie. The cue points are not being created dynamically, they are in the FLV video.

Video embed code:
// Initialize net stream
nc = new NetConnection();
nc.connect (null); // Not using a media server.

[Code]....

Is there anything I am missing have wrong to capture events from my net stream?

View 2 Replies

Actionscript 2.0 :: How To Detect When Video Finished Playing To Play Next Video

May 31, 2010

How can I detect when a video has finished playing a.k.a stopped playing, so I can tell flash to play the next video in an array?

This is my code:

Code: Select allvar x:XML = new XML();
x.ignoreWhite = true;
var urls:Array = new Array();

[code]....

View 1 Replies

Actionscript 2.0 :: Detect When Video Finished Playing, To Play Next Video?

Aug 17, 2009

How can I detect when a video has finished playing a.k.a stopped playing, so I can tell flash to play the next video in an array?

This is my code:

Code: Select allvar x:XML = new XML();
x.ignoreWhite = true;
var urls:Array = new Array();
var desc:Array = new Array();

[Code]....

View 1 Replies

Flex :: Detect When A Remote Client Has Started/stopped Streaming Video Over His NetStream With RTFMP ?

May 1, 2011

Am building a video chat application and i was wondering if there are any native events for the NetStream that fire,that can help in detecting when a remote client starts/stops streaming video over his outgoing stream (NetStream) to which the other client has subscribed over P2P/RTFMP in AS3 ?I maybe able to dispatch custom messages since the two clients are already connected, but i don't want to add the extra overhead.

View 1 Replies

Actionscript 3 :: Detect When A Flash Video Is Playing / Not

Jan 21, 2011

I have a NetConnection attached to a NetStream, which is in turn attached to a Video. As you can guess, this is a video player. I've looked through the public properties of all three classes and could not find an "isPlaying" property - a boolean that would tell me video is currently running (and not paused, stopped, nor corrupted). [code]...

View 2 Replies

Detect Latency When Playing Live Video Streams From FMS?

Sep 25, 2010

Because of network latency,there will always be latency, how to know how many seconds the latency is with ActionScript?

View 2 Replies

Javascript :: Detect Time On A Playing Flash Video?

May 13, 2010

I have a video playing on my page. I want to show and hide some div's when the video reaches a certain point. Lets say hide something on 10th second and show it again on 20th second.I can easily do it in HTML5 with video tag and currentTime attribute but for IE I have to create the same functionality and I think with flash based videos (from YouTube or something like that).Is there a way to detect the current time of a video playing on my website, embeded from YouTube, Metacafe or any other video sharing site?I know I could detect it in flash and make it run some JavaScript function but I don't have flash nor have the skills to do it in AS3.

View 2 Replies

ActionScript 2.0 :: Detect Which External Flv Is Playing In A Video Array?

Apr 8, 2011

I'm using a video array to load external flvs randomly for a movie quiz game I am building. Is there a way to code my actionscript so that I can identify which flv is playing randomly so that I can choose and use a specific animation that is to go with that video?This is my code:


// video array set up
var videoArray:Array = new Array({vid:"question1.flv", ans:"school of rocketeers"},
{vid:"question2.flv", ans:"supermanhattan"},[code]......

View 1 Replies

Actionscript 3 - Detect TCP Connection Close When Playing Flash Video

Feb 15, 2011

On the Flash client side,how do I detect when the server purposely closes the TCP connection to its video stream? I'll need to take action when this occurs - maybe attempt to restart the video or display an error message. Currently, the connection closing and the connection being slow look the same to me. The NetStream object ushers a NetStream.Play.Stop event in both cases. When the connection is slow, it usually recovers by itself within seconds.I wish to only take action when the connection is closed, not when it is slow.Here's how my general setup looks like. It's the basic NetConnection->NetStream->Video setup.

this.vidConnection = new NetConnection();
this.vidConnection.addEventListener(AsyncErrorEvent.ASYNC_ERROR, this.connectionAsyncError);[code].....

View 2 Replies

ActionScript 3.0 :: Error: "NetStream.Play.StreamNotFound" While Playing Mp4 File Using NetStream Object?

Jan 7, 2010

I am using NetStream, NetConnection and Video object to play an mp4 file which is hosted over a web server using http.This is an AIR application and the relevant code is pasted below:

var url:String = <some http url>;
connect_nc = new NetConnection();
connect_nc.connect(null);

[code]........

View 0 Replies

ActionScript 3.0 :: Detect Cuepoints Playing From FLV Movie That Is Playing From FLV Playback Component?

Oct 9, 2009

I was wondering, what was the best way to for actionscript 3.0 to detect cuepoints playing from a FLV movie that is playing from an FLV playback component?

View 1 Replies

ActionScript 3.0 :: Detect When A Playing Audio File Has Reached The End (stops Playing)?

Aug 31, 2009

I have some animation (programmatic, I'm NOT using keyframed animation in timeline), and some music I want to play in the background. Once the music file reaches the end (about 30 seconds long), I want to trigger the end of the animation functions.I figure I could either use an actionscript timer to trigger the end of the animation or a keyframe with actionscript that is placed on the timeline near the end of the song but these methods assume knowledge about the duration of the wave file. If I changed the framerate or updated the external wave file, these triggers would possibly no longer sync upIs there some sort of event listener or other detection method for an audio file to signal it has finished playing? Or maybe there is a way to get the duration of the audio file to use in the timer

View 3 Replies

ActionScript 3.0 :: Can't Detect When Netstream FLV Stops

Sep 10, 2009

I want to detect when my FLV stops and jump to another video. How can I do this? My current code is: The first video plays fine, but it just stops when it is done.

// Setting up my netstream and playing my video
var nc:NetConnection = new NetConnection();nc.connect(null);var ns:NetStream = new NetStream(nc);ns.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler);var vid:Video = new Video(320,

[Code].....

View 12 Replies

ActionScript 1/2 :: NetStream Video Control Button - Play Video Automatically

Jul 18, 2011

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.

[Code]...

View 1 Replies

ActionScript 2.0 :: Playing FLV From Dynamic URL Using Netstream

Mar 14, 2008

I have a URL that dynamically serves an FLV file or GIF file at different times.

For example, if I put [URL] in my browser, and the server happens to serve an FLV file at that time, the browser will ask me to download the FLV file. If the server happens to serve a GIF file at that time, the browser will display the GIF. Basically [URL] will generate dynamic file content.

In my actionscript I have the following code (assume the video object, netconnection, and other initialization are already done):

netStream.play(http://www.myserver.com/path1/var=somevalue);

When the URL serves an FLV file, the video plays successfully in my flashplayer.

Note that the *actual* FLV file is not specified, only the path that is supposed to contain it. I haven't seen any example of this before, but it works when I try it.

Problem: If the URL happens to serve a GIF, my flashplayer stalls.

Question:

How can I detect that the URL served a GIF? (so that my player can recover) I tried checking if an onStatus event was fired (I'm expecting NetStream.Play.StreamNotFound), but there doesn't seem to be any. It looks like the netstream object did not react to the wrong input.

View 3 Replies

ActionScript 3.0 :: Fetch NetStream Meta Without Playing?

Nov 30, 2011

Is there any way to get a NetStream's meta from FMS other than starting playback?I want duration, framerate, etc. before the movie starts playing.

View 1 Replies

Flash :: NetStream Only Playing When Fully Loaded?

Feb 9, 2012

I've been searching for this for a while, and either my google-fu is weak or there is no easy to find answer yet...

I am using a NetStream to stream a video file from anywhere. The NetStream is NOT connected to any server. Here is the code:

// Create new connection and stream
_netCon = new NetConnection();
_netCon.connect(null);

[Code]....

This basically works, of course, but the video always starts playing only when it is fully loaded. It also passes the metadata only then. But the main reason to use a NetStream is so that you can play a video BEFORE it is fully loaded.

I tried playing around with the bufferTime property, but to no avail. Also made sure that there is no caching involved when loading the video. I always load a "new one" by adding some "?bla=date" value behind the url.

Is it possible that the "real" streaming only works when really connected to a server? Or am I missing something else?

View 3 Replies

Flash :: NetStream FLV Movie Playing Way Too Fast?

Mar 14, 2012

I have this little NetStream movie (which I'm not allowed to show, sorry) set up like this:

var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);

[code].....

View 1 Replies

Actionscript 2.0 :: Detecting When A NetStream Has Finished Playing?

Jun 17, 2009

I'm brininging in external .flv's into my swf using the NetStream method, I can't seem to detect when the flv has finished playing so I can reset the buttons in my video playlist.

View 11 Replies

ActionScript 2.0 :: Getting Status Of The NetStream Whether It Is Playing Or Paused Or Stopped?

Jul 22, 2009

how I know the status of the NetStream whether it is playing or paused or stopped

View 7 Replies

ActionScript 3.0 :: Stale Data In Playing NetStream Objects

Apr 27, 2010

I am reusing a NetStream object to play different live streams.

What annoys me is that even though I start playing another stream name on this same stream object, when it is attached to a new Video object after issuing the "play" call, there is stale data after the previous playback. It's NOT the video object obviously, as I already create a new Video object every time I play another stream name on this NetStream object (Video.clear does not work anyway - known player bug).

I can rectify the situation by "resetting" the NetStream object - creating and setting up a new one for each playback, assigning it to the old reference - essentially transparent to the application. The problem is performance - there is the overhead of creating and setting up a new stream object every time. I wish to avoid such overheads.

I wish there was some form of "clear" call for the NetStream class as well...

View 0 Replies

ActionScript 3.0 :: VIDEO Stops Playing, Continue Playing Flash Movie?

Aug 7, 2009

I am loading an external SWF file into my main timeline. The external SWF file contains an FLV video. At a certain point in my main timeline, the SWF file loads and plays the video. Is there a way to say...

If the VIDEO (FLV) is done playing, gotoAndPlay(X)?

View 4 Replies

ActionScript 3.0 :: Detect Swf Has Finished Playing?

Jun 7, 2009

I am using the loader class to load an external swf "cube_final.swf". note I am setting a movie_clip (set on stage) to alpha=0 as I want it to remain invisble until the loaded swf finishes playing. I will then set alpha = 100% .

But how to i detect that the swf has finished playing? I can detect whether its loaded (i'll place a preloader in the loading() function)

this.open_cube.alpha = 0
var introLoader:Loader;
function loadIntro(url:String):void {

[Code]....

View 5 Replies

ActionScript 3.0 :: NetStream Detect Buffered And Not Already Buffered Places?

Sep 29, 2010

i have a video in which I can seek to unload parts (Pseudo-Streaming), the server return the video and it loads it from the requested second,the problem, i don't want to make a new request to the server if a part has already been buffered, here's what I have in mind, but can't achieve

Code:
if(netStream_has_been_download){
//Just run the seek() command

[code].....

View 1 Replies

Actionscript 3 :: Know How Much Of A Video Is Loaded By A NetStream?

Apr 5, 2012

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?

View 1 Replies

ActionScript 3.0 :: Scale A NetStream Video?

Jun 23, 2010

It's a simple video player that opens a netStream which setups a client callback object onMetaData.The size is off when video is scaled.Example 1:

ActionScript Code:
trace("width: " + data.width, "height: " + data.height);
if(data.height > 240)

[code].....

View 0 Replies

Actionscript 2.0 :: Using Netstream To Load In A Video?

Aug 27, 2007

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.

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved