Pakiet | org.osmf.media |
Klasa | public class PluginInfo |
Dziedziczenie | PluginInfo Object |
Wersja języka: | ActionScript 3.0 |
Wersja produktu: | OSMF 1.0 |
Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
From the point of view of the Open Source Media Framework, the plugin's purpose is to expose the MediaFactoryItem objects that represent the media that the plugin handles. These MediaFactoryItem objects could describe standard media types such as video, audio, or image that can be represented by the built-in Open Source Media Framework MediaElements: VideoElement, AudioElement, or ImageElement. More likely, a plugin provides some type of specialized processing, such as a custom loader or special-purpose media element with custom implementations of the traits. For example, a plugin that provides tracking might implement a TrackingCompositeElement that includes a customized loader and a customized PlayTrait implementation that start and stop tracking as well as the video.
A PluginInfo also gives the plugin an opportunity to accept or reject a specific
Open Source Media Framework version through its isFrameworkVersionSupported()
method.
A dynamic plugin is loaded at runtime from a SWF.
A static plugin is compiled as part of the Open Source Media Framework application.
An application attempting to load a dynamic plugin accesses the class
that extends PluginInfo through
the pluginInfo
property on the root of the plugin SWF.
If this class is not found,
the plugin is not loaded.
An application attempting to load a static plugin accesses the PluginInfo
exposed by the PluginInfoResource object.
Powiązane elementy interfejsu API
Właściwość | Zdefiniowane przez | ||
---|---|---|---|
constructor : Object
Odwołanie do obiektu klasy lub funkcji konstruktora, dotyczące danej instancji obiektu. | Object | ||
frameworkVersion : String [tylko do odczytu]
The version of the framework that this plugin was compiled against. | PluginInfo | ||
mediaElementCreationNotificationFunction : Function [tylko do odczytu]
Optional function which is invoked for every MediaElement that is
created from the MediaFactory to which this plugin's MediaFactoryItem
objects are added. | PluginInfo | ||
numMediaFactoryItems : int [tylko do odczytu]
The number of MediaFactoryItem objects that the plugin
exposes to the loading application. | PluginInfo |
Właściwość | Zdefiniowane przez | ||
---|---|---|---|
mediaFactoryItems : Vector.<MediaFactoryItem>
The MediaFactoryItem objects that this PluginInfo exposes. | PluginInfo |
Metoda | Zdefiniowane przez | ||
---|---|---|---|
PluginInfo(mediaFactoryItems:Vector.<MediaFactoryItem> = null, mediaElementCreationNotificationFunction:Function = null)
Constructor. | PluginInfo | ||
Returns the MediaFactoryItem object at the specified index. | PluginInfo | ||
Wskazuje, czy dla obiektu zdefiniowano określoną właściwość. | Object | ||
Initialization method invoked by the media framework when this plugin
is being initialized, and which provides the plugin the resource which
was used to request the plugin. | PluginInfo | ||
Returns true if the plugin supports the specified version
of the framework, in which case the loading application loads the plugin. | PluginInfo | ||
Wskazuje, czy instancja klasy Object należy do łańcucha prototypów obiektu określonego jako parametr. | Object | ||
Wskazuje, czy określona właściwość istnieje i jest przeliczalna. | Object | ||
Ustawia dostępność właściwości dynamicznej używanej w pętlach. | Object | ||
Zwraca ciąg reprezentujący obiekt — sformatowany zgodnie z konwencjami właściwymi dla ustawień regionalnych. | Object | ||
Zwraca ciąg reprezentujący określony obiekt. | Object | ||
Zwraca pierwotną wartość dla określonego obiektu. | Object |
Stała | Zdefiniowane przez | ||
---|---|---|---|
PLUGIN_MEDIAFACTORY_NAMESPACE : String = "http://www.osmf.org/plugin/mediaFactory/1.0" [statyczny]
Metadata namespace URL for a MediaFactory that is passed from player
to plugin. | PluginInfo |
frameworkVersion | właściwość |
frameworkVersion:String
[tylko do odczytu] Wersja języka: | ActionScript 3.0 |
Wersja produktu: | OSMF 1.0 |
Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
The version of the framework that this plugin was compiled against. The current version can be obtained from org.osmf.utils.Version.version.
Implementacja
public function get frameworkVersion():String
mediaElementCreationNotificationFunction | właściwość |
mediaElementCreationNotificationFunction:Function
[tylko do odczytu] Wersja języka: | ActionScript 3.0 |
Wersja produktu: | OSMF 1.0 |
Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
Optional function which is invoked for every MediaElement that is created from the MediaFactory to which this plugin's MediaFactoryItem objects are added. The function must take one param of type MediaElement, and return void. This callback function is useful for plugins who want to be notified when other MediaElement are created (e.g. so as to listen to or control them).
Implementacja
public function get mediaElementCreationNotificationFunction():Function
mediaFactoryItems | właściwość |
mediaFactoryItems:Vector.<MediaFactoryItem>
The MediaFactoryItem objects that this PluginInfo exposes.
Implementacja
protected function get mediaFactoryItems():Vector.<MediaFactoryItem>
protected function set mediaFactoryItems(value:Vector.<MediaFactoryItem>):void
numMediaFactoryItems | właściwość |
numMediaFactoryItems:int
[tylko do odczytu] Wersja języka: | ActionScript 3.0 |
Wersja produktu: | OSMF 1.0 |
Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
The number of MediaFactoryItem objects that the plugin exposes to the loading application.
Implementacja
public function get numMediaFactoryItems():int
PluginInfo | () | Konstruktor |
public function PluginInfo(mediaFactoryItems:Vector.<MediaFactoryItem> = null, mediaElementCreationNotificationFunction:Function = null)
Wersja języka: | ActionScript 3.0 |
Wersja produktu: | OSMF 1.0 |
Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
Constructor.
ParametrymediaFactoryItems:Vector.<MediaFactoryItem> (default = null ) — Vector of MediaFactoryItem objects that this plugin
exposes.
| |
mediaElementCreationNotificationFunction:Function (default = null ) — Optional function which,
if specified, is invoked for each MediaElement that is created from the
MediaFactory to which this MediaFactoryItem is added. If specified,
the function must take one param of type MediaElement, and return void.
This callback function is useful for MediaFactoryItems which need to be
notified when other MediaElements are created (e.g. so as to listen to
or control them).
|
getMediaFactoryItemAt | () | metoda |
public function getMediaFactoryItemAt(index:int):MediaFactoryItem
Wersja języka: | ActionScript 3.0 |
Wersja produktu: | OSMF 1.0 |
Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
Returns the MediaFactoryItem object at the specified index.
If the index is out of range, throws a RangeError.
Parametry
index:int — Zero-based index position of the requested MediaFactoryItem.
|
MediaFactoryItem — A MediaFactoryItem object representing media to be loaded.
|
Powiązane elementy interfejsu API
initializePlugin | () | metoda |
public function initializePlugin(resource:MediaResourceBase):void
Wersja języka: | ActionScript 3.0 |
Wersja produktu: | OSMF 1.0 |
Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
Initialization method invoked by the media framework when this plugin is being initialized, and which provides the plugin the resource which was used to request the plugin. By default does nothing, but plugins can override this method to specify their own initialization logic.
Note that an instance of PluginInfo may be instantiated before the framework has determined that that plugin is truly going to be used, so it is strongly recommended that any initialization logic be placed within an override of this method to avoid duplicate initialization.
This method is called before getMediaFactoryItemAt or get numMediaFactoryItems.
Parametry
resource:MediaResourceBase |
isFrameworkVersionSupported | () | metoda |
public function isFrameworkVersionSupported(version:String):Boolean
Wersja języka: | ActionScript 3.0 |
Wersja produktu: | OSMF 1.0 |
Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
Returns true
if the plugin supports the specified version
of the framework, in which case the loading application loads the plugin.
Returns false
if the plugin does not support the specified version
of the framework, in which case the loading application does not load the plugin.
Parametry
version:String — Version string of the Open Source Media Framework version.
|
Boolean — Returns true if the version is supported.
|
PLUGIN_MEDIAFACTORY_NAMESPACE | Stała |
public static const PLUGIN_MEDIAFACTORY_NAMESPACE:String = "http://www.osmf.org/plugin/mediaFactory/1.0"
Metadata namespace URL for a MediaFactory that is passed from player to plugin.
Client code can set this on the MediaResourceBase that is passed
to MediaFactory.loadPlugin
, and it will be exposed to
the plugin on the MediaResourceBase that is passed to
PluginInfo.initializePlugin
.
Tue Jun 12 2018, 12:06 PM Z