add native player library

This commit is contained in:
Alex
2024-08-09 14:20:45 -05:00
committed by mertalev
parent 4b5657c21e
commit a8994ffb22
5 changed files with 81 additions and 25 deletions
+14 -10
View File
@@ -103,7 +103,7 @@ class VideoViewerPage extends HookConsumerWidget {
// Done in a microtask to avoid setting the state while the is building
if (!isMotionVideo) {
Future.microtask(() {
ref.read(showControlsProvider.notifier).show = false;
ref.read(showControlsProvider.notifier).show = true;
});
}
@@ -148,16 +148,20 @@ class VideoViewerPage extends HookConsumerWidget {
),
if (controller != null)
SizedBox(
height: size.height,
height: 16 / 9 * size.width,
width: size.width,
child: VideoPlayerViewer(
controller: controller,
isMotionVideo: isMotionVideo,
placeholder: placeholder,
hideControlsTimer: hideControlsTimer,
showControls: showControls,
showDownloadingIndicator: showDownloadingIndicator,
loopVideo: loopVideo,
child: AspectRatio(
aspectRatio: 16 / 9,
child: VideoPlayerViewer(
controller: controller,
isMotionVideo: isMotionVideo,
placeholder: placeholder,
hideControlsTimer: hideControlsTimer,
showControls: showControls,
showDownloadingIndicator: showDownloadingIndicator,
loopVideo: loopVideo,
asset: asset,
),
),
),
],