skip

abstract fun skip()

Skips the current ad. A successful skip is signaled via PlayerEvent.AdSkipped.

Has no effect if the current ad is not skippable or if no ad is being played back.

This also dismisses a presented pause ad, which is signaled via PlayerEvent.NonLinearAdSkipped. Dismissing a pause ad leaves the main content paused and consumes the current pause ad opportunity, so no further pause ad is presented until playback resumes and is paused again. Has no effect while a pause ad creative is still being loaded, i.e. before PlayerEvent.NonLinearAdStarted was emitted.

Limitations

Programmatically skipping the current ad is not supported for ads of type AdSourceType.Ima if IMA renders the 'Skip ad' button. In this case, ad skipping can only be initiated by clicking the 'Skip ad' button on the UI.

For ads of type AdSourceType.Ima the 'Skip ad' button can be hidden by setting ImaConfig.preferredUiType to ImaUiType.Disabled on supported ads.