Fixes double video auto initialize issue and placeholder for video controller

This commit is contained in:
Marty Fuhry
2024-03-01 13:54:03 -05:00
parent 670a3838a3
commit f18872c18c
2 changed files with 1 additions and 6 deletions
@@ -20,7 +20,6 @@ ChewieController? useChewieController(
bool showOptions = true, bool showOptions = true,
bool showControlsOnInitialize = false, bool showControlsOnInitialize = false,
bool autoPlay = true, bool autoPlay = true,
bool autoInitialize = true,
bool allowFullScreen = false, bool allowFullScreen = false,
bool allowedScreenSleep = false, bool allowedScreenSleep = false,
bool showControls = true, bool showControls = true,
@@ -43,7 +42,6 @@ ChewieController? useChewieController(
hideControlsTimer: hideControlsTimer, hideControlsTimer: hideControlsTimer,
showControlsOnInitialize: showControlsOnInitialize, showControlsOnInitialize: showControlsOnInitialize,
showControls: showControls, showControls: showControls,
autoInitialize: autoInitialize,
allowedScreenSleep: allowedScreenSleep, allowedScreenSleep: allowedScreenSleep,
onPlaying: onPlaying, onPlaying: onPlaying,
onPaused: onPaused, onPaused: onPaused,
@@ -58,7 +56,6 @@ class _ChewieControllerHook extends Hook<ChewieController?> {
final bool showOptions; final bool showOptions;
final bool showControlsOnInitialize; final bool showControlsOnInitialize;
final bool autoPlay; final bool autoPlay;
final bool autoInitialize;
final bool allowFullScreen; final bool allowFullScreen;
final bool allowedScreenSleep; final bool allowedScreenSleep;
final bool showControls; final bool showControls;
@@ -77,7 +74,6 @@ class _ChewieControllerHook extends Hook<ChewieController?> {
this.showOptions = true, this.showOptions = true,
this.showControlsOnInitialize = false, this.showControlsOnInitialize = false,
this.autoPlay = true, this.autoPlay = true,
this.autoInitialize = true,
this.allowFullScreen = false, this.allowFullScreen = false,
this.allowedScreenSleep = false, this.allowedScreenSleep = false,
this.showControls = true, this.showControls = true,
@@ -166,7 +162,6 @@ class _ChewieControllerHookState
showOptions: hook.showOptions, showOptions: hook.showOptions,
showControlsOnInitialize: hook.showControlsOnInitialize, showControlsOnInitialize: hook.showControlsOnInitialize,
autoPlay: hook.autoPlay, autoPlay: hook.autoPlay,
autoInitialize: hook.autoInitialize,
allowFullScreen: hook.allowFullScreen, allowFullScreen: hook.allowFullScreen,
allowedScreenSleep: hook.allowedScreenSleep, allowedScreenSleep: hook.allowedScreenSleep,
showControls: hook.showControls, showControls: hook.showControls,
@@ -40,7 +40,7 @@ class VideoViewerPage extends HookWidget {
controlsSafeAreaMinimum: const EdgeInsets.only( controlsSafeAreaMinimum: const EdgeInsets.only(
bottom: 100, bottom: 100,
), ),
placeholder: placeholder, placeholder: SizedBox.expand(child: placeholder),
showControls: showControls && !isMotionVideo, showControls: showControls && !isMotionVideo,
hideControlsTimer: hideControlsTimer, hideControlsTimer: hideControlsTimer,
customControls: const VideoPlayerControls(), customControls: const VideoPlayerControls(),