diff --git a/app-release.apk b/app-release.apk index 279345c..a0aa87a 100644 Binary files a/app-release.apk and b/app-release.apk differ diff --git a/lib/pages/player/widgets/video/page.dart b/lib/pages/player/widgets/video/page.dart index bcac508..86b676b 100644 --- a/lib/pages/player/widgets/video/page.dart +++ b/lib/pages/player/widgets/video/page.dart @@ -27,97 +27,83 @@ class _VideoPlayerPageState extends State { player.addListener(() { if (mounted) setState(() {}); }); - return Column( - children: [ - SizedBox( - height: 250, - width: MediaQuery.of(context).size.width, - child: Stack( - clipBehavior: Clip.none, - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded( + return OverflowBox( + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SizedBox( + height: MediaQuery.of(context).size.height - 200, + width: MediaQuery.of(context).size.width, + child: Stack( + alignment: Alignment.center, + clipBehavior: Clip.none, + children: [ + AspectRatio( + aspectRatio: player.value.aspectRatio, child: Container( decoration: const BoxDecoration(color: Colors.black), - child: AspectRatio( - aspectRatio: p.player.value.aspectRatio, - child: VideoPlayer(p.player)), + child: VideoPlayer(p.player), + )), + Column( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + IconButton( + onPressed: () { + widget.setMiniPlayer(true); + }, + icon: + const Icon(Icons.keyboard_arrow_down_sharp)), + IconButton( + onPressed: () {}, + icon: const Icon(Icons.more_vert)), + ], + ) + ], + ), + Column( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + IconButton( + constraints: const BoxConstraints(minWidth: 200), + onPressed: () { + if (p.playerState == PlayerStates.paused) { + p.resumePlaying(); + } else { + p.pausePlaying(); + } + }, + icon: Icon( + p.playerState == PlayerStates.paused + ? Icons.play_arrow + : Icons.pause, + size: 50.0)), + ], ), - ), - ], - ), - Column( - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - IconButton( - onPressed: () { - widget.setMiniPlayer(true); - }, - icon: const Icon(Icons.keyboard_arrow_down_sharp)), - IconButton( - onPressed: () {}, - icon: const Icon(Icons.more_vert)), - ], - ) - ], - ), - Column( - mainAxisSize: MainAxisSize.max, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - IconButton( - onPressed: () => p.skipToPrevious(), - icon: const Icon( - Icons.chevron_left_rounded, - size: 50, - )), - IconButton( - constraints: const BoxConstraints(minWidth: 200), - onPressed: () { - if (p.playerState == PlayerStates.paused) { - p.resumePlaying(); - } else { - p.pausePlaying(); - } - }, - icon: Icon( - p.playerState == PlayerStates.paused - ? Icons.play_arrow - : Icons.pause, - size: 50.0)), - IconButton( - onPressed: () => p.skipToNext(), - icon: const Icon( - Icons.chevron_right_rounded, - size: 50, - )) - ], - ), - ], - ), - Column( - mainAxisAlignment: MainAxisAlignment.end, - children: [ - Slider( - min: 0.0, - max: player.value.duration.inSeconds.toDouble(), - value: player.value.position.inSeconds.toDouble(), - onChanged: (value) { - player.seekTo(Duration(seconds: value.toInt())); - }, - ) - ], - ) - ], - )) - ], + ], + ), + Column( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Slider( + min: 0.0, + max: player.value.duration.inSeconds.toDouble(), + value: player.value.position.inSeconds.toDouble(), + onChanged: (value) { + player.seekTo(Duration(seconds: value.toInt())); + }, + ) + ], + ) + ], + )) + ], + ), ); } }