Pacote | org.osmf.media |
Classe | public class MediaElement |
Herança | MediaElement EventDispatcher Object |
Subclasses | BeaconElement, CompositeElement, HTMLElement, LoadableElementBase, ProxyElement |
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | OSMF 1.0 |
Versões de runtime: | 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.
Elementos da API relacionados
MediaResourceBase
Propriedade | Definido por | ||
---|---|---|---|
constructor : Object
Uma referência ao objeto de classe ou à função de construtor de uma determinada ocorrência de objeto. | Object | ||
container : IMediaContainer [somente leitura]
The media container that this element uses. | MediaElement | ||
metadataNamespaceURLs : Vector.<String> [somente leitura]
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> [somente leitura]
A Vector of MediaTraitType values representing the trait types on this
media element. | MediaElement |
Método | Definido por | ||
---|---|---|---|
Constructor. | MediaElement | ||
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registra um objeto de ouvinte de evento em um objeto EventDispatcher, de forma que o ouvinte receba a notificação de um evento. | EventDispatcher | ||
Adds a Metadata object to this MediaElement under the specified namespace URL. | MediaElement | ||
Envia um evento para o fluxo de eventos. | 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 | ||
Verifica se o objeto EventDispatcher tem ouvintes registrados para um tipo específico de evento. | EventDispatcher | ||
Indica se um objeto tem uma propriedade especificada definida. | Object | ||
Determines whether this media element has a media trait of the
specified type. | MediaElement | ||
Indica se uma ocorrência da classe Object está na cadeia de protótipos do objeto especificado como o parâmetro. | Object | ||
Indica se a propriedade especificada existe e é enumerável. | Object | ||
Remove um ouvinte do objeto EventDispatcher. | EventDispatcher | ||
Removes the Metadata object that was stored under this MediaElement with
the specified namespace URL. | MediaElement | ||
Define a disponibilidade de uma propriedade dinâmica para operações de repetição. | Object | ||
Retorna a representação da string deste objeto, formatado segundo as convenções específicas para a localidade. | Object | ||
Retorna a representação de string do objeto especificado. | Object | ||
Retorna o valor primitivo do objeto especificado. | Object | ||
Verifica se um ouvinte de evento está registrado nesse objeto EventDispatcher ou em qualquer um de seus ancestrais para o tipo de evento especificado. | EventDispatcher |
Método | Definido por | ||
---|---|---|---|
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 |
Evento | Resumo | Definido por | ||
---|---|---|---|---|
[transmissão de evento] Despachado quando o Flash Player ou o aplicativo do AIR ganha o foco do sistema operacional e está se tornando inativo. | EventDispatcher | |||
Dispatched when the element's container property changed. | MediaElement | |||
[transmissão de evento] Despachado quando o Flash Player ou o aplicativo do AIR perde o foco do sistema operacional e está se tornando inativo. | 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 | propriedade |
container:IMediaContainer
[somente leitura] Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | OSMF 1.0 |
Versões de runtime: | Flash Player 10, AIR 1.5 |
The media container that this element uses.
Implementação
public function get container():IMediaContainer
metadataNamespaceURLs | propriedade |
resource | propriedade |
resource:MediaResourceBase
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | OSMF 1.0 |
Versões de runtime: | Flash Player 10, AIR 1.5 |
The media resource that this media element operates on.
Implementação
public function get resource():MediaResourceBase
public function set resource(value:MediaResourceBase):void
traitTypes | propriedade |
traitTypes:Vector.<String>
[somente leitura] Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | OSMF 1.0 |
Versões de runtime: | Flash Player 10, AIR 1.5 |
A Vector of MediaTraitType values representing the trait types on this media element.
Implementação
public function get traitTypes():Vector.<String>
MediaElement | () | Construtor |
public function MediaElement()
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | OSMF 1.0 |
Versões de runtime: | Flash Player 10, AIR 1.5 |
Constructor.
addMetadata | () | método |
public function addMetadata(namespaceURL:String, metadata:Metadata):void
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | OSMF 1.0 |
Versões de runtime: | Flash Player 10, AIR 1.5 |
Adds a Metadata object to this MediaElement under the specified namespace URL.
Parâmetros
namespaceURL:String — The namespace URL used to store the Metadata.
| |
metadata:Metadata — The Metadata to add.
|
Lança
ArgumentError — if namespaceURL or metadata is null.
|
addTrait | () | método |
protected function addTrait(type:String, instance:org.osmf.traits:MediaTraitBase):void
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | OSMF 1.0 |
Versões de runtime: | Flash Player 10, AIR 1.5 |
Adds a new media trait to this media element. If successful, dispatches a MediaElementEvent.
Parâmetros
type:String — The MediaTraitType for the media trait to add.
| |
instance:org.osmf.traits:MediaTraitBase — The media trait to add.
|
Lança
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 | () | método |
public function getMetadata(namespaceURL:String):Metadata
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | OSMF 1.0 |
Versões de runtime: | Flash Player 10, AIR 1.5 |
Returns the Metadata object that is stored under this MediaElement with the specified namespace URL.
Parâmetros
namespaceURL:String — The namespace URL of the Metadata object to retrieve.
|
Metadata |
Lança
ArgumentError — If namespaceURL is null.
|
getTrait | () | método |
public function getTrait(type:String):org.osmf.traits:MediaTraitBase
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | OSMF 1.0 |
Versões de runtime: | Flash Player 10, AIR 1.5 |
Returns the media trait of the specified type.
Parâmetros
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.
|
Lança
ArgumentError — If the parameter is null .
|
hasTrait | () | método |
public function hasTrait(type:String):Boolean
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | OSMF 1.0 |
Versões de runtime: | Flash Player 10, AIR 1.5 |
Determines whether this media element has a media trait of the specified type.
Parâmetros
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.
|
Lança
ArgumentError — If the parameter is null .
|
removeMetadata | () | método |
public function removeMetadata(namespaceURL:String):Metadata
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | OSMF 1.0 |
Versões de runtime: | Flash Player 10, AIR 1.5 |
Removes the Metadata object that was stored under this MediaElement with the specified namespace URL.
Parâmetros
namespaceURL:String — The namespace URL of the Metadata to remove.
|
Metadata |
Lança
ArgumentError — If namespaceURL is null.
|
removeTrait | () | método |
protected function removeTrait(type:String):org.osmf.traits:MediaTraitBase
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | OSMF 1.0 |
Versões de runtime: | Flash Player 10, AIR 1.5 |
Removes a media trait from this media element. If successful, dispatches a MediaElementEvent.
Parâmetros
type:String — The MediaTraitType for the media trait to remove.
|
org.osmf.traits:MediaTraitBase — The removed trait or null if no trait was
removed.
|
Lança
ArgumentError — If the parameter is null .
|
setupTraits | () | método |
protected function setupTraits():void
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | OSMF 1.0 |
Versões de runtime: | 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 | Evento |
org.osmf.events.ContainerChangeEvent
propriedade ContainerChangeEvent.type =
org.osmf.events.ContainerChangeEvent.CONTAINER_CHANGE
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | OSMF 1.0 |
Versões de runtime: | 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 | Evento |
org.osmf.events.MediaErrorEvent
propriedade MediaErrorEvent.type =
org.osmf.events.MediaErrorEvent.MEDIA_ERROR
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | OSMF 1.0 |
Versões de runtime: | 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 | Evento |
org.osmf.events.MediaErrorEvent
propriedade MediaErrorEvent.type =
org.osmf.events.MediaErrorEvent.MEDIA_INFO
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | OSMF 2.0 |
Versões de runtime: | 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 | Evento |
org.osmf.events.MediaElementEvent
propriedade MediaElementEvent.type =
org.osmf.events.MediaElementEvent.METADATA_ADD
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | OSMF 1.0 |
Versões de runtime: | 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 | Evento |
org.osmf.events.MediaElementEvent
propriedade MediaElementEvent.type =
org.osmf.events.MediaElementEvent.METADATA_REMOVE
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | OSMF 1.0 |
Versões de runtime: | 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 | Evento |
org.osmf.events.MediaElementEvent
propriedade MediaElementEvent.type =
org.osmf.events.MediaElementEvent.TRAIT_ADD
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | OSMF 1.0 |
Versões de runtime: | 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 | Evento |
org.osmf.events.MediaElementEvent
propriedade MediaElementEvent.type =
org.osmf.events.MediaElementEvent.TRAIT_REMOVE
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | OSMF 1.0 |
Versões de runtime: | 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.Wed Jun 13 2018, 11:10 AM Z