Package | sekati.ui |
Class | public class FLVPlayer |
Inheritance | FLVPlayer AbstractMediaPlayer LiquidSprite CoreSprite flash.display.Sprite |
To implement pass references to UI controller instances to the FLVPlayer
constructor, instantiate the FLVPlayer instance & addChild( myFLVPlayerInstance )
to attach the sprite-wrapped Video
.
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
Property | Defined by | ||
---|---|---|---|
bufferBarPercent : Number
Buffer bar scale percent (0-1).
| AbstractMediaPlayer | ||
currentCuePoint : Object [read-only]
Returns reference to current cue point data object.
| FLVPlayer | ||
enabled : Boolean
Enabled property defines whether liquid eventing is available or not.
| LiquidSprite | ||
interactiveMode : Boolean
Specifies the mouse cursors modal state in the object as an interactive
target via:
buttonMode, mouseChildren & tabChildren . | CoreSprite | ||
media : IProgressiveMedia
The
IProgressiveMedia being played. | AbstractMediaPlayer | ||
movie : FLV
[read-only]
The
FLV being played. | FLVPlayer | ||
progressBarPercent : Number
Progress bar scale percent (0-1).
| AbstractMediaPlayer | ||
scale : Number
The
scale value. | CoreSprite | ||
video : Video [read-only]
The
Video instance. | FLVPlayer |
Property | Defined by | ||
---|---|---|---|
_bufferBar : Sprite | AbstractMediaPlayer | ||
_currentCuePoint : Object | FLVPlayer | ||
_gutterBar : Sprite | AbstractMediaPlayer | ||
_height : uint | FLVPlayer | ||
_isBufferPaused : Boolean | AbstractMediaPlayer | ||
_isDrag : Boolean | AbstractMediaPlayer | ||
_isSeeking : Boolean | AbstractMediaPlayer | ||
_media : IProgressiveMedia | AbstractMediaPlayer | ||
_playBtn : MovieClip | AbstractMediaPlayer | ||
_progressBar : Sprite | AbstractMediaPlayer | ||
_smoothing : Boolean | FLVPlayer | ||
_volumeBtn : Sprite | AbstractMediaPlayer | ||
_wasPlaying : Boolean | AbstractMediaPlayer | ||
_width : uint | FLVPlayer |
Method | Defined by | ||
---|---|---|---|
FLVPlayer(playBtn:MovieClip, progressBar:Sprite, bufferBar:Sprite, gutterBar:Sprite, volumeBtn:Sprite, width:uint = 320, height:uint = 240, smoothing:Boolean = true)
FLVPlayer Constructor
| FLVPlayer | ||
addChildren(... args):void
Add multiple child
DisplayObject 's. | CoreSprite | ||
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 | ||
pause():void
Pause playback
| AbstractMediaPlayer | ||
remove():void
Remove the
IProgressiveMedia from player. | AbstractMediaPlayer | ||
reset():void
Reset the interface.
| AbstractMediaPlayer | ||
resume():void
Resume playback
| AbstractMediaPlayer | ||
setVolume(percent:Number):void
Core video volume driver.
| AbstractMediaPlayer | ||
toString():String
Return reflective output.
| CoreSprite |
Method | Defined by | ||
---|---|---|---|
addMediaListeners():void
Add
MediaEvent.PROGRESS & other IProgressiveMedia events. | FLVPlayer | ||
addUIListeners():void
Add UI listers.
| AbstractMediaPlayer | ||
bufferBarDown(e:MouseEvent):void
_bufferBar pressed: being seeking. | AbstractMediaPlayer | ||
bufferBarMove(e:MouseEvent):void
_bufferBar scrubbing: seek. | AbstractMediaPlayer | ||
bufferBarUp(e:MouseEvent):void
_bufferBar released: stop seeking. | AbstractMediaPlayer | ||
bufferPause(e:MediaEvent):void
When playhead enters area that needs buffering, pause the
IProgressiveMedia if playing. | AbstractMediaPlayer | ||
bufferResume(e:MediaEvent):void
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 | ||
configListeners(isAdd:Boolean = false):void
Event listener management.
| LiquidSprite | ||
createMedia():void
Instantiate
IProgressiveMedia (stub). | FLVPlayer | ||
fullscreen(e:StageEvent = null):void
Stub: fires when
StageDisplay dispatches a FULLSCREEN event. | LiquidSprite | ||
invalidate():void
Request a redraw, use for deferred rendering.
| CoreSprite | ||
offStage(e:Event = null):void
Stub: Sprite has been removed from stage.
| LiquidSprite | ||
onStage(e:Event = null):void
Stub: Sprite has been added to stage.
| LiquidSprite | ||
pauseMemory():void
Pause video in memory and track state.
| AbstractMediaPlayer | ||
playBtnClick(e:MouseEvent = null):void
Toggle the framed
_playBtn icon and pause/resume playback. | AbstractMediaPlayer | ||
progressHandler(e:MediaEvent):void
Handle
MediaEvent.PROGRESS event: update the buffer and progress bars. | AbstractMediaPlayer | ||
removeMediaListeners():void
Remove
MediaEvent.PROGRESS & other IProgressiveMedia events. | FLVPlayer | ||
removeUIListeners():void
Remove UI listers.
| AbstractMediaPlayer | ||
resize(e:StageEvent = null):void
Stub: fires when
StageDisplay dispatches a RESIZE event. | AbstractMediaPlayer | ||
resizeComplete(e:StageEvent = null):void
Stub: fires when
StageDisplay dispatches a RESIZE_COMPLETE event. | LiquidSprite | ||
resumeMemory():void
Resume video from member and release state.
| AbstractMediaPlayer | ||
seekUI():void
Use guttBar to prevent seek offset inaccuracy while still buffering.
| AbstractMediaPlayer | ||
setPauseIcon():void
Set the
_playBtn icon "paused". | AbstractMediaPlayer | ||
setPlayIcon():void
Set the
_playBtn icon "played". | AbstractMediaPlayer | ||
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). | FLVPlayer | ||
volumeBtnDown(e:MouseEvent):void
_volumeBtn pressed: begin volume control. | AbstractMediaPlayer | ||
volumeBtnMove(e:MouseEvent):void
_volumeBtn scrubbing: change volume. | AbstractMediaPlayer | ||
volumeBtnUp(e:MouseEvent):void
_volumeBtn released: end volume control. | AbstractMediaPlayer |
_currentCuePoint | property |
protected var _currentCuePoint:Object
currentCuePoint | property |
currentCuePoint:Object
[read-only]Returns reference to current cue point data object.
Implementation public function get currentCuePoint():Object
_height | property |
protected var _height:uint
movie | property |
_smoothing | property |
protected var _smoothing:Boolean
video | property |
video:Video
[read-only]
The Video
instance.
public function get video():Video
_width | property |
protected var _width:uint
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
ParametersplayBtn: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.
|
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.
Parametersurl: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.
Parameterse:MediaEvent |