Package | cv.media |
Class | public class VideoManager |
Inheritance | VideoManager ![]() |
Implements | IMediaManager |
See also
Property | Defined by | ||
---|---|---|---|
autoScale : Boolean
Gets or sets whether the video object will be scaled to the metadata given
for video dimensions.
| VideoManager | ||
buffer : int
Gets or sets how long the VideoManager should buffer the video before playing, in seconds.
| VideoManager | ||
currentPercent : uint [read-only]
Gets the current play progress in terms of percent
| VideoManager | ||
isPause : Boolean [read-only]
If VideoManager is currently paused.
| VideoManager | ||
isPlaying : Boolean [read-only]
If VideoManager is currently playing.
| VideoManager | ||
loadCurrent : Number [read-only]
Gets the current load progress in terms of bytes
| VideoManager | ||
loadTotal : Number [read-only]
Gets the total size to be loaded in terms of bytes
| VideoManager | ||
metaData : Object [read-only]
Gets the metadata if available for the currently playing audio file
| VideoManager | ||
objectEncoding : uint
Gets or sets the object encodeing for use with streaming servers.
| VideoManager | ||
streamHost : String
Gets or sets the stream host url for use with streaming media.
| VideoManager | ||
timeCurrent : Number [read-only]
Gets the elapsed play time in milliseconds
| VideoManager | ||
timeLeft : Number [read-only]
Gets the remaining play time in milliseconds
| VideoManager | ||
timeTotal : Number [read-only]
Gets the total play time in milliseconds
| VideoManager | ||
video : Video
Gets or sets the reference to the display video object.
| VideoManager | ||
volume : Number
Gets or sets the current volume, from 0 - 1
| VideoManager |
Method | Defined by | ||
---|---|---|---|
VideoManager | |||
isValid(str:String):Boolean
Validates if the given filetype is compatible to be played with VideoManager.
| VideoManager | ||
load(s:String):void
Loads a new file to be played.
| VideoManager | ||
mute(b:Boolean = true):void
Controls the mute of the media
| VideoManager | ||
pause(b:Boolean = true):void
Controls the pause of the media
| VideoManager | ||
play(pos:int = 0):void
Plays the media, starting at the given position.
| VideoManager | ||
seek(n:Number):void
Seeks to time given in the media.
| VideoManager | ||
seekPercent(n:Number):void
Seeks to the given percent in the media
| VideoManager | ||
stop(pos:int = 0):void
Stops the media at the specified position.
| VideoManager | ||
unLoad():void
Stops the media, closes the NetConnetion or NetStream, and resets the metadata.
| VideoManager |
Event | Summary | Defined by | ||
---|---|---|---|---|
Dispatched everytime a cuepoint in encountered | VideoManager | |||
Dispatched when the media file has completed loading | VideoManager | |||
Dispatched as a media file is loaded | VideoManager | |||
Dispatched as a media file begins loading | VideoManager | |||
Dispatched after VideoManager has begun loading the next item, also at the end of an item playing | VideoManager | |||
Dispatched as a media file finishes playing | VideoManager | |||
Dispatched as a media file is playing | VideoManager | |||
Dispatched once as a media file first begins to play | VideoManager | |||
Dispatched as metadata is receieved from the media playing | VideoManager |
autoScale | property |
autoScale:Boolean
[read-write]Gets or sets whether the video object will be scaled to the metadata given for video dimensions.
Implementation public function get autoScale():Boolean
public function set autoScale(value:Boolean):void
buffer | property |
buffer:int
[read-write]Gets or sets how long the VideoManager should buffer the video before playing, in seconds.
Implementation public function get buffer():int
public function set buffer(value:int):void
currentPercent | property |
currentPercent:uint
[read-only]Gets the current play progress in terms of percent
Implementation public function get currentPercent():uint
isPause | property |
isPause:Boolean
[read-only]If VideoManager is currently paused.
Implementation public function get isPause():Boolean
isPlaying | property |
isPlaying:Boolean
[read-only]If VideoManager is currently playing.
Implementation public function get isPlaying():Boolean
loadCurrent | property |
loadCurrent:Number
[read-only]Gets the current load progress in terms of bytes
Implementation public function get loadCurrent():Number
loadTotal | property |
loadTotal:Number
[read-only]Gets the total size to be loaded in terms of bytes
Implementation public function get loadTotal():Number
metaData | property |
metaData:Object
[read-only]Gets the metadata if available for the currently playing audio file
Implementation public function get metaData():Object
objectEncoding | property |
objectEncoding:uint
[read-write]Gets or sets the object encodeing for use with streaming servers.
Implementation public function get objectEncoding():uint
public function set objectEncoding(value:uint):void
streamHost | property |
streamHost:String
[read-write]Gets or sets the stream host url for use with streaming media.
Implementation public function get streamHost():String
public function set streamHost(value:String):void
timeCurrent | property |
timeCurrent:Number
[read-only]Gets the elapsed play time in milliseconds
Implementation public function get timeCurrent():Number
timeLeft | property |
timeLeft:Number
[read-only]Gets the remaining play time in milliseconds
Implementation public function get timeLeft():Number
timeTotal | property |
timeTotal:Number
[read-only]Gets the total play time in milliseconds
Implementation public function get timeTotal():Number
video | property |
video:Video
[read-write]Gets or sets the reference to the display video object.
Implementation public function get video():Video
public function set video(value:Video):void
volume | property |
volume:Number
[read-write]Gets or sets the current volume, from 0 - 1
Implementation public function get volume():Number
public function set volume(value:Number):void
VideoManager | () | constructor |
public function VideoManager()
isValid | () | method |
public function isValid(str:String):Boolean
Validates if the given filetype is compatible to be played with VideoManager. The acceptable file types are :
str:String — The file extension to be validated
|
Boolean — Boolean of whether the extension was valid or not.
|
load | () | method |
public function load(s:String):void
Loads a new file to be played.
Parameterss:String — The url of the file to be loaded
|
mute | () | method |
public function mute(b:Boolean = true):void
Controls the mute of the media
Parametersb:Boolean (default = true ) — Whether to mute or not
|
pause | () | method |
public function pause(b:Boolean = true):void
Controls the pause of the media
Parametersb:Boolean (default = true ) — Whether to pause or not
|
play | () | method |
public function play(pos:int = 0):void
Plays the media, starting at the given position.
Parameterspos:int (default = 0 ) — Position to play from
|
seek | () | method |
public function seek(n:Number):void
Seeks to time given in the media.
Parametersn:Number — Seconds into the media to seek to
|
seekPercent | () | method |
public function seekPercent(n:Number):void
Seeks to the given percent in the media
Parametersn:Number — Percent to seek to
|
stop | () | method |
public function stop(pos:int = 0):void
Stops the media at the specified position. Sets the position given as the pause position.
Parameterspos:int (default = 0 ) — Position to stop at
|
unLoad | () | method |
public function unLoad():void
Stops the media, closes the NetConnetion or NetStream, and resets the metadata.
cuePoint | event |
cv.events.CuePointEvent
cv.events.CuePointEvent.CUE_POINT
Dispatched everytime a cuepoint in encountered
Defines the value of the type
property of an cuePoint
event object.
This event has the following properties:
Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is
no default behavior to cancel. |
cuePoint | The cue point object. |
currentTarget | The object that is actively processing the event object with an event listener. |
target | The object that dispatched the event. The target is
not always the object listening for the event. Use the currentTarget
property to access the object that is listening for the event. |
loadComplete | event |
loadProgress | event |
loadStart | event |
next | event |
flash.events.Event
Dispatched after VideoManager has begun loading the next item, also at the end of an item playing
playComplete | event |
playProgress | event |
cv.events.PlayProgressEvent
cv.events.PlayProgressEvent.PLAY_PROGRESS
Dispatched as a media file is playing
Defines the value of the type
property of an playProgress
event object.
This event has the following properties:
Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is
no default behavior to cancel. |
percent | The percentage of progress for the media playing. |
elapsed | The elapsed time of the media playing. |
remain | The remaining time of the media playing. |
total | The total time of the media playing. |
currentTarget | The object that is actively processing the event object with an event listener. |
target | The object that dispatched the event. The target is
not always the object listening for the event. Use the currentTarget
property to access the object that is listening for the event. |
playStart | event |
videoMetadata | event |
cv.events.MetaDataEvent
cv.events.MetaDataEvent.VIDEO_METADATA
Dispatched as metadata is receieved from the media playing
Defines the value of the type
property of an videoMetadata
event object.
This event has the following properties:
Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is
no default behavior to cancel. |
data | The metadata object. |
currentTarget | The object that is actively processing the event object with an event listener. |
target | The object that dispatched the event. The target is
not always the object listening for the event. Use the currentTarget
property to access the object that is listening for the event. |