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
No known key found for this signature in database
GPG Key ID: E2AB6392D894D900
2 changed files with 1 additions and 6 deletions

View File

@ -20,7 +20,6 @@ ChewieController? useChewieController(
bool showOptions = true,
bool showControlsOnInitialize = false,
bool autoPlay = true,
bool autoInitialize = true,
bool allowFullScreen = false,
bool allowedScreenSleep = false,
bool showControls = true,
@ -43,7 +42,6 @@ ChewieController? useChewieController(
hideControlsTimer: hideControlsTimer,
showControlsOnInitialize: showControlsOnInitialize,
showControls: showControls,
autoInitialize: autoInitialize,
allowedScreenSleep: allowedScreenSleep,
onPlaying: onPlaying,
onPaused: onPaused,
@ -58,7 +56,6 @@ class _ChewieControllerHook extends Hook<ChewieController?> {
final bool showOptions;
final bool showControlsOnInitialize;
final bool autoPlay;
final bool autoInitialize;
final bool allowFullScreen;
final bool allowedScreenSleep;
final bool showControls;
@ -77,7 +74,6 @@ class _ChewieControllerHook extends Hook<ChewieController?> {
this.showOptions = true,
this.showControlsOnInitialize = false,
this.autoPlay = true,
this.autoInitialize = true,
this.allowFullScreen = false,
this.allowedScreenSleep = false,
this.showControls = true,
@ -166,7 +162,6 @@ class _ChewieControllerHookState
showOptions: hook.showOptions,
showControlsOnInitialize: hook.showControlsOnInitialize,
autoPlay: hook.autoPlay,
autoInitialize: hook.autoInitialize,
allowFullScreen: hook.allowFullScreen,
allowedScreenSleep: hook.allowedScreenSleep,
showControls: hook.showControls,

View File

@ -40,7 +40,7 @@ class VideoViewerPage extends HookWidget {
controlsSafeAreaMinimum: const EdgeInsets.only(
bottom: 100,
),
placeholder: placeholder,
placeholder: SizedBox.expand(child: placeholder),
showControls: showControls && !isMotionVideo,
hideControlsTimer: hideControlsTimer,
customControls: const VideoPlayerControls(),