Member Junction
    Preparing search index...

    A live share.

    interface DisplayCapture {
        Label: string;
        PanelLabel?: string;
        PanelMethod?: PanelCaptureMethod;
        Stream: MediaStream;
        Surface: CapturedDisplaySurface;
        Track: MediaStreamTrack;
        OnEnded(handler: () => void): () => void;
        Stop(): void;
    }
    Index

    Properties

    Label: string

    The browser's label for the shared surface, such as a window or tab title.

    PanelLabel?: string

    The shared panel's name, for a panel capture that was given one (DisplayCaptureOptions.PanelLabel).

    PanelMethod?: PanelCaptureMethod

    How the stream was narrowed, for a panel capture.

    Stream: MediaStream

    What is being shared now. It can change if the user switches surfaces mid-share.

    Track: MediaStreamTrack

    The shared video track.

    Methods

    • Calls handler once when the share ends: the user pressed the browser's "Stop sharing", the shared surface closed, or DisplayCapture.Stop was called. If the share has already ended, handler is called at once.

      Parameters

      • handler: () => void

      Returns () => void

      A function that removes the handler.