useChewieController function
ChewieController
useChewieController({
- Widget subtitleBuilder(
- BuildContext context,
- String subtitle
- Subtitles? subtitle,
- required VideoPlayerController videoPlayerController,
- bool autoInitialize = false,
- bool autoPlay = false,
- Duration? startAt,
- bool looping = false,
- bool showControlsOnInitialize = true,
- bool showControls = true,
- Widget? customControls,
- Widget errorBuilder(
- BuildContext context,
- String errorMessage
- double? aspectRatio,
- ChewieProgressColors? cupertinoProgressColors,
- ChewieProgressColors? materialProgressColors,
- Widget? placeholder,
- Widget? overlay,
- bool fullScreenByDefault = false,
- bool allowedScreenSleep = true,
- bool isLive = false,
- bool allowFullScreen = true,
- bool allowMuting = true,
- bool allowPlaybackSpeedChanging = true,
- List<
double> playbackSpeeds = const [0.25, 0.5, 0.75, 1, 1.25, 1.5, 1.75, 2], - List<
SystemUiOverlay> ? systemOverlaysOnEnterFullScreen, - List<
DeviceOrientation> ? deviceOrientationsOnEnterFullScreen, - List<
SystemUiOverlay> systemOverlaysAfterFullScreen = SystemUiOverlay.values, - List<
DeviceOrientation> deviceOrientationsAfterFullScreen = DeviceOrientation.values, - ChewieRoutePageBuilder? routePageBuilder,
- List<
Object?> ? keys,
Implementation
ChewieController useChewieController({
Widget Function(BuildContext context, String subtitle)? subtitleBuilder,
Subtitles? subtitle,
required VideoPlayerController videoPlayerController,
bool autoInitialize = false,
bool autoPlay = false,
Duration? startAt,
bool looping = false,
bool showControlsOnInitialize = true,
bool showControls = true,
Widget? customControls,
Widget Function(BuildContext context, String errorMessage)? errorBuilder,
double? aspectRatio,
ChewieProgressColors? cupertinoProgressColors,
ChewieProgressColors? materialProgressColors,
Widget? placeholder,
Widget? overlay,
bool fullScreenByDefault = false,
bool allowedScreenSleep = true,
bool isLive = false,
bool allowFullScreen = true,
bool allowMuting = true,
bool allowPlaybackSpeedChanging = true,
List<double> playbackSpeeds = const [0.25, 0.5, 0.75, 1, 1.25, 1.5, 1.75, 2],
List<SystemUiOverlay>? systemOverlaysOnEnterFullScreen,
List<DeviceOrientation>? deviceOrientationsOnEnterFullScreen,
List<SystemUiOverlay> systemOverlaysAfterFullScreen = SystemUiOverlay.values,
List<DeviceOrientation> deviceOrientationsAfterFullScreen =
DeviceOrientation.values,
ChewieRoutePageBuilder? routePageBuilder,
List<Object?>? keys,
}) {
return use(_ChewieControllerHook(
videoPlayerController: videoPlayerController,
allowFullScreen: allowFullScreen,
allowMuting: allowMuting,
allowPlaybackSpeedChanging: allowPlaybackSpeedChanging,
allowedScreenSleep: allowedScreenSleep,
aspectRatio: aspectRatio,
autoInitialize: autoInitialize,
autoPlay: autoPlay,
cupertinoProgressColors: cupertinoProgressColors,
customControls: customControls,
deviceOrientationsAfterFullScreen: deviceOrientationsAfterFullScreen,
deviceOrientationsOnEnterFullScreen: deviceOrientationsOnEnterFullScreen,
errorBuilder: errorBuilder,
fullScreenByDefault: fullScreenByDefault,
isLive: isLive,
looping: looping,
materialProgressColors: materialProgressColors,
overlay: overlay,
placeholder: placeholder,
playbackSpeeds: playbackSpeeds,
routePageBuilder: routePageBuilder,
showControls: showControls,
showControlsOnInitialize: showControlsOnInitialize,
startAt: startAt,
subtitle: subtitle,
subtitleBuilder: subtitleBuilder,
systemOverlaysAfterFullScreen: systemOverlaysAfterFullScreen,
systemOverlaysOnEnterFullScreen: systemOverlaysOnEnterFullScreen,
keys: keys,
));
}