chewie
chewie copied to clipboard
Video is playing on Android but not on iOS
We are running chewie: ^1.2.2 with a dependency override on provider: ^6.0.1 .
The video player plays just fine on android, but in iOS it wont show up at all. The Chewie widget is not built.
Unless you run the app in debug with breakpoints. Then it build the Chewie widget, and you can see the video is loaded by the end time next to the progress bar. But nothing will play.
This is the code we're running:
class VideoPlayer extends StatefulWidget {
VideoPlayer({required this.url});
final String url;
@override
State<VideoPlayer> createState() => _VideoPlayerState();
}
class _VideoPlayerState extends State<VideoPlayer> {
VideoPlayerController? _videoPlayerController;
ChewieController? _chewieController;
@override
void initState() {
super.initState();
setUpVideoControllers();
}
Future<void> setUpVideoControllers() async {
final controller = VideoPlayerController.network(widget.url);
await controller.initialize();
setState(() {
_videoPlayerController = controller;
_chewieController = ChewieController(
videoPlayerController: controller,
autoPlay: false,
autoInitialize: true,
cupertinoProgressColors: PrevetTheme.videoControllerColors,
materialProgressColors: PrevetTheme.videoControllerColors,
);
});
}
@override
void dispose() {
_videoPlayerController?.dispose();
_chewieController?.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
if (_chewieController != null) {
return Chewie(controller: _chewieController!);
} else {
return Center(child: CircularProgressIndicator.adaptive());
}
}
}
Does anything strike you as odd?
Facing similar issue. Did you find the solution yet?
You can use following package instead appinio_video_player
Hey! I had the same issue, specifically, HLS videos were not playing on iOS 15. I stopped using HLS url for that reason and didn't check it since then. Any body can confirm my observation that's about HLS?