mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
fix: 特定视频mediaItem关闭使标题未更新
This commit is contained in:
@@ -148,8 +148,8 @@ class VideoPlayerServiceHandler extends BaseAudioHandler with SeekHandler {
|
|||||||
if (mediaItem == null) return;
|
if (mediaItem == null) return;
|
||||||
// print("exist: ${PlPlayerController.instanceExists()}");
|
// print("exist: ${PlPlayerController.instanceExists()}");
|
||||||
if (!PlPlayerController.instanceExists()) return;
|
if (!PlPlayerController.instanceExists()) return;
|
||||||
setMediaItem(mediaItem);
|
|
||||||
_item.add(mediaItem);
|
_item.add(mediaItem);
|
||||||
|
setMediaItem(mediaItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
onVideoDetailDispose() {
|
onVideoDetailDispose() {
|
||||||
@@ -164,15 +164,14 @@ class VideoPlayerServiceHandler extends BaseAudioHandler with SeekHandler {
|
|||||||
}
|
}
|
||||||
if (_item.isNotEmpty) {
|
if (_item.isNotEmpty) {
|
||||||
setMediaItem(_item.last);
|
setMediaItem(_item.last);
|
||||||
|
stop();
|
||||||
} else {
|
} else {
|
||||||
mediaItem?.close();
|
clear();
|
||||||
}
|
}
|
||||||
stop();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
clear() {
|
clear() {
|
||||||
if (!enableBackgroundPlay) return;
|
if (!enableBackgroundPlay) return;
|
||||||
|
|
||||||
mediaItem.add(null);
|
mediaItem.add(null);
|
||||||
playbackState.add(PlaybackState(
|
playbackState.add(PlaybackState(
|
||||||
processingState: AudioProcessingState.idle,
|
processingState: AudioProcessingState.idle,
|
||||||
|
|||||||
Reference in New Issue
Block a user