AdFrequencyControl

Process-level AFC policy owner. One global counter shared across all playbacks: stopping one playback and starting another preserves the accumulated consumption.

Each playback configures AFC via adFrequencyControl on its player builder, passing AdFrequencyControlConfiguration.

Properties

Link copied to clipboard

Shared logger for all AFC components. Use AdFrequencyControl.logger for AFC-wide logging.

Functions

Link copied to clipboard

Applies one domain event. Thread-safe; may be called from any thread.

Link copied to clipboard

Evaluates an ad opportunity synchronously. Returns true to allow the break, false to suppress it. Called by the ad adapter immediately before it commits to a scheduled break.

Link copied to clipboard

Current accumulated consumption, for tests and observers.

Link copied to clipboard
fun reset()

Clears all AFC state (tests and explicit reset only — never on playback stop).