StrategyManager class
策略管理器,统一管理已注册策略的生命周期
与 AliPlayerWidgetController 一对一绑定,随 Controller 创建而创建, 随 destroy 而销毁。默认内置推荐策略(首帧统计、卡顿检测),开箱即用。
Strategy manager that manages the lifecycle of registered strategies.
Bound one-to-one with AliPlayerWidgetController. By default, it registers recommended built-in strategies (first frame timing, stutter detection).
Constructors
- StrategyManager()
- 创建策略管理器,默认注册内置推荐策略
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
strategies
→ List<
PlayerStrategy> -
当前已注册的策略列表(只读)
no setter
Methods
-
clear(
) → void - 移除所有已注册的策略(包括内置策略)
-
dispose(
) → void - 停止并销毁所有策略
-
initialize(
AliPlayerWidgetController controller) → void - 初始化策略管理器,启动所有已注册策略
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
register(
PlayerStrategy strategy) → void - 注册策略
-
reset(
) → void - 重置所有策略的内部状态
-
toString(
) → String -
A string representation of this object.
inherited
-
unregister(
String name) → void - 按名称移除策略
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited