Vinyl
    Preparing search index...

    Interface MediaSourceController

    interface MediaSourceController {
        duration: number;
        readyState: ReadyState;
        readyToAppend: boolean;
        createSourceBuffer(
            contentType: ContentType,
            mimeType: string,
        ): SourceBufferRef;
        createUrl(): string;
        endOfStream(error?: EndOfStreamError): void;
        hasAnyListeners(): boolean;
        hasListeners(type: keyof MediaSourceControllerEventMap): boolean;
        on<K extends keyof MediaSourceControllerEventMap>(
            type: K,
            handler: EventHandler<MediaSourceControllerEventMap[K]>,
            options?: SignalOptions,
        ): Unsubscribe;
    }

    Hierarchy (View Summary)

    Implemented by

    Index

    Properties

    duration: number

    Sets/gets the media source's duration.

    readyState: ReadyState

    Returns the parent media source ready state.

    readyToAppend: boolean

    True if all source buffers have been created and data may be appended.

    Methods

    • Constructs a new SourceBuffer with the given content type and mime type.

      Parameters

      Returns SourceBufferRef

    • Creates an Object URL to use as the source for this stream.

      Returns string

    • Signals the end of the stream.

      Parameters

      • Optionalerror: EndOfStreamError

        A string representing an error to throw when the end of the stream is reached.

      Returns void