Raw File
media-source.idl
// GENERATED CONTENT - DO NOT EDIT
// Content of this file was automatically extracted from the
// "Media Source Extensions™" spec.
// See: https://w3c.github.io/media-source/

enum ReadyState {
    "closed",
    "open",
    "ended"
};
enum EndOfStreamError {
    "network",
    "decode"
};
[Constructor]
interface MediaSource : EventTarget {
    readonly attribute SourceBufferList    sourceBuffers;
    readonly attribute SourceBufferList    activeSourceBuffers;
    readonly attribute ReadyState          readyState;
             attribute unrestricted double duration;
             attribute EventHandler        onsourceopen;
             attribute EventHandler        onsourceended;
             attribute EventHandler        onsourceclose;
    SourceBuffer addSourceBuffer(DOMString type);
    void         removeSourceBuffer(SourceBuffer sourceBuffer);
    void         endOfStream(optional EndOfStreamError error);
    void         setLiveSeekableRange(double start, double end);
    void         clearLiveSeekableRange();
    static boolean isTypeSupported(DOMString type);
};
enum AppendMode {
    "segments",
    "sequence"
};
interface SourceBuffer : EventTarget {
             attribute AppendMode          mode;
    readonly attribute boolean             updating;
    readonly attribute TimeRanges          buffered;
             attribute double              timestampOffset;
    readonly attribute AudioTrackList      audioTracks;
    readonly attribute VideoTrackList      videoTracks;
    readonly attribute TextTrackList       textTracks;
             attribute double              appendWindowStart;
             attribute unrestricted double appendWindowEnd;
             attribute EventHandler        onupdatestart;
             attribute EventHandler        onupdate;
             attribute EventHandler        onupdateend;
             attribute EventHandler        onerror;
             attribute EventHandler        onabort;
    void appendBuffer(BufferSource data);
    void abort();
    void remove(double start, unrestricted double end);
};
interface SourceBufferList : EventTarget {
    readonly attribute unsigned long length;
             attribute EventHandler  onaddsourcebuffer;
             attribute EventHandler  onremovesourcebuffer;
    getter SourceBuffer (unsigned long index);
};
[Exposed=Window]
partial interface URL {
    static DOMString createObjectURL(MediaSource mediaSource);
};
partial interface AudioTrack {
    readonly attribute SourceBuffer? sourceBuffer;
};
partial interface VideoTrack {
    readonly attribute SourceBuffer? sourceBuffer;
};
partial interface TextTrack {
    readonly attribute SourceBuffer? sourceBuffer;
};
back to top