ActionScript® 3.0 Reference for the Adobe® Flash® Platform
Home  |  Show Packages and Classes List |  Packages  |  Classes  |  What's New  |  Index  |  Appendixes
org.osmf.media 

MediaResourceBase  - AS3 OSMF

Packageorg.osmf.media
Classpublic class MediaResourceBase
InheritanceMediaResourceBase Inheritance Object
Subclasses PluginInfoResource, URLResource

Language Version: ActionScript 3.0
Product Version: OSMF 1.0
Runtime Versions: Flash Player 10, AIR 1.5

A MediaResourceBase is a base class for media that serves as input to a MediaElement.

Different MediaElement instances can "handle" (i.e. process and present) different resource types (e.g. a URL vs. an array of streams), or even different variations of the same resource type (e.g. a URL with the ".jpg" extension vs. a URL with a ".mp3" extension).

A MediaResourceBase can also have an arbitrary set of descriptive metadata. Metadata is typically used to further qualify the resource so that each MediaElement can determine whether (and how) to present and process the resource.



Public Properties
 PropertyDefined By
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
  mediaType : String
The MediaType, if any, of this resource.
MediaResourceBase
  metadataNamespaceURLs : Vector.<String>
[read-only] A Vector containing the namespace URLs for all Metadata objects within this resource.
MediaResourceBase
  mimeType : String
The MIME type, if any, of this resource.
MediaResourceBase
Public Methods
 MethodDefined By
  
Constructor.
MediaResourceBase
  
addMetadataValue(namespaceURL:String, value:Object):void
Adds a metadata value to this resource.
MediaResourceBase
  
Retrieves a metadata value from this resource.
MediaResourceBase
 Inherited
Indicates whether an object has a specified property defined.
Object
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
  
Removes a metadata value from this resource.
MediaResourceBase
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
 Inherited
Returns the string representation of this object, formatted according to locale-specific conventions.
Object
 Inherited
Returns the string representation of the specified object.
Object
 Inherited
Returns the primitive value of the specified object.
Object
Property Detail

mediaType

property
mediaType:String

The MediaType, if any, of this resource.



Implementation
    public function get mediaType():String
    public function set mediaType(value:String):void

metadataNamespaceURLs

property 
metadataNamespaceURLs:Vector.<String>  [read-only]

A Vector containing the namespace URLs for all Metadata objects within this resource.



Implementation
    public function get metadataNamespaceURLs():Vector.<String>

mimeType

property 
mimeType:String

The MIME type, if any, of this resource.



Implementation
    public function get mimeType():String
    public function set mimeType(value:String):void
Constructor Detail

MediaResourceBase

()Constructor
public function MediaResourceBase()

Constructor.

Method Detail

addMetadataValue

()method
public function addMetadataValue(namespaceURL:String, value:Object):void

Language Version: ActionScript 3.0
Product Version: OSMF 1.0
Runtime Versions: Flash Player 10, AIR 1.5

Adds a metadata value to this resource.

Parameters

namespaceURL:String — A URL with which this metadata is associated, and with which it can be retrieved. If there is metadata that is already associated with this URL, then it will be overwritten.
 
value:Object — The metadata value. It is recommended that this be a strongly-typed class, rather than an untyped Object.

getMetadataValue

()method 
public function getMetadataValue(namespaceURL:String):Object

Language Version: ActionScript 3.0
Product Version: OSMF 1.0
Runtime Versions: Flash Player 10, AIR 1.5

Retrieves a metadata value from this resource.

Parameters

namespaceURL:String — The URL with which the metadata is associated.

Returns
Object — The retrieved metadata value, null if there is no metadata value associated with the specified namespace URL.

removeMetadataValue

()method 
public function removeMetadataValue(namespaceURL:String):Object

Language Version: ActionScript 3.0
Product Version: OSMF 1.0
Runtime Versions: Flash Player 10, AIR 1.5

Removes a metadata value from this resource.

Parameters

namespaceURL:String — The URL with which the metadata value is associated.

Returns
Object — The removed metadata value, null if there is no metadata value associated with the specified namespace URL.