mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
@@ -417,6 +417,12 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (videoDetailController.plPlayerController.playerStatus.status.value ==
|
||||||
|
PlayerStatus.playing &&
|
||||||
|
videoDetailController.playerStatus != PlayerStatus.playing) {
|
||||||
|
videoDetailController.plPlayerController.pause();
|
||||||
|
}
|
||||||
|
|
||||||
isShowing = true;
|
isShowing = true;
|
||||||
PlPlayerController.setPlayCallBack(playCallBack);
|
PlPlayerController.setPlayCallBack(playCallBack);
|
||||||
videoIntroController.startTimer();
|
videoIntroController.startTimer();
|
||||||
|
|||||||
@@ -285,7 +285,7 @@ class PlPlayerController {
|
|||||||
// 播放顺序相关
|
// 播放顺序相关
|
||||||
PlayRepeat playRepeat = PlayRepeat.pause;
|
PlayRepeat playRepeat = PlayRepeat.pause;
|
||||||
|
|
||||||
final GlobalKey<VideoState> key = GlobalKey<VideoState>();
|
GlobalKey<VideoState> key = GlobalKey<VideoState>();
|
||||||
|
|
||||||
TextStyle get subTitleStyle => TextStyle(
|
TextStyle get subTitleStyle => TextStyle(
|
||||||
height: 1.5,
|
height: 1.5,
|
||||||
@@ -1496,7 +1496,9 @@ class PlPlayerController {
|
|||||||
if (type == 'single' && playerCount.value > 1) {
|
if (type == 'single' && playerCount.value > 1) {
|
||||||
_playerCount.value -= 1;
|
_playerCount.value -= 1;
|
||||||
_heartDuration = 0;
|
_heartDuration = 0;
|
||||||
pause();
|
if (!Get.previousRoute.startsWith('/video')) {
|
||||||
|
pause();
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_playerCount.value = 0;
|
_playerCount.value = 0;
|
||||||
|
|||||||
@@ -154,6 +154,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
|||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
|
plPlayerController.key = GlobalKey<VideoState>();
|
||||||
animationController = AnimationController(
|
animationController = AnimationController(
|
||||||
vsync: this, duration: const Duration(milliseconds: 100));
|
vsync: this, duration: const Duration(milliseconds: 100));
|
||||||
videoController = plPlayerController.videoController!;
|
videoController = plPlayerController.videoController!;
|
||||||
|
|||||||
Reference in New Issue
Block a user