Package | org.osmf.media |
Class | public class MediaFactoryItem |
Inheritance | MediaFactoryItem Object |
Language Version: | ActionScript 3.0 |
Product Version: | OSMF 1.0 |
Runtime Versions: | 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.
Related API Elements
Public Properties
Property | Defined By | ||
---|---|---|---|
canHandleResourceFunction : Function [read-only]
Function which is used to determine whether this MediaFactoryItem can handle
a particular resource. | MediaFactoryItem | ||
constructor : Object
A reference to the class object or constructor function for a given object instance. | Object | ||
id : String [read-only]
An identifier that represents this MediaFactoryItem. | MediaFactoryItem | ||
mediaElementCreationFunction : Function [read-only]
Function which creates a new instance of the desired MediaElement. | MediaFactoryItem | ||
type : String [read-only]
The MediaFactoryItemType for this MediaFactoryItem. | MediaFactoryItem |
Public Methods
Method | Defined By | ||
---|---|---|---|
MediaFactoryItem(id:String, canHandleResourceFunction:Function, mediaElementCreationFunction:Function, type:String = null)
Constructor. | MediaFactoryItem | ||
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 | ||
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 |
Property Detail
canHandleResourceFunction | property |
canHandleResourceFunction:Function
[read-only] Language Version: | ActionScript 3.0 |
Product Version: | OSMF 1.0 |
Runtime Versions: | 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.
Implementation
public function get canHandleResourceFunction():Function
id | property |
mediaElementCreationFunction | property |
mediaElementCreationFunction:Function
[read-only] Language Version: | ActionScript 3.0 |
Product Version: | OSMF 1.0 |
Runtime Versions: | 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.
Implementation
public function get mediaElementCreationFunction():Function
type | property |
Constructor Detail
MediaFactoryItem | () | Constructor |
public function MediaFactoryItem(id:String, canHandleResourceFunction:Function, mediaElementCreationFunction:Function, type:String = null)
Language Version: | ActionScript 3.0 |
Product Version: | OSMF 1.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Constructor.
Parametersid: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 .
|
Throws
ArgumentError — If any argument (except type) is null.
|
Thu Dec 6 2018, 01:12 PM -08:00