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.
Related
I have a Flutter app containing a Video with video_player and chewie. I want to implement something to cast that video to a TV, like on Youtube (image below).
Does anyone know how I can implement that? Is there a package supporting that exact functionality? I can also use another video player package, like youtube_player_flutter. I actually checked that package for that exact functionality, but didn't find it. Did I oversee something?
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.
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
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.
I am developing an app in which I wanna show the tutorial on how to use the app. For that need a custom video player which should look simple with a single play/pause button, a seeker and a stop button.
I have tried some video players like "videoplayerkit". To use this videoplayerkit I have to install cocoapods(libpods.a). It would be very helpful if anyone help me with a custom third party video player that satisfies my need. In short I need something like this in the picture below
You can try out an example app I created if you would like to see an example of a custom movie player, the Xcode project is at AVSync. This movie player looks exactly like the default iOS movie player, but you can have a look at the code to see how a custom set of controls can be made to control a movie player underneath. This example sits on top on a custom movie library, but the basic idea of creating your own controls and having them submit actions is the same no matter how you implement it.