| Package | org.openvideoplayer.events |
| Class | public class OvpEvent |
| Inheritance | OvpEvent flash.events.Event |
OvpEvent.BANDWIDTH event
provides bandwith and latency values via the data property:
private function bandwidthHandler(e:OvpEvent):void {
trace("Bandwidth measured at " + e.data.bandwidth+ " kbps and latency is " + e.data.latency + " ms.");
}
| Property | Defined By | ||
|---|---|---|---|
| data : Object [read-only]
Returns the data for the event, which can differ based on the event type. | OvpEvent | ||
| Method | Defined By | ||
|---|---|---|---|
OvpEvent(type:String, data:Object = null)
Constructor. | OvpEvent | ||
| Constant | Defined By | ||
|---|---|---|---|
| ASYNC_ERROR : String = asyncerror [static]
The OvpEvent.ASYNC_ERROR constant defines the value of the OvpEvent's
type property, which indicates an OVP class has a received
an AsyncErrorEvent.ASYNC_ERROR event. | OvpEvent | ||
| BANDWIDTH : String = bandwidth [static]
The OvpEvent.BANDWIDTH constant defines the value of the OvpEvent's
type property, which indicates the class
has completed a bandwidth estimate. | OvpEvent | ||
| CAPTION : String = caption [static]
Closed caption event. | OvpEvent | ||
| COMPLETE : String = complete [static]
The OvpEvent.COMPLETE constant defines the value of the OvpEvent's
type property, which indicates that the end of the stream has been reached. | OvpEvent | ||
| CPU : String = cpu [static] | OvpEvent | ||
| DATA_MESSAGE : String = datamessage [static]
The RTMP protocol allows arbitrarily-named data messages to be embedded in both live and ondemand streams. | OvpEvent | ||
| DEBUG : String = debug [static]
The OvpEvent.DEBUG constant defines the value of the OvpEvent's
type property, which indicates the class has a debug message
for tranmission. | OvpEvent | ||
| ERROR : String = error [static]
The OvpEvent.ERROR constant defines the value of an error event's
type property, which indicates that the class
has encountered a run-time error. | OvpEvent | ||
| FAIL_OVER_TO_RTMP : String = failovertortmp [static] | OvpEvent | ||
| FAILURE : String = failure [static] | OvpEvent | ||
| IS_BUFFERING : String = isbuffering [static] | OvpEvent | ||
| IS_LIVE_STREAM : String = islivestream [static] | OvpEvent | ||
| IS_PLAYING_LIVE : String = isplayinglive [static] | OvpEvent | ||
| LOADED : String = loaded [static]
The OvpEvent.LOADED constant defines the value of the OvpEvent's
type property, which indicates the class has successfully loaded external data, such
as a MediaRSS feed. | OvpEvent | ||
| LOOP : String = loop [static] | OvpEvent | ||
| METADATA : String = metadata [static] | OvpEvent | ||
| MP3_ID3 : String = id3 [static]
The OvpEvent.MP3_ID3 constant defines the value of an OvpEvent's
type property, dispatched when the the class receives information about
ID3 data embedded in an MP3 file. | OvpEvent | ||
| NETSESSION_CLIENT : String = netsessionclient [static] | OvpEvent | ||
| NETSESSION_EULA : String = netsessioneula [static] | OvpEvent | ||
| NET_STATUS : String = netstatus [static]
Mapped over from HDEVENT
| OvpEvent | ||
| NETSTREAM_CUEPOINT : String = cuepoint [static]
The OvpEvent.NETSTREAM_CUEPOINT constant defines the value of an OvpEvent's
type property, dispatched when an embedded cue point is reached while playing an FLV file. | OvpEvent | ||
| NETSTREAM_IMAGEDATA : String = imagedata [static]
The OvpEvent.NETSTREAM_IMAGEDATA constant defines the value of an OvpEvent's
type property, dispatched when the OvpNetStream class receives an image embedded
in the H.264 file being played. | OvpEvent | ||
| NETSTREAM_METADATA : String = metadata [static]
The OvpEvent.NETSTREAM_METADATA constant defines the value of an OvpEvent's
type property, dispatched when the OvpNetStream class receives descriptive
information embedded in the FLV file being played. | OvpEvent | ||
| NETSTREAM_PLAYSTATUS : String = playstatus [static]
The OvpEvent.NETSTREAM_PLAYSTATUS constant defines the value of an OvpEvent's
type property, dispatched when a NetStream object has completely played a stream,
or when it switches to a different stream in a server-side playlist. | OvpEvent | ||
| NETSTREAM_TEXTDATA : String = textdata [static]
The OvpEvent.NETSTREAM_TEXTDATA constant defines the value of an OvpEvent's
type property, dispatched when the OvpNetStream class receives text data embedded
in the H.264 file being played. | OvpEvent | ||
| NETSTREAM_XMPDATA : String = xmpdata [static]
The OvpEvent.NETSTREAM_TEXTDATA constant defines the value of an OvpEvent's
type property, dispatched when the NetStream receives information
specific to Adobe Extensible Metadata Platform (XMP) embedded in the video being played. | OvpEvent | ||
| ONFI : String = onfi [static]
Flash Media Live Encoder contains a special built-in handler, onFI, that subscribing clients can use
in their ActionScript code to access timecode information. | OvpEvent | ||
| ONLASTSECOND : String = onLastSecond [static]
Some FLV files have this callback embedded. | OvpEvent | ||
| PARSED : String = parsed [static]
The OvpEvent.PARSED constant defines the value of the OvpEvent's
type property, which indicates the class has successfully
parsed some data, such as a Media RSS feed. | OvpEvent | ||
| PAUSE : String = pause [static] | OvpEvent | ||
| PLAY : String = play [static] | OvpEvent | ||
| PROGRESS : String = progress [static]
The OvpEvent.PROGRESS constant defines the value of the OvpEvent's
type property, which indicates the class is actively playing a stream. | OvpEvent | ||
| REBUFFER : String = rebuffer [static] | OvpEvent | ||
| REJECTED : String = rejected [static] | OvpEvent | ||
| RENDITION_CHANGE : String = renditionchange [static] | OvpEvent | ||
| RESUME : String = resume [static] | OvpEvent | ||
| RTT : String = rtt [static] | OvpEvent | ||
| SEEK : String = seek [static] | OvpEvent | ||
| SESSION_ID : String = sessionid [static] | OvpEvent | ||
| STREAM_LENGTH : String = streamlength [static]
The OvpEvent.STREAM_LENGTH constant defines the value of the OvpEvent's
type property, which indicates the class
has completed a stream length request. | OvpEvent | ||
| STREAM_NAME_CHANGE : String = streamnamechange [static] | OvpEvent | ||
| STREAM_NOT_FOUND : String = streamnotfound [static] | OvpEvent | ||
| STREAM_START_TIME : String = streamstarttime [static] | OvpEvent | ||
| STREAM_TYPE_CHANGE : String = streamtypechange [static] | OvpEvent | ||
| SUBSCRIBE_ATTEMPT : String = subscribeattempt [static]
The OvpEvent.SUBSCRIBE_ATTEMPT constant defines the value of the OvpEvent's
type property, which indicates the class is making a new attempt to subscribe to a live stream. | OvpEvent | ||
| SUBSCRIBED : String = subscribed [static]
The OvpEvent.SUBSCRIBED constant defines the value of the OvpEvent's
type property, which indicates the class has successfully subscribed to a live stream. | OvpEvent | ||
| SUCCESS : String = success [static] | OvpEvent | ||
| SWITCH_ACKNOWLEDGED : String = switchAcknowledged [static]
For dynamic streaming, dispatched when the NetStream object receives a "NetStream.Play.Transition" event meaning the
server has acknowledged the switch request and is in the process of switching streams. | OvpEvent | ||
| SWITCH_COMPLETE : String = switchComplete [static]
For dynamic streaming, dispatched when the NetStream object receives a "NetStream.Play.TransitionComplete" event
meaning the switch is complete and is visible to the user. | OvpEvent | ||
| SWITCH_REQUESTED : String = switchRequested [static]
For dynamic streaming, dispatched when either a manual switch has been requested or a
switching rule has requested a switch to a new index. | OvpEvent | ||
| SWITCH_START : String = switchstart [static] | OvpEvent | ||
| TAT : String = tat [static] | OvpEvent | ||
| TIMEOUT : String = timeout [static]
The OvpEvent.TIMEOUT constant defines the value of an error event's
type property, which indicates a timeout has occurred. | OvpEvent | ||
| UNSUBSCRIBED : String = unsubscribed [static]
The OvpEvent.UNSUBSCRIBED constant defines the value of the OvpEvent's
type property, which indicates the class has unsubscribed from a live stream. | OvpEvent | ||
| data | property |
data:Object [read-only] Returns the data for the event, which can differ based on the event type. See the event constants in this class for a description of the data object for each event type.
public function get data():Object| OvpEvent | () | Constructor |
public function OvpEvent(type:String, data:Object = null)Constructor.
Parameterstype:String — One of the event type constants defined in this class.
| |
data:Object (default = null) — Corresponding data for the event. This can differ depending on the event type. See the event type definitions in this class.
|
| ASYNC_ERROR | Constant |
public static const ASYNC_ERROR:String = asyncerror
The OvpEvent.ASYNC_ERROR constant defines the value of the OvpEvent's
type property, which indicates an OVP class has a received
an AsyncErrorEvent.ASYNC_ERROR event. The event text is carried in the data object as a string.
| BANDWIDTH | Constant |
public static const BANDWIDTH:String = bandwidth
The OvpEvent.BANDWIDTH constant defines the value of the OvpEvent's
type property, which indicates the class
has completed a bandwidth estimate. The bandwidth and latency
values can be accessed via the data property, for example event.data.bandwidth
and event.data.latency
See also
| CAPTION | Constant |
public static const CAPTION:String = captionClosed caption event. The data property will be a Caption object.
See also
| COMPLETE | Constant |
public static const COMPLETE:String = complete
The OvpEvent.COMPLETE constant defines the value of the OvpEvent's
type property, which indicates that the end of the stream has been reached.
This event can only be used for streaming and (not progressive downloads) and is dispatched
whenever the onPlayStatus callback function of the NetStream object
issues a NetStream.Play.Complete code.
| CPU | Constant |
public static const CPU:String = cpu| DATA_MESSAGE | Constant |
public static const DATA_MESSAGE:String = datamessageThe RTMP protocol allows arbitrarily-named data messages to be embedded in both live and ondemand streams. Typically, to listen for these, a public callback function must be created on the client object associated with the NetStream. To avoid the rigidity of this system, with OVP you are able to subscribe to the DATA_MESSAGE event, which will carry the name and value associated with any non-standard data message. Standard data messages not included in this event (since they have their own custome events) include onMetaData, onCuePoint, onPlayStatus, onXMPData, onImageData, onTextData, onFI, onId3 and onLastSecond.
| DEBUG | Constant |
public static const DEBUG:String = debug
The OvpEvent.DEBUG constant defines the value of the OvpEvent's
type property, which indicates the class has a debug message
for tranmission. The contents of the message are carried in the data object as a string.
| ERROR | Constant |
public static const ERROR:String = error
The OvpEvent.ERROR constant defines the value of an error event's
type property, which indicates that the class
has encountered a run-time error.
The data object will contain errorNumber and errorDescription properties.
See also
| FAIL_OVER_TO_RTMP | Constant |
public static const FAIL_OVER_TO_RTMP:String = failovertortmp| FAILURE | Constant |
public static const FAILURE:String = failure| IS_BUFFERING | Constant |
public static const IS_BUFFERING:String = isbuffering| IS_LIVE_STREAM | Constant |
public static const IS_LIVE_STREAM:String = islivestream| IS_PLAYING_LIVE | Constant |
public static const IS_PLAYING_LIVE:String = isplayinglive| LOADED | Constant |
public static const LOADED:String = loaded
The OvpEvent.LOADED constant defines the value of the OvpEvent's
type property, which indicates the class has successfully loaded external data, such
as a MediaRSS feed. This event is fired before that data is parsed.
| LOOP | Constant |
public static const LOOP:String = loop| METADATA | Constant |
public static const METADATA:String = metadata| MP3_ID3 | Constant |
public static const MP3_ID3:String = id3
The OvpEvent.MP3_ID3 constant defines the value of an OvpEvent's
type property, dispatched when the the class receives information about
ID3 data embedded in an MP3 file. To trigger this event, first make a request to the
getMp3Id3Info method.
See also
| NET_STATUS | Constant |
public static const NET_STATUS:String = netstatusMapped over from HDEVENT
| NETSESSION_CLIENT | Constant |
public static const NETSESSION_CLIENT:String = netsessionclient| NETSESSION_EULA | Constant |
public static const NETSESSION_EULA:String = netsessioneula| NETSTREAM_CUEPOINT | Constant |
public static const NETSTREAM_CUEPOINT:String = cuepoint
The OvpEvent.NETSTREAM_CUEPOINT constant defines the value of an OvpEvent's
type property, dispatched when an embedded cue point is reached while playing an FLV file.
You can use this handler to trigger actions in your code when the video reaches a specific cue point,
which lets you synchronize other actions in your application with video playback events.
The following types of cue points can be embedded in an FLV file:
| NETSTREAM_IMAGEDATA | Constant |
public static const NETSTREAM_IMAGEDATA:String = imagedata
The OvpEvent.NETSTREAM_IMAGEDATA constant defines the value of an OvpEvent's
type property, dispatched when the OvpNetStream class receives an image embedded
in the H.264 file being played. The onImageData method is a callback like
onMetaData that sends image data as a byte array through an AMF0 data channel. The image data
can be in JPEG, PNG, or GIF formats. As the information is a byte array, this functionality is
only supported for ActionScript 3.0 client SWFs. The info property of the event will
hold the image data object and the imageData.data object holds the actual byte array.
| NETSTREAM_METADATA | Constant |
public static const NETSTREAM_METADATA:String = metadata
The OvpEvent.NETSTREAM_METADATA constant defines the value of an OvpEvent's
type property, dispatched when the OvpNetStream class receives descriptive
information embedded in the FLV file being played. This event is triggered after a call to
the NetStream.play() method, but before the video playhead has advanced.
In many cases, the duration value embedded in FLV metadata approximates the actual duration,
but is not exact. In other words, it does not always match the value of the NetStream.time property
when the playhead is at the end of the video stream.
| NETSTREAM_PLAYSTATUS | Constant |
public static const NETSTREAM_PLAYSTATUS:String = playstatus
The OvpEvent.NETSTREAM_PLAYSTATUS constant defines the value of an OvpEvent's
type property, dispatched when a NetStream object has completely played a stream,
or when it switches to a different stream in a server-side playlist.
This handler returns information objects that provide information in addition to what's returned
by the netStatus event. You can use this handler to trigger actions in your code when a NetStream
object has switched from one stream to another stream in a playlist (as indicated by the information
object NetStream.Play.Switch) or when a NetStream object has played to the end (as indicated by the
information object NetStream.Play.Complete).
| NETSTREAM_TEXTDATA | Constant |
public static const NETSTREAM_TEXTDATA:String = textdata
The OvpEvent.NETSTREAM_TEXTDATA constant defines the value of an OvpEvent's
type property, dispatched when the OvpNetStream class receives text data embedded
in the H.264 file being played. The onTextData method is a callback like onMetaData that sends text
data through an AMF0 data channel. The text data is always in UTF-8 format and can contain additional
information about formatting based on the 3GP timed text specification. This functionality is fully
supported in ActionScript 2.0 and 3.0 because it does not use a byte array.The info property of the event will
hold the text data object and the textData.text object holds the actual text.
| NETSTREAM_XMPDATA | Constant |
public static const NETSTREAM_XMPDATA:String = xmpdata
The OvpEvent.NETSTREAM_TEXTDATA constant defines the value of an OvpEvent's
type property, dispatched when the NetStream receives information
specific to Adobe Extensible Metadata Platform (XMP) embedded in the video being played.
The associated event listener is triggered after a call to the NetStream.play() method,
but before the video playhead has advanced.
The data object passed in the event handling function has one data property, which is a string.
The string is generated from a top-level UUID box which contains exactly one XML document represented
as a null-terminated UTF-8 string.
| ONFI | Constant |
public static const ONFI:String = onfi
Flash Media Live Encoder contains a special built-in handler, onFI, that subscribing clients can use
in their ActionScript code to access timecode information. You can get timecode and system date and time
information, if timecode and system date and time were embedded in the stream, by accessing the tc, sd,
and st properties of the data object when handling this event:
| ONLASTSECOND | Constant |
public static const ONLASTSECOND:String = onLastSecondSome FLV files have this callback embedded.
| PARSED | Constant |
public static const PARSED:String = parsed
The OvpEvent.PARSED constant defines the value of the OvpEvent's
type property, which indicates the class has successfully
parsed some data, such as a Media RSS feed.
| PAUSE | Constant |
public static const PAUSE:String = pause| PLAY | Constant |
public static const PLAY:String = play| PROGRESS | Constant |
public static const PROGRESS:String = progress
The OvpEvent.PROGRESS constant defines the value of the OvpEvent's
type property, which indicates the class is actively playing a stream. This event is fired
every progressInterval millseconds from when play is first called, to when
close() is called. This event is designed to be an update interval to drive time and position displays
which vary with the progress of the stream.
See also
| REBUFFER | Constant |
public static const REBUFFER:String = rebuffer| REJECTED | Constant |
public static const REJECTED:String = rejected| RENDITION_CHANGE | Constant |
public static const RENDITION_CHANGE:String = renditionchange| RESUME | Constant |
public static const RESUME:String = resume| RTT | Constant |
public static const RTT:String = rtt| SEEK | Constant |
public static const SEEK:String = seek| SESSION_ID | Constant |
public static const SESSION_ID:String = sessionid| STREAM_LENGTH | Constant |
public static const STREAM_LENGTH:String = streamlength
The OvpEvent.STREAM_LENGTH constant defines the value of the OvpEvent's
type property, which indicates the class
has completed a stream length request. The streamLength value
can be accessed via the data property, for example event.data.streamLength.
See also
| STREAM_NAME_CHANGE | Constant |
public static const STREAM_NAME_CHANGE:String = streamnamechange| STREAM_NOT_FOUND | Constant |
public static const STREAM_NOT_FOUND:String = streamnotfound| STREAM_START_TIME | Constant |
public static const STREAM_START_TIME:String = streamstarttime| STREAM_TYPE_CHANGE | Constant |
public static const STREAM_TYPE_CHANGE:String = streamtypechange| SUBSCRIBE_ATTEMPT | Constant |
public static const SUBSCRIBE_ATTEMPT:String = subscribeattempt
The OvpEvent.SUBSCRIBE_ATTEMPT constant defines the value of the OvpEvent's
type property, which indicates the class is making a new attempt to subscribe to a live stream.
This will occur immediately after the first play request for a live stream, as well as after
an OvpEvent.UNSUBSCRIBED event has been issued while the stream was still active.
These resubscription attempts will occur roughly every 30 seconds until the liveStreamMasterTimeout period
has been exceeded, after which an error event will be dispatched.
| SUBSCRIBED | Constant |
public static const SUBSCRIBED:String = subscribed
The OvpEvent.SUBSCRIBED constant defines the value of the OvpEvent's
type property, which indicates the class has successfully subscribed to a live stream.
| SUCCESS | Constant |
public static const SUCCESS:String = success| SWITCH_ACKNOWLEDGED | Constant |
public static const SWITCH_ACKNOWLEDGED:String = switchAcknowledged
For dynamic streaming, dispatched when the NetStream object receives a "NetStream.Play.Transition" event meaning the
server has acknowledged the switch request and is in the process of switching streams.
The data object for the event will contain:
| SWITCH_COMPLETE | Constant |
public static const SWITCH_COMPLETE:String = switchComplete| SWITCH_REQUESTED | Constant |
public static const SWITCH_REQUESTED:String = switchRequested
For dynamic streaming, dispatched when either a manual switch has been requested or a
switching rule has requested a switch to a new index.
The data object for the event will contain these items:
| SWITCH_START | Constant |
public static const SWITCH_START:String = switchstart| TAT | Constant |
public static const TAT:String = tat| TIMEOUT | Constant |
public static const TIMEOUT:String = timeout
The OvpEvent.TIMEOUT constant defines the value of an error event's
type property, which indicates a timeout has occurred.
| UNSUBSCRIBED | Constant |
public static const UNSUBSCRIBED:String = unsubscribed
The OvpEvent.UNSUBSCRIBED constant defines the value of the OvpEvent's
type property, which indicates the class has unsubscribed from a live stream.
This may happen because the unsubscribe method was called by the parent or because the
publisher of the stream ceased publication. In the latter case, the OvpConnection class will automatically
attempt to resubscribe to the live stream. It will do this until the liveStreamMasterTimeout period
has been exceeded, after which it will dispatch an error event.