mod: continue playing when popnext, if it's playing when pushnext

This commit is contained in:
bggRGjQaUbCoE
2024-09-26 20:42:55 +08:00
parent bfc2065514
commit b88cfae8d9
3 changed files with 12 additions and 1 deletions

View File

@@ -127,7 +127,9 @@ class _ListSheetContentState extends State<ListSheetContent> {
? episode.bvid ? episode.bvid
: widget.bvid, : widget.bvid,
episode.cid, episode.cid,
episode.aid, episode.runtimeType.toString() == "EpisodeItem"
? episode.aid
: widget.aid,
episode is video.EpisodeItem episode is video.EpisodeItem
? episode.arc?.pic ? episode.arc?.pic
: episode is bangumi.EpisodeItem : episode is bangumi.EpisodeItem

View File

@@ -88,6 +88,8 @@ class VideoDetailController extends GetxController
late String cacheSecondDecode; late String cacheSecondDecode;
late int cacheAudioQa; late int cacheAudioQa;
PlayerStatus? playerStatus;
@override @override
void onInit() { void onInit() {
super.onInit(); super.onInit();

View File

@@ -306,6 +306,9 @@ class _VideoDetailPageState extends State<VideoDetailPage>
ScreenBrightness().resetScreenBrightness(); ScreenBrightness().resetScreenBrightness();
videoDetailController.playerStatus =
plPlayerController?.playerStatus.status.value;
/// 开启 /// 开启
if (setting.get(SettingBoxKey.enableAutoBrightness, defaultValue: true) if (setting.get(SettingBoxKey.enableAutoBrightness, defaultValue: true)
as bool) { as bool) {
@@ -347,6 +350,10 @@ class _VideoDetailPageState extends State<VideoDetailPage>
!videoDetailController.isShowCover.value; !videoDetailController.isShowCover.value;
await videoDetailController.playerInit(autoplay: autoplay); await videoDetailController.playerInit(autoplay: autoplay);
if (videoDetailController.playerStatus == PlayerStatus.playing) {
plPlayerController?.play();
}
/// 未开启自动播放时,未播放跳转下一页返回/播放后跳转下一页返回 /// 未开启自动播放时,未播放跳转下一页返回/播放后跳转下一页返回
videoIntroController.isPaused = false; videoIntroController.isPaused = false;
// if (autoplay) { // if (autoplay) {