@@ -37,11 +37,16 @@ class PlayerWithControls extends StatelessWidget {
37
37
children: < Widget > [
38
38
if (chewieController.placeholder != null )
39
39
chewieController.placeholder! ,
40
- Center (
41
- child: AspectRatio (
42
- aspectRatio: chewieController.aspectRatio ??
43
- chewieController.videoPlayerController.value.aspectRatio,
44
- child: VideoPlayer (chewieController.videoPlayerController),
40
+ InteractiveViewer (
41
+ maxScale: chewieController.maxScale,
42
+ panEnabled: chewieController.zoomAndPan,
43
+ scaleEnabled: chewieController.zoomAndPan,
44
+ child: Center (
45
+ child: AspectRatio (
46
+ aspectRatio: chewieController.aspectRatio ??
47
+ chewieController.videoPlayerController.value.aspectRatio,
48
+ child: VideoPlayer (chewieController.videoPlayerController),
49
+ ),
45
50
),
46
51
),
47
52
if (chewieController.overlay != null ) chewieController.overlay! ,
@@ -52,14 +57,17 @@ class PlayerWithControls extends StatelessWidget {
52
57
PlayerNotifier notifier,
53
58
Widget ? widget,
54
59
) =>
55
- AnimatedOpacity (
56
- opacity: notifier.hideStuff ? 0.0 : 0.8 ,
57
- duration: const Duration (
58
- milliseconds: 250 ,
59
- ),
60
- child: Container (
61
- decoration: const BoxDecoration (color: Colors .black54),
62
- child: Container (),
60
+ Visibility (
61
+ visible: ! notifier.hideStuff,
62
+ child: AnimatedOpacity (
63
+ opacity: notifier.hideStuff ? 0.0 : 0.8 ,
64
+ duration: const Duration (
65
+ milliseconds: 250 ,
66
+ ),
67
+ child: Container (
68
+ decoration: const BoxDecoration (color: Colors .black54),
69
+ child: Container (),
70
+ ),
63
71
),
64
72
),
65
73
),
0 commit comments