fix(player): 修复清晰度切换闪屏与还原黑屏
This commit is contained in:
1 parent
43e60e29ec
commit
85dedf20fa
8 files changed
+249
-296
No files matched your search
@@ -11,7 +11,7 @@ part 'playback_neighbors.dart';
|
||||
part 'playback_session_controls.dart';
|
||||
|
||||
/// 新纹理第一帧常是黑的,旧画面只盖住这一小段。
|
||||
const Duration _qualityHandoffHold = Duration(milliseconds: 200);
|
||||
const Duration _qualityHandoffHold = Duration(milliseconds: 500);
|
||||
|
||||
typedef PlayerFactory = PlayerPort Function(Episode episode);
|
||||
typedef PlayerPreparation =
|
||||
|
||||
@@ -144,6 +144,14 @@ class WatchRecordsController extends ChangeNotifier {
|
||||
return _detailCache[dramaId];
|
||||
}
|
||||
|
||||
/// 按剧集 id 找最近观看记录,供收藏网格显示「看到第n集」与继续观看横幅。
|
||||
WatchRecord? recordForDrama(String dramaId) {
|
||||
for (final record in records) {
|
||||
if (record.dramaId == dramaId) return record;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// 删除单条记录,先更新 UI,失败按原位置回滚。
|
||||
Future<bool> remove(String dramaId) async {
|
||||
final index = _recordIndex(dramaId);
|
||||
|
||||
Reference in new issue
Block a user