Packageorg.paazio
Classpublic class VideoConnector
InheritanceVideoConnector Inheritance flash.media.Video

Simplifies the media player interface by putting all classes needed under this one.

See also

http://paazio.nanbudo.fi/tutorials/flash/


Public Properties
 PropertyDefined by
  complete : Number
[read-only] Returns a number between 0 and 1 depending where current playhead is.
VideoConnector
  currentMeta : Object

By default, the height, width and duration of the video are defined.

VideoConnector
  duration : Number
[read-only] Get the duration of the current file if it is available.
VideoConnector
  loaded : Number
[read-only] Returns a number between 0 and 1 depending how much of the current file has been loaded.
VideoConnector
  time : Number
[read-only] Get the stream time which is the current playhead position.
VideoConnector
  traceFunction : Function
Somewhere to put the tracing.
VideoConnector
  volume : Number
Returns a number between 0 and 1 depending what is the current volume of the audio.
VideoConnector
Public Methods
 MethodDefined by
  
VideoConnector(w:int, h:int)
VideoConnector
  
centerVideo():void
Center the video instance to the middle of the stage.
VideoConnector
  
load(file:String):void
Start loading and then finally playing the requested file.
VideoConnector
  
onCuePoint(info:Object):void
VideoConnector
  
onImageData(info:Object):void
VideoConnector
  
onMetaData(meta:Object):void
VideoConnector
  
onPlayStatus(info:Object):void
VideoConnector
  
onTextData(info:Object):void
VideoConnector
  
seek(offset:Number, isPercent:Boolean = false):void
Seek the playhead either by seconds of by percentage of the total duration.
VideoConnector
  
togglePause():void
Toggle the play/pause of the stream.
VideoConnector
  
updateSize():void
Set the video instance to match the size of the media currently played.
VideoConnector
Property detail
completeproperty
complete:Number  [read-only]

Returns a number between 0 and 1 depending where current playhead is.

Implementation
    public function get complete():Number
currentMetaproperty 
public var currentMeta:Object

By default, the height, width and duration of the video are defined. This will prevent undefined variable errors later on.

width: 640,
height: 480,
duration: 20,
audiosamplerate: 22050

durationproperty 
duration:Number  [read-only]

Get the duration of the current file if it is available.

Implementation
    public function get duration():Number
loadedproperty 
loaded:Number  [read-only]

Returns a number between 0 and 1 depending how much of the current file has been loaded.

Implementation
    public function get loaded():Number
timeproperty 
time:Number  [read-only]

Get the stream time which is the current playhead position.

Implementation
    public function get time():Number
traceFunctionproperty 
public var traceFunction:Function

Somewhere to put the tracing.

volumeproperty 
volume:Number  [read-write]

Returns a number between 0 and 1 depending what is the current volume of the audio.

Implementation
    public function get volume():Number
    public function set volume(value:Number):void
Constructor detail
VideoConnector()constructor
public function VideoConnector(w:int, h:int)

Parameters
w:int — The width of the video object to be created
 
h:int — The height of the video object to be created
Method detail
centerVideo()method
public function centerVideo():void

Center the video instance to the middle of the stage.

load()method 
public function load(file:String):void

Start loading and then finally playing the requested file.

Parameters
file:String — url of the video file
onCuePoint()method 
public function onCuePoint(info:Object):voidParameters
info:Object
onImageData()method 
public function onImageData(info:Object):voidParameters
info:Object
onMetaData()method 
public function onMetaData(meta:Object):voidParameters
meta:Object
onPlayStatus()method 
public function onPlayStatus(info:Object):voidParameters
info:Object
onTextData()method 
public function onTextData(info:Object):voidParameters
info:Object
seek()method 
public function seek(offset:Number, isPercent:Boolean = false):void

Seek the playhead either by seconds of by percentage of the total duration.

Parameters
offset:Number — Offset of the current time in seconds
 
isPercent:Boolean (default = false) — If the offset is percentage (0...100), it is calculated from the total duration
togglePause()method 
public function togglePause():void

Toggle the play/pause of the stream.

updateSize()method 
public function updateSize():void

Set the video instance to match the size of the media currently played.