Skip to main content

VOD

Prompts for pre-roll, mid-roll and post-roll ads in VOD content on iOS.

📄️VOD with FlowerAVPlayer

Use this prompt when you can replace your AVPlayer with the SDK's FlowerAVPlayer and want pre-roll, mid-roll and post-roll ads in VOD content with the least code. The player handles the ad flow itself; the prompt produces the player setup, FlowerVodAdConfig (including the optional timing values), the content-end notification and the onError handling (start the content after a pre-roll error, resume it after a mid-roll error). See Using Extended AVPlayer and VOD Pre-roll, Mid-roll, Post-roll Ad Implementation.

📄️VOD PIP Without Ads (Default)

Use this prompt when your VOD app supports Picture-in-Picture and keeps the default mode, in which ads are not shown in PIP mode (FlowerSdk.setIgnoreAdBreakInPIPMode(true)). So that PIP cannot be used to skip an ad, the app reports to the SDK when the user leaves the app and comes back: FlowerSdk.notifyUserLeftApp(true) when the user goes to the home screen (the app goes to the background), and FlowerSdk.notifyUserLeftApp(false) when the user returns to the app. Start from a working VOD with MediaPlayerHook or VOD with FlowerAVPlayer integration. To keep VOD ads playing in PIP instead, use VOD Ads in PIP Mode. See PIP Mode Support and VOD PIP Mode Support.

📄️Migrate to SDK-Managed Content

Use this prompt when your app already has a VOD integration with MediaPlayerHook that pauses, resumes, seeks or delays the content itself around ad breaks (for example player.pause() in onPlay, a countdown before play() in onPrepare, or player.play() after every onCompleted). With the default FlowerSdk.setIgnoreAdBreakInPIPMode(true), the SDK now pauses and resumes the content around a mid-roll by itself, so that code must go. The prompt removes it and keeps only the pre-roll start logic and, in onError after a mid-roll, a player.play() safety net. See VOD Pre-roll, Mid-roll, Post-roll Ad Implementation.