Plugin name
Appinio video player version 1.3.0 (also tested with 1.2.2 same happens)
Describe the bug
When setLooping(true) on CachedVideoPlayerController everything works fine the first time the video is displayed.
The second time it displays the video the video doesn't appear anymore
This is my code:
class ArticleDetailVideoWidget extends StatefulWidget {
final String videoUrl;
@override
State createState() => _ArticleDetailVideoWidgetState();
}
class _ArticleDetailVideoWidgetState extends State {
late final CachedVideoPlayerController _videoPlayerController;
late CustomVideoPlayerController _customVideoPlayerController;
Plugin name Appinio video player version 1.3.0 (also tested with 1.2.2 same happens)
Describe the bug When setLooping(true) on CachedVideoPlayerController everything works fine the first time the video is displayed. The second time it displays the video the video doesn't appear anymore
This is my code: class ArticleDetailVideoWidget extends StatefulWidget { final String videoUrl;
const ArticleDetailVideoWidget(this.videoUrl, {super.key});
@override State createState() => _ArticleDetailVideoWidgetState();
}
class _ArticleDetailVideoWidgetState extends State {
late final CachedVideoPlayerController _videoPlayerController;
late CustomVideoPlayerController _customVideoPlayerController;
@override void initState() { super.initState(); _videoPlayerController = CachedVideoPlayerController.network( widget.videoUrl, )..initialize()..setLooping(true).then((value) => setState(() {}));
}
@override void dispose() { _customVideoPlayerController.dispose(); super.dispose(); }
@override Widget build(BuildContext context) { return AspectRatio( aspectRatio: _customVideoPlayerController.videoPlayerController.value.aspectRatio, // Use the VideoPlayer widget to display the video. child: CustomVideoPlayer(customVideoPlayerController: _customVideoPlayerController), ); } }
Expected behavior Video should always be displayed.
Smartphone (please complete the following information):