MobileSourceSelector class

Pure-Dart selection rule for mobile platforms: given a list of ByteArkPlayerSources, return the first one whose DRM matches the target platform's capabilities. On mobile, exactly one of WidevineDrm or FairPlayDrm is supported (Android or iOS); a non-DRM source (drm == null) is always playable on both.

Both the Android Kotlin and iOS Swift native mappers implement the same first-match rule in their own language; this Dart module is the canonical specification (and the test suite below it is the canonical matrix).

See ADR-0004 and the MOB-152 PRD for the design rationale.

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

selectForAndroid(List<ByteArkPlayerSource> sources) ByteArkPlayerSource
Selects the first source Android can play — drm == nulldrm is WidevineDrm. Throws NoCompatibleSourceException if no source matches.
selectForIOS(List<ByteArkPlayerSource> sources) ByteArkPlayerSource
Selects the first source iOS can play — drm == nulldrm is FairPlayDrm. Throws NoCompatibleSourceException if no source matches.