Package | org.osmf.traits |
Class | public class BufferTrait |
Inheritance | BufferTrait MediaTraitBase EventDispatcher Object |
Language Version: | ActionScript 3.0 |
Product Version: | OSMF 1.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Use the MediaElement.hasTrait(MediaTraitType.BUFFER)
method to query
whether a media element has this trait.
If hasTrait(MediaTraitType.BUFFER)
returns true
,
use the MediaElement.getTrait(MediaTraitType.BUFFER)
method
to get an object of this type.
Related API Elements
Property | Defined By | ||
---|---|---|---|
buffering : Boolean [read-only]
Indicates whether the media is currently buffering. | BufferTrait | ||
bufferLength : Number [read-only]
The length of the content currently in the media's
buffer in seconds. | BufferTrait | ||
bufferTime : Number
The desired length of the media's buffer in seconds. | BufferTrait | ||
constructor : Object
A reference to the class object or constructor function for a given object instance. | Object | ||
prototype : Object [static]
A reference to the prototype object of a class or function object. | Object | ||
traitType : String [read-only]
The MediaTraitType for this trait. | MediaTraitBase |
Method | Defined By | ||
---|---|---|---|
Constructor. | BufferTrait | ||
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener object with an EventDispatcher object so that the listener
receives notification of an event. | EventDispatcher | ||
Dispatches an event into the event flow. | EventDispatcher | ||
Disposes of any resources used by this trait. | MediaTraitBase | ||
Checks whether the EventDispatcher object has any listeners registered for a specific type
of event. | EventDispatcher | ||
Indicates whether an object has a specified property defined. | Object | ||
Indicates whether an instance of the Object class is in the prototype chain of the object specified
as the parameter. | Object | ||
Indicates whether the specified property exists and is enumerable. | Object | ||
Removes a listener from the EventDispatcher object. | EventDispatcher | ||
Sets the availability of a dynamic property for loop operations. | Object | ||
Returns the string representation of this object, formatted according to locale-specific conventions. | Object | ||
Returns the string representation of the specified object. | Object | ||
Returns the primitive value of the specified object. | Object | ||
Checks whether an event listener is registered with this EventDispatcher object or any of
its ancestors for the specified event type. | EventDispatcher |
Method | Defined By | ||
---|---|---|---|
Called just after buffering has changed. | BufferTrait | ||
Called immediately before the buffering value is changed. | BufferTrait | ||
Called just after the bufferLength value has changed. | BufferTrait | ||
Called immediately before the bufferLength value is changed. | BufferTrait | ||
Called just after the bufferTime value has changed. | BufferTrait | ||
Called immediately before the bufferTime value is changed. | BufferTrait | ||
Indicates whether the trait is in a buffering state. | BufferTrait | ||
Defines the value of the bufferLength property. | BufferTrait |
Event | Summary | Defined By | ||
---|---|---|---|---|
[broadcast event] Dispatched when the Flash Player or AIR application gains operating system focus and becomes active. | EventDispatcher | |||
Dispatched when the trait's buffering property has changed. | BufferTrait | |||
Dispatched when the trait's bufferTime property has changed. | BufferTrait | |||
[broadcast event] Dispatched when the Flash Player or AIR application operating loses system focus and is becoming inactive. | EventDispatcher |
buffering | property |
bufferLength | property |
bufferTime | property |
bufferTime:Number
Language Version: | ActionScript 3.0 |
Product Version: | OSMF 1.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
The desired length of the media's buffer in seconds.
If the passed value is not numerical or negative, it is forced to zero.
The default is zero.
Implementation
public function get bufferTime():Number
public function set bufferTime(value:Number):void
BufferTrait | () | Constructor |
public function BufferTrait()
Language Version: | ActionScript 3.0 |
Product Version: | OSMF 1.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Constructor.
bufferingChangeEnd | () | method |
protected function bufferingChangeEnd():void
Language Version: | ActionScript 3.0 |
Product Version: | OSMF 1.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Called just after buffering
has changed.
Dispatches the change event.
Subclasses that override should call this method to dispatch the bufferingChange event.
bufferingChangeStart | () | method |
protected function bufferingChangeStart(newBuffering:Boolean):void
Language Version: | ActionScript 3.0 |
Product Version: | OSMF 1.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Called immediately before the buffering
value is changed.
Subclasses implement this method to communicate the change to the media.
Parameters
newBuffering:Boolean — New buffering value.
|
bufferLengthChangeEnd | () | method |
protected function bufferLengthChangeEnd():void
Language Version: | ActionScript 3.0 |
Product Version: | OSMF 1.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Called just after the bufferLength
value has changed.
bufferLengthChangeStart | () | method |
protected function bufferLengthChangeStart(newSize:Number):void
Language Version: | ActionScript 3.0 |
Product Version: | OSMF 1.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Called immediately before the bufferLength
value is changed.
Subclasses implement this method to communicate the change to the media.
Parameters
newSize:Number — New bufferLength value.
|
bufferTimeChangeEnd | () | method |
protected function bufferTimeChangeEnd():void
Language Version: | ActionScript 3.0 |
Product Version: | OSMF 1.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Called just after the bufferTime
value has changed.
Dispatches the change event.
Subclasses that override should call this method to dispatch the bufferTimeChange event.
bufferTimeChangeStart | () | method |
protected function bufferTimeChangeStart(newTime:Number):void
Language Version: | ActionScript 3.0 |
Product Version: | OSMF 1.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Called immediately before the bufferTime
value is changed.
Subclasses implement this method to communicate the change to the media.
Parameters
newTime:Number — New bufferTime value.
|
setBuffering | () | method |
protected final function setBuffering(value:Boolean):void
Language Version: | ActionScript 3.0 |
Product Version: | OSMF 1.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Indicates whether the trait is in a buffering state. Dispatches
a bufferingChange event if invocation results in the buffering
property changing.
Parameters
value:Boolean |
setBufferLength | () | method |
protected final function setBufferLength(value:Number):void
Language Version: | ActionScript 3.0 |
Product Version: | OSMF 1.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Defines the value of the bufferLength property.
This method fires a BufferLengthChangeEvent if the value's change persists.
Parameters
value:Number |
bufferingChange | Event |
org.osmf.events.BufferEvent
property BufferEvent.type =
org.osmf.events.BufferEvent.BUFFERING_CHANGE
Language Version: | ActionScript 3.0 |
Product Version: | OSMF 1.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Dispatched when the trait's buffering
property has changed.
bufferTimeChange | Event |
org.osmf.events.BufferEvent
property BufferEvent.type =
org.osmf.events.BufferEvent.BUFFER_TIME_CHANGE
Language Version: | ActionScript 3.0 |
Product Version: | OSMF 1.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Dispatched when the trait's bufferTime
property has changed.
Mon Nov 28 2011, 06:48 AM -08:00