Interface EventData

interface EventData {
    audiotrackchange: {
        description: null | string;
        langCode: string;
        name: string;
        title: string;
        trackId: string;
    };
    ended: void;
    error: {
        code: ErrorCode;
        msg: string;
    };
    pause: void;
    play: void;
    progress: {
        percent: number;
    };
    ready: {
        events: string[];
        methods: string[];
        src: string;
    };
    resetready: void;
    seeked: void;
    texttrackchange: null | {
        description: null | string;
        langCode: string;
        name: string;
        title: string;
        trackId: string;
    };
    timeupdate: {
        duration: number;
        seconds: number;
    };
    videochange: {
        audioLanguages: string[];
        textLanguages: string[];
        videoId: string;
    };
    videoloading: {
        videoId: string;
    };
}

Properties

audiotrackchange: {
    description: null | string;
    langCode: string;
    name: string;
    title: string;
    trackId: string;
}

Information about the audio track that will be played.

Type declaration

  • description: null | string

    The translated description of the video.

  • langCode: string

    The ISO 639-3 language code of the track.

  • name: string

    The name of the language of the track. In its native version if available, otherwise in English (e.g., English, Deutsch, Italiano).

  • title: string

    The translated title of the video.

  • trackId: string

    The UUID of the track.

ended: void

The ended event has no data.

error: {
    code: ErrorCode;
    msg: string;
}

The error that occured.

Type declaration

pause: void

The pause event has no data.

play: void

The play event has no data.

progress: {
    percent: number;
}

Type declaration

  • percent: number

    The buffering progress between 0 and 1. A value of 0.5, for example, means the video has been loaded until the 50% mark.

ready: {
    events: string[];
    methods: string[];
    src: string;
}

Information about the receiver.

Type declaration

  • events: string[]

    The event types supported by the player.

  • methods: string[]

    The method types supported by the player.

  • src: string

    The URL of the embedded player.

resetready: void

The resetready event has no data.

seeked: void

The seeked event has no data.

texttrackchange: null | {
    description: null | string;
    langCode: string;
    name: string;
    title: string;
    trackId: string;
}

Information about the text track (closed captions or subtitles) that will be played. Can be null if the user disabled the text track.

Type declaration

  • description: null | string

    The translated description of the video.

  • langCode: string

    The ISO 639-3 language code of the track.

  • name: string

    The name of the language of the track. In its native version if available, otherwise in English (e.g., English, Deutsch, Italiano).

  • title: string

    The translated title of the video.

  • trackId: string

    The UUID of the track.

timeupdate: {
    duration: number;
    seconds: number;
}

Type declaration

  • duration: number

    The total duration of the video in seconds.

  • seconds: number

    The current timestamp of the video playback in seconds.

videochange: {
    audioLanguages: string[];
    textLanguages: string[];
    videoId: string;
}

Information about the video that will be played.

Type declaration

  • audioLanguages: string[]

    The ISO 639-3 language codes of the audio tracks belonging to this video.

  • textLanguages: string[]

    The ISO 639-3 language codes of the text tracks belonging to this video.

  • videoId: string

    The UUID of the video.

videoloading: {
    videoId: string;
}

Information about the video that will be loaded.

Type declaration

  • videoId: string

Generated using TypeDoc