Package | sekati.media |
Class | public class FLV |
Inheritance | FLV flash.events.EventDispatcher |
Implements | IProgressiveMedia |
FileTypeValidator.IS_VIDEO
.
var flv : FLV = new FLV( ); flv.load( "path/to/video.flv" ); flv.play( );
See also
Property | Defined 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 |
Method | Defined 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 |
Method | Defined 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 |
Constant | Defined 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 |
bufferLength | property |
bufferLength:Number
[read-only]Amount of play-ahead buffer, in seconds.
Implementation public function get bufferLength():Number
deblocking | property |
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
duration | property |
duration:Number
[read-only]The total playback duration, in seconds.
Implementation public function get duration():Number
isBuffering | property |
isBuffering:Boolean
[read-only]Buffering status.
Implementation public function get isBuffering():Boolean
isPaused | property |
isPaused:Boolean
[read-only]Paused status.
Implementation public function get isPaused():Boolean
isPlaying | property |
isPlaying:Boolean
[read-only]Playing status.
Implementation public function get isPlaying():Boolean
isStopped | property |
isStopped:Boolean
[read-only]Stopped status.
Implementation public function get isStopped():Boolean
ns | property |
ns:NetStream
[read-only]
The Netstream
instance should clients wish to listen to NetStream
directly rather than the more pragmatic but less granular MediaEvent
.
public function get ns():NetStream
pan | property |
pan:Number
[read-write] The Video
sound panning (-1 - 1).
public function get pan():Number
public function set pan(value:Number):void
percentLoaded | property |
percentLoaded:Number
[read-only]The percent loaded (0 - 1).
Implementation public function get percentLoaded():Number
percentPlayed | property |
percentPlayed:Number
[read-only]The percent played (0 - 1).
Implementation public function get percentPlayed():Number
percentPlayedWithBuffer | property |
percentPlayedWithBuffer:Number
[read-only]The percent of the movie that should be currently buffered.
Implementation public function get percentPlayedWithBuffer():Number
See also
position | property |
position:Number
[read-only]The position of the playhead, in seconds.
Implementation public function get position():Number
smoothing | property |
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
url | property |
url:String
[read-only]The video url.
Implementation public function get url():String
video | property |
video:Video
[read-only]
The Video
instance to be added to the DisplayList
.
public function get video():Video
videoHeight | property |
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
videoWidth | property |
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
volume | property |
volume:Number
[read-write]
The Video
volume (0 - 1).
public function get volume():Number
public function set volume(value:Number):void
FLV | () | constructor |
public function FLV(width:int = 320, height:int = 240, smoothing:Boolean = false, deblocking:int)
FLV Constructor
Parameterswidth:int (default = 320 )
|
|
height:int (default = 240 )
|
|
smoothing:Boolean (default = false )
|
|
deblocking:int |
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.
infoObject:Object |
destroy | () | method |
public function destroy():void
Stop playback and cleanup.
fastForward | () | method |
public function fastForward(seconds:Number = 2):void
Fast-Forward playback.
Parametersseconds:Number (default = 2 ) — to step forward.
|
load | () | method |
public function load(url:String, buffer:uint = 4):void
Load the video and begin playback.
Parametersurl:String — of the video to be loaded.
|
|
buffer:uint (default = 4 ) — in seconds.
|
— ArgumentError if url is not video type.
|
metaDataHandler | () | method |
protected function metaDataHandler(metadata:Object):void
NetStream
metadata handler.
metadata:Object |
//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.
Parametersstats: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.
Parameterse:Event |
resolveTime | () | method |
protected function resolveTime(time:Number):Number
Formats time so that it fits inside the available seek scope.
Parameterstime:Number |
Number |
resume | () | method |
public function resume():void
Resume playback.
rewind | () | method |
public function rewind(seconds:Number = 2):void
Rewind playback.
Parametersseconds:Number (default = 2 ) — to step back.
|
seek | () | method |
public function seek(time:Number):void
Seek to a playback time.
Parameterstime:Number — in playback to seek to.
|
seekToPercent | () | method |
public function seekToPercent(percent:Number):void
Seek to a playback percent (0 - 1).
Parameterspercent:Number — of playback to seek to.
|
stop | () | method |
public function stop():void
Stop playback.
togglePause | () | method |
public function togglePause():void
Pause/Resume playback toggle.
DEBLOCK_AUTO | constant |
public static const DEBLOCK_AUTO:int = 0
Let the video compressor apply the deblocking filter as needed [default].
DEBLOCK_NONE | constant |
public static const DEBLOCK_NONE:int = 1
Do not use a deblocking filter.
DEBLOCK_ON2 | constant |
public static const DEBLOCK_ON2:int = 3
For On2 video only, uses the On2 deblocking filter but no deringing filter.
DEBLOCK_ON2_DERINGER | constant |
public static const DEBLOCK_ON2_DERINGER:int = 4
For On2 video only, uses the On2 deblocking and deringing filter.
DEBLOCK_ON2_DERINGER_HIGH | constant |
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_SORENSON | constant |
public static const DEBLOCK_SORENSON:int = 2
Uses the Sorenson deblocking filter.