MediaSource class

Experimental: This is an experimental technologyCheck the Browser compatibility table carefully before using this in production. The interface of the Media Source Extensions API represents a source of media data for an HTMLMediaElement object. A object can be attached to a HTMLMediaElement to be played in the user agent.

EventTarget

MediaSource

Implemented types
Available extensions
Annotations
  • @experimental
  • @JS()
  • @staticInterop

Constructors

MediaSource()
factory

Properties

activeSourceBuffers SourceBufferList

Available on MediaSource, provided by the PropsMediaSource extension

no setter
duration ↔ dynamic

Available on MediaSource, provided by the PropsMediaSource extension

getter/setter pair
handle MediaSourceHandle

Available on MediaSource, provided by the PropsMediaSource extension

no setter
hashCode int
The hash code for this object.
no setterinherited
onsourceclose EventHandlerNonNull<Event>?

Available on MediaSource, provided by the PropsMediaSource extension

getter/setter pair
onsourceended EventHandlerNonNull<Event>?

Available on MediaSource, provided by the PropsMediaSource extension

getter/setter pair
onsourceopen EventHandlerNonNull<Event>?

Available on MediaSource, provided by the PropsMediaSource extension

getter/setter pair
readyState ReadyState

Available on MediaSource, provided by the PropsMediaSource extension

no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sourceBuffers SourceBufferList

Available on MediaSource, provided by the PropsMediaSource extension

no setter

Methods

addEventListener(String type, EventListener? callback, [dynamic options]) → void

Available on EventTarget, provided by the PropsEventTarget extension

addSourceBuffer(String type) SourceBuffer

Available on MediaSource, provided by the PropsMediaSource extension

clearLiveSeekableRange() → void

Available on MediaSource, provided by the PropsMediaSource extension

dispatchEvent(Event event) bool

Available on EventTarget, provided by the PropsEventTarget extension

endOfStream([EndOfStreamError? error]) → void

Available on MediaSource, provided by the PropsMediaSource extension

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeEventListener(String type, EventListener? callback, [dynamic options]) → void

Available on EventTarget, provided by the PropsEventTarget extension

removeSourceBuffer(SourceBuffer sourceBuffer) → void

Available on MediaSource, provided by the PropsMediaSource extension

setLiveSeekableRange(double start, double end) → void

Available on MediaSource, provided by the PropsMediaSource extension

toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

isTypeSupported(String type) bool