2022 App ServicesAudio & Video
WWDC22 · 11 min · App Services / Audio & Video
Display ads and interstitials in SharePlay
Find out how you can deliver a coordinated playback experience in SharePlay when your app delivers different ad schedules to each participant. We’ll explore how to build playback experiences with stitched-in ads and scheduled HLS interstitials, and share tips and best practices.
Watch at developer.apple.com ↗Code shown on screen · 1 snippet
Specific sample accurate time ranges that represent ads or interstitials
class MyAVPlayerCoordinatorDelegate : NSObject, AVPlayerPlaybackCoordinatorDelegate
{
func playbackCoordinator(_ coordinator: AVPlayerPlaybackCoordinator,
interstitialTimeRangesFor playerItem: AVPlayerItem) -> [NSValue]
{
return interstitialTimeRanges
}
} Related sessions
-
19 min -
15 min -
9 min