Overview
The Media
class represents a media resource.
It contains information about the media such
as its source URI, duration, resolution, and metadata.
See Also:
MediaError
Profile: common
Variable Summary
access | name | type | Can Read | Can Init | Can Write | Default Value | description |
---|---|---|---|---|---|---|---|
public-read | duration | Duration |
The duration in seconds of the source media. The duration in seconds of the source media. If the media duration is unknown then this property will be less than zero. Profile: common |
||||
public-read | height | Number |
The height of the source media specified in pixels. The height of the source media specified in pixels. This may be zero if the media has no height, e.g., when playing audio, or if the height is currently unknown which may occur with streaming media.
See Also:
Profile: common |
||||
public-read | metadata | Metadata[] |
A sequence of Metadata objects which can contain information about the media. |
||||
public | onError | function(:MediaError):Void |
The function to be invoked when an error occurs on this The function to be invoked when an error occurs on this
See Also:
Profile: common |
||||
public-init | source | String |
Defines the Defines the Constraints: See java.net.URI for more information about URI formatting. Profile: common |
||||
public-read | tracks | Track[] |
A A
See Also:
Profile: common |
||||
public-read | width | Number |
The width of the source media specified in pixels. The width of the source media specified in pixels. This may be zero if the media has no width, e.g., when playing audio, or if the width is currently unknown which may occur with streaming media.
See Also:
Profile: common |
Inherited Variables
Function Summary
- public getMetadata(key: java.lang.String) : java.lang.Object
-
Returns the metadata stored in the source media for the specified key.
Returns the metadata stored in the source media for the specified key.
See Also:
metadata-
Parameters
- key
- the name of the key, such as "author"
-
Returns
- Object
-
the Object for the specided key.
The class of this is often a
String
but could be another class depending on the media type and the key value. Note that metadata may not be available for all media types.
Profile: common