소스 검색

Always wrap player in AspectRatio to preserve aspect ratio in fullscreen (#58)

patrickbz 7 년 전
부모
커밋
df751ab3aa
1개의 변경된 파일2개의 추가작업 그리고 9개의 파일을 삭제
  1. 2 9
      lib/src/player_with_controls.dart

+ 2 - 9
lib/src/player_with_controls.dart

@@ -46,10 +46,7 @@ class _VideoPlayerWithControlsState extends State<PlayerWithControls> {
     return new Center(
       child: new Container(
         width: MediaQuery.of(context).size.width,
-        child: widget.fullScreen &&
-                MediaQuery.of(context).orientation == Orientation.landscape
-            ? _buildPlayerWithControls(controller, context)
-            : new AspectRatio(
+        child: new AspectRatio(
                 aspectRatio: widget.aspectRatio,
                 child: _buildPlayerWithControls(controller, context),
               ),
@@ -66,11 +63,7 @@ class _VideoPlayerWithControlsState extends State<PlayerWithControls> {
           new Center(
             child: new Hero(
               tag: controller,
-              child: widget.fullScreen &&
-                      MediaQuery.of(context).orientation ==
-                          Orientation.landscape
-                  ? new VideoPlayer(controller)
-                  : new AspectRatio(
+              child: new AspectRatio(
                       aspectRatio: widget.aspectRatio,
                       child: new VideoPlayer(controller),
                     ),