fix: 视频全屏时的安全区域
This commit is contained in:
@ -817,6 +817,10 @@ class PlPlayerController {
|
||||
}
|
||||
|
||||
toggleFullScreen(true);
|
||||
bool isValid =
|
||||
direction.value == 'vertical' || mode == FullScreenMode.vertical
|
||||
? true
|
||||
: false;
|
||||
var result = await showDialog(
|
||||
context: Get.context!,
|
||||
useSafeArea: false,
|
||||
@ -824,12 +828,10 @@ class PlPlayerController {
|
||||
backgroundColor: Colors.black,
|
||||
child: SafeArea(
|
||||
// 忽略手机安全区域
|
||||
top: isValid,
|
||||
left: false,
|
||||
right: false,
|
||||
bottom:
|
||||
direction.value == 'vertical' || mode == FullScreenMode.vertical
|
||||
? true
|
||||
: false,
|
||||
bottom: isValid,
|
||||
child: PLVideoPlayer(
|
||||
controller: this,
|
||||
headerControl: headerControl,
|
||||
|
||||
@ -547,34 +547,38 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
||||
),
|
||||
|
||||
// 头部、底部控制条
|
||||
Obx(
|
||||
() => Column(
|
||||
children: [
|
||||
if (widget.headerControl != null || _.headerControl != null)
|
||||
SafeArea(
|
||||
top: false,
|
||||
bottom: false,
|
||||
child: Obx(
|
||||
() => Column(
|
||||
children: [
|
||||
if (widget.headerControl != null || _.headerControl != null)
|
||||
ClipRect(
|
||||
clipBehavior: Clip.hardEdge,
|
||||
child: AppBarAni(
|
||||
controller: animationController,
|
||||
visible: !_.controlsLock.value && _.showControls.value,
|
||||
position: 'top',
|
||||
child: widget.headerControl ?? _.headerControl!,
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
ClipRect(
|
||||
clipBehavior: Clip.hardEdge,
|
||||
child: AppBarAni(
|
||||
controller: animationController,
|
||||
visible: !_.controlsLock.value && _.showControls.value,
|
||||
position: 'top',
|
||||
child: widget.headerControl ?? _.headerControl!,
|
||||
position: 'bottom',
|
||||
child: widget.bottomControl ??
|
||||
BottomControl(
|
||||
controller: widget.controller,
|
||||
triggerFullScreen:
|
||||
widget.controller.triggerFullScreen),
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
ClipRect(
|
||||
clipBehavior: Clip.hardEdge,
|
||||
child: AppBarAni(
|
||||
controller: animationController,
|
||||
visible: !_.controlsLock.value && _.showControls.value,
|
||||
position: 'bottom',
|
||||
child: widget.bottomControl ??
|
||||
BottomControl(
|
||||
controller: widget.controller,
|
||||
triggerFullScreen:
|
||||
widget.controller.triggerFullScreen),
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user