Guida di riferimento di ActionScript® 3.0 per la piattaforma Adobe® Flash®
Home  |  Nascondi elenco pacchetti e classi |  Pacchetti  |  Classi  |  Novità  |  Indice  |  Appendici  |  Perché in inglese?
Filtri: Recupero dati dal server...
Recupero dati dal server...
org.osmf.media 

PluginInfo  - AS3 OSMF

Pacchettoorg.osmf.media
Classepublic class PluginInfo
EreditarietàPluginInfo Inheritance Object

Versione linguaggio: ActionScript 3.0
Versione prodotto: OSMF 1.0
Versioni runtime: Flash Player 10, AIR 1.5

PluginInfo is the encapsulation of the set of MediaFactoryItem objects that will be available to the application after the plugin has been successfully loaded. Every Open Source Media Framework plugin must define an instance or subclass of PluginInfo to provide the application with the information it needs to create and load the plugin's MediaElement.

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.

Elementi API correlati



Proprietà pubbliche
 ProprietàDefinito da
 Inheritedconstructor : Object
Un riferimento all'oggetto classe o alla funzione di costruzione per una determinata istanza di oggetto.
Object
  frameworkVersion : String
[sola lettura] The version of the framework that this plugin was compiled against.
PluginInfo
  mediaElementCreationNotificationFunction : Function
[sola lettura] 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
[sola lettura] The number of MediaFactoryItem objects that the plugin exposes to the loading application.
PluginInfo
Proprietà protette
 ProprietàDefinito da
  mediaFactoryItems : Vector.<MediaFactoryItem>
The MediaFactoryItem objects that this PluginInfo exposes.
PluginInfo
Metodi pubblici
 MetodoDefinito da
  
PluginInfo(mediaFactoryItems:Vector.<MediaFactoryItem> = null, mediaElementCreationNotificationFunction:Function = null)
Constructor.
PluginInfo
  
Returns the MediaFactoryItem object at the specified index.
PluginInfo
 Inherited
Indica se per un oggetto è definita una proprietà specifica.
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
 Inherited
Indica se un'istanza della classe Object si trova nella catena di prototipi dell'oggetto specificato come parametro.
Object
 Inherited
Indica se la proprietà specificata esiste ed è enumerabile.
Object
 Inherited
Imposta la disponibilità di una proprietà dinamica per le operazioni cicliche.
Object
 Inherited
Restituisce la rappresentazione in formato stringa di questo oggetto, formattato in base alle convenzioni specifiche per le versioni localizzate.
Object
 Inherited
Restituisce la rappresentazione in formato stringa dell'oggetto specificato.
Object
 Inherited
Restituisce il valore di base dell'oggetto specificato.
Object
Costanti pubbliche
 CostanteDefinito da
  PLUGIN_MEDIAFACTORY_NAMESPACE : String = "http://www.osmf.org/plugin/mediaFactory/1.0"
[statico] Metadata namespace URL for a MediaFactory that is passed from player to plugin.
PluginInfo
Descrizione delle proprietà

frameworkVersion

proprietà
frameworkVersion:String  [sola lettura]

Versione linguaggio: ActionScript 3.0
Versione prodotto: OSMF 1.0
Versioni runtime: 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.



Implementazione
    public function get frameworkVersion():String

mediaElementCreationNotificationFunction

proprietà 
mediaElementCreationNotificationFunction:Function  [sola lettura]

Versione linguaggio: ActionScript 3.0
Versione prodotto: OSMF 1.0
Versioni runtime: 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).



Implementazione
    public function get mediaElementCreationNotificationFunction():Function

mediaFactoryItems

proprietà 
mediaFactoryItems:Vector.<MediaFactoryItem>

The MediaFactoryItem objects that this PluginInfo exposes.



Implementazione
    protected function get mediaFactoryItems():Vector.<MediaFactoryItem>
    protected function set mediaFactoryItems(value:Vector.<MediaFactoryItem>):void

numMediaFactoryItems

proprietà 
numMediaFactoryItems:int  [sola lettura]

Versione linguaggio: ActionScript 3.0
Versione prodotto: OSMF 1.0
Versioni runtime: Flash Player 10, AIR 1.5

The number of MediaFactoryItem objects that the plugin exposes to the loading application.



Implementazione
    public function get numMediaFactoryItems():int
Descrizione della funzione di costruzione

PluginInfo

()Funzione di costruzione
public function PluginInfo(mediaFactoryItems:Vector.<MediaFactoryItem> = null, mediaElementCreationNotificationFunction:Function = null)

Versione linguaggio: ActionScript 3.0
Versione prodotto: OSMF 1.0
Versioni runtime: Flash Player 10, AIR 1.5

Constructor.

Parametri
mediaFactoryItems: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).
Descrizione dei metodi

getMediaFactoryItemAt

()metodo
public function getMediaFactoryItemAt(index:int):MediaFactoryItem

Versione linguaggio: ActionScript 3.0
Versione prodotto: OSMF 1.0
Versioni runtime: Flash Player 10, AIR 1.5

Returns the MediaFactoryItem object at the specified index.

If the index is out of range, throws a RangeError.

Parametri

index:int — Zero-based index position of the requested MediaFactoryItem.

Restituisce
MediaFactoryItem — A MediaFactoryItem object representing media to be loaded.

Elementi API correlati

initializePlugin

()metodo 
public function initializePlugin(resource:MediaResourceBase):void

Versione linguaggio: ActionScript 3.0
Versione prodotto: OSMF 1.0
Versioni runtime: 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.

Parametri

resource:MediaResourceBase

isFrameworkVersionSupported

()metodo 
public function isFrameworkVersionSupported(version:String):Boolean

Versione linguaggio: ActionScript 3.0
Versione prodotto: OSMF 1.0
Versioni runtime: 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.

Parametri

version:String — Version string of the Open Source Media Framework version.

Restituisce
Boolean — Returns true if the version is supported.
Descrizione delle costanti

PLUGIN_MEDIAFACTORY_NAMESPACE

Costante
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.





[ X ]Perché in inglese?
Il contenuto della Guida di riferimento di ActionScript 3.0 appare in inglese

Non tutte le parti della Guida di riferimento di ActionScript 3.0 sono tradotte in tutte le lingue. Quando un elemento del linguaggio non è tradotto, viene riportato in inglese. Ad esempio, la classe ga.controls.HelpBox non è tradotta in nessuna lingua. Pertanto, nella versione italiana della guida di riferimento, la descrizione della classe ga.controls.HelpBox è riportata in inglese.