AdsConfigMapper class
Pure-Dart mapper from the cross-platform ByteArkAdsSettings data class onto the JS player-options block ByteArk Player Web's IMA-based ad plugin consumes.
The Dart API exposes:
adTagUrl— required for any ads at all.enableDefaultCompanionSlot— toggle for the default companion slot.defaultCompanionSize—width × heightfor the default companion.autoplayAdsMuted— top-level option already wired in MOB-133, not touched here.
The exact JS shape isn't fully spelled out in the public ByteArk Player
Web docs at MOB-130 design time. Lines marked // VERIFY in this file
mirror the most common videojs-ima naming convention and should be
reconfirmed against the live SDK during the MOB-138 cross-browser manual
pass; when the SDK uses a different key name the corresponding unit-test
line flips red and the fix is one line.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
mapAds(
ByteArkAdsSettings? ads) → Map< String, dynamic> ? -
Builds the JS plugin options block for the SDK's IMA-based ad plugin,
or
nullwhen no usableadTagUrlis configured. The caller decides whether to attach the result underplugins.bytearkAds(the assumed SDK plugin key; VERIFY) on the player options. -
requiresAdsPlugin(
ByteArkAdsSettings? ads) → bool -
Whether the player-level ads plugin needs to be enabled for the given
adsconfig. Non-ad playback skips the plugin so the SDK ships with its lightweight default bundle.