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


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

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

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

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.0 :: Video Class Vs. FLV Playback Using NetStream?

Sep 17, 2008

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?

View 2 Replies

ActionScript 3.0 :: Detect What Events Have Been Attached To A Movieclip?

Mar 23, 2009

Is there a way to detect what events have been attached to a movieclip?

I want to remove an event listener only if it has been added, and add it only if it hasn't been added yet.

View 1 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 :: [FMX] Attached Sound Isn't Working

May 1, 2004

I have the following problem. I have a attachSound for three wav files in the library. This is the code:

Code:
song1 = new Sound();
song1.attachSound("song1");
song2 = new Sound();

[code].....

This is also working.When I press the button the music stops. When I press the song1 button, song1 start playing again. But when I press on of the othet two buttons nothing happens. This is the code for the buttons:

Code:
on (release){
_root.mc_menu.song1.start();
_root.mc_menu.song2.stop();
_root.mc_menu.song3.stop();
}

View 5 Replies

ActionScript 2.0 :: Attached Movies Not Working

Sep 20, 2006

why the attached movies when they are bigger than the stage go to the next line but tahy stay all in the same location

[Code]....

View 4 Replies

ActionScript 2.0 :: [FMX]Attached Sound Isn't Working?

May 1, 2004

I have the following problem. I have a attachSound for three wav files in the library. This is the code:

Code:
song1 = new Sound();
song1.attachSound("song1");

[code]...

View 5 Replies

ActionScript 2.0 :: OnRollOut Not Working On All Attached Clips

May 21, 2007

i'm trying to make this little news section and for some reason the rollover and rollout works only on the last news itemClip to be attached. you can take a look at it HERE and see that the bottom one is the only one working.[code]

View 3 Replies

ActionScript 3.0 :: H.264 .mov And NetStream.seek Not Working?

Apr 6, 2009

When working with MOV files using the h.264 codec and AAC sound I am unable to get netStream.seek to work correctly. No matter what argument I pass to netStream.seek it will always seek to 0. I have this problem on both a legacy as2 and a newer as3 video player I have built. Regular flvs work perfectly on both players.

View 1 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

Professional :: CuePoints Not Working Properly Netstream?

Jul 15, 2010

Im trying to get cuepoints working on an old as2 project.I have a netstream video component and want the cuepoints embedded in the FLV to trigger buttons to appear. I have embedded them as Event Cuepoints. 
 
ns.onCuePoint = function(infoObject:Object){    trace(infoObject.name);    if(infoObject.name == "CP1") {         trace("yes working");    }}; 

[code]...
 
This shows all of the cuepoints within the FLV. I cant figure out how to change the code to trigger actions WHEN the FLV hits a Cuepoint.

View 2 Replies

ActionScript 3.0 :: NetStream Play Complete Still Not Working?

May 2, 2008

Hoped this would ave been fixed in as3 but this event does not always get triggered. Seems to be related to the encode. Anyways I would like to see others approach to this issue.

Currently I have place a condition in the NetStream.Play.Stop event to check if the ns.time is > the duration-1;

[as]
if (ns.time > duration-1){
playing = "complete";
}
[as]

I have noticed this does even work consistantly unless I change it to ns.time > duration-2.

View 1 Replies

ActionScript 2.0 :: NetStream.Buffer.Empty Not Working?

Jun 25, 2009

I have 9 videos in a gallery. Each one gets displayed in a custom video component. When you navigate to watch a new one a new NetStream is setup.I have 2 problems. Basically if you don't watch the video right to the end and when you select and watch a new one:1. a "buffering video" movieclip does not display correctly (or at all) indicating that NetStream.Buffer.Empty isn't working properly (maybe its referencing the previous movie ???).2. when the next movie is buffered and starts you hear a little split second glitch of sound (which sounds like its from the previous movie).

both these problems seem to indicate that in some way the previous movie is still lingering around and in some way needs to be 'flushed' away so that on the next movie the code to display the 'buffering video' message works properly and you don't get this legacy remnant of sound for a split second.At the beginning of the code for each movie I have placed:

ns.pause();
player.clear();
ns.close();

[code]........

View 0 Replies

ActionScript 3.0 :: [Q] FMS2 NetStream Publish Not Working?

Jul 28, 2007

I am trying to create a simple online recording via FMS2

Here is my coding:

Code:

NetConnection.defaultObjectEncoding = ObjectEncoding.AMF0;
var nc:NetConnection = new NetConnection();
var ns:NetStream;

[code].....

WHen I try to record a video via my cam (click the button "btnRec"), ... no error message comes up, but there is no FLV file (it should be "videoName.flv") has been generated in rtmp://localhost/test ?

View 2 Replies

ActionScript 2.0 :: Flash8 - OnRelease Functions Not Working With Attached Button?

Jan 12, 2010

I'm loading an item to the stage and trying to apply a function to it but it doesn't seem to work.

Code:
_root.attachMovie("FullScreenBTN","FullScreenBTN",_root.getNextHighestDepth());
_root.FullScreenBTN.onRelease = function(){
trace("test")
}

When I press the button nothing happens, but when I remove the attach code and just put the button on the stage with the appropriate instance name it does work.

View 5 Replies

ActionScript 2.0 :: F8 Play / Pause Clip Not Working With NetStream

Feb 6, 2009

I've got a play/pause movie on my timeline to control an FLV via NetStream. The idea is to switch from a play symbol to a pause symbol, but it's not working.[code]Clicking on the clip will start and stop the flv just fine, but the symbol switch doesn't happen. When I take out the ns code, just to check and see if the switch will actually work, there's no problem.What am I doing wrong? How can I get my clip to change from a play to a pause symbol?

View 1 Replies

ActionScript 3.0 :: MOV Files - NetStream.Seek Not Working Correctly

Apr 6, 2009

When working with MOV files using the h.264 codec and AAC sound I am unable to get netStream.seek to work correctly. No matter what argument I pass to netStream.seek it will always seek to 0. I have this problem on both a legacy as2 and a newer as3 video player I have built. Regular flv work perfectly on both players.

View 1 Replies

Media Server :: NetStream.Play.StreamNotFound Not Working?

Aug 3, 2011

I would like to have the possibility to detect when NetStream is not working (i.e. the name used in initialization can't be found on the server side). The StreamNotFound doesn't work at all. I've read that it's the fault of the Flash Media Server, which automaticaly creates new stream, if it cannot be found (of course it's an empty stream - what is wrong from my point of view). Is it true? If yes, can I disable it on the server side, so I could easily detect if the stream name is correct?

View 8 Replies

Actionscript 3 :: Netstream.seek() Not Working For MP4 Videos In Flash

Mar 11, 2011

I am implementing a video player in Actionscript and I need to be able to define the starting play time for the videos. Netstream.seek(pos) works for flv files but fails for H.264 files (the player starts playing the video from the beginning). Anyone knows what might be the problem? (I am using Netstream for this instead of adding a parameter with the starting time when I call the Netstream.play method because I don't have Flash Media Server).

View 2 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

Actionscript 3.0 :: Using External Swf AND Netstream Video?

May 28, 2010

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]

View 1 Replies







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