opt: 竖屏直播布局

This commit is contained in:
guozhigq
2024-09-22 23:16:19 +08:00
parent 031358e72e
commit 249600ec27
4 changed files with 150 additions and 136 deletions

View File

@ -41,6 +41,7 @@ class PLVideoPlayer extends StatefulWidget {
this.customWidgets,
this.showEposideCb,
this.fullScreenCb,
this.alignment = Alignment.center,
super.key,
});
@ -55,6 +56,7 @@ class PLVideoPlayer extends StatefulWidget {
final List<Widget>? customWidgets;
final Function? showEposideCb;
final Function? fullScreenCb;
final Alignment? alignment;
@override
State<PLVideoPlayer> createState() => _PLVideoPlayerState();
@ -393,6 +395,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
key: ValueKey(_.videoFit.value),
controller: videoController,
controls: NoVideoControls,
alignment: widget.alignment!,
pauseUponEnteringBackgroundMode: !enableBackgroundPlay,
resumeUponEnteringForegroundMode: true,
subtitleViewConfiguration: const SubtitleViewConfiguration(