套件 | org.osmf.traits |
類別 | public class BufferTrait |
繼承 | BufferTrait MediaTraitBase EventDispatcher Object |
語言版本: | ActionScript 3.0 |
產品版本: | OSMF 1.0 |
執行階段版本: | 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.
相關 API 元素
屬性 | 定義自 | ||
---|---|---|---|
buffering : Boolean [唯讀]
Indicates whether the media is currently buffering. | BufferTrait | ||
bufferLength : Number [唯讀]
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
類別物件的參照或是特定物件實體的建構函數。 | Object | ||
traitType : String [唯讀]
The MediaTraitType for this trait. | MediaTraitBase |
方法 | 定義自 | ||
---|---|---|---|
Constructor. | BufferTrait | ||
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
會在 EventDispatcher 物件註冊事件偵聽程式,以便讓偵聽程式收到事件的通知。 | EventDispatcher | ||
會將事件傳送到事件流程。 | EventDispatcher | ||
Disposes of any resources used by this trait. | MediaTraitBase | ||
會檢查 EventDispatcher 物件是否有對特定的事件類型註冊偵聽程式。 | EventDispatcher | ||
指出物件是否有已定義的指定屬性。 | Object | ||
指出 Object 類別的實體是否位於指定為參數的物件原型鏈中。 | Object | ||
指出指定的屬性是否存在,以及是否可列舉。 | Object | ||
會從 EventDispatcher 物件移除偵聽程式。 | EventDispatcher | ||
為迴圈作業設定動態屬性的可用性。 | Object | ||
傳回代表此物件的字串,根據地區特定慣例進行格式化。 | Object | ||
會傳回指定之物件的字串形式。 | Object | ||
會傳回指定之物件的基本值。 | Object | ||
檢查此 EventDispatcher 物件是否已註冊事件偵聽程式,或者此物件的任何祖系已為特定事件類型註冊事件偵聽程式。 | EventDispatcher |
方法 | 定義自 | ||
---|---|---|---|
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 |
事件 | 摘要 | 定義自 | ||
---|---|---|---|---|
[廣播事件] 當 Flash Player 或 AIR 應用程式取得作業系統焦點並成為作用中時傳送。 | EventDispatcher | |||
Dispatched when the trait's buffering property has changed. | BufferTrait | |||
Dispatched when the trait's bufferTime property has changed. | BufferTrait | |||
[廣播事件] 當 Flash Player 或 AIR 應用程式失去作業系統焦點並成為非作用中時傳送。 | EventDispatcher |
buffering | 屬性 |
bufferLength | 屬性 |
bufferTime | 屬性 |
bufferTime:Number
語言版本: | ActionScript 3.0 |
產品版本: | OSMF 1.0 |
執行階段版本: | 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.
實作
public function get bufferTime():Number
public function set bufferTime(value:Number):void
BufferTrait | () | 建構函式 |
public function BufferTrait()
語言版本: | ActionScript 3.0 |
產品版本: | OSMF 1.0 |
執行階段版本: | Flash Player 10, AIR 1.5 |
Constructor.
bufferingChangeEnd | () | 方法 |
protected function bufferingChangeEnd():void
語言版本: | ActionScript 3.0 |
產品版本: | OSMF 1.0 |
執行階段版本: | 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 | () | 方法 |
protected function bufferingChangeStart(newBuffering:Boolean):void
語言版本: | ActionScript 3.0 |
產品版本: | OSMF 1.0 |
執行階段版本: | 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.
參數
newBuffering:Boolean — New buffering value.
|
bufferLengthChangeEnd | () | 方法 |
protected function bufferLengthChangeEnd():void
語言版本: | ActionScript 3.0 |
產品版本: | OSMF 1.0 |
執行階段版本: | Flash Player 10, AIR 1.5 |
Called just after the bufferLength
value has changed.
bufferLengthChangeStart | () | 方法 |
protected function bufferLengthChangeStart(newSize:Number):void
語言版本: | ActionScript 3.0 |
產品版本: | OSMF 1.0 |
執行階段版本: | 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.
參數
newSize:Number — New bufferLength value.
|
bufferTimeChangeEnd | () | 方法 |
protected function bufferTimeChangeEnd():void
語言版本: | ActionScript 3.0 |
產品版本: | OSMF 1.0 |
執行階段版本: | 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 | () | 方法 |
protected function bufferTimeChangeStart(newTime:Number):void
語言版本: | ActionScript 3.0 |
產品版本: | OSMF 1.0 |
執行階段版本: | 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.
參數
newTime:Number — New bufferTime value.
|
setBuffering | () | 方法 |
setBufferLength | () | 方法 |
bufferingChange | 事件 |
org.osmf.events.BufferEvent
屬性 BufferEvent.type =
org.osmf.events.BufferEvent.BUFFERING_CHANGE
語言版本: | ActionScript 3.0 |
產品版本: | OSMF 1.0 |
執行階段版本: | Flash Player 10, AIR 1.5 |
Dispatched when the trait's buffering
property has changed.
bufferTimeChange | 事件 |
org.osmf.events.BufferEvent
屬性 BufferEvent.type =
org.osmf.events.BufferEvent.BUFFER_TIME_CHANGE
語言版本: | ActionScript 3.0 |
產品版本: | OSMF 1.0 |
執行階段版本: | Flash Player 10, AIR 1.5 |
Dispatched when the trait's bufferTime
property has changed.
Tue Jun 12 2018, 03:47 PM Z