interface RestrictStrategy {
    shouldPlayAdBreak: ((toPlay) => boolean);
    shouldPlaySkippedAdBreaks: ((skipped, from, to) => AdBreak[]);


shouldPlayAdBreak: ((toPlay) => boolean)

A callback function that will be called every time an ad break is about to start. The return value decides whether the ad break will actually start playing or be discarded.

Type declaration

    • (toPlay): boolean
    • Parameters

      Returns boolean

shouldPlaySkippedAdBreaks: ((skipped, from, to) => AdBreak[])

A callback function that will be called after every seek where ad breaks were scheduled in between the original time and the seek target. The return value decides which ad breaks will be played after the operation finished.

The default behaviour is to playback the most recent AdBreak.

Type declaration