Package | com.gestureworks.cml.elements |
Class | public class Video |
Inheritance | Video ![]() ![]() |
It support the following file types are: .mp4, .FLV, .MPEG-4, .m4v, .3GPP, .MOV, .F4V
var video:VideoElement = new VideoElement(); video.src = "myVideo.mp4"; video.autoplay = true; video.init(); addChild(video); video.play();
Property | Defined By | ||
---|---|---|---|
autoLoad : Boolean
Indicates whether the video file is loaded when the src property is set
| Video | ||
autoplay : Boolean
Indicates whether the video file plays upon load
| Video | ||
![]() | autoShuffle : Boolean
autoshuffles
| TouchContainer | |
centerPlayButton : Boolean = true
Flag central alignment of the play button
| Video | ||
![]() | childList : ChildList
Returns the object's childList. | TouchContainer | |
![]() | className : String
sets the class name of displayobject
| TouchContainer | |
![]() | cloneExclusions : Vector.<String> [read-only]
Returns a list of properties to exclude when cloning this object
| TouchContainer | |
![]() | cmlIndex : int
Returns the index created by the CML parser. | TouchContainer | |
deblocking : int
Indicates the type of filter applied to decoded video as part of post-processing. | Video | ||
debug : Boolean
Prints status message to console
| Video | ||
![]() | dimensionsTo : Object
Sets the dimensions of TouchContainer to given object
| TouchContainer | |
![]() | dropShadow : Boolean
Sets the drop shadow effect
| TouchContainer | |
duration : Number [read-only]
Total video duration
| Video | ||
![]() | group : String | TouchContainer | |
height : Number [override]
Sets the video height
| Video | ||
![]() | heightPercent : Number
sets the height of the container
| TouchContainer | |
![]() | id : String
Returns the object's id. | TouchContainer | |
isLoaded : Boolean [read-only]
Returns video loaded status
| Video | ||
isPaused : Boolean [read-only]
Returns video paused status
| Video | ||
isPlaying : Boolean [read-only]
Returns video playing status
| Video | ||
![]() | layout : *
specifies the type of layout
| TouchContainer | |
![]() | layoutList : Dictionary | TouchContainer | |
loop : Boolean
Video loop play
| Video | ||
![]() | mouseChildren : Boolean [override]
sets the mousechildren value to true or false. | TouchContainer | |
mute : Boolean
Turns the volume all the way down when true and returns it to volume prior to muting when false
| Video | ||
![]() | paddingBottom : Number
Sets the number of pixels between the container's bottom border and the bottom of its content area. | TouchContainer | |
![]() | paddingLeft : Number
Sets the number of pixels between the component's left border and the left edge of its content area. | TouchContainer | |
![]() | paddingRight : Number
Sets the number of pixels between the component's right border and the right edge of its content area. | TouchContainer | |
![]() | paddingTop : Number
Sets the number of pixels between the container's top border and the top of its content area. | TouchContainer | |
percentLoaded : Number [read-only]
Percent of file loaded
| Video | ||
playButtonState : String
Specifies the button state to execute the play operation
| Video | ||
position : * [override]
Playhead position in ms
| Video | ||
progressBar : *
Links a progress bar to the video process
| Video | ||
![]() | relativeX : Boolean
When set true this containers children's x position will be laid out relatively
to each other. | TouchContainer | |
![]() | relativeY : Boolean
When set true this containers children's y position will be laid out relatively
to each other. | TouchContainer | |
resample : Boolean | Video | ||
smoothing : Boolean
Specifies whether the video should be smoothed (interpolated) when it is scaled. | Video | ||
![]() | sound : String | TouchContainer | |
src : String
Sets the video file path
| Video | ||
![]() | state : Dictionary | TouchContainer | |
![]() | stateId : *
Returns the current state id. | TouchContainer | |
![]() | toBitmap : Boolean | TouchContainer | |
volume : Number
Sets the audio volume
| Video | ||
width : Number [override]
Sets the video width
| Video | ||
![]() | widthPercent : Number
sets the width of the container
| TouchContainer |
Method | Defined By | ||
---|---|---|---|
Video()
Constructor
| Video | ||
![]() | activateTouch():void | TouchContainer | |
![]() | addAllChildren():void
method searches the child and adds to the list
| TouchContainer | |
![]() | addChild(child:DisplayObject):DisplayObject [override]
Adds child to display list and, if not already added, the child list
| TouchContainer | |
![]() | addChildAt(child:DisplayObject, index:int):DisplayObject [override]
Adds child to display list and, if not already added, the child list
| TouchContainer | |
![]() | applyLayout(value:* = null):void
Apply the containers layout
| TouchContainer | |
![]() | childToList(id:String, child:*):void
child appended to the childlist
| TouchContainer | |
![]() | clone():*
Clone method
| TouchContainer | |
close():void
Closes video
| Video | ||
dispose():void [override]
Destructor
| Video | ||
fitContent(aspectWidth:Number, aspectHeight:Number):void | Video | ||
![]() | getElementById(id:String):*
Searches CML childList by id. | TouchContainer | |
![]() | getElementsByClassName(className:String):Array
Searches the CML childList by className. | TouchContainer | |
![]() | getElementsByTagName(tagName:Class):Array
Searches the CML childList by tagName as Class. | TouchContainer | |
init():void [override] | Video | ||
![]() | loadState(sId:* = null, recursion:Boolean = false):void
Loads state by index number. | TouchContainer | |
![]() | makeGestureList(value:XMLList):Object
Creates gestureList object from XML
| TouchContainer | |
open(file:String = null):void
Sets the src property and loads the video
| Video | ||
![]() | parseCML(cml:XMLList):XMLList
Parse cml for local layouts. | TouchContainer | |
pause(e:StateEvent = null):void
Pauses video
| Video | ||
play(e:StateEvent = null):void
Plays the video from the beginning
| Video | ||
![]() | postparseCML(cml:XMLList):void
Abstract method allows the setting of a postparse CML routine. | TouchContainer | |
![]() | querySelector(selector:String):*
Searches the CML childList by selector. | TouchContainer | |
![]() | querySelectorAll(selector:*):Array
Search the CML childList by selector. | TouchContainer | |
![]() | removeChild(child:DisplayObject):DisplayObject [override]
Removes child from display list and, if not already removed, the child list
| TouchContainer | |
![]() | removeChildAt(index:int):DisplayObject [override]
Removes child from display list and, if not already removed, the child list
| TouchContainer | |
![]() | removeChildren(beginIndex:int = 0, endIndex:int = 2147483647):void [override]
Removes children from display list and, if not already removed, the child list
| TouchContainer | |
resize():void | Video | ||
resume(e:StateEvent = null):void
Resumes video playback from paused position
| Video | ||
![]() | saveState(sId:* = null, recursion:Boolean = false):void
Save state by index number. | TouchContainer | |
![]() | searchChildren(value:*, returnType:Class = null):*
This method does a depth first search of childLists. | TouchContainer | |
seek(offset:Number):void
Sets the video playhead position
| Video | ||
![]() | setDimensionsToChild():void
method sets the dimensions of each child
| TouchContainer | |
stop():void
Pauses video and returns to the beginning
| Video | ||
![]() | tweenState(sId:* = null, tweenTime:Number = 1):void
Tween state by stateIndex from current to given state index. | TouchContainer | |
![]() | updatePadding():void
Updates child padding within this container
| TouchContainer | |
![]() | updatePercentDim():void
Updates child percent dimensions within this container
| TouchContainer | |
![]() | updateProperties(state:* = 0):void
Updates properties from state. | TouchContainer | |
![]() | updateRelativePos():void
Updates child relative positions within this container
| TouchContainer |
autoLoad | property |
autoLoad:Boolean
Indicates whether the video file is loaded when the src property is set
public function get autoLoad():Boolean
public function set autoLoad(value:Boolean):void
autoplay | property |
autoplay:Boolean
Indicates whether the video file plays upon load
public function get autoplay():Boolean
public function set autoplay(value:Boolean):void
centerPlayButton | property |
public var centerPlayButton:Boolean = true
Flag central alignment of the play button
deblocking | property |
deblocking:int
Indicates the type of filter applied to decoded video as part of post-processing.
public function get deblocking():int
public function set deblocking(value:int):void
debug | property |
debug:Boolean
Prints status message to console
public function get debug():Boolean
public function set debug(value:Boolean):void
duration | property |
duration:Number
[read-only] Total video duration
public function get duration():Number
height | property |
height:Number
[override] Sets the video height
public function get height():Number
public function set height(value:Number):void
isLoaded | property |
isLoaded:Boolean
[read-only] Returns video loaded status
public function get isLoaded():Boolean
isPaused | property |
isPaused:Boolean
[read-only] Returns video paused status
public function get isPaused():Boolean
isPlaying | property |
isPlaying:Boolean
[read-only] Returns video playing status
public function get isPlaying():Boolean
loop | property |
loop:Boolean
Video loop play
public function get loop():Boolean
public function set loop(value:Boolean):void
mute | property |
mute:Boolean
Turns the volume all the way down when true and returns it to volume prior to muting when false
The default value is false
.
public function get mute():Boolean
public function set mute(value:Boolean):void
percentLoaded | property |
percentLoaded:Number
[read-only] Percent of file loaded
public function get percentLoaded():Number
playButtonState | property |
playButtonState:String
Specifies the button state to execute the play operation
The default value is down
.
public function get playButtonState():String
public function set playButtonState(value:String):void
position | property |
position:*
[override] Playhead position in ms
public function get position():*
public function set position(value:any):void
progressBar | property |
progressBar:*
Links a progress bar to the video process
public function get progressBar():*
public function set progressBar(value:any):void
resample | property |
resample:Boolean
public function get resample():Boolean
public function set resample(value:Boolean):void
smoothing | property |
smoothing:Boolean
Specifies whether the video should be smoothed (interpolated) when it is scaled.
public function get smoothing():Boolean
public function set smoothing(value:Boolean):void
src | property |
src:String
Sets the video file path
public function get src():String
public function set src(value:String):void
volume | property |
volume:Number
Sets the audio volume
The default value is 1
.
public function get volume():Number
public function set volume(value:Number):void
width | property |
width:Number
[override] Sets the video width
public function get width():Number
public function set width(value:Number):void
Video | () | Constructor |
public function Video()
Constructor
close | () | method |
public function close():void
Closes video
dispose | () | method |
override public function dispose():void
Destructor
fitContent | () | method |
public function fitContent(aspectWidth:Number, aspectHeight:Number):void
Parameters
aspectWidth:Number | |
aspectHeight:Number |
init | () | method |
override public function init():void
open | () | method |
public function open(file:String = null):void
Sets the src property and loads the video
Parameters
file:String (default = null )
|
pause | () | method |
public function pause(e:StateEvent = null):void
Pauses video
Parameters
e:StateEvent (default = null )
|
play | () | method |
public function play(e:StateEvent = null):void
Plays the video from the beginning
Parameters
e:StateEvent (default = null )
|
resize | () | method |
public function resize():void
resume | () | method |
public function resume(e:StateEvent = null):void
Resumes video playback from paused position
Parameters
e:StateEvent (default = null )
|
seek | () | method |
public function seek(offset:Number):void
Sets the video playhead position
Parameters
offset:Number |
stop | () | method |
public function stop():void
Pauses video and returns to the beginning