Package | cv |
Class | public class TempoLite |
Inheritance | TempoLite ![]() |
loadMedia()
method allows for autoStart to be setversion
propertypause()
Property | Defined by | ||
---|---|---|---|
autoStart : Boolean
Whether a video will play immediately when a playlist is loaded.
| TempoLite | ||
autoStartIndex : int
If autoStart is true, the index of the item in the playlist to play first.
| TempoLite | ||
bufferTime : int
The time in seconds to buffer a file before playing.
| TempoLite | ||
isPause : Boolean [read-only]
If TempoLite is currently paused.
| TempoLite | ||
isPlaying : Boolean [read-only]
| TempoLite | ||
length : uint [read-only]
Retrieves the number of items in the playlist.
| TempoLite | ||
repeat : String
Sets whether repeat is enabled, or which type of repeat is enabled.
| TempoLite | ||
shuffle : Boolean
Whether to shuffle the playlist or not.
| TempoLite | ||
version : String [static][read-only]
The version of TempoLite in use.
| TempoLite | ||
volume : Number
A number from 0 to 1 determines volume.
| TempoLite |
Property | Defined by | ||
---|---|---|---|
aM : IMediaManager | TempoLite | ||
cM : IMediaManager | TempoLite | ||
plM : PlayListManager | TempoLite | ||
screenHeight : Number | TempoLite | ||
screenWidth : Number | TempoLite | ||
screenX : Number | TempoLite | ||
screenY : Number | TempoLite | ||
vidScreen : Video | TempoLite | ||
vM : IMediaManager | TempoLite |
Method | Defined by | ||
---|---|---|---|
Constructor.
| TempoLite | ||
addItem(item:Object, index:int = -1):void
Add an item to the playlist at the end, or at index specified.
| TempoLite | ||
clearItems():void
Clears the current playlist.
| TempoLite | ||
getCurrentIndex():uint
Retrieve the current index in the playlist.
| TempoLite | ||
getCurrentItem():Object
Retrieve the current item playing.
| TempoLite | ||
getCurrentPercent():uint
Retrieve the current play progress as a percent.
| TempoLite | ||
Retrieve the current playlist in
PlayList format (enhanced array). | TempoLite | ||
getLoadCurrent():Number
Retrieve the current bytes loaded of the current item.
| TempoLite | ||
getLoadTotal():Number
Retrieve the total bytes to load of the current item.
| TempoLite | ||
getMetaData():Object
Retrieve the metadata from the current item playing if available.
| TempoLite | ||
getTimeCurrent():int
Retrieve the current play time of the current item playing.
| TempoLite | ||
getTimeLeft():int
Retrieve the play time remaining of the current item playing.
| TempoLite | ||
getTimeTotal():int
Retrieve the total play time of the current item playing.
| TempoLite | ||
loadMedia(item:Object, autoStart:Boolean = true):void
Create a playlist of a single item and load the item.
| TempoLite | ||
loadPlayList(url:String = "playlists/Tempo.m3u"):void
Loads a new playlist and clears any previous playlsit.
| TempoLite | ||
next():void
Plays the next item in the playlist.
| TempoLite | ||
pause(b:Boolean = true):void
Pauses the current playback.
| TempoLite | ||
play(index:int = -1):void
Plays the current item in the playlist, or at the
specified index in the playlist.
| TempoLite | ||
previous():void
Plays the previous item in the playlist.
| TempoLite | ||
removeItem(index:int = -1):void
Remove an item from the playlist from the end, or at index specified.
| TempoLite | ||
seek(time:Number):void
Seek to a specific time (in seconds) in the current item playing.
| TempoLite | ||
seekPercent(percent:Number):void
Seek to a specific percent (0 - 1) in the current item playing.
| TempoLite | ||
seekRelative(time:Number):void
Seek by the amount (in seconds) specified relative to the current play time.
| TempoLite | ||
setMute(b:Boolean):void
Toggles mute.
| TempoLite | ||
setStreamHost(value:String):void
Used to specify a hosting server when streaming video
| TempoLite | ||
setVideoScale(scaleMode:String):void
Determines how TempoLite will scale a video.
| TempoLite | ||
setVideoScreen(video:Video):void
Assigns a video screen for TempoLite to display videos with.
| TempoLite | ||
stop():void
Stops the selected item in the playlist.
| TempoLite | ||
stringToTime(text:String):int
Converts a time in 00:00:000 format and converts it back into a number.
| TempoLite | ||
timeToString(n:int):String
Converts milliseconds to a 00:00:000 format.
| TempoLite | ||
unloadMedia():void
Unloads the current item playing.
| TempoLite |
Method | Defined by | ||
---|---|---|---|
eventHandler(e:Event):void
| TempoLite | ||
initMedia(m:IMediaManager):void
| TempoLite | ||
load(o:Object):void
| TempoLite | ||
metaDataHandler(e:MetaDataEvent):void
| TempoLite | ||
playlistHandler(e:Event):void
| TempoLite | ||
zero(n:int, isMS:Boolean = false):String
| TempoLite |
Event | Summary | Defined by | ||
---|---|---|---|---|
Dispatched as ID3 metadata is receieved from an MP3 | TempoLite | |||
Dispatched from the PlayList when a change has occured | TempoLite | |||
Dispatched everytime a cue point is encountered | TempoLite | |||
Dispatched as a media file is loaded | TempoLite | |||
Dispatched as a media file begins loading | TempoLite | |||
Dispatched after Tempo has begun loading the next item, also at the end of an item playing | TempoLite | |||
Dispatched as a media file finishes playing | TempoLite | |||
Dispatched as a media file is playing | TempoLite | |||
Dispatched once as a media file first begins to play | TempoLite | |||
Dispatched after Tempo has begun loading the previous item | TempoLite | |||
Dispatched from the PlayListManager when ever an item is removed, or updated, or the entire list is updated | TempoLite | |||
Dispatched as metadata is receieved from an video stream of M4A file | TempoLite |
Constant | Defined by | ||
---|---|---|---|
AUDIO : String = "audio" [static]
| TempoLite | ||
AUDIO_METADATA : String = "audioMetadata" [static]
| TempoLite | ||
CHANGE : String = "change" [static]
| TempoLite | ||
EXACT_FIT : String = "fit" [static]
| TempoLite | ||
LOAD_COMPLETE : String = "loadComplete" [static]
| TempoLite | ||
LOAD_PROGRESS : String = "loadProgress" [static]
| TempoLite | ||
LOAD_START : String = "loadStart" [static]
| TempoLite | ||
MAINTAIN_ASPECT_RATIO : String = "ratio" [static]
| TempoLite | ||
NEW_PLAYLIST : String = "newPlaylist" [static]
| TempoLite | ||
NEXT : String = "next" [static]
| TempoLite | ||
NO_SCALE : String = "scale" [static]
| TempoLite | ||
PLAY_COMPLETE : String = "playComplete" [static]
| TempoLite | ||
PLAY_PROGRESS : String = "playProgress" [static]
| TempoLite | ||
PLAY_START : String = "playStart" [static]
| TempoLite | ||
PREVIOUS : String = "prev" [static]
| TempoLite | ||
REFRESH_PLAYLIST : String = "refreshPlaylist" [static]
| TempoLite | ||
REPEAT_ALL : String = "all" [static]
| TempoLite | ||
REPEAT_NONE : String = "none" [static]
| TempoLite | ||
REPEAT_TRACK : String = "track" [static]
| TempoLite | ||
VERSION : String = "2.0.3" [static]
The current version of TempoLite in use.
| TempoLite | ||
VIDEO : String = "video" [static]
| TempoLite | ||
VIDEO_METADATA : String = "videoMetadata" [static]
| TempoLite |
aM | property |
protected var aM:IMediaManager
autoStart | property |
autoStart:Boolean
[read-write]Whether a video will play immediately when a playlist is loaded.
Implementation public function get autoStart():Boolean
public function set autoStart(value:Boolean):void
autoStartIndex | property |
autoStartIndex:int
[read-write]If autoStart is true, the index of the item in the playlist to play first.
Implementation public function get autoStartIndex():int
public function set autoStartIndex(value:int):void
bufferTime | property |
bufferTime:int
[read-write]The time in seconds to buffer a file before playing.
Implementation public function get bufferTime():int
public function set bufferTime(value:int):void
cM | property |
protected var cM:IMediaManager
isPause | property |
isPause:Boolean
[read-only]If TempoLite is currently paused.
Implementation public function get isPause():Boolean
isPlaying | property |
isPlaying:Boolean
[read-only]Implementation
public function get isPlaying():Boolean
length | property |
length:uint
[read-only]Retrieves the number of items in the playlist.
Implementation public function get length():uint
plM | property |
protected var plM:PlayListManager
repeat | property |
repeat:String
[read-write]Sets whether repeat is enabled, or which type of repeat is enabled. Accepted values are:
public function get repeat():String
public function set repeat(value:String):void
screenHeight | property |
protected var screenHeight:Number
screenWidth | property |
protected var screenWidth:Number
screenX | property |
protected var screenX:Number
screenY | property |
protected var screenY:Number
shuffle | property |
shuffle:Boolean
[read-write]Whether to shuffle the playlist or not.
The default value is false
.
public function get shuffle():Boolean
public function set shuffle(value:Boolean):void
version | property |
version:String
[read-only]The version of TempoLite in use.
Implementation public static function get version():String
vidScreen | property |
protected var vidScreen:Video
vM | property |
protected var vM:IMediaManager
volume | property |
volume:Number
[read-write]A number from 0 to 1 determines volume.
The default value is 0.5
.
public function get volume():Number
public function set volume(value:Number):void
TempoLite | () | constructor |
public function TempoLite()
Constructor.
This creates a new TempoLite instance.
addItem | () | method |
public function addItem(item:Object, index:int = -1):void
Add an item to the playlist at the end, or at index specified.
Parametersitem:Object — item to be added.
|
|
index:int (default = -1 ) — where the item should be added in the playlist.
|
clearItems | () | method |
public function clearItems():void
Clears the current playlist.
eventHandler | () | method |
protected function eventHandler(e:Event):void
Parameters
e:Event |
getCurrentIndex | () | method |
public function getCurrentIndex():uint
Retrieve the current index in the playlist.
Returnsuint — the index of the playlist.
|
getCurrentItem | () | method |
public function getCurrentItem():Object
Retrieve the current item playing.
ReturnsObject — the current item playing.
|
getCurrentPercent | () | method |
public function getCurrentPercent():uint
Retrieve the current play progress as a percent.
Returnsuint — the play progress in terms of percent.
|
getList | () | method |
public function getList():PlayList
Retrieve the current playlist in PlayList
format (enhanced array).
PlayList —
the playlist as a PlayList type.
|
getLoadCurrent | () | method |
public function getLoadCurrent():Number
Retrieve the current bytes loaded of the current item.
ReturnsNumber — the current bytes loaded of the item.
|
getLoadTotal | () | method |
public function getLoadTotal():Number
Retrieve the total bytes to load of the current item.
ReturnsNumber — the total bytes to load of the item.
|
getMetaData | () | method |
public function getMetaData():Object
Retrieve the metadata from the current item playing if available.
ReturnsObject — the metadata associated with the item playing.
|
getTimeCurrent | () | method |
public function getTimeCurrent():int
Retrieve the current play time of the current item playing.
Returnsint — the current play time of the item playing.
|
getTimeLeft | () | method |
public function getTimeLeft():int
Retrieve the play time remaining of the current item playing.
Returnsint — the play time remaining of the item playing.
|
getTimeTotal | () | method |
public function getTimeTotal():int
Retrieve the total play time of the current item playing.
Returnsint — the total play time of the item playing.
|
initMedia | () | method |
load | () | method |
protected function load(o:Object):void
Parameters
o:Object |
loadMedia | () | method |
public function loadMedia(item:Object, autoStart:Boolean = true):void
Create a playlist of a single item and load the item.
Parametersitem:Object — item to be played.
|
|
autoStart:Boolean (default = true ) — Whether the file will start playing as soon as possible
|
loadPlayList | () | method |
public function loadPlayList(url:String = "playlists/Tempo.m3u"):void
Loads a new playlist and clears any previous playlsit.
Parametersurl:String (default = "playlists/Tempo.m3u ") — the path to the playlist file.
|
metaDataHandler | () | method |
next | () | method |
public function next():void
Plays the next item in the playlist.
pause | () | method |
public function pause(b:Boolean = true):void
Pauses the current playback.
Parametersb:Boolean (default = true ) — Value to set pause to
|
play | () | method |
public function play(index:int = -1):void
Plays the current item in the playlist, or at the specified index in the playlist.
Parametersindex:int (default = -1 ) — The index of the item to be played
|
playlistHandler | () | method |
protected function playlistHandler(e:Event):void
Parameters
e:Event |
previous | () | method |
removeItem | () | method |
public function removeItem(index:int = -1):void
Remove an item from the playlist from the end, or at index specified.
Parametersindex:int (default = -1 ) — The index of the item to be removed
|
seek | () | method |
public function seek(time:Number):void
Seek to a specific time (in seconds) in the current item playing.
Parameterstime:Number — Specific time to seek to, in seconds
|
seekPercent | () | method |
public function seekPercent(percent:Number):void
Seek to a specific percent (0 - 1) in the current item playing.
Parameterspercent:Number — Percentage to seek to
|
seekRelative | () | method |
public function seekRelative(time:Number):void
Seek by the amount (in seconds) specified relative to the current play time.
Parameterstime:Number — Amount to seek relative to current play time in seconds.
|
setMute | () | method |
public function setMute(b:Boolean):void
Toggles mute.
Parametersb:Boolean — Value to set mute to
|
setStreamHost | () | method |
public function setStreamHost(value:String):void
Used to specify a hosting server when streaming video
Parametersvalue:String — The host url
|
import cv.TempoLite;
var vidScreen:Video = new Video();
this.addChild(vidScreen);
var tempo:TempoLite = new TempoLite();
tempo.setStreamHost("rtmp://cp11111.edgefcs.net/ondemand");
tempo.loadMedia({url:"11111/VideoName", extOverride:"flv"});
tempo.setVideoScreen(vidScreen);
setVideoScale | () | method |
public function setVideoScale(scaleMode:String):void
Determines how TempoLite will scale a video. The options are
scaleMode:String — scale mode to use for video scaling.
|
See also
setVideoScreen | () | method |
public function setVideoScreen(video:Video):void
Assigns a video screen for TempoLite to display videos with.
Parametersvideo:Video — video display object to be used as a screen.
|
stop | () | method |
public function stop():void
Stops the selected item in the playlist.
stringToTime | () | method |
public function stringToTime(text:String):int
Converts a time in 00:00:000 format and converts it back into a number.
Parameterstext:String — The string to convert
|
int — The converted number
|
timeToString | () | method |
public function timeToString(n:int):String
Converts milliseconds to a 00:00:000 format.
Parametersn:int — Milliseconds to convert
|
String — The converted string
|
unloadMedia | () | method |
public function unloadMedia():void
Unloads the current item playing.
zero | () | method |
protected function zero(n:int, isMS:Boolean = false):String
Parameters
n:int |
|
isMS:Boolean (default = false )
|
String |
audioMetadata | event |
cv.events.MetaDataEvent
cv.events.MetaDataEvent.AUDIO_METADATA
Dispatched as ID3 metadata is receieved from an MP3
Defines the value of the type
property of an audioMetadata
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. |
change | event |
cuePoint | event |
cv.events.CuePointEvent
cv.events.CuePointEvent.CUE_POINT
Dispatched everytime a cue point is 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. |
loadProgress | event |
loadStart | event |
next | event |
flash.events.Event
Dispatched after Tempo 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 |
previous | event |
refreshPlaylist | event |
flash.events.Event
Dispatched from the PlayListManager when ever an item is removed, or updated, or the entire list is updated
videoMetadata | event |
cv.events.MetaDataEvent
cv.events.MetaDataEvent.VIDEO_METADATA
Dispatched as metadata is receieved from an video stream of M4A file
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. |
AUDIO | constant |
public static const AUDIO:String = "audio"
AUDIO_METADATA | constant |
public static const AUDIO_METADATA:String = "audioMetadata"
CHANGE | constant |
public static const CHANGE:String = "change"
EXACT_FIT | constant |
public static const EXACT_FIT:String = "fit"
LOAD_COMPLETE | constant |
public static const LOAD_COMPLETE:String = "loadComplete"
LOAD_PROGRESS | constant |
public static const LOAD_PROGRESS:String = "loadProgress"
LOAD_START | constant |
public static const LOAD_START:String = "loadStart"
MAINTAIN_ASPECT_RATIO | constant |
public static const MAINTAIN_ASPECT_RATIO:String = "ratio"
NEW_PLAYLIST | constant |
public static const NEW_PLAYLIST:String = "newPlaylist"
NEXT | constant |
public static const NEXT:String = "next"
NO_SCALE | constant |
public static const NO_SCALE:String = "scale"
PLAY_COMPLETE | constant |
public static const PLAY_COMPLETE:String = "playComplete"
PLAY_PROGRESS | constant |
public static const PLAY_PROGRESS:String = "playProgress"
PLAY_START | constant |
public static const PLAY_START:String = "playStart"
PREVIOUS | constant |
public static const PREVIOUS:String = "prev"
REFRESH_PLAYLIST | constant |
public static const REFRESH_PLAYLIST:String = "refreshPlaylist"
REPEAT_ALL | constant |
public static const REPEAT_ALL:String = "all"
REPEAT_NONE | constant |
public static const REPEAT_NONE:String = "none"
REPEAT_TRACK | constant |
public static const REPEAT_TRACK:String = "track"
VERSION | constant |
public static const VERSION:String = "2.0.3"
The current version of TempoLite in use.
VIDEO | constant |
public static const VIDEO:String = "video"
VIDEO_METADATA | constant |
public static const VIDEO_METADATA:String = "videoMetadata"