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
|
? 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
|
||||||
|
|||||||
@@ -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();
|
||||||
|
|||||||
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user