| Package | org.flowplayer.controller |
| Class | public class NetStreamControllingStreamProvider |
| Implements | StreamProvider |
| Property | Defined by | ||
|---|---|---|---|
| allowRandomSeek : Boolean [read-only]
Does this provider support random seeking to unbuffered areas in the timeline?
| NetStreamControllingStreamProvider | ||
| bufferEnd : Number [read-only]
The point in timeline where the buffered data region ends, in seconds.
| NetStreamControllingStreamProvider | ||
| bufferStart : Number [read-only]
The point in timeline where the buffered data region begins, in seconds.
| NetStreamControllingStreamProvider | ||
| fileSize : Number [read-only]
File size in bytes.
| NetStreamControllingStreamProvider | ||
| model : ProviderModel
Gets the provider model.
| NetStreamControllingStreamProvider | ||
| netConnection : NetConnection [read-only]
Gets the underlying netConnection object.
| NetStreamControllingStreamProvider | ||
| netStream : NetStream [read-only]
Gets the underlying NetStream object.
| NetStreamControllingStreamProvider | ||
| player : Flowplayer
[write-only]
Sets the player instance.
| NetStreamControllingStreamProvider | ||
| playlist : Playlist
| NetStreamControllingStreamProvider | ||
| seekTarget : Number [read-only]
Previous seek target value in seconds.
| NetStreamControllingStreamProvider | ||
| stopping : Boolean [read-only]
Is this provider in the process of stopping the stream?
When stopped the provider should not dispatch any events resulting from events that
might get triggered by the underlying streaming implementation.
| NetStreamControllingStreamProvider | ||
| streamCallbacks : Dictionary [read-only]
Get the current stream callbacks.
| NetStreamControllingStreamProvider | ||
| time : Number [read-only]
Current playhead time in seconds.
| NetStreamControllingStreamProvider | ||
| timeProvider : TimeProvider [write-only]
| NetStreamControllingStreamProvider | ||
| type : String [read-only]
| NetStreamControllingStreamProvider | ||
| volumeController : VolumeController [write-only]
Volume controller used to control the video volume.
| NetStreamControllingStreamProvider | ||
| Property | Defined by | ||
|---|---|---|---|
| clip : Clip
[read-only]
The current clip in the playlist.
| NetStreamControllingStreamProvider | ||
| log : Log | NetStreamControllingStreamProvider | ||
| pauseAfterStart : Boolean
Should we pause on first frame after starting.
| NetStreamControllingStreamProvider | ||
| paused : Boolean [read-only]
Are we paused?
| NetStreamControllingStreamProvider | ||
| seeking : Boolean
Is the seek in process?
| NetStreamControllingStreamProvider | ||
| silentSeek : Boolean | NetStreamControllingStreamProvider | ||
| started : Boolean [read-only]
Have we already received a NetStream.Play.Start from the NetStream
| NetStreamControllingStreamProvider | ||
| Method | Defined by | ||
|---|---|---|---|
| NetStreamControllingStreamProvider | |||
|
addConnectionCallback(name:String, listener:Function):void
Adds a callback function to the NetConnection instance.
| NetStreamControllingStreamProvider | ||
|
addStreamCallback(name:String, listener:Function):void
Adds a callback function to the NetStream object.
| NetStreamControllingStreamProvider | ||
|
attachStream(video:DisplayObject):void
Attaches a stream to the specified display object.
| NetStreamControllingStreamProvider | ||
|
Gets the Video object.
| NetStreamControllingStreamProvider | ||
|
Starts loading the specivied clip.
| NetStreamControllingStreamProvider | ||
|
onConfig(model:PluginModel):void
Override this to receive the plugin model.
| NetStreamControllingStreamProvider | ||
|
onLoad(player:Flowplayer):void
Override this to receive the player instance.
| NetStreamControllingStreamProvider | ||
|
Pauses playback.
| NetStreamControllingStreamProvider | ||
|
Resumes playback.
| NetStreamControllingStreamProvider | ||
|
Seeks to the specified point in the timeline.
| NetStreamControllingStreamProvider | ||
|
Stops and rewinds to the beginning of current clip.
| NetStreamControllingStreamProvider | ||
|
stopBuffering():void
Stops loading data into the buffer.
| NetStreamControllingStreamProvider | ||
| NetStreamControllingStreamProvider | |||
| Method | Defined by | ||
|---|---|---|---|
|
canDispatchBegin():Boolean
Can we dispatch the start event now? This class uses this method every time
before it's about to dispatch the start event.
| NetStreamControllingStreamProvider | ||
|
canDispatchStreamNotFound():Boolean
Can we disppatch the onStreamNotFound ERROR event now?
| NetStreamControllingStreamProvider | ||
|
Connects to the backend.
| NetStreamControllingStreamProvider | ||
|
createNetStream(connection:NetConnection):NetStream
| NetStreamControllingStreamProvider | ||
|
currentClipStarted():Boolean
Have we started streaming the playlist's current clip?
| NetStreamControllingStreamProvider | ||
|
dispatchEvent(event:ClipEvent):void
Dispatches the specified event.
| NetStreamControllingStreamProvider | ||
|
Starts loading using the specified netStream and clip.
| NetStreamControllingStreamProvider | ||
|
Pauses the specified netStream.
| NetStreamControllingStreamProvider | ||
|
Resumes the specified netStream.
| NetStreamControllingStreamProvider | ||
|
Seeks the netStream to the specified target.
| NetStreamControllingStreamProvider | ||
| NetStreamControllingStreamProvider | |||
|
doSwitchStream(event:ClipEvent, netStream:NetStream, clip:Clip, netStreamPlayOptions:Object = null):void
| NetStreamControllingStreamProvider | ||
|
getClipUrl(clip:Clip):String
Gets the clip URL from the specified clip.
| NetStreamControllingStreamProvider | ||
|
Gets the connection provider for the specified clip.
| NetStreamControllingStreamProvider | ||
|
getCurrentPlayheadTime(netStream:NetStream):Number
Gets the current playhead time.
| NetStreamControllingStreamProvider | ||
|
Gets the default clip url resolver to be used if the ProviderModel
supplied to this provider does not specify a connection provider.
| NetStreamControllingStreamProvider | ||
|
isDurationReached():Boolean
Is the playback duration of current clip reached?
| NetStreamControllingStreamProvider | ||
|
netStreamPlay(url:String):void
Calls netStream.play(url)
| NetStreamControllingStreamProvider | ||
|
onClipUrlResolved(clip:Clip):void
| NetStreamControllingStreamProvider | ||
|
onMetaData(event:ClipEvent):void
| NetStreamControllingStreamProvider | ||
|
onNetStatus(event:NetStatusEvent):void
Called when NetStatusEvents are received.
| NetStreamControllingStreamProvider | ||
|
resolveClipUrl(clip:Clip, successListener:Function):void
Resolves the url for the specified clip.
| NetStreamControllingStreamProvider | ||
| allowRandomSeek | property |
allowRandomSeek:Boolean [read-only]Does this provider support random seeking to unbuffered areas in the timeline?
Implementation public function get allowRandomSeek():Boolean
| bufferEnd | property |
bufferEnd:Number [read-only]The point in timeline where the buffered data region ends, in seconds.
Implementation public function get bufferEnd():Number
| bufferStart | property |
bufferStart:Number [read-only]The point in timeline where the buffered data region begins, in seconds.
Implementation public function get bufferStart():Number
| clip | property |
clip:Clip [read-only]The current clip in the playlist.
Implementation protected function get clip():Clip
| fileSize | property |
fileSize:Number [read-only]File size in bytes.
Implementation public function get fileSize():Number
| log | property |
protected var log:Log
| model | property |
model:ProviderModel [read-write]Gets the provider model.
Implementation public function get model():ProviderModel
public function set model(value:ProviderModel):void
| netConnection | property |
netConnection:NetConnection [read-only]Gets the underlying netConnection object.
Implementation public function get netConnection():NetConnection
| netStream | property |
netStream:NetStream [read-only]Gets the underlying NetStream object.
Implementation public function get netStream():NetStream
| pauseAfterStart | property |
pauseAfterStart:Boolean [read-write]Should we pause on first frame after starting.
Implementation protected function get pauseAfterStart():Boolean
protected function set pauseAfterStart(value:Boolean):void
See also
| paused | property |
paused:Boolean [read-only]Are we paused?
Implementation protected function get paused():Boolean
| player | property |
player:Flowplayer [write-only]Sets the player instance.
Implementation public function set player(value:Flowplayer):void
| playlist | property |
playlist:Playlist [read-write]Implementation
public function get playlist():Playlist
public function set playlist(value:Playlist):void
| seeking | property |
seeking:Boolean [read-write]Is the seek in process?
Implementation protected function get seeking():Boolean
protected function set seeking(value:Boolean):void
| seekTarget | property |
seekTarget:Number [read-only]Previous seek target value in seconds.
Implementation public function get seekTarget():Number
| silentSeek | property |
silentSeek:Boolean [read-write]Implementation
protected function get silentSeek():Boolean
protected function set silentSeek(value:Boolean):void
| started | property |
started:Boolean [read-only]Have we already received a NetStream.Play.Start from the NetStream
Implementation protected function get started():Boolean
| stopping | property |
stopping:Boolean [read-only]Is this provider in the process of stopping the stream? When stopped the provider should not dispatch any events resulting from events that might get triggered by the underlying streaming implementation.
Implementation public function get stopping():Boolean
| streamCallbacks | property |
streamCallbacks:Dictionary [read-only]Get the current stream callbacks.
Implementation public function get streamCallbacks():Dictionary
| time | property |
time:Number [read-only]Current playhead time in seconds.
Implementation public function get time():Number
| timeProvider | property |
timeProvider:TimeProvider [write-only]Implementation
public function set timeProvider(value:TimeProvider):void
| type | property |
type:String [read-only]Implementation
public function get type():String
| volumeController | property |
volumeController:VolumeController [write-only]Volume controller used to control the video volume.
Implementation public function set volumeController(value:VolumeController):void
| NetStreamControllingStreamProvider | () | constructor |
public function NetStreamControllingStreamProvider()
| addConnectionCallback | () | method |
public function addConnectionCallback(name:String, listener:Function):voidAdds a callback function to the NetConnection instance. This function will fire ClipEvents whenever the callback is invoked in the connection.
Parametersname:String |
|
listener:Function |
| addStreamCallback | () | method |
public function addStreamCallback(name:String, listener:Function):voidAdds a callback function to the NetStream object. This function will fire a ClipEvent of type StreamEvent whenever the callback has been invoked on the stream. The invokations typically come from a server-side app running on RTMP server.
Parametersname:String |
|
listener:Function |
| attachStream | () | method |
public function attachStream(video:DisplayObject):voidAttaches a stream to the specified display object.
Parametersvideo:DisplayObject — the video object that was originally retrieved using getVideo().
|
| canDispatchBegin | () | method |
protected function canDispatchBegin():Boolean
Can we dispatch the start event now? This class uses this method every time
before it's about to dispatch the start event. The event is only dispatched
if this method returns true.
Boolean — true if the start event can be dispatched
|
See also
| canDispatchStreamNotFound | () | method |
protected function canDispatchStreamNotFound():BooleanCan we disppatch the onStreamNotFound ERROR event now?
ReturnsBoolean — true if the start event can be dispatched
|
See also
| connect | () | method |
protected function connect(clip:Clip, ... rest):void
Connects to the backend. The implementation creates a new NetConnection then calls
addConnectionStatusListener(connection) and NetConnection.connect(getConnectUrl(clip)).
clip:Clip |
|
... rest |
See also
| createNetStream | () | method |
protected function createNetStream(connection:NetConnection):NetStreamParameters
connection:NetConnection |
NetStream |
| currentClipStarted | () | method |
protected function currentClipStarted():BooleanHave we started streaming the playlist's current clip?
ReturnsBoolean |
| dispatchEvent | () | method |
protected final function dispatchEvent(event:ClipEvent):voidDispatches the specified event.
Parametersevent:ClipEvent |
| doLoad | () | method |
protected function doLoad(event:ClipEvent, netStream:NetStream, clip:Clip):voidStarts loading using the specified netStream and clip. Can be overridden in subclasses.
Parametersevent:ClipEvent — the event that is dispatched after the loading has been successfully
started
|
|
netStream:NetStream |
|
clip:Clip |
| doPause | () | method |
protected function doPause(netStream:NetStream, event:ClipEvent = null):void
Pauses the specified netStream. This implementation calls netStream.pause()
and dispatches the specified event.
netStream:NetStream |
|
event:ClipEvent (default = null) — the event that is dispatched after pausing, is null if
we are pausing silently
|
| doResume | () | method |
protected function doResume(netStream:NetStream, event:ClipEvent):void
Resumes the specified netStream. The implementation in this class calls netStream.resume()
and dispatches the specified event.
netStream:NetStream |
|
event:ClipEvent — the event that is dispatched after resuming
|
| doSeek | () | method |
protected function doSeek(event:ClipEvent, netStream:NetStream, seconds:Number):void
Seeks the netStream to the specified target. The implementation in this class calls
netStream.seek(seconds). Override if you need something different.
event:ClipEvent — the event that is dispatched after seeking successfully
|
|
netStream:NetStream |
|
seconds:Number — the seek target position
|
| doStop | () | method |
protected function doStop(event:ClipEvent, netStream:NetStream, closeStreamAndConnection:Boolean = false):voidParameters
event:ClipEvent |
|
netStream:NetStream |
|
closeStreamAndConnection:Boolean (default = false) |
| doSwitchStream | () | method |
protected function doSwitchStream(event:ClipEvent, netStream:NetStream, clip:Clip, netStreamPlayOptions:Object = null):voidParameters
event:ClipEvent |
|
netStream:NetStream |
|
clip:Clip |
|
netStreamPlayOptions:Object (default = null) |
| getClipUrl | () | method |
protected function getClipUrl(clip:Clip):StringGets the clip URL from the specified clip. The URL is supplied to NetStream.play(url). Can be overridden unsubclasses.
Parametersclip:Clip |
String |
| getConnectionProvider | () | method |
protected function getConnectionProvider(clip:Clip):ConnectionProviderGets the connection provider for the specified clip. Note: this function should return the same instance on repeated calls for the same clip.
Parametersclip:Clip |
ConnectionProvider |
| getCurrentPlayheadTime | () | method |
protected function getCurrentPlayheadTime(netStream:NetStream):NumberGets the current playhead time. This should be overridden if the time is not equl to netStream.time
ParametersnetStream:NetStream |
Number |
| getDefaultClipURLResolver | () | method |
protected function getDefaultClipURLResolver():ClipURLResolverGets the default clip url resolver to be used if the ProviderModel supplied to this provider does not specify a connection provider.
ReturnsClipURLResolver |
| getVideo | () | method |
public function getVideo(clip:Clip):DisplayObject
Gets the Video object.
A stream will be attached to the returned video object using attachStream().
clip:Clip — the clip for which the Video object is queried for
|
DisplayObject |
| isDurationReached | () | method |
protected function isDurationReached():BooleanIs the playback duration of current clip reached?
ReturnsBoolean |
| load | () | method |
public final function load(event:ClipEvent, clip:Clip, pauseAfterStart:Boolean = false):void
Starts loading the specivied clip. Once video data is available the provider
must set it to the clip using clip.setContent(). Typically the video
object passed to the clip is an instance of flash.media.Video.
event:ClipEvent — the event that this provider should dispatch once loading has successfully started,
once dispatched the player will call getVideo()
|
|
clip:Clip — the clip to load
|
|
pauseAfterStart:Boolean (default = false) — if true the playback is paused on first frame and
buffering is continued
|
| netStreamPlay | () | method |
protected function netStreamPlay(url:String):voidCalls netStream.play(url)
Parametersurl:String |
| onClipUrlResolved | () | method |
| onConfig | () | method |
public function onConfig(model:PluginModel):voidOverride this to receive the plugin model.
Parametersmodel:PluginModel |
| onLoad | () | method |
public function onLoad(player:Flowplayer):voidOverride this to receive the player instance.
Parametersplayer:Flowplayer |
| onMetaData | () | method |
| onNetStatus | () | method |
protected function onNetStatus(event:NetStatusEvent):voidCalled when NetStatusEvents are received.
Parametersevent:NetStatusEvent |
| pause | () | method |
public final function pause(event:ClipEvent):voidPauses playback.
Parametersevent:ClipEvent — the event that this provider should dispatch once loading has been successfully paused
|
| resolveClipUrl | () | method |
protected final function resolveClipUrl(clip:Clip, successListener:Function):voidResolves the url for the specified clip.
Parametersclip:Clip |
|
successListener:Function |
| resume | () | method |
public final function resume(event:ClipEvent):voidResumes playback.
Parametersevent:ClipEvent — the event that this provider should dispatch once loading has been successfully resumed
|
| seek | () | method |
public final function seek(event:ClipEvent, seconds:Number):voidSeeks to the specified point in the timeline.
Parametersevent:ClipEvent — the event that this provider should dispatch once the seek is in target
|
|
seconds:Number — the target point in the timeline
|
See also
| stop | () | method |
public final function stop(event:ClipEvent, closeStreamAndConnection:Boolean = false):voidStops and rewinds to the beginning of current clip.
Parametersevent:ClipEvent — the event that this provider should dispatch once loading has been successfully stopped
|
|
closeStreamAndConnection:Boolean (default = false) |
| stopBuffering | () | method |
public function stopBuffering():voidStops loading data into the buffer.
| switchStream | () | method |
public final function switchStream(event:ClipEvent, clip:Clip, netStreamPlayOptions:Object = null):voidParameters
event:ClipEvent |
|
clip:Clip |
|
netStreamPlayOptions:Object (default = null) |