mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-18 23:23:58 +08:00
@@ -273,20 +273,20 @@ class PlPlayerController with BlockConfigMixin {
|
|||||||
|
|
||||||
late bool _shouldSetPip = false;
|
late bool _shouldSetPip = false;
|
||||||
|
|
||||||
bool get _isCurrVideoPage {
|
static bool get _isCurrVideoPage {
|
||||||
final routing = Get.routing;
|
final routing = Get.routing;
|
||||||
if (routing.route is! GetPageRoute) {
|
if (routing.route is! GetPageRoute) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
final currentRoute = routing.current;
|
return _isVideoPage(routing.current);
|
||||||
return currentRoute.startsWith('/video') ||
|
|
||||||
currentRoute.startsWith('/liveRoom');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool get _isPreviousVideoPage {
|
static bool get _isPreviousVideoPage {
|
||||||
final previousRoute = Get.previousRoute;
|
return _isVideoPage(Get.previousRoute);
|
||||||
return previousRoute.startsWith('/video') ||
|
}
|
||||||
previousRoute.startsWith('/liveRoom');
|
|
||||||
|
static bool _isVideoPage(String routeName) {
|
||||||
|
return routeName == '/videoV' || routeName == '/liveRoom';
|
||||||
}
|
}
|
||||||
|
|
||||||
void enterPip({bool isAuto = false}) {
|
void enterPip({bool isAuto = false}) {
|
||||||
@@ -1636,7 +1636,8 @@ class PlPlayerController with BlockConfigMixin {
|
|||||||
if (!_isCloseAll && _playerCount > 1) {
|
if (!_isCloseAll && _playerCount > 1) {
|
||||||
_playerCount -= 1;
|
_playerCount -= 1;
|
||||||
_heartDuration = 0;
|
_heartDuration = 0;
|
||||||
if (!_isPreviousVideoPage) {
|
// called after pop
|
||||||
|
if (!_isCurrVideoPage) {
|
||||||
pause();
|
pause();
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user