PlayerStrategy class abstract

播放器策略接口

定义策略的生命周期合约。策略只观察播放器状态,不直接控制播放行为。 当需要协调多个状态信号、维护内部计时/计数、并在视频切换时重置时, 应使用策略而非直接监听单个 ValueNotifier。

Player strategy interface.

Defines the lifecycle contract for strategies. Strategies only observe player state and do not directly control playback behavior.

Implementers

Constructors

PlayerStrategy()

Properties

hashCode int
The hash code for this object.
no setterinherited
isActive bool
策略是否处于活跃状态(onStart 之后、onStop 之前)
getter/setter pair
name String
策略唯一标识,用于注册/注销和调试日志
no setter
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
onReset() → void
视频切换时重置内部状态(保持策略活跃)
onStart(AliPlayerWidgetController controller) → void
策略启动,订阅感兴趣的状态变化
onStop() → void
策略停止,释放资源并取消所有订阅
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited