mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-07-12 12:20:13 +08:00
opt in-app fullscreen
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -161,7 +161,7 @@ class _LiveRoomPageState extends State<LiveRoomPage>
|
||||
if (isFullScreen && Platform.isIOS) {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
if (!_liveRoomController.isPortrait.value) {
|
||||
landScape();
|
||||
landscape();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import 'package:PiliPlus/http/loading_state.dart';
|
||||
import 'package:PiliPlus/pages/login/controller.dart';
|
||||
import 'package:PiliPlus/utils/extension.dart';
|
||||
import 'package:PiliPlus/utils/image_utils.dart';
|
||||
import 'package:PiliPlus/utils/page_utils.dart';
|
||||
import 'package:PiliPlus/utils/utils.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@@ -76,8 +77,8 @@ class _LoginPageState extends State<LoginPage> {
|
||||
),
|
||||
if (isMobile)
|
||||
TextButton.icon(
|
||||
onPressed: () => launchUrl(
|
||||
Uri.parse(_loginPageCtr.codeInfo.value.data.url),
|
||||
onPressed: () => PageUtils.launchURL(
|
||||
_loginPageCtr.codeInfo.value.data.url,
|
||||
mode: LaunchMode.externalNonBrowserApplication,
|
||||
),
|
||||
icon: const Icon(Icons.open_in_browser_outlined),
|
||||
|
||||
@@ -309,13 +309,4 @@ List<SettingsModel> get playSettings => [
|
||||
setKey: SettingBoxKey.tempPlayerConf,
|
||||
defaultVal: false,
|
||||
),
|
||||
if (Utils.isDesktop)
|
||||
const SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '独占全屏',
|
||||
subtitle: '关闭为应用内全屏',
|
||||
leading: Icon(Icons.zoom_out_map_rounded),
|
||||
setKey: SettingBoxKey.nativeFullscreen,
|
||||
defaultVal: true,
|
||||
),
|
||||
];
|
||||
|
||||
@@ -189,7 +189,7 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
(mode == FullScreenMode.auto && isVertical) ||
|
||||
(mode == FullScreenMode.ratio &&
|
||||
(isVertical || maxHeight / maxWidth < 1.25)))) {
|
||||
landScape();
|
||||
landscape();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -153,7 +153,10 @@ class PlayerFocus extends StatelessWidget {
|
||||
return true;
|
||||
|
||||
case LogicalKeyboardKey.keyF:
|
||||
plPlayerController.triggerFullScreen(status: !isFullScreen);
|
||||
plPlayerController.triggerFullScreen(
|
||||
status: !isFullScreen,
|
||||
inAppFullScreen: HardwareKeyboard.instance.isShiftPressed,
|
||||
);
|
||||
return true;
|
||||
|
||||
case LogicalKeyboardKey.escape:
|
||||
|
||||
Reference in New Issue
Block a user