How to play .m3u8 file on flutter web using video_player plugin? - flutter

Just tried video_player plugin with flutter web and .m3u8 file format, but it's not working at all .
Can someone help me if it works in any case or just MP4 is supported in video_player plugin for flutter web

In Flutter Web, I found some libraries that support playing m3u8 files like video_player_web_hls but it's not providing any controls like Play/Pause, Fast Forwarding, etc.
video_player_web_hls

Related

how solve flutter with just_audio package problem

i used Just_audio pakage for load audio assets for windows app but when I turn the app show me
iam use this way to load assets
if you have solution for this problem or other ways to load assets or another package for windows flutter please tell me

How to load and show a video file flutter web

I want to show a video in my website developed using flutter web, what the solution for this problem?
Note: Using video_player package doesn't work for file. VideoPlayerController.file() not implemented for flutter web.
Thx for help!

How to play YouTube videos in google chromecast from Flutter application?

My Flutter application has some YouTube video links. Those YouTube links, i would like to stream through google chromecast. I have seen some video stream casting using the below flutter libraries.
https://pub.dev/packages/cast
https://pub.dev/packages/dart_chromecast
But those libraries are playing MP4 format video streaming. So i am searching for the way to play YouTube videos though flutter application in chromecast.
Please someone suggest me if there is any code clues for this.
We had the same challenge, and we searched high and low. Finally found this solution to make it work: https://pub.dev/packages/dart_chromecast
Make sure your flutter compiler is downgraded to 13 or below. Otherwise, you will not be able to compile. Unfortunately, their code is not supported in a newer version of the flutter compiler and the author is not going to update anytime soon.

Video player for web, mobile and desktop applications in Flutter?

There is this Flutter plugin for playing videos on iOS & Android (Video Plugin)
However, I also want to embed a video player into my web and desktop applications.
So I dont understand how Flutter is going this way of supporting plugins for different platforms. Because if you have a look at the video plugin it makes use of the AVPlayer on iOS and ExoPlayer on Android, but these are not then supported for web and desktop applications.
My Questions:
Why isn't the community writing a Flutter plugin for videos which is independent of it's underlying platform? Or isn't it possible? Why do we have to rely so much on Android & iOS especially if Flutter will be more and more platform independent in the future? Isn't it possible to write the source code for making videos working on different platforms solely with the Dart language & Flutter framework?
Is there currently a way to embed a video player for web and desktop applications?
You can use dart_vlc to add video playback to your Flutter desktop application.
It currently supports Windows & Linux, we are working on adding macOS support actively.
The library is rather easier to use aswell,
Player player = Player(id: 0);
player.open(
Playlist(
medias: [
Media.file(File('C:/music.mp3')),
Media.file(File('C:/audio.mp3')),
Media.network('https://www.example.com/music.aac'),
],
),
);
Thanks. Checkout project README for more examples and documentation.
You can try using WebView by flutter_webview_plugin package. It can take advantage of the built-in video decoders/players in any Operating Systems as they're pre-loaded as web content.
Edit: This is because not many Video Plugins are to be found for the Desktop and Web Platforms yet (At least by me)
The video_player along with the video_player_web plugins work for web, android and ios. But I have not tested them on a desktop.

Is there a way to open other applications in flutter

I need to be able open other apps in my flutter application
In an application i am working on I need to be able to play videos however the video_player plugin in flutter only has play and pause options and there is chewie also however we don't have the option of pausing chewie with commands , so I am thinking of opening videos through other apps like vlc,MX players, etc. How do i open these apps in flutter.
Please take a look at the open_file plugin, it supports opening most of the file including videos.
Example usage:
Specify dependency in pubspec.yaml
dependencies:
open_file: ^1.1.1
then
import 'package:open_file/open_file.dart';
OpenFile.open(your_file_path);
Hope that helps!