mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: video play
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -74,7 +74,7 @@ class _PlDanmakuState extends State<PlDanmaku> {
|
||||
// 播放器状态监听
|
||||
void playerListener(PlayerStatus? status) {
|
||||
if (status == PlayerStatus.playing) {
|
||||
_controller?.onResume();
|
||||
_controller?.resume();
|
||||
} else {
|
||||
_controller?.pause();
|
||||
}
|
||||
@@ -93,6 +93,10 @@ class _PlDanmakuState extends State<PlDanmaku> {
|
||||
return;
|
||||
}
|
||||
|
||||
if (playerController.playerStatus.status.value != PlayerStatus.playing) {
|
||||
return;
|
||||
}
|
||||
|
||||
int currentPosition = position.inMilliseconds;
|
||||
currentPosition -= currentPosition % 100; //取整百的毫秒数
|
||||
if (currentPosition == latestAddedPosition) {
|
||||
|
||||
@@ -1217,6 +1217,9 @@ class VideoDetailController extends GetxController
|
||||
autoPlay.value = false;
|
||||
isShowCover.value = true;
|
||||
videoState.value = LoadingState.error('视频资源不存在');
|
||||
if (plPlayerController.isFullScreen.value) {
|
||||
plPlayerController.toggleFullScreen(false);
|
||||
}
|
||||
isQuerying = false;
|
||||
return;
|
||||
}
|
||||
@@ -1330,6 +1333,9 @@ class VideoDetailController extends GetxController
|
||||
autoPlay.value = false;
|
||||
isShowCover.value = true;
|
||||
videoState.value = LoadingState.error(result['msg']);
|
||||
if (plPlayerController.isFullScreen.value) {
|
||||
plPlayerController.toggleFullScreen(false);
|
||||
}
|
||||
if (result['code'] == -404) {
|
||||
SmartDialog.showToast('视频不存在或已被删除');
|
||||
}
|
||||
|
||||
@@ -2331,6 +2331,11 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
required dynamic aid,
|
||||
required bool isSeason,
|
||||
}) {
|
||||
if (isSeason && videoDetailController.isPlayAll) {
|
||||
SmartDialog.showToast('当前为播放全部,合集不支持倒序');
|
||||
return;
|
||||
}
|
||||
|
||||
void changeEpisode(episode) {
|
||||
videoIntroController.changeSeasonOrbangu(
|
||||
episode is bangumi.EpisodeItem ? episode.epId : null,
|
||||
|
||||
Reference in New Issue
Block a user