fluttercommunity / fluttercommunity/chewie
Lag when navigating to new screen while player is playing
- Dominant language
- Dart
- Stars
- 2.1k
- Forks
- 1.1k
- Avg merge
- 6d 8h
- Merged PRs (30d)
- 6
Description
As seen in the video there is a second or 2 lag when the video player is started, as compared to nothing when the video player isn't running. If i pause the video before i navigate this lag doesn't exist.
https://user-images.githubusercontent.com/17206638/128080231-bf879972-dd65-4349-8fca-aa407f52a482.MP4
I am using the controller from your example
```
@override
void initState() {
videoPlayerController = VideoPlayerController.network(
"https://assets.mixkit.co/videos/preview/mixkit-daytime-city-traffic-aerial-view-56-large.mp4");
super.initState();
// Wrapper on top of the videoPlayerController
_chewieController = ChewieController(
autoPlay: false,
videoPlayerController: videoPlayerController,
aspectRatio: 16 / 9,
// Prepare the video to be played and display the first frame
autoInitialize: true,
showControlsOnInitialize: true,
// allowFullScreen: false,
allowMuting: false,
customControls: CupertinoControls(
backgroundColor: Color.fromRGBO(41, 41, 41, 0.7),
iconColor: Color.fromARGB(255, 200, 200, 200),
),
placeholder: Center(
child: Text(
'Loading...',
style: kTitleStyle(widget.height),
),
),
looping: widget.looping,
// Errors can occur for example when trying to play a video
// from a non-existent URL
errorBuilder: (context, errorMessage) {
return Center(
child: Text(
errorMessage,
style: TextStyle(color: Colors.white),
),
);
},
);
}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.