mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
mod: pip库-floating升级
This commit is contained in:
@@ -117,7 +117,9 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
||||
onUserLeaveHintListener = const MethodChannel("onUserLeaveHint");
|
||||
onUserLeaveHintListener.setMethodCallHandler((call) async {
|
||||
if (call.method == 'onUserLeaveHint') {
|
||||
if (autoPiP) {
|
||||
if (autoPiP &&
|
||||
plPlayerController != null &&
|
||||
playerStatus == PlayerStatus.playing) {
|
||||
autoEnterPip();
|
||||
}
|
||||
}
|
||||
@@ -364,10 +366,17 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
||||
final String routePath = Get.currentRoute;
|
||||
|
||||
if (autoPiP && routePath.startsWith('/video')) {
|
||||
floating.enable(
|
||||
aspectRatio: Rational(
|
||||
videoDetailController.data.dash!.video!.first.width!,
|
||||
videoDetailController.data.dash!.video!.first.height!,
|
||||
floating.enable(EnableManual(
|
||||
aspectRatio: Rational(
|
||||
videoDetailController.data.dash!.video!.first.width!,
|
||||
videoDetailController.data.dash!.video!.first.height!,
|
||||
),
|
||||
sourceRectHint: Rectangle<int>(
|
||||
0,
|
||||
0,
|
||||
context.width.toInt(),
|
||||
context.height.toInt(),
|
||||
),
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user