Paket | org.osmf.media |
Klass | public class MediaElement |
Arv | MediaElement EventDispatcher Object |
Underklasser | BeaconElement, CompositeElement, HTMLElement, LoadableElementBase, ProxyElement |
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Programmatically, a media element encapsulates a set of media traits and a state space. The media traits represent the capabilities of the media element and are dynamic in nature. At one moment in time a media element might be seekable, at another moment it might not be. For example, this could occur if the media element is a video sequence containing unskippable ads.
A media element operates on a media resource. For example, if the media element represents a video player, the media resource might encapsulate a URL to a video stream. If the media element represents a complex media composition, the media resource URL might be a document that references the multiple resources used in the media composition.
Relaterade API-element
MediaResourceBase
Egenskap | Definieras med | ||
---|---|---|---|
constructor : Object
En referens till klassobjektet eller konstruktorfunktionen för en given objektinstans. | Object | ||
container : IMediaContainer [skrivskyddad]
The media container that this element uses. | MediaElement | ||
metadataNamespaceURLs : Vector.<String> [skrivskyddad]
A Vector containing the namespace URLs for all Metadata
objects stored within this MediaElement. | MediaElement | ||
resource : MediaResourceBase
The media resource that this media element operates on. | MediaElement | ||
traitTypes : Vector.<String> [skrivskyddad]
A Vector of MediaTraitType values representing the trait types on this
media element. | MediaElement |
Metod | Definieras med | ||
---|---|---|---|
Constructor. | MediaElement | ||
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registrerar ett händelseavlyssnarobjekt för ett EventDispatcher-objekt så att avlyssnaren får meddelanden om händelser. | EventDispatcher | ||
Adds a Metadata object to this MediaElement under the specified namespace URL. | MediaElement | ||
Skickar en händelse till händelseflödet. | EventDispatcher | ||
Returns the Metadata object that is stored under this MediaElement with
the specified namespace URL. | MediaElement | ||
Returns the media trait of the specified type. | MediaElement | ||
Kontrollerar om EventDispatcher-objektet har några avlyssnare registrerade för en viss typ av händelse. | EventDispatcher | ||
Anger om det finns en egenskap angiven för ett objekt. | Object | ||
Determines whether this media element has a media trait of the
specified type. | MediaElement | ||
Anger om en instans av klassen Object finns i prototypkedjan för objektet som anges som parameter. | Object | ||
Anger om den angivna egenskapen finns och är uppräkningsbar. | Object | ||
Tar bort en avlyssnare från EventDispatcher-objektet. | EventDispatcher | ||
Removes the Metadata object that was stored under this MediaElement with
the specified namespace URL. | MediaElement | ||
Anger tillgänglighet för en dynamisk egenskap för slingåtgärder. | Object | ||
Returnerar det här objektets strängrepresentation, formaterad i enlighet med språkspecifika konventioner. | Object | ||
Returnerar det angivna objektets strängbeteckning. | Object | ||
Returnerar det angivna objektets primitiva värde. | Object | ||
Kontrollerar om en händelseavlyssnare är registrerad för det här EventDispatcher-objektet eller något av dess överordnade objekt för den angivna händelsetypen. | EventDispatcher |
Metod | Definieras med | ||
---|---|---|---|
Adds a new media trait to this media element. | MediaElement | ||
Removes a media trait from this media element. | MediaElement | ||
Sets up the traits for this media element. | MediaElement |
Händelse | Sammanfattning | Definieras med | ||
---|---|---|---|---|
[utsändningshändelse] Skickas när Flash Player eller AIR får operativsystemfokus och blir aktivt. | EventDispatcher | |||
Dispatched when the element's container property changed. | MediaElement | |||
[utsändningshändelse] Skickas när Flash Player eller AIR förlorar operativsystemfokus och blir inaktivt. | EventDispatcher | |||
Dispatched when an error which impacts the operation of the media element occurs. | MediaElement | |||
Dispatched when a info which impacts the operation of the media element is available. | MediaElement | |||
Dispatched when a Metadata object has been added to this media element. | MediaElement | |||
Dispatched when a Metadata object has been removed from this media element. | MediaElement | |||
Dispatched when a trait is added to the media element. | MediaElement | |||
Dispatched when a trait is removed from the media element. | MediaElement |
container | egenskap |
container:IMediaContainer
[skrivskyddad] Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
The media container that this element uses.
Implementering
public function get container():IMediaContainer
metadataNamespaceURLs | egenskap |
resource | egenskap |
resource:MediaResourceBase
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
The media resource that this media element operates on.
Implementering
public function get resource():MediaResourceBase
public function set resource(value:MediaResourceBase):void
traitTypes | egenskap |
MediaElement | () | Konstruktor |
public function MediaElement()
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Constructor.
addMetadata | () | metod |
public function addMetadata(namespaceURL:String, metadata:Metadata):void
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Adds a Metadata object to this MediaElement under the specified namespace URL.
Parametrar
namespaceURL:String — The namespace URL used to store the Metadata.
| |
metadata:Metadata — The Metadata to add.
|
Utlöser
ArgumentError — if namespaceURL or metadata is null.
|
addTrait | () | metod |
protected function addTrait(type:String, instance:org.osmf.traits:MediaTraitBase):void
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Adds a new media trait to this media element. If successful, dispatches a MediaElementEvent.
Parametrar
type:String — The MediaTraitType for the media trait to add.
| |
instance:org.osmf.traits:MediaTraitBase — The media trait to add.
|
Utlöser
ArgumentError — If either parameter is null , or
if the specified type and the type of the media trait don't match,
or if a different instance of the specific trait class has already
been added.
|
getMetadata | () | metod |
public function getMetadata(namespaceURL:String):Metadata
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Returns the Metadata object that is stored under this MediaElement with the specified namespace URL.
Parametrar
namespaceURL:String — The namespace URL of the Metadata object to retrieve.
|
Metadata |
Utlöser
ArgumentError — If namespaceURL is null.
|
getTrait | () | metod |
public function getTrait(type:String):org.osmf.traits:MediaTraitBase
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Returns the media trait of the specified type.
Parametrar
type:String — The MediaTraitType for the media trait to return.
|
org.osmf.traits:MediaTraitBase — The retrieved trait or null if no such trait exists on this
media element.
|
Utlöser
ArgumentError — If the parameter is null .
|
hasTrait | () | metod |
public function hasTrait(type:String):Boolean
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Determines whether this media element has a media trait of the specified type.
Parametrar
type:String — The MediaTraitType for the media trait to check for.
|
Boolean — true if this media element has a media
trait of the specified class, false otherwise.
|
Utlöser
ArgumentError — If the parameter is null .
|
removeMetadata | () | metod |
public function removeMetadata(namespaceURL:String):Metadata
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Removes the Metadata object that was stored under this MediaElement with the specified namespace URL.
Parametrar
namespaceURL:String — The namespace URL of the Metadata to remove.
|
Metadata |
Utlöser
ArgumentError — If namespaceURL is null.
|
removeTrait | () | metod |
protected function removeTrait(type:String):org.osmf.traits:MediaTraitBase
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Removes a media trait from this media element. If successful, dispatches a MediaElementEvent.
Parametrar
type:String — The MediaTraitType for the media trait to remove.
|
org.osmf.traits:MediaTraitBase — The removed trait or null if no trait was
removed.
|
Utlöser
ArgumentError — If the parameter is null .
|
setupTraits | () | metod |
protected function setupTraits():void
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Sets up the traits for this media element. Occurs during construction. Subclasses should override this method and call addTrait for each trait of their own.
containerChange | Händelse |
org.osmf.events.ContainerChangeEvent
egenskap ContainerChangeEvent.type =
org.osmf.events.ContainerChangeEvent.CONTAINER_CHANGE
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Dispatched when the element's container property changed.
The ContainerChangeEvent.CONTAINER_CHANGE constant defines the value of the type property of the event object for a containerChange event.mediaError | Händelse |
org.osmf.events.MediaErrorEvent
egenskap MediaErrorEvent.type =
org.osmf.events.MediaErrorEvent.MEDIA_ERROR
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Dispatched when an error which impacts the operation of the media element occurs.
The MediaErrorEvent.MEDIA_ERROR constant defines the value of the type property of the event object for a mediaError event.mediaInfo | Händelse |
org.osmf.events.MediaErrorEvent
egenskap MediaErrorEvent.type =
org.osmf.events.MediaErrorEvent.MEDIA_INFO
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 2.0 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Dispatched when a info which impacts the operation of the media element is available. MEDIA_INFO events are non-fatal.
metadataAdd | Händelse |
org.osmf.events.MediaElementEvent
egenskap MediaElementEvent.type =
org.osmf.events.MediaElementEvent.METADATA_ADD
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Dispatched when a Metadata object has been added to this media element.
The MediaElementEvent.METADATA_ADD constant defines the value of the type property of the event object for a metadataAdd event.metadataRemove | Händelse |
org.osmf.events.MediaElementEvent
egenskap MediaElementEvent.type =
org.osmf.events.MediaElementEvent.METADATA_REMOVE
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Dispatched when a Metadata object has been removed from this media element.
The MediaElementEvent.METADATA_REMOVE constant defines the value of the type property of the event object for a metadataRemove event.traitAdd | Händelse |
org.osmf.events.MediaElementEvent
egenskap MediaElementEvent.type =
org.osmf.events.MediaElementEvent.TRAIT_ADD
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Dispatched when a trait is added to the media element.
The MediaElementEvent.TRAIT_ADD constant defines the value of the type property of the event object for a traitAdd event.traitRemove | Händelse |
org.osmf.events.MediaElementEvent
egenskap MediaElementEvent.type =
org.osmf.events.MediaElementEvent.TRAIT_REMOVE
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Dispatched when a trait is removed from the media element.
The MediaElementEvent.TRAIT_REMOVE constant defines the value of the type property of the event object for a traitRemove event.Tue Jun 12 2018, 01:40 PM Z