mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-20 03:06:59 +08:00
@@ -284,7 +284,11 @@ class PlPlayerController {
|
||||
late bool _shouldSetPip = false;
|
||||
|
||||
bool get _isCurrVideoPage {
|
||||
final currentRoute = Get.currentRoute;
|
||||
final routing = Get.routing;
|
||||
if (routing.route is! GetPageRoute) {
|
||||
return false;
|
||||
}
|
||||
final currentRoute = routing.current;
|
||||
return currentRoute.startsWith('/video') ||
|
||||
currentRoute.startsWith('/liveRoom');
|
||||
}
|
||||
@@ -297,6 +301,7 @@ class PlPlayerController {
|
||||
|
||||
void enterPip({bool isAuto = false}) {
|
||||
if (videoController != null) {
|
||||
controls = false;
|
||||
final state = videoController!.player.state;
|
||||
PageUtils.enterPip(
|
||||
isAuto: isAuto,
|
||||
@@ -546,7 +551,7 @@ class PlPlayerController {
|
||||
|
||||
if (Platform.isAndroid && autoPiP) {
|
||||
Utils.sdkInt.then((sdkInt) {
|
||||
if (sdkInt < 31) {
|
||||
if (sdkInt < 36) {
|
||||
Utils.channel.setMethodCallHandler((call) async {
|
||||
if (call.method == 'onUserLeaveHint') {
|
||||
if (playerStatus.playing && _isCurrVideoPage) {
|
||||
|
||||
Reference in New Issue
Block a user