fix(player): 重构单层过渡并阻止锁定集串播
This commit is contained in:
1 parent
70d8e0f982
commit
0cb0ab0613
8 files changed
+657
-335
No files matched your search
@@ -10,6 +10,26 @@ extension PlaybackSessionControls on PlaybackSession {
|
||||
_warmNeighbors(this, preferredNext: forward);
|
||||
}
|
||||
|
||||
/// 选中锁定集时立即停播并释放所有原生播放器,不创建新片源。
|
||||
Future<void> selectLocked(
|
||||
int index, {
|
||||
int? preloadIndex,
|
||||
int? previousIndex,
|
||||
}) {
|
||||
if (_closed || index < 0 || index >= episodes.length) {
|
||||
return Future<void>.value();
|
||||
}
|
||||
_generation++;
|
||||
_selected = false;
|
||||
_currentIndex = index;
|
||||
_rememberNeighbors(preloadIndex, previousIndex);
|
||||
_loading = false;
|
||||
_error = null;
|
||||
_userWantsPlay = false;
|
||||
_notify();
|
||||
return _releasePlayers();
|
||||
}
|
||||
|
||||
/// 清晰度切换时盖住黑帧的旧播放器。只在仍由会话持有时交给界面。
|
||||
PlayerPort? handoffAt(int index) {
|
||||
final slot = _handoff;
|
||||
|
||||
Reference in new issue
Block a user