| Pacchetto | org.osmf.media |
| Classe | public class DefaultMediaFactory |
| Ereditarietà | DefaultMediaFactory MediaFactory EventDispatcher Object |
| Versione linguaggio: | ActionScript 3.0 |
| Versione prodotto: | OSMF 1.0 |
| Versioni runtime: | Flash Player 10, AIR 1.5 |
The default media factory can construct media elements of the following types:
-
VideoElement, using either:
- NetLoader (streaming or progressive)
- RTMPDynamicStreamingNetLoader (MBR streaming)
- HTTPStreamingNetLoader (HTTP streaming), if the CONFIG::FLASH_10_1 compiler flag is set to true
- F4MLoader (Flash Media Manifest files)
- DVRCastNetLoader (DVRCast)
-
SoundElement, using either:
- SoundLoader (progressive)
- NetLoader (streaming)
- ImageElement
- SWFElement
Proprietà pubbliche
Metodi pubblici
| Metodo | Definito da | ||
|---|---|---|---|
Constructor. | DefaultMediaFactory | ||
![]() | addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registra un oggetto listener di eventi con un oggetto EventDispatcher, in modo che il listener riceva la notifica di un evento. | EventDispatcher | |
![]() |
Adds the specified MediaFactoryItem to the factory. | MediaFactory | |
![]() |
Returns a MediaElement that can be created based on the specified
MediaResourceBase. | MediaFactory | |
![]() |
Invia un evento nel flusso di eventi. | EventDispatcher | |
![]() |
Gets the MediaFactoryItem at the specified index. | MediaFactory | |
![]() |
Returns the MediaFactoryItem with the specified ID or null if the
specified MediaFactoryItem does not exist in this factory. | MediaFactory | |
![]() |
Verifica se per l'oggetto EventDispatcher sono presenti listener registrati per un tipo specifico di evento. | EventDispatcher | |
![]() |
Indica se per un oggetto è definita una proprietà specifica. | Object | |
![]() |
Indica se un'istanza della classe Object si trova nella catena di prototipi dell'oggetto specificato come parametro. | Object | |
![]() |
Load a plugin identified by the specified resource. | MediaFactory | |
![]() |
Indica se la proprietà specificata esiste ed è enumerabile. | Object | |
![]() |
Rimuove un listener dall'oggetto EventDispatcher. | EventDispatcher | |
![]() |
Removes the specified MediaFactoryItem from the factory. | MediaFactory | |
![]() |
Imposta la disponibilità di una proprietà dinamica per le operazioni cicliche. | Object | |
![]() |
Restituisce la rappresentazione in formato stringa di questo oggetto, formattato in base alle convenzioni specifiche per le versioni localizzate. | Object | |
![]() |
Restituisce la rappresentazione in formato stringa dell'oggetto specificato. | Object | |
![]() |
Restituisce il valore di base dell'oggetto specificato. | Object | |
![]() |
Verifica se un listener di eventi è registrato con questo oggetto EventDispatcher o qualsiasi suo antenato per il tipo di evento specificato. | EventDispatcher | |
Metodi protetti
Eventi
Descrizione della funzione di costruzione
DefaultMediaFactory | () | Funzione di costruzione |
public function DefaultMediaFactory()| Versione linguaggio: | ActionScript 3.0 |
| Versione prodotto: | OSMF 1.0 |
| Versioni runtime: | Flash Player 10, AIR 1.5 |
Constructor.
DefaultMediaFactoryExample.as
This example demonstrates how to manually use the DefaultMediaFactory
class to instantiate a video element.
package org.osmf.media
{
import flash.display.Sprite;
import org.osmf.containers.MediaContainer;
public class DefaultMediaFactoryExample extends Sprite
{
public function DefaultMediaFactoryExample()
{
// Construct a default media factory:
var factory:DefaultMediaFactory = new DefaultMediaFactory();
// Request the factory to create a media element that matches the passed URL:
var media:MediaElement = factory.createMediaElement(new URLResource("http://mediapm.edgesuite.net/strobe/content/test/AFaerysTale_sylviaApostol_640_500_short.flv"));
// Add a media container, and player to have the constructed VideoElement
// play back:
var mediaContainer:MediaContainer = new MediaContainer();
addChild(mediaContainer);
mediaContainer.width = 640;
mediaContainer.height = 500;
mediaContainer.addMediaElement(media);
new MediaPlayer(media);
}
}
}
Tue Jun 12 2018, 02:44 PM Z
Nascondi proprietà pubbliche ereditate
Mostra proprietà pubbliche ereditate