mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
mod: continue playing when popnext, if it's playing when pushnext
This commit is contained in:
@@ -127,7 +127,9 @@ class _ListSheetContentState extends State<ListSheetContent> {
|
||||
? episode.bvid
|
||||
: widget.bvid,
|
||||
episode.cid,
|
||||
episode.aid,
|
||||
episode.runtimeType.toString() == "EpisodeItem"
|
||||
? episode.aid
|
||||
: widget.aid,
|
||||
episode is video.EpisodeItem
|
||||
? episode.arc?.pic
|
||||
: episode is bangumi.EpisodeItem
|
||||
|
||||
@@ -88,6 +88,8 @@ class VideoDetailController extends GetxController
|
||||
late String cacheSecondDecode;
|
||||
late int cacheAudioQa;
|
||||
|
||||
PlayerStatus? playerStatus;
|
||||
|
||||
@override
|
||||
void onInit() {
|
||||
super.onInit();
|
||||
|
||||
@@ -306,6 +306,9 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
||||
|
||||
ScreenBrightness().resetScreenBrightness();
|
||||
|
||||
videoDetailController.playerStatus =
|
||||
plPlayerController?.playerStatus.status.value;
|
||||
|
||||
/// 开启
|
||||
if (setting.get(SettingBoxKey.enableAutoBrightness, defaultValue: true)
|
||||
as bool) {
|
||||
@@ -347,6 +350,10 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
||||
!videoDetailController.isShowCover.value;
|
||||
await videoDetailController.playerInit(autoplay: autoplay);
|
||||
|
||||
if (videoDetailController.playerStatus == PlayerStatus.playing) {
|
||||
plPlayerController?.play();
|
||||
}
|
||||
|
||||
/// 未开启自动播放时,未播放跳转下一页返回/播放后跳转下一页返回
|
||||
videoIntroController.isPaused = false;
|
||||
// if (autoplay) {
|
||||
|
||||
Reference in New Issue
Block a user