Packagesekati.ui
Classpublic class FLVPlayer
InheritanceFLVPlayer Inheritance AbstractMediaPlayer Inheritance LiquidSprite Inheritance CoreSprite Inheritance flash.display.Sprite

FLVPlayer provides playback control interface logic to be used with sekati.media.FLV.

To implement pass references to UI controller instances to the FLVPlayer constructor, instantiate the FLVPlayer instance & addChild( myFLVPlayerInstance ) to attach the sprite-wrapped Video.


Example
  var player : FLVPlayer = new FLVPlayer( player.playBtn, player.progressBar, player.bufferBar, player.gutterBar, player.volumeBtn );
  player.x = player.y = 10;
  addChild( player ); // adds a sprite-wrapped video instance.
  player.init( 'path/to/my.flv' );
  

See also

sekati.media.FLV
sekati.events.MediaEvent


Public Properties
 PropertyDefined by
 InheritedbufferBarPercent : Number
Buffer bar scale percent (0-1).
AbstractMediaPlayer
  currentCuePoint : Object
[read-only] Returns reference to current cue point data object.
FLVPlayer
 Inheritedenabled : Boolean
Enabled property defines whether liquid eventing is available or not.
LiquidSprite
 InheritedinteractiveMode : Boolean
Specifies the mouse cursors modal state in the object as an interactive target via: buttonMode, mouseChildren & tabChildren.
CoreSprite
 Inheritedmedia : IProgressiveMedia
The IProgressiveMedia being played.
AbstractMediaPlayer
  movie : FLV
[read-only] The FLV being played.
FLVPlayer
 InheritedprogressBarPercent : Number
Progress bar scale percent (0-1).
AbstractMediaPlayer
 Inheritedscale : Number
The scale value.
CoreSprite
  video : Video
[read-only] The Video instance.
FLVPlayer
Protected Properties
 PropertyDefined by
 Inherited_bufferBar : Sprite
AbstractMediaPlayer
  _currentCuePoint : Object
FLVPlayer
 Inherited_gutterBar : Sprite
AbstractMediaPlayer
  _height : uint
FLVPlayer
 Inherited_isBufferPaused : Boolean
AbstractMediaPlayer
 Inherited_isDrag : Boolean
AbstractMediaPlayer
 Inherited_isSeeking : Boolean
AbstractMediaPlayer
 Inherited_media : IProgressiveMedia
AbstractMediaPlayer
 Inherited_playBtn : MovieClip
AbstractMediaPlayer
 Inherited_progressBar : Sprite
AbstractMediaPlayer
  _smoothing : Boolean
FLVPlayer
 Inherited_volumeBtn : Sprite
AbstractMediaPlayer
 Inherited_wasPlaying : Boolean
AbstractMediaPlayer
  _width : uint
FLVPlayer
Public Methods
 MethodDefined by
  
FLVPlayer(playBtn:MovieClip, progressBar:Sprite, bufferBar:Sprite, gutterBar:Sprite, volumeBtn:Sprite, width:uint = 320, height:uint = 240, smoothing:Boolean = true)
FLVPlayer Constructor
FLVPlayer
 Inherited
addChildren(... args):void
Add multiple child DisplayObject's.
CoreSprite
 Inherited
destroy():void
Clean up after thy self.
AbstractMediaPlayer
  
init(url:String, buffer:uint = 4):void
Load video and initialize FLVPlayer UI and FLV core.
FLVPlayer
 Inherited
pause():void
Pause playback
AbstractMediaPlayer
 Inherited
remove():void
Remove the IProgressiveMedia from player.
AbstractMediaPlayer
 Inherited
reset():void
Reset the interface.
AbstractMediaPlayer
 Inherited
resume():void
Resume playback
AbstractMediaPlayer
 Inherited
setVolume(percent:Number):void
Core video volume driver.
AbstractMediaPlayer
 Inherited
toString():String
Return reflective output.
CoreSprite
Protected Methods
 MethodDefined by
  
Add MediaEvent.PROGRESS & other IProgressiveMedia events.
FLVPlayer
 Inherited
Add UI listers.
AbstractMediaPlayer
 Inherited
bufferBarDown(e:MouseEvent):void
_bufferBar pressed: being seeking.
AbstractMediaPlayer
 Inherited
bufferBarMove(e:MouseEvent):void
_bufferBar scrubbing: seek.
AbstractMediaPlayer
 Inherited
bufferBarUp(e:MouseEvent):void
_bufferBar released: stop seeking.
AbstractMediaPlayer
 Inherited
When playhead enters area that needs buffering, pause the IProgressiveMedia if playing.
AbstractMediaPlayer
 Inherited
When IProgressiveMedia has finished buffering check to see if media was paused to allow for buffering if it was restart, if not, do nothing.
AbstractMediaPlayer
 Inherited
configListeners(isAdd:Boolean = false):void
Event listener management.
LiquidSprite
  
createMedia():void
Instantiate IProgressiveMedia (stub).
FLVPlayer
 Inherited
fullscreen(e:StageEvent = null):void
Stub: fires when StageDisplay dispatches a FULLSCREEN event.
LiquidSprite
 Inherited
invalidate():void
Request a redraw, use for deferred rendering.
CoreSprite
 Inherited
offStage(e:Event = null):void
Stub: Sprite has been removed from stage.
LiquidSprite
 Inherited
onStage(e:Event = null):void
Stub: Sprite has been added to stage.
LiquidSprite
 Inherited
pauseMemory():void
Pause video in memory and track state.
AbstractMediaPlayer
 Inherited
playBtnClick(e:MouseEvent = null):void
Toggle the framed _playBtn icon and pause/resume playback.
AbstractMediaPlayer
 Inherited
Handle MediaEvent.PROGRESS event: update the buffer and progress bars.
AbstractMediaPlayer
  
Remove MediaEvent.PROGRESS & other IProgressiveMedia events.
FLVPlayer
 Inherited
Remove UI listers.
AbstractMediaPlayer
 Inherited
resize(e:StageEvent = null):void
Stub: fires when StageDisplay dispatches a RESIZE event.
AbstractMediaPlayer
 Inherited
resizeComplete(e:StageEvent = null):void
Stub: fires when StageDisplay dispatches a RESIZE_COMPLETE event.
LiquidSprite
 Inherited
resumeMemory():void
Resume video from member and release state.
AbstractMediaPlayer
 Inherited
seekUI():void
Use guttBar to prevent seek offset inaccuracy while still buffering.
AbstractMediaPlayer
 Inherited
setPauseIcon():void
Set the _playBtn icon "paused".
AbstractMediaPlayer
 Inherited
setPlayIcon():void
Set the _playBtn icon "played".
AbstractMediaPlayer
  
Handle & re-dispatch the MediaEvent status events (since AbstractMediaPlayer subclasses have the option of being added to stage and bubbling these events unlike IProgressiveMedia classes).
FLVPlayer
 Inherited
volumeBtnDown(e:MouseEvent):void
_volumeBtn pressed: begin volume control.
AbstractMediaPlayer
 Inherited
volumeBtnMove(e:MouseEvent):void
_volumeBtn scrubbing: change volume.
AbstractMediaPlayer
 Inherited
volumeBtnUp(e:MouseEvent):void
_volumeBtn released: end volume control.
AbstractMediaPlayer
Property detail
_currentCuePointproperty
protected var _currentCuePoint:Object
currentCuePointproperty 
currentCuePoint:Object  [read-only]

Returns reference to current cue point data object.

Implementation
    public function get currentCuePoint():Object
_heightproperty 
protected var _height:uint
movieproperty 
movie:FLV  [read-only]

The FLV being played.

Implementation
    public function get movie():FLV
_smoothingproperty 
protected var _smoothing:Boolean
videoproperty 
video:Video  [read-only]

The Video instance.

Implementation
    public function get video():Video
_widthproperty 
protected var _width:uint
Constructor detail
FLVPlayer()constructor
public function FLVPlayer(playBtn:MovieClip, progressBar:Sprite, bufferBar:Sprite, gutterBar:Sprite, volumeBtn:Sprite, width:uint = 320, height:uint = 240, smoothing:Boolean = true)

FLVPlayer Constructor

Parameters
playBtn:MovieClip — reference to play UI control.
 
progressBar:Sprite — reference to progress UI to control.
 
bufferBar:Sprite — reference to buffer UI control.
 
gutterBar:Sprite — reference to gutter UI to control.
 
volumeBtn:Sprite — reference to volume UI to control.
 
width:uint (default = 320) — of the Video instance.
 
height:uint (default = 240) — of the Video instance.
 
smoothing:Boolean (default = true) — of the Video instance.
Method detail
addMediaListeners()method
protected override function addMediaListeners():void

Add MediaEvent.PROGRESS & other IProgressiveMedia events.

createMedia()method 
protected override function createMedia():void

Instantiate IProgressiveMedia (stub).

init()method 
public override function init(url:String, buffer:uint = 4):void

Load video and initialize FLVPlayer UI and FLV core.

Parameters
url:String — of flv video.
 
buffer:uint (default = 4) — in seconds.
removeMediaListeners()method 
protected override function removeMediaListeners():void

Remove MediaEvent.PROGRESS & other IProgressiveMedia events.

statusHandler()method 
protected override function statusHandler(e:MediaEvent):void

Handle & re-dispatch the MediaEvent status events (since AbstractMediaPlayer subclasses have the option of being added to stage and bubbling these events unlike IProgressiveMedia classes).

It is best to implement your own switch/case subclass code for granular event responses.

Parameters
e:MediaEvent