Merge pull request #325 from orz12/fix_portrait_fullscreen_bottom_cherry_pick
fix: 竖屏非全屏状态小白条适配
This commit is contained in:
@ -244,7 +244,8 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
||||
}
|
||||
Widget childWhenDisabled = SafeArea(
|
||||
top: MediaQuery.of(context).orientation == Orientation.portrait,
|
||||
bottom: MediaQuery.of(context).orientation == Orientation.portrait,
|
||||
bottom: MediaQuery.of(context).orientation == Orientation.portrait
|
||||
&& plPlayerController!.isFullScreen.value,
|
||||
left: !plPlayerController!.isFullScreen.value,
|
||||
right: !plPlayerController!.isFullScreen.value,
|
||||
child: Stack(
|
||||
@ -432,7 +433,8 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
||||
// },
|
||||
/// 不收回
|
||||
pinnedHeaderSliverHeightBuilder: () {
|
||||
return pinnedHeaderHeight;
|
||||
return plPlayerController!.isFullScreen.value ?
|
||||
MediaQuery.of(context).size.height: pinnedHeaderHeight;
|
||||
},
|
||||
onlyOneScrollInBody: true,
|
||||
body: Container(
|
||||
|
@ -937,32 +937,13 @@ class PlPlayerController {
|
||||
if (!isFullScreen.value && status) {
|
||||
/// 按照视频宽高比决定全屏方向
|
||||
toggleFullScreen(true);
|
||||
switch (mode) {
|
||||
case FullScreenMode.auto:
|
||||
if (direction.value == 'horizontal') {
|
||||
/// 进入全屏
|
||||
await enterFullScreen();
|
||||
// 横屏
|
||||
await landScape();
|
||||
} else {
|
||||
// 竖屏
|
||||
await verticalScreen();
|
||||
}
|
||||
break;
|
||||
case FullScreenMode.vertical:
|
||||
|
||||
/// 进入全屏
|
||||
await enterFullScreen();
|
||||
// 竖屏
|
||||
await verticalScreen();
|
||||
break;
|
||||
case FullScreenMode.horizontal:
|
||||
|
||||
/// 进入全屏
|
||||
await enterFullScreen();
|
||||
// 横屏
|
||||
await landScape();
|
||||
break;
|
||||
/// 进入全屏
|
||||
await enterFullScreen();
|
||||
if(mode == FullScreenMode.vertical ||
|
||||
(mode == FullScreenMode.auto && direction.value == 'vertical')) {
|
||||
await verticalScreen();
|
||||
} else {
|
||||
await landScape();
|
||||
}
|
||||
|
||||
// bool isValid =
|
||||
|
@ -26,8 +26,8 @@ class BottomControl extends StatelessWidget implements PreferredSizeWidget {
|
||||
|
||||
return Container(
|
||||
color: Colors.transparent,
|
||||
height: 85,
|
||||
padding: const EdgeInsets.only(left: 14, right: 14),
|
||||
height: 90,
|
||||
padding: const EdgeInsets.only(left: 18, right: 18),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
@ -50,8 +50,8 @@ class BottomControl extends StatelessWidget implements PreferredSizeWidget {
|
||||
bufferedBarColor: colorTheme.withOpacity(0.4),
|
||||
timeLabelLocation: TimeLabelLocation.none,
|
||||
thumbColor: colorTheme,
|
||||
barHeight: 3.0,
|
||||
thumbRadius: 5.5,
|
||||
barHeight: 3.5,
|
||||
thumbRadius: 7,
|
||||
onDragStart: (duration) {
|
||||
feedBack();
|
||||
_.onChangedSliderStart();
|
||||
|
Reference in New Issue
Block a user