React Native THEOplayer SDK
    Preparing search index...

    Interface GoogleDAI

    The Google DAI API.

    interface GoogleDAI {
        snapback: Promise<boolean>;
        contentTimeForStreamTime(time: number): Promise<number>;
        setSnapback(enabled: boolean): void;
        streamTimeForContentTime(time: number): Promise<number>;
    }
    Index
    snapback: Promise<boolean>

    Whether snapback is enabled. When enabled and the user seeks over multiple ad breaks, the last ad break that was seeked past will be played.

    true

    • Returns the content time without ads for a given stream time. Returns the given stream time for live streams.

      Parameters

      • time: number

        The stream time with inserted ads (in seconds).

      Returns Promise<number>

    • Set snapback value. When enabled and the user seeks over multiple ad breaks, the last ad break that was seeked past will be played.

      Parameters

      • enabled: boolean

      Returns void

    • Returns the stream time with ads for a given content time. Returns the given content time for live streams.

      Parameters

      • time: number

        The content time without any ads (in seconds).

      Returns Promise<number>