AudioAdBreakSpec class

Self-contained specification for an audio ad break (with optional companion video/artwork and VAST 4.x tracking beacons) played inside NeomAudioHandler (ephemeral single-player queue item) or BookNarrationController (Read-Aloud page break).

Constructors

AudioAdBreakSpec({required String id, required String title, required String advertiser, String subtitle = '', String audioUrl = '', String narrationScript = '', String companionImgUrl = '', String companionVideoUrl = '', String ctaRoute = '', String ctaUrl = '', String ctaLabel = 'Conocer más', int durationSeconds = 15, int skipAfterSeconds = 10, int accentColorHex = 0xFF00879E, bool isHouseAd = false, List<String> vastImpressionUrls = const [], List<String> vastFirstQuartileUrls = const [], List<String> vastMidpointUrls = const [], List<String> vastThirdQuartileUrls = const [], List<String> vastCompleteUrls = const [], List<String> vastSkipUrls = const [], List<String> vastClickTrackingUrls = const []})
const
AudioAdBreakSpec.fromJson(Map<String, dynamic> json)
factory

Properties

accentColorHex → int
final
advertiser → String
final
audioUrl → String
Direct MP3/AAC stream URL (from VAST <MediaFile>, Sponsor, or House Ad).
final
companionImgUrl → String
Foreground companion creative (image or muted synced video).
final
companionVideoUrl → String
final
ctaLabel → String
final
ctaRoute → String
Click-through destination (ctaRoute in-app or ctaUrl external).
final
ctaUrl → String
final
durationSeconds → int
final
hashCode → int
The hash code for this object.
no setterinherited
hasPlayableAudio → bool
no setter
id → String
final
isHouseAd → bool
final
narrationScript → String
Spoken narration fallback when audioUrl is empty (e.g. Read-Aloud TTS).
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
skipAfterSeconds → int
final
subtitle → String
final
title → String
final
vastClickTrackingUrls → List<String>
final
vastCompleteUrls → List<String>
final
vastFirstQuartileUrls → List<String>
final
vastImpressionUrls → List<String>
VAST 4.x HTTP tracking pixel URLs fired automatically during playback.
final
vastMidpointUrls → List<String>
final
vastSkipUrls → List<String>
final
vastThirdQuartileUrls → List<String>
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
toMediaItemExtras() → Map<String, dynamic>
Builds MediaItem.extras compatible with NeomAudioHandler's single-player ephemeral pipeline (ephemeralPlayback: true + isAd: true).
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

fromMediaItemExtras(Map<String, dynamic>? extras) → AudioAdBreakSpec?