PlayerQualityConfig class
全局画质选项配置。在播放前调用一次,原生画质选择器即使用该配置。
示例:
final jsonText = await rootBundle.loadString('assets/quality_options.json');
await PlayerQualityConfig.setOptionsJson(jsonText);
// 或者直接传 jsonDecode 后的 List:
await PlayerQualityConfig.setOptions(jsonDecode(jsonText) as List);
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
-
setOptions(
List options) → Future< void> - 设置全局画质选项,播放器下次打开画质选择器时生效。
-
setOptionsJson(
String jsonText) → Future< void> - 从 JSON 文件内容直接设置画质选项。