mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
@@ -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,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 继续播放或重新播放
|
||||
|
||||
Reference in New Issue
Block a user