LanguageMapper class

Maps ByteArkPlayerLanguage onto ByteArk Player Web's videojs language option.

The Web SDK only knows concrete codes ('en', 'th'), so ByteArkPlayerLanguage.system is resolved here with the same rule the native SDKs use: the first preferred language whose base code is en or th, falling back to 'en'.

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

mapLanguage(ByteArkPlayerLanguage? language, List<String> preferredLanguages) → String?
Returns the SDK language code for language, or null when unset so the SDK default applies. preferredLanguages is the browser's navigator.languages (BCP 47 tags such as th-TH), consulted only for ByteArkPlayerLanguage.system.