| Package | gs.display.flv |
| Class | public class FLV |
| Inheritance | FLV flash.events.EventDispatcher |
It's integrated with the AssetManager so if you preload an flv, f4v, or mp4 the net stream will be availale in the asset manager, and an FLV instance would use the cached net stream (pulling it from the asset manager).
You have to add the video property to the display list.
Examples are in the guttershark repository.
| Property | Defined by | ||
|---|---|---|---|
| currentTime : Number [read-only]
Get the current time.
| FLV | ||
| height : Number
Video height.
| FLV | ||
| metadata : Object | FLV | ||
| netStream : NetStream [read-only]
The currently playing net stream.
| FLV | ||
| percentBuffered : Number [read-only]
The percent of the total buffer that is full.
| FLV | ||
| percentLoaded : Number [read-only]
The percent of the video that has loaded.
| FLV | ||
| percentPlayed : Number [read-only]
The percent of the video that has played.
| FLV | ||
| pixelsPlayed : Number [read-only]
The amount of pixels that are full.
| FLV | ||
| pixelsToFill : int
The amount of pixels to use when calculating
how many pixels have played and how many
pixels for buffer are full.
| FLV | ||
| smoothing : Boolean [write-only]
Set the smoothing property on the video.
| FLV | ||
| soundTransform : SoundTransform
The sound transform of the stream.
| FLV | ||
| totalTime : Number [read-only]
Get the total time.
| FLV | ||
| traceStatuses : Boolean
Whether or not to trace out status events
from the net stream.
| FLV | ||
| updateInterval : Number
The update interval for progress.
| FLV | ||
| video : Video [read-only]
The internal video object used to display the
flv.
| FLV | ||
| volume : Number
The volume of the video player.
| FLV | ||
| width : Number
Video width.
| FLV | ||
| xmpdata : Object | FLV | ||
| Method | Defined by | ||
|---|---|---|---|
|
FLV(pixelsToFill:int = 100, updateIntervalMS:int = 400)
Constructor for FLV instances.
| FLV | ||
|
close():void
Stops and closes the net stream and net connection.
| FLV | ||
|
dispose():void
Stops playback, closes the net stream, and
removes the net stream from the asset manager.
| FLV | ||
|
forward(step:Number = 2):void
Fast-forward playback.
| FLV | ||
|
isPaused():Boolean
Check if the FLV is paused.
| FLV | ||
|
isPlaying():Boolean
Check if the FLV is playing.
| FLV | ||
|
isStopped():Boolean
Check if the FLV is stopped.
| FLV | ||
|
load(url:String, width:int = 320, height:int = 240, buffer:uint = 4, autoPlay:Boolean = false, showFirstFrame:Boolean = true):void
Loads the video, and optionally shows the first frame.
| FLV | ||
|
pause():void
Pause the flv.
| FLV | ||
|
pauseResume():void
Pauses or resumes the flv.
| FLV | ||
|
play():void
Play the flv.
| FLV | ||
|
playFromBeginning():void
Seeks to 0 and plays.
| FLV | ||
|
resume():void
Resume the flv playback.
| FLV | ||
|
rewind(step:Number = 2):void
Rewind playback.
| FLV | ||
|
seek(time:Number):void
Seek to a playback time.
| FLV | ||
|
seekToAndStop(position:Number = 0):void
Stop the flv, and seeks to the specified position.
| FLV | ||
|
seekToPercent(percent:Number):void
Seek to a playback percent.
| FLV | ||
|
seekToPixel(pixel:int):void
Seek to a width based off of the pixelsToFill property.
| FLV | ||
|
stop():void
Stop the flv.
| FLV | ||
| Event | Summary | Defined by | ||
|---|---|---|---|---|
| Dispatched when the buffer is empty. | FLV | |||
| Dispatched when the buffer was flushed. | FLV | |||
| Dispatched when the buffer is full. | FLV | |||
| Dispatched when a cue point is reached. | FLV | |||
| Dispatched when meta data is received for the current flv. | FLV | |||
| Dispatched for progress of the flv. | FLV | |||
| Dispatched when an invalid seek time was attempted. | FLV | |||
| Dispatched when a seek occurs. | FLV | |||
| Dispatched when the flv starts playing. | FLV | |||
| Dispatched when the flv stops playing. | FLV | |||
| Dispatched when a stream was not found. | FLV | |||
| currentTime | property |
currentTime:Number [read-only]Get the current time.
Implementation public function get currentTime():Number
| height | property |
height:Number [read-write]Video height.
Implementation public function get height():Number
public function set height(value:Number):void
| metadata | property |
metadata:Object [read-write]Implementation
public function get metadata():Object
public function set metadata(value:Object):void
| netStream | property |
netStream:NetStream [read-only]The currently playing net stream.
Implementation public function get netStream():NetStream
| percentBuffered | property |
percentBuffered:Number [read-only]The percent of the total buffer that is full.
Implementation public function get percentBuffered():Number
| percentLoaded | property |
percentLoaded:Number [read-only]The percent of the video that has loaded.
Implementation public function get percentLoaded():Number
| percentPlayed | property |
percentPlayed:Number [read-only]The percent of the video that has played.
Implementation public function get percentPlayed():Number
| pixelsPlayed | property |
pixelsPlayed:Number [read-only]The amount of pixels that are full.
For example, you might set the pixels to fill to 300, and if the movie is 50% played through, you'd get back the number 150. Which correlates to 50% of 300.
Implementation public function get pixelsPlayed():Number
| pixelsToFill | property |
public var pixelsToFill:intThe amount of pixels to use when calculating how many pixels have played and how many pixels for buffer are full.
| smoothing | property |
smoothing:Boolean [write-only]Set the smoothing property on the video.
Implementation public function set smoothing(value:Boolean):void
| soundTransform | property |
soundTransform:SoundTransform [read-write]The sound transform of the stream.
Implementation public function get soundTransform():SoundTransform
public function set soundTransform(value:SoundTransform):void
| totalTime | property |
totalTime:Number [read-only]Get the total time.
Implementation public function get totalTime():Number
| traceStatuses | property |
public var traceStatuses:BooleanWhether or not to trace out status events from the net stream.
| updateInterval | property |
updateInterval:Number [read-write]The update interval for progress.
Implementation public function get updateInterval():Number
public function set updateInterval(value:Number):void
| video | property |
video:Video [read-only]The internal video object used to display the flv.
Implementation public function get video():Video
| volume | property |
volume:Number [read-write]The volume of the video player.
Implementation public function get volume():Number
public function set volume(value:Number):void
| width | property |
width:Number [read-write]Video width.
Implementation public function get width():Number
public function set width(value:Number):void
| xmpdata | property |
xmpdata:Object [read-write]Implementation
public function get xmpdata():Object
public function set xmpdata(value:Object):void
| FLV | () | constructor |
public function FLV(pixelsToFill:int = 100, updateIntervalMS:int = 400)Constructor for FLV instances.
ParameterspixelsToFill:int (default = 100) — The width of the video object.
|
|
updateIntervalMS:int (default = 400) — The height of the video object.
|
| close | () | method |
public function close():voidStops and closes the net stream and net connection.
| dispose | () | method |
public function dispose():voidStops playback, closes the net stream, and removes the net stream from the asset manager.
| forward | () | method |
public function forward(step:Number = 2):voidFast-forward playback.
Parametersstep:Number (default = 2) — seconds to step forward.
|
| isPaused | () | method |
public function isPaused():BooleanCheck if the FLV is paused.
ReturnsBoolean |
| isPlaying | () | method |
public function isPlaying():BooleanCheck if the FLV is playing.
ReturnsBoolean |
| isStopped | () | method |
public function isStopped():BooleanCheck if the FLV is stopped.
ReturnsBoolean |
| load | () | method |
public function load(url:String, width:int = 320, height:int = 240, buffer:uint = 4, autoPlay:Boolean = false, showFirstFrame:Boolean = true):voidLoads the video, and optionally shows the first frame.
Parametersurl:String — The url of the FLV to load.
|
|
width:int (default = 320) — The width of the video.
|
|
height:int (default = 240) — The height of the video.
|
|
buffer:uint (default = 4) — Seconds of buffer to maintain.
|
|
autoPlay:Boolean (default = false) — Whether or not to auto play the video.
|
|
showFirstFrame:Boolean (default = true) — Whether or not to show the first frame of the flv if auto play is false.
|
| pause | () | method |
public function pause():voidPause the flv.
| pauseResume | () | method |
public function pauseResume():voidPauses or resumes the flv.
| play | () | method |
public function play():voidPlay the flv.
| playFromBeginning | () | method |
public function playFromBeginning():voidSeeks to 0 and plays.
| resume | () | method |
public function resume():voidResume the flv playback.
| rewind | () | method |
public function rewind(step:Number = 2):voidRewind playback.
Parametersstep:Number (default = 2) — seconds to step backwards.
|
| seek | () | method |
public function seek(time:Number):voidSeek to a playback time.
note that unless you're using a flash media server, it will only seek to the nearest key frame (i-frame) (see video docs in flash help for more info).
Parameterstime:Number — The time in seconds to seek to.
|
| seekToAndStop | () | method |
public function seekToAndStop(position:Number = 0):voidStop the flv, and seeks to the specified position.
Parametersposition:Number (default = 0) — The seek position.
|
| seekToPercent | () | method |
public function seekToPercent(percent:Number):voidSeek to a playback percent.
Parameterspercent:Number — of playback to seek to.
|
| seekToPixel | () | method |
public function seekToPixel(pixel:int):voidSeek to a width based off of the pixelsToFill property.
For example, if the pixels to fill was 300, you could seek anywhere between 0-300.
Parameterspixel:int — The width to seek to.
|
| stop | () | method |
public function stop():voidStop the flv.
| bufferEmpty | event |
gs.support.events.FLVEvent
Dispatched when the buffer is empty. The event manager can handle this event, as "BufferEmpty". When this is dispatched, you should pause the video, and wait for the buffer full event.
| bufferFlush | event |
gs.support.events.FLVEvent
Dispatched when the buffer was flushed. The event manager can handle this event, as "BufferFlush".
| bufferFull | event |
gs.support.events.FLVEvent
Dispatched when the buffer is full. The event manager can handle this event, as "BufferFull". When this is dispatched, you can begin playing the video again - call play or resume.
| cuePoint | event |
gs.support.events.FLVEvent
Dispatched when a cue point is reached. The event manager can handle this event, as "CuePoint".
| metaData | event |
gs.support.events.FLVEvent
Dispatched when meta data is received for the current flv. The event manager can handle this event, as "Meta".
| progress | event |
gs.support.events.FLVEvent
Dispatched for progress of the flv. The event manager can handle this event, as "Progress".
| seekInvalidTime | event |
gs.support.events.FLVEvent
Dispatched when an invalid seek time was attempted. The event manager can handle this event, as "SeekInvalidTime".
| seekNotify | event |
gs.support.events.FLVEvent
Dispatched when a seek occurs. The event manager can handle this event, as "SeekNotify".
| start | event |
gs.support.events.FLVEvent
Dispatched when the flv starts playing. The event manager can handle this event, as "Start".
| stop | event |
gs.support.events.FLVEvent
Dispatched when the flv stops playing. The event manager can handle this event, as "Stop".
| streamNotFound | event |
gs.support.events.FLVEvent
Dispatched when a stream was not found. The event manager can handle this event, as "StreamNotFound".