How to play a List of video carousel in flutter? - flutter

I want to play a list of video in in a carousel. I tried to combine package like swiper and other carousel package and with video player.
I pass the URL to custom video Player class and and pass the URL according to the onIndexChanged function, But sometimes the 2nd video get initialize then the first.

A solution could be instead of using a custom carousel package, try using PageView.builder and then pass the indexedPage.

Related

Video player in Flutter with own methods to play, pause etc

I need to add the video player to my Flutter app. Is there a way to display video but use my own methods to play, pause and stop presenting the video?
Now I'm using video_player dart package and when I'm calling my methods it doesn't work, the video reacts only on methods called on controller from package.
I need something to display the video only(widget?) and be able to manage it by myself. Is it possible?
Hi You need to use chewie its based on The video_player plugin and provides low-level access to video playback.
here:- https://pub.dev/packages/chewie
You can use _ControlsOverlay or create your custom controller widget using stack for any video player.

Flutter Multiple Image to Video Slideshow with Audio converter Using FFmpegKit

I want to render a video file using some images with animation.
I have tried some solution out there and i did not get any solution either I don't know how to write command of FFmpegKit. I also tried to first implement a single image with mp3 but it was also not working.

Displaying Multiple Videos In Flutter

I'm trying to display a list of videos on my UI just like the way the Youtube app is. But my issue is i just cant find how to display the list of videos using the VideoPlayer plugin. The video player plugin takes just a VideoPlayerController and i don't know how to set all the list of videos to the controller so when they user tap on any video it plays. Or would i have to create lots of VideoPlayerController in a loop and assign them to each video in the list?
Add Dependency
chewie: ^0.9.10
Overall, for showing youtube like list, you need separate thumbnail images, so that on clicked specific video can be played.
Run below code, where everything is available which you required.
https://github.com/codemissions/flutter-video-streaming-app
just create new variable call path
String? _path;
then
_controller = VideoPlayerController.asset(_path!);
now, you can passing the path variable from resource that you have

How to float a video player over all pages like youtube in flutter?

I want to create a video player like youtube which will appear all over the screen like youtube app.
After minimize or back pressed this video will play like this for all screens:
You can try miniplayer dependencies and read how to persistence to pass miniplayer over all pages.
Use the same controller and pass it to a new widget( the one sitting down at bottom) and use hero animation to swap it there.

How to make video player in swift?

I am making video player in swift. I need add some custom buttons and functionality for standard video player:
1. Playing video from url (server)
2. Showing indicator while loading video like in VK
3. Add custom buttons to control (stop,pause buttons)
I try to use AVKit/AVPlayerViewController, but i cant understand how i can implement my tasks there. Can you give some advise, which is the better way to do this?