Package | com.adobe.mediacore |
Class | public final class MediaResource |
Inheritance | MediaResource ![]() |
Property | Defined By | ||
---|---|---|---|
metadata : Metadata [read-only]
Resource custom information. | MediaResource | ||
type : String [read-only]
Type of the media resource. | MediaResource | ||
url : String [read-only]
Returns the URL where the media manifest/playlist can be found. | MediaResource |
Method | Defined By | ||
---|---|---|---|
MediaResource(url:String, type:String, metadata:Metadata)
Default constructor. | MediaResource | ||
[static] | MediaResource | ||
[static]
Helper function for creating a media resource instance. | MediaResource | ||
equals(otherMediaResource:MediaResource):Boolean
Checks if is equal with other media resource. | MediaResource | ||
toString():String
Returns a String representation of the current media resource. | MediaResource |
metadata | property |
metadata:Metadata
[read-only] Resource custom information.
public function get metadata():Metadata
type | property |
type:String
[read-only] Type of the media resource. Usually the type of the resource can be detected from the provided url, but sometimes when custom naming schemes are involved this is not possible.
public function get type():String
url | property |
url:String
[read-only] Returns the URL where the media manifest/playlist can be found.
public function get url():String
MediaResource | () | Constructor |
public function MediaResource(url:String, type:String, metadata:Metadata)
Default constructor.
Parametersurl:String — the url where the manifest/playlist of media is available
| |
type:String — the type of the resource.
| |
metadata:Metadata — the custom information associated with this resource
|
ArgumentError — if provided url is null or empty.
|
createFromMetadata | () | method |
public static function createFromMetadata(metadata:Metadata, type:String):MediaResource
Parameters
metadata:Metadata | |
type:String |
MediaResource |
createFromUrl | () | method |
public static function createFromUrl(url:String, metadata:Metadata):MediaResource
Helper function for creating a media resource instance.
Parameters
url:String — the url where the manifest/playlist of media is available
| |
metadata:Metadata — the custom information associated with this resource
|
MediaResource — a new MediaResource instance
|
ArgumentError — if provided url is null or empty or no supported type was extracted from the specified url.
|
equals | () | method |
public function equals(otherMediaResource:MediaResource):Boolean
Checks if is equal with other media resource. The metadata property is ignored during comparison, only the url and the type are used.
Parameters
otherMediaResource:MediaResource — the other media resource to be compared with.
|
Boolean — return true if both objects have the same urls and the same type and false otherwise.
|
toString | () | method |
public function toString():String
Returns a String representation of the current media resource. As a media resource can have a significant amount of custom metadata associated with it, we will not include metadata content in this representation.
ReturnsString — a string containing the url and the type of the resource
|