0

How to play multiple sources with video_player?

I'm about mixing the video and audio source, how to do it?

2 Answers2

0

You only can merge them as a video but can not play them at a same time. If you want to merge it, try this: Merge videos

It worked for me.

hoangquyy
  • 1,893
  • 2
  • 14
  • 29
  • but if I merge this, I need to download video and audio, thanks anyway. I'll try downloading chunk by chunk – ResQNet Mar 20 '20 at 14:25
0
 final List<VideoPlayerController> _playerControllers = [
   VideoPlayerController.asset("assets/videos/video_0.mp4"),
   VideoPlayerController.asset("assets/videos/video_1.mp4"),
   VideoPlayerController.asset("assets/videos/video_2.mp4"),
 ];


for (var element in _playerControllers) {
  element.initialize().then((_) {
    setState(() {});
  });
}
John vinith
  • 114
  • 5