Media class

Media

A Media object to open inside a Player for playback.

final player = Player();
final playable = Media('https://user-images.githubusercontent.com/28951144/229373695-22f88f13-d18f-4288-9bf1-c3e078d83722.mp4');
await player.open(playable);

Constructors

Media(String resource, {Map<String, dynamic>? extras, Map<String, String>? httpHeaders})
Media

Properties

extras Map<String, dynamic>?
Additional optional user data.
final
hashCode int
For comparing with other Media instances.
no setteroverride
httpHeaders Map<String, String>?
HTTP headers.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
uri String
URI of the Media.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
For comparing with other Media instances.
override

Static Properties

cache HashMap<String, _MediaCache>
Previously created Media instances. This HashMap is used to retrieve previously set extras & httpHeaders.
final
ref HashMap<String, int>
Previously created Media instances' reference count.
final

Static Methods

encodeAssetKey(String uri) String
normalizeURI(String uri) String
Normalizes the passed URI.