AFCPlaybackSessionManager

class AFCPlaybackSessionManager(player: AdComposedPlayer, val configuration: AdFrequencyControlConfiguration = AdFrequencyControlConfiguration())

Creates and owns the AFC trackers for one playback session:

  • ContentConsumptionTracker measures main content consumption.

  • AdBreakExposureTracker measures ad break exposure. It is a terminal observer: the player registers it via registerAdListener alongside analytics providers, and it forwards nothing.

attach returns the AdEventListener the player must register on its ad chain. The global AFC counter is preserved across playbacks — detaching one playback never resets it.

Parameters

player

the ad-composed player for this playback. It supplies com.quickplay.vstb7.player.ad.AdComposedPlayer.playerContext, which the content tracker needs to exclude ad and promo time, and owns the ad listener list this integration registers on.

configuration

the AFC policy; applied to the process-global AdFrequencyControl on attach.

Constructors

Link copied to clipboard
constructor(player: AdComposedPlayer, configuration: AdFrequencyControlConfiguration = AdFrequencyControlConfiguration())

Properties

Functions

Link copied to clipboard

Starts content tracking and returns the ad listener to register on the ad chain. The caller owns registration, because the ad chain differs per provider.

Link copied to clipboard
fun detach()

Stops tracking and unregisters the content listener. The global counter is preserved so the next playback continues where this one left off.

Link copied to clipboard

Synchronously evaluates if the upcoming ad break should play or be skipped.