1
This commit is contained in:
@@ -66,6 +66,23 @@ class FeedPlayerPool {
|
||||
/// open(play:false) 内部的 pause 覆盖导致恢复后不播)
|
||||
Future<void>? _pendingBind;
|
||||
|
||||
/// 当前槽正在播放的视频(-1 表示尚未绑定)与实时播放位置
|
||||
int get currentVideoId => currentSlot.videoId;
|
||||
|
||||
Duration get currentPosition {
|
||||
try {
|
||||
return currentSlot.player.state.position;
|
||||
} catch (_) {
|
||||
return Duration.zero;
|
||||
}
|
||||
}
|
||||
|
||||
/// 冷启动续播:指定视频从 position 起播(bindWindow 时经 mpv start 属性应用)
|
||||
void setResumePoint(int videoId, Duration position) {
|
||||
_resumeVideoId = videoId;
|
||||
_resumePosition = position;
|
||||
}
|
||||
|
||||
/// 初始化(创建 3 槽位并订阅各自进度流)
|
||||
void init() {
|
||||
for (var i = 0; i < slotCount; i++) {
|
||||
|
||||
Reference in New Issue
Block a user