@vestra-player/sdk - v1.11.3
    Preparing search index...

    Interface FactEventPayloads

    The data each FactEvent carries, as the listener of Player.on gets it.

    1.11.0

    interface FactEventPayloads {
        "video.reconfigured": {
            sourceId: number;
            width: number;
            height: number;
            displayWidth: number;
            displayHeight: number;
            fps: number | null;
            rotation: number;
            hdr: boolean;
        };
        "audio.reconfigured": {
            sourceId: number;
            sampleRate: number;
            channels: number
            | null;
            format: string | null;
        };
        "audio.tracks.changed": { sourceId: number; audioTracks: AudioTrack[] };
        "subtitles.changed": { state: SubtitlesState };
        "window.changed": WindowState;
        "layout.changed": {
            slots: {
                bottom: LayoutPosition | null;
                sidebar: LayoutPosition | null;
                adjust: LayoutPosition | null;
                backdrop: { effective: boolean } | null;
            };
        };
        "audio.devices.changed": {
            devices: AudioDevice[];
            requested: string
            | null;
            active: string | null;
        };
        "app.started": { version: string; previous: string
        | null };
    }
    Index
    "video.reconfigured": {
        sourceId: number;
        width: number;
        height: number;
        displayWidth: number;
        displayHeight: number;
        fps: number | null;
        rotation: number;
        hdr: boolean;
    }

    The decoded video's parameters changed: a new source's video is known, or a rotation, a crop or another filter changed the size it is shown at. Once to a few times per file; not for a source without video.

    Type Declaration

    • sourceId: number

      The source it belongs to (PlayerState.sourceId).

    • width: number

      The decoded width in pixels.

    • height: number

      The decoded height in pixels.

    • displayWidth: number

      The width it is shown at, after aspect, rotation and the video filters (0 while unknown).

    • displayHeight: number

      The height it is shown at, after aspect, rotation and the video filters (0 while unknown).

    • fps: number | null

      The frame rate the file declares, null when it declares none.

    • rotation: number

      The rotation the file asks for, in degrees (0, 90, 180 or 270).

    • hdr: boolean

      The video is HDR (PQ or HLG transfer).

    "audio.reconfigured": {
        sourceId: number;
        sampleRate: number;
        channels: number | null;
        format: string | null;
    }

    The decoded audio's parameters changed: a new source's audio is known, another track plays, or the output was opened again. Not for a source without audio.

    Type Declaration

    • sourceId: number

      The source it belongs to (PlayerState.sourceId).

    • sampleRate: number

      The sample rate in Hz.

    • channels: number | null

      The number of channels, null while unknown.

    • format: string | null

      The sample format ("floatp", "s16"…), null while unknown.

    "audio.tracks.changed": { sourceId: number; audioTracks: AudioTrack[] }

    The current source's audio track list or its selected track changed: the list of a new source is known, a track was added, another was selected. Not when the list goes away (a source closes or a new one loads; source.ended and source.opening say so).

    Type Declaration

    "subtitles.changed": { state: SubtitlesState }

    The subtitle track list or the primary or secondary selection changed for a loaded source: its tracks are known, a track was loaded or removed, another was selected. state is the subtitle state then; the SDK takes it into plugin.subtitles.state first, so it can be passed as ifCurrent.

    Type Declaration

    "window.changed": WindowState

    The main window's state changed: fullscreen, maximized or picture-in-picture flipped (at once), or its video area changed size (once, when the size has not changed for 300 ms, so a resize gesture sends one event at its end). The SDK takes it into plugin.window.state first.

    "layout.changed": {
        slots: {
            bottom: LayoutPosition | null;
            sidebar: LayoutPosition | null;
            adjust: LayoutPosition | null;
            backdrop: { effective: boolean } | null;
        };
    }

    A panel position was shown or hidden, docked or detached, another tab became active, or a panel came or went. backdrop is the backdrop panel's state, null without one.

    Type Declaration

    • slots: {
          bottom: LayoutPosition | null;
          sidebar: LayoutPosition | null;
          adjust: LayoutPosition | null;
          backdrop: { effective: boolean } | null;
      }

      Each position, null where it has no panel.

      • Readonlybottom: LayoutPosition | null

        The bottom bar, null without a panel there.

      • Readonlysidebar: LayoutPosition | null

        The sidebar, null without a panel there.

      • Readonlyadjust: LayoutPosition | null

        The adjust column, null without a panel there.

      • Readonlybackdrop: { effective: boolean } | null

        The backdrop panel, null without one.

    "audio.devices.changed": {
        devices: AudioDevice[];
        requested: string | null;
        active: string | null;
    }

    The audio output devices changed: one was plugged in or removed, or the device in use changed (setAudioDevice, or the chosen one went away and the system default plays). Checked once a second. The SDK takes requested and active into PlayerState.audioOutput first.

    Type Declaration

    "app.started": { version: string; previous: string | null }

    The player started: once per run, after its start-up settled, behind everything start-up does.

    Type Declaration

    • version: string

      This run's player version (App.version).

    • previous: string | null

      The player version of the last run with this profile, null on its first run.