套件 | org.osmf.media |
類別 | public class MediaFactoryItem |
繼承 | MediaFactoryItem Object |
語言版本: | ActionScript 3.0 |
產品版本: | OSMF 1.0 |
執行階段版本: | Flash Player 10, AIR 1.5 |
MediaFactoryItem objects are exposed by plugins (on the PluginInfo class), and used by the framework to create the MediaElement(s) specified by the plugin.
相關 API 元素
公用屬性
屬性 | 定義自 | ||
---|---|---|---|
canHandleResourceFunction : Function [唯讀]
Function which is used to determine whether this MediaFactoryItem can handle
a particular resource. | MediaFactoryItem | ||
constructor : Object
類別物件的參照或是特定物件實體的建構函數。 | Object | ||
id : String [唯讀]
An identifier that represents this MediaFactoryItem. | MediaFactoryItem | ||
mediaElementCreationFunction : Function [唯讀]
Function which creates a new instance of the desired MediaElement. | MediaFactoryItem | ||
type : String [唯讀]
The MediaFactoryItemType for this MediaFactoryItem. | MediaFactoryItem |
公用方法
方法 | 定義自 | ||
---|---|---|---|
MediaFactoryItem(id:String, canHandleResourceFunction:Function, mediaElementCreationFunction:Function, type:String = null)
Constructor. | MediaFactoryItem | ||
指出物件是否有已定義的指定屬性。 | Object | ||
指出 Object 類別的實體是否位於指定為參數的物件原型鏈中。 | Object | ||
指出指定的屬性是否存在,以及是否可列舉。 | Object | ||
為迴圈作業設定動態屬性的可用性。 | Object | ||
傳回代表此物件的字串,根據地區特定慣例進行格式化。 | Object | ||
會傳回指定之物件的字串形式。 | Object | ||
會傳回指定之物件的基本值。 | Object |
屬性詳細資訊
canHandleResourceFunction | 屬性 |
canHandleResourceFunction:Function
[唯讀] 語言版本: | ActionScript 3.0 |
產品版本: | OSMF 1.0 |
執行階段版本: | Flash Player 10, AIR 1.5 |
Function which is used to determine whether this MediaFactoryItem can handle a particular resource. The function must take a single parameter of type MediaResourceBase, and return a Boolean.
實作
public function get canHandleResourceFunction():Function
id | 屬性 |
mediaElementCreationFunction | 屬性 |
mediaElementCreationFunction:Function
[唯讀] 語言版本: | ActionScript 3.0 |
產品版本: | OSMF 1.0 |
執行階段版本: | Flash Player 10, AIR 1.5 |
Function which creates a new instance of the desired MediaElement. The function must take no params, and return a MediaElement.
實作
public function get mediaElementCreationFunction():Function
type | 屬性 |
建構函式詳細資料
MediaFactoryItem | () | 建構函式 |
public function MediaFactoryItem(id:String, canHandleResourceFunction:Function, mediaElementCreationFunction:Function, type:String = null)
語言版本: | ActionScript 3.0 |
產品版本: | OSMF 1.0 |
執行階段版本: | Flash Player 10, AIR 1.5 |
Constructor.
參數id:String — An identifier that represents this MediaFactoryItem. Identifiers should reflect
the plugin makers name, and the specific name of the element it generates. The convention
is to use the package namespace scheme. Two examples:
com.example.MyAdPlugin
com.example.MyAnalyticsPlugin
Note: org.osmf should be avoided since the MediaFactory gives precedence to
non-osmf plugins.
| |
canHandleResourceFunction:Function — Function which is used to determine
whether this MediaFactoryItem can handle a particular resource. The
function must take a single parameter of type MediaResourceBase, and
return a Boolean.
| |
mediaElementCreationFunction:Function — Function which creates a new instance
of the desired MediaElement. The function must take no params, and
return a MediaElement.
| |
type:String (default = null ) — The type of this MediaFactoryItem. If null, the default is
MediaFactoryItemType.STANDARD .
|
擲回值
ArgumentError — If any argument (except type) is null.
|
Tue Jun 12 2018, 03:47 PM Z