We Use Packages:
~ video_player: ^2.8.6
~ chewie: ^1.8.1
Example Code:
class Display extends StatefulWidget {
Display({super.key});
@override
State<Display> createState() => _DisplayState();
}
class _DisplayState extends State<Display> with TickerProviderStateMixin{
VideoPlayerController? controllerVideoWorkout;
ChewieController? chewieController;
@override
void initState(){
controllerVideoWorkout = VideoPlayerController.file(
"pathVideo",
videoPlayerOptions: VideoPlayerOptions(mixWithOthers: true)
)..initialize().then((value){
controllerVideoWorkout!.setVolume(0.0);
setState(() {});
});
chewieController = ChewieController(
videoPlayerController: controllerVideoWorkout!,
looping: true
);
}
Widget build(BuildContext context) {
return Scaffold(
child: Center(
child: Chewie(
controller: chewieController!
)
)
)
}
}
Example Video:
I experienced something strange, some videos used this code smoothly and had no problems, but I found some videos didn’t run normally, such as Example Video
.
I want to ask if there is a solution to solve this problem?, without using the chewie
package I experienced the same thing, I suspect there is something in the video_player
package, please help everyone,
The oddity that I experienced was, the example video has a duration of 11 seconds but can only move at second 4, at seconds 1-3 the video doesn’t move
Which I expected to run the video smoothly, starting from the first second