Packagesekati.media
Classpublic class FLV
InheritanceFLV Inheritance flash.events.EventDispatcher
ImplementsIProgressiveMedia

FLV provides a common media control object for playing progressive video content. Acceptable file types are defined in FileTypeValidator.IS_VIDEO.


Example
    var flv : FLV = new FLV( );
    flv.load( "path/to/video.flv" );
    flv.play( );
  

See also

sekati.ui.FLVPlayer
sekati.events.MediaEvent


Public Properties
 PropertyDefined by
  bufferLength : Number
[read-only] Amount of play-ahead buffer, in seconds.
FLV
  deblocking : int
Indicates the type of filter applied to decoded video as part of post-processing.
FLV
  duration : Number
[read-only] The total playback duration, in seconds.
FLV
  isBuffering : Boolean
[read-only] Buffering status.
FLV
  isPaused : Boolean
[read-only] Paused status.
FLV
  isPlaying : Boolean
[read-only] Playing status.
FLV
  isStopped : Boolean
[read-only] Stopped status.
FLV
  ns : NetStream
[read-only] The Netstream instance should clients wish to listen to NetStream directly rather than the more pragmatic but less granular MediaEvent.
FLV
  pan : Number
The Video sound panning (-1 - 1).
FLV
  percentLoaded : Number
[read-only] The percent loaded (0 - 1).
FLV
  percentPlayed : Number
[read-only] The percent played (0 - 1).
FLV
  percentPlayedWithBuffer : Number
[read-only] The percent of the movie that should be currently buffered.
FLV
  position : Number
[read-only] The position of the playhead, in seconds.
FLV
  smoothing : Boolean
Whether the Video should be smoothed (interpolated) when it is scaled.
FLV
  url : String
[read-only] The video url.
FLV
  video : Video
[read-only] The Video instance to be added to the DisplayList.
FLV
  videoHeight : int
[read-only] The native integer height that the video file was encoded/exported at.
FLV
  videoWidth : int
[read-only] The native integer width that the video file was encoded/exported at.
FLV
  volume : Number
The Video volume (0 - 1).
FLV
Public Methods
 MethodDefined by
  
FLV(width:int = 320, height:int = 240, smoothing:Boolean = false, deblocking:int)
FLV Constructor
FLV
  
destroy():void
Stop playback and cleanup.
FLV
  
fastForward(seconds:Number = 2):void
Fast-Forward playback.
FLV
  
load(url:String, buffer:uint = 4):void
Load the video and begin playback.
FLV
  
pause():void
Pause playback.
FLV
  
play():void
Start playback.
FLV
  
resume():void
Resume playback.
FLV
  
rewind(seconds:Number = 2):void
Rewind playback.
FLV
  
seek(time:Number):void
Seek to a playback time.
FLV
  
seekToPercent(percent:Number):void
Seek to a playback percent (0 - 1).
FLV
  
stop():void
Stop playback.
FLV
  
togglePause():void
Pause/Resume playback toggle.
FLV
Protected Methods
 MethodDefined by
  
checkBuffer():void
Handle buffer externally to ns.bufferTime so we can achieve proper cuePoint timing.
FLV
  
cuePointHandler(infoObject:Object):void
NetStream cuepoint handler.
FLV
  
metaDataHandler(metadata:Object):void
NetStream metadata handler.
FLV
  
netStatusHandler(stats:NetStatusEvent):void
NetStatus handler.
FLV
  
progressHandler(e:Event):void
Progress frame loop to keep client progress up to date.
FLV
  
resolveTime(time:Number):Number
Formats time so that it fits inside the available seek scope.
FLV
Public Constants
 ConstantDefined by
  DEBLOCK_AUTO : int = 0
[static] Let the video compressor apply the deblocking filter as needed [default].
FLV
  DEBLOCK_NONE : int = 1
[static] Do not use a deblocking filter.
FLV
  DEBLOCK_ON2 : int = 3
[static] For On2 video only, uses the On2 deblocking filter but no deringing filter.
FLV
  DEBLOCK_ON2_DERINGER : int = 4
[static] For On2 video only, uses the On2 deblocking and deringing filter.
FLV
  DEBLOCK_ON2_DERINGER_HIGH : int = 5
[static] For On2 video only, uses the On2 deblocking and a higher-performance On2 deringing filter.
FLV
  DEBLOCK_SORENSON : int = 2
[static] Uses the Sorenson deblocking filter.
FLV
Property detail
bufferLengthproperty
bufferLength:Number  [read-only]

Amount of play-ahead buffer, in seconds.

Implementation
    public function get bufferLength():Number
deblockingproperty 
deblocking:int  [read-write]

Indicates the type of filter applied to decoded video as part of post-processing. The default value is 0, which lets the video compressor apply a deblocking filter as needed.

Compression of video can result in undesired artifacts. You can use the deblocking property to set filters that reduce blocking and, for video compressed using the On2 codec, ringing.

Blocking refers to visible imperfections between the boundaries of the blocks that compose each video frame. Ringing refers to distorted edges around elements within a video image.

Two deblocking filters are available: one in the Sorenson codec and one in the On2 VP6 codec. In addition, a deringing filter is available when you use the On2 VP6 codec. To set a filter use one of the DEBLOCK constants.

If a value greater than 2 is selected for video when you are using the Sorenson codec, the Sorenson decoder defaults to 2.

Using a deblocking filter has an effect on overall playback performance, and it is usually not necessary for high-bandwidth video. If a user's system is not powerful enough, the user may experience difficulties playing back video with a deblocking filter enabled.

Implementation
    public function get deblocking():int
    public function set deblocking(value:int):void

See also

durationproperty 
duration:Number  [read-only]

The total playback duration, in seconds.

Implementation
    public function get duration():Number
isBufferingproperty 
isBuffering:Boolean  [read-only]

Buffering status.

Implementation
    public function get isBuffering():Boolean
isPausedproperty 
isPaused:Boolean  [read-only]

Paused status.

Implementation
    public function get isPaused():Boolean
isPlayingproperty 
isPlaying:Boolean  [read-only]

Playing status.

Implementation
    public function get isPlaying():Boolean
isStoppedproperty 
isStopped:Boolean  [read-only]

Stopped status.

Implementation
    public function get isStopped():Boolean
nsproperty 
ns:NetStream  [read-only]

The Netstream instance should clients wish to listen to NetStream directly rather than the more pragmatic but less granular MediaEvent.

Implementation
    public function get ns():NetStream
panproperty 
pan:Number  [read-write]

The Video sound panning (-1 - 1).

Implementation
    public function get pan():Number
    public function set pan(value:Number):void
percentLoadedproperty 
percentLoaded:Number  [read-only]

The percent loaded (0 - 1).

Implementation
    public function get percentLoaded():Number
percentPlayedproperty 
percentPlayed:Number  [read-only]

The percent played (0 - 1).

Implementation
    public function get percentPlayed():Number
percentPlayedWithBufferproperty 
percentPlayedWithBuffer:Number  [read-only]

The percent of the movie that should be currently buffered.

Implementation
    public function get percentPlayedWithBuffer():Number

See also

positionproperty 
position:Number  [read-only]

The position of the playhead, in seconds.

Implementation
    public function get position():Number
smoothingproperty 
smoothing:Boolean  [read-write]

Whether the Video should be smoothed (interpolated) when it is scaled. For smoothing to work, the player must be in high-quality mode. The default value is false (no smoothing).

For video playback using Flash Player 9.0.115.0 and later versions, set this property to true to take advantage of mipmapping image optimization.

Implementation
    public function get smoothing():Boolean
    public function set smoothing(value:Boolean):void
urlproperty 
url:String  [read-only]

The video url.

Implementation
    public function get url():String
videoproperty 
video:Video  [read-only]

The Video instance to be added to the DisplayList.

Implementation
    public function get video():Video
videoHeightproperty 
videoHeight:int  [read-only]

The native integer height that the video file was encoded/exported at.

This property may be used to ensure that the user is seeing the video at the same size at which it was captured, regardless of the actual size of the Video object on the Stage.

Implementation
    public function get videoHeight():int
videoWidthproperty 
videoWidth:int  [read-only]

The native integer width that the video file was encoded/exported at.

This property may be used to ensure that the user is seeing the video at the same size at which it was captured, regardless of the actual size of the Video object on the Stage.

Implementation
    public function get videoWidth():int
volumeproperty 
volume:Number  [read-write]

The Video volume (0 - 1).

Implementation
    public function get volume():Number
    public function set volume(value:Number):void
Constructor detail
FLV()constructor
public function FLV(width:int = 320, height:int = 240, smoothing:Boolean = false, deblocking:int)

FLV Constructor

Parameters
width:int (default = 320)
 
height:int (default = 240)
 
smoothing:Boolean (default = false)
 
deblocking:int
Method detail
checkBuffer()method
protected function checkBuffer():void

Handle buffer externally to ns.bufferTime so we can achieve proper cuePoint timing.

cuePointHandler()method 
protected function cuePointHandler(infoObject:Object):void

NetStream cuepoint handler.

Parameters
infoObject:Object
destroy()method 
public function destroy():void

Stop playback and cleanup.

fastForward()method 
public function fastForward(seconds:Number = 2):void

Fast-Forward playback.

Parameters
seconds:Number (default = 2) — to step forward.
load()method 
public function load(url:String, buffer:uint = 4):void

Load the video and begin playback.

Parameters
url:String — of the video to be loaded.
 
buffer:uint (default = 4) — in seconds.

Throws
— ArgumentError if url is not video type.
metaDataHandler()method 
protected function metaDataHandler(metadata:Object):void

NetStream metadata handler.

Parameters
metadata:Object

Example
   //use the embedded metadata height/width to resize video to correct proportions
   if( Number( metadata['height'] ) > 0) {
     //resize based on width/height
     var newH:Number = Number(metadata['height']);
     var newW:Number = Number(metadata['width']);
     var prop:Number = newW / _initWidth;
     
     _video.height = newH prop;
     _video.width = newW prop;
    }
   

netStatusHandler()method 
protected function netStatusHandler(stats:NetStatusEvent):void

NetStatus handler.

Parameters
stats:NetStatusEvent
pause()method 
public function pause():void

Pause playback.

play()method 
public function play():void

Start playback.

progressHandler()method 
protected function progressHandler(e:Event):void

Progress frame loop to keep client progress up to date.

Parameters
e:Event
resolveTime()method 
protected function resolveTime(time:Number):Number

Formats time so that it fits inside the available seek scope.

Parameters
time:Number

Returns
Number
resume()method 
public function resume():void

Resume playback.

rewind()method 
public function rewind(seconds:Number = 2):void

Rewind playback.

Parameters
seconds:Number (default = 2) — to step back.
seek()method 
public function seek(time:Number):void

Seek to a playback time.

Parameters
time:Number — in playback to seek to.
seekToPercent()method 
public function seekToPercent(percent:Number):void

Seek to a playback percent (0 - 1).

Parameters
percent:Number — of playback to seek to.
stop()method 
public function stop():void

Stop playback.

togglePause()method 
public function togglePause():void

Pause/Resume playback toggle.

Constant detail
DEBLOCK_AUTOconstant
public static const DEBLOCK_AUTO:int = 0

Let the video compressor apply the deblocking filter as needed [default].

DEBLOCK_NONEconstant 
public static const DEBLOCK_NONE:int = 1

Do not use a deblocking filter.

DEBLOCK_ON2constant 
public static const DEBLOCK_ON2:int = 3

For On2 video only, uses the On2 deblocking filter but no deringing filter.

DEBLOCK_ON2_DERINGERconstant 
public static const DEBLOCK_ON2_DERINGER:int = 4

For On2 video only, uses the On2 deblocking and deringing filter.

DEBLOCK_ON2_DERINGER_HIGHconstant 
public static const DEBLOCK_ON2_DERINGER_HIGH:int = 5

For On2 video only, uses the On2 deblocking and a higher-performance On2 deringing filter.

DEBLOCK_SORENSONconstant 
public static const DEBLOCK_SORENSON:int = 2

Uses the Sorenson deblocking filter.