Pause Advertising

Display pause ads when the viewer pauses playback on tvOS using startADBreak and stopADBreak, with optional delayed display via DispatchWorkItem.

What are Pause Ads

Pause Ads display brand messages during natural breaks in playback. When a viewer pauses live or on-demand content, an ad appears on-screen after a brief delay. This format provides a high-visibility, static canvas that integrates naturally with the viewing experience. Pause Ads are effective for driving awareness, shoppability, and branded interactions.

Key Characteristics

  • Trigger: The viewer pauses live or on-demand content.
  • Delay: Configurable — from instant display (with pre-fetching) to any custom duration. A 3–5 second delay is common to filter out accidental pauses.
  • Display: A static brand creative fills the screen or appears in a sidebar overlay.
  • Resume: Resuming playback automatically dismisses the ad.

Configure ads to appear when the user pauses video. Set up the SDK as described in the tvOS Integration Guide first.


// Call these methods only in response to the Play/Pause button.
func handlePlayingState() {
  StreamLayer.stopADBreak()
}

func handlePausedState() {
	StreamLayer.startADBreak()
}

Delay pause ads

Add a delay before displaying pause ads to filter out brief or accidental pauses. The delay is fully configurable — common values range from instant (0 seconds, using pre-fetched ads) to 3–5 seconds. If playback does not resume within the delay window, the SDK treats the pause as intentional and starts an ad break. The example below uses a 5-second delay, but you can adjust the value to match your requirements.

Use a DispatchWorkItem to defer the ad break and cancel it when playback resumes.

private var adBreakWorkItem: DispatchWorkItem?

func handlePlayingState() {
  StreamLayer.stopADBreak()
	adBreakWorkItem?.cancel()
  adBreakWorkItem = nil
}

func handlePausedState() {
	let adBreakWorkItem = DispatchWorkItem { [weak self] in
		guard self?.adBreakWorkItem?.isCancelled == false else { return }
		StreamLayer.startADBreak()
	}
 	DispatchQueue.main.asyncAfter(deadline: .now() + 5, execute: adBreakWorkItem)
	self.adBreakWorkItem = adBreakWorkItem
}

Related