View comments | RSS feed

NetStream information objects

The following messages notify you when certain NetStream activities occur:

Code property

Level property

Meaning

NetStream.Buffer.Empty

Status

Data is not being received quickly enough to fill the buffer. Data flow is interrupted until the buffer refills, at which time a NetStream.Buffer.Full message is sent and the stream begins playing again.

NetStream.Buffer.Full

Status

The buffer is full and the stream begins playing.

NetStream.Failed

Error

An error has occurred for a reason other than those listed elsewhere in this table, such as the subscriber trying to use the seek command to move to a particular location in the recorded stream, but with invalid parameters.*

NetStream.Pause.Notify

Status

The subscriber has paused playback.

NetStream.Play.Complete

Status

Playback has completed.****

NetStream.Play.Failed

Error

An error has occurred in playback for a reason other than those listed elsewhere in this table, such as the subscriber not having read access.*

NetSream.Play.InsufficientBW

Warning

Data is playing behind the normal speed.***

NetStream.Play.PublishNotify

Status

Publishing has begun; this message is sent to all subscribers.

NetStream.Play.Reset

Status

The playlist has reset (pending play commands have been flushed).

NetStream.Play.Start

Status

Playback has started.**

NetStream.Play.Stop

Status

Playback has stopped.

NetStream.Play.StreamNotFound

Error

The client tried to play a live or recorded stream that does not exist.

NetStream.Play.Switch

Status

The subscriber is switching from one stream to another in a playlist.****

NetStream.Play.UnpublishNotify

Status

Publishing has stopped; this message is sent to all subscribers.

NetStream.Publish.BadName

Error

The client tried to publish a stream that is already being published by someone else.

NetStream.Publish.Idle

Status

The publisher of the stream has been idling for too long.

NetStream.Publish.Start

Status

Publishing has started.

NetStream.Record.Failed

Error

An error has occurred in recording for a reason other than those listed elsewhere in this table; for example, the disk is full.*

NetStream.Record.NoAccess

Error

The client tried to record a stream that is still playing, or the client tried to record (overwrite) a stream that already exists on the server with read-only status.

NetStream.Record.Start

Status

Recording has started.

NetStream.Record.Stop

Status

Recording has stopped.

NetStream.Seek.Failed

Error

The subscriber tried to use the seek command to move to a particular location in the recorded stream, but failed.

NetStream.Seek.Notify

Status

The subscriber has used the seek command to move to a particular location in the recorded stream.

NetStream.Unpause.Notify

Status

The subscriber has resumed playback.

NetStream.Unpublish.Success

Status

Publishing has stopped.

*This information object also has a description property, which is a string that provides a more specific reason for the failure.

**This information object also has a details property, which is a string that provides the name of the stream currently playing on the NetStream. If you are streaming a playlist that contains multiple streams, this information object will be sent each time you begin playing a different stream in the playlist.

***** By default, outgoing messages are monitored at five-second intervals; if data is behind, the client is notified within five seconds. The interval for sampling can be configured in the Application.xml file in the Client tag.

****** This information object is handled by NetStream.onPlayStatus, and is not handled by NetStream.onStatus.


Comments


doof moof said on Jan 30, 2006 at 6:20 PM :
where is the footnote to correspond to **** next to NetStream.Play.Complete? it must be something important as I am trying to use this in an onSataus handler but it is never recieved by the client. How else am I supposed to trigger actions which play the next video if I can't use this. I find it very frustrating that you indicate that there is a footnote to go with the text and then don't put it in! So where is it?
doof moof said on Jan 30, 2006 at 6:24 PM :
where is the footnote to correspond with ****. this is very frustrating as this symbol appears next to netstream.play.complete which i have used in my script but i have found dosn't work. I am very interested to know what extra data this symbol refers to and am very confused as to why it isn't on the page.
No screen name said on Feb 23, 2006 at 1:16 AM :
The "NetStream.Play.Complete" message is generated by onPlayStatus rather than onStatus.

Using NetStream.Play.Stop to check for the end of a stream will cause it to report the end of streaming, which doesn't take into account the buffering you may have set on the stream. I found my movie playbacks cutting out early because of this...
Craig Grummitt said on Jul 11, 2006 at 4:39 PM :
There appears to be some inconsistency between the number of asterixes in the main text and in the footnotes. It appears as though three asterixes in the main text corresponds to five asterixes in the footnote, and four asterixes in the main text corresponds to six asterixes in the footnote...
agorman said on Sep 29, 2006 at 3:43 PM :
I am getting a status code of "NetStream.Buffer.Flush" This isn't documented anywhere. Can you explain the meaning of this status code? Is related to an empty buffer condition?
joeflashTO2 said on Mar 6, 2007 at 9:54 AM :
Look in the Flash 8 LiveDocs http://livedocs.adobe.com/flash/8/main/00002563.html for "NetStream.Buffer.Flush"
No screen name said on Jun 20, 2007 at 1:51 PM :
Has anyone noticed NetStream.Play.Complete not being sent on very short streams? Like under 3 seconds? Is there a reason for this or should I catch both Play.Complete and Play.Stop?
Putty Mud Duck said on Aug 16, 2007 at 12:50 PM :
NetStream.Play.Complete is reported for streaming media.
NetStream.Play.Complete isn't reported for progressive download media.
CP05 said on Jul 29, 2008 at 8:44 PM :
To detect the end of a progressive video:

Step One:
use a Timer in you onMetadata event handler.

var timer : Timer = new Timer( 20 );
timer.addEventListener( TimerEvent.TIMER, onTimer );
timer.start();


Step Two:
Compare where the playhead is with the duration of the clip in your onTimer event handler

var loaded : Number = _ns.bufferLength + _ns.time;
var length : Number = _metadata["duration"];
var position : Number = _ns.time;

if( position >= length ) {
trace("COMPLETE");
// Loop
_ns.seek( 0 );
}

As stated above, NetStream.Play.Complete only applies to Streaming Video.

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/fms/2/docs/00000628.html