Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-04-28 15:16:34 +08:00
parent 47e3a47e00
commit f7a2be1923

View File

@@ -273,20 +273,20 @@ class PlPlayerController with BlockConfigMixin {
late bool _shouldSetPip = false;
bool get _isCurrVideoPage {
static bool get _isCurrVideoPage {
final routing = Get.routing;
if (routing.route is! GetPageRoute) {
return false;
}
final currentRoute = routing.current;
return currentRoute.startsWith('/video') ||
currentRoute.startsWith('/liveRoom');
return _isVideoPage(routing.current);
}
bool get _isPreviousVideoPage {
final previousRoute = Get.previousRoute;
return previousRoute.startsWith('/video') ||
previousRoute.startsWith('/liveRoom');
static bool get _isPreviousVideoPage {
return _isVideoPage(Get.previousRoute);
}
static bool _isVideoPage(String routeName) {
return routeName == '/videoV' || routeName == '/liveRoom';
}
void enterPip({bool isAuto = false}) {
@@ -1636,7 +1636,8 @@ class PlPlayerController with BlockConfigMixin {
if (!_isCloseAll && _playerCount > 1) {
_playerCount -= 1;
_heartDuration = 0;
if (!_isPreviousVideoPage) {
// called after pop
if (!_isCurrVideoPage) {
pause();
}
return;