mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-01 15:49:49 +08:00
desktop pip
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -6,6 +6,7 @@ import 'package:PiliPlus/pages/video/introduction/ugc/controller.dart';
|
||||
import 'package:PiliPlus/plugin/pl_player/controller.dart';
|
||||
import 'package:PiliPlus/utils/storage.dart';
|
||||
import 'package:PiliPlus/utils/storage_key.dart';
|
||||
import 'package:PiliPlus/utils/utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart'
|
||||
show KeyDownEvent, KeyUpEvent, LogicalKeyboardKey;
|
||||
@@ -71,7 +72,9 @@ class PlayerFocus extends StatelessWidget {
|
||||
return true;
|
||||
|
||||
case LogicalKeyboardKey.escape:
|
||||
if (isFullScreen) {
|
||||
if (plPlayerController.isDesktopPip) {
|
||||
plPlayerController.exitDesktopPip();
|
||||
} else if (isFullScreen) {
|
||||
plPlayerController.triggerFullScreen(status: false);
|
||||
} else {
|
||||
Get.back();
|
||||
@@ -94,6 +97,10 @@ class PlayerFocus extends StatelessWidget {
|
||||
}
|
||||
return true;
|
||||
|
||||
case LogicalKeyboardKey.keyP when (Utils.isDesktop && hasPlayer):
|
||||
plPlayerController.toggleDesktopPip();
|
||||
return true;
|
||||
|
||||
case LogicalKeyboardKey.arrowUp:
|
||||
if (hasPlayer) {
|
||||
final volume = math.min(1.0, plPlayerController.volume.value + 0.1);
|
||||
|
||||
Reference in New Issue
Block a user