Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-10-18 11:27:56 +08:00
parent 52498b3e34
commit 464f008023
4 changed files with 43 additions and 17 deletions

View File

@@ -199,9 +199,9 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
// 播放器状态监听
Future<void> playerListener(PlayerStatus status) async {
bool isPlaying = status == PlayerStatus.playing;
try {
if (videoDetailController.scrollCtr.hasClients) {
bool isPlaying = status == PlayerStatus.playing;
if (isPlaying) {
if (!videoDetailController.isExpanding &&
videoDetailController.scrollCtr.offset != 0 &&
@@ -275,6 +275,17 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
}
}
}
if (Platform.isAndroid &&
plPlayerController!.autoPiP &&
await Utils.sdkInt >= 12) {
if (isPlaying) {
plPlayerController!.enterPip(isAuto: true);
} else {
Utils.channel.invokeMethod('setPipAutoEnterEnabled', {
'autoEnable': false,
});
}
}
}
// 继续播放或重新播放