mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: live room
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -132,7 +132,7 @@ class _LiveRoomPageState extends State<LiveRoomPage>
|
|||||||
final GlobalKey playerKey = GlobalKey();
|
final GlobalKey playerKey = GlobalKey();
|
||||||
double? padding;
|
double? padding;
|
||||||
|
|
||||||
Widget videoPlayerPanel([Color? fill]) {
|
Widget videoPlayerPanel({Color? fill, Alignment? alignment}) {
|
||||||
return PopScope(
|
return PopScope(
|
||||||
canPop: !isFullScreen,
|
canPop: !isFullScreen,
|
||||||
onPopInvokedWithResult: (bool didPop, Object? result) {
|
onPopInvokedWithResult: (bool didPop, Object? result) {
|
||||||
@@ -152,6 +152,7 @@ class _LiveRoomPageState extends State<LiveRoomPage>
|
|||||||
return PLVideoPlayer(
|
return PLVideoPlayer(
|
||||||
key: playerKey,
|
key: playerKey,
|
||||||
fill: fill,
|
fill: fill,
|
||||||
|
alignment: alignment,
|
||||||
plPlayerController: plPlayerController,
|
plPlayerController: plPlayerController,
|
||||||
bottomControl: BottomControl(
|
bottomControl: BottomControl(
|
||||||
plPlayerController: plPlayerController,
|
plPlayerController: plPlayerController,
|
||||||
@@ -273,7 +274,9 @@ class _LiveRoomPageState extends State<LiveRoomPage>
|
|||||||
? 0
|
? 0
|
||||||
: MediaQuery.paddingOf(context).top)
|
: MediaQuery.paddingOf(context).top)
|
||||||
: Get.height - 56 - 85 - padding!,
|
: Get.height - 56 - 85 - padding!,
|
||||||
child: videoPlayerPanel(),
|
child: videoPlayerPanel(
|
||||||
|
alignment: isFullScreen ? null : Alignment.topCenter,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@@ -433,7 +436,7 @@ class _LiveRoomPageState extends State<LiveRoomPage>
|
|||||||
child: MediaQuery.removePadding(
|
child: MediaQuery.removePadding(
|
||||||
removeRight: true,
|
removeRight: true,
|
||||||
context: context,
|
context: context,
|
||||||
child: videoPlayerPanel(Colors.transparent),
|
child: videoPlayerPanel(fill: Colors.transparent),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ class PLVideoPlayer extends StatefulWidget {
|
|||||||
this.showEpisodes,
|
this.showEpisodes,
|
||||||
this.showViewPoints,
|
this.showViewPoints,
|
||||||
this.fill,
|
this.fill,
|
||||||
|
this.alignment,
|
||||||
super.key,
|
super.key,
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -69,6 +70,7 @@ class PLVideoPlayer extends StatefulWidget {
|
|||||||
final Function? showEpisodes;
|
final Function? showEpisodes;
|
||||||
final VoidCallback? showViewPoints;
|
final VoidCallback? showViewPoints;
|
||||||
final Color? fill;
|
final Color? fill;
|
||||||
|
final Alignment? alignment;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<PLVideoPlayer> createState() => _PLVideoPlayerState();
|
State<PLVideoPlayer> createState() => _PLVideoPlayerState();
|
||||||
@@ -898,6 +900,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
|||||||
child: Video(
|
child: Video(
|
||||||
fill: widget.fill ?? Colors.black,
|
fill: widget.fill ?? Colors.black,
|
||||||
key: key,
|
key: key,
|
||||||
|
alignment: widget.alignment ?? Alignment.center,
|
||||||
controller: videoController,
|
controller: videoController,
|
||||||
controls: NoVideoControls,
|
controls: NoVideoControls,
|
||||||
pauseUponEnteringBackgroundMode:
|
pauseUponEnteringBackgroundMode:
|
||||||
|
|||||||
Reference in New Issue
Block a user