I am developing a new native App. I have chosen Flutter for it (over React Native). In this app, there will be a section for video streaming. These videos will have HLS streaming.
I am using video_player package in Flutter for it. I am able to play the video successfully but there is no option to change the quality (1080p, 720p etc.). How can I implement video quality selection in video_player package? Also, does video_player have adaptive bitrate streaming for HLS?
You can use stack widget adding there video player and button. After pressing button you change url of video from 1080 p to 720 p.
There's a package which you can use to change the quality from 1080p to 720p, here's the package's link: yoyo_player
For those that might come here looking for a solution. It is a pretty trivial solution using the default video_player or even yoyo player. In front of the url, just add the file format type that you desire. For example for HLS just add ".m3u8" and for dash add ".mpd" and the video will work and still be adaptive.
So your full url should be something like this:
For HLS
https://itvnnowoptimised-sano1.streaming.media.azure.net/3c0ecaef-002f-461f-854a-2397449d351f/thestoryofjoseph.ism/manifest(format=m3u8-aapl).m3u8
For dash
https://itvnnowoptimised-sano1.streaming.media.azure.net/3c0ecaef-002f-461f-854a-2397449d351f/thestoryofjoseph.ism/manifest(format=mpd-time-cmaf).mpd
This was using azure Media Services.
Related
I want to know how can I get GStreamer to work on Flutter application to show a video on media player.
Any help and tips would be appriciated
Do you really need GStreamer on the device to play the video?
The main point is the source of the video - you can play:
video file (https://pub.dev/packages/video_player)
WebRTC stream (https://pub.dev/packages/flutter_webrtc)
HLS stream (https://pub.dev/packages/video_player_web_hls)
without GStreamer at all.
If need gstreamer just use platformviews to embed and do the rendering using native android and ios. worked for me.
So I have a streaming link generated from encoding azure media services. Video plays on the test player there but now want to use the URL on flutter video player.
Below is an example of the link type to expect https://itvnnows-sano13.streaming.media.azure.net/be344295-3f54-4537-abd4-87435a3d51ea/ITVNNow.ism/manifest
On flutter video player, when I use URL with .mp4 extension it works but when using the above mentioned link nothing happens. Is there a possible workaround?
Is there anyway we can combine cached_video_player 1.0.3 & chewie 0.12.0 ?
I am using chewie to play my video, but I want to cache them so that user need not download the video again and again.
You can try using this package pub.dev/packages/better_player which already uses chewie and manages cache or try following up this https://www.gitmemory.com/issue/flutter/flutter/28094/612075565
Here it uses your video player and cache manager to achieve the result
One solution could be to just store the video as a file in the file system when first downloaded. Then you just load the video from the file system and play it if it's already downloaded the next time you want to play the video.
I want to download video with flutter (maybe use dio package), and play it in the screen automatic. There is a way to do that?
I have searched it but feel like it only can play a video have added to asset.
check this one Flutter Video Player
The VideoPlayerController offers several different constructors to play videos from assets, files, or the internet.
You can use https://flutter.dev/docs/cookbook/plugins/play-video and can download that to app directory and get the path from there and then play using a video player.don't need to play it from assets.
so this is my issue. I was able to autoplay some videos which are not live stream. They are auto playing perfectly using https://github.com/Stanko/html-canvas-video-player but when I place the live stream HLS format, the video does not play, whether auto or via double tap. I would like to know how to auto play a video stream on iphone. Thanks!
iOS specifically refuses to auto play live streams. This allows the user to controll their data usage considering most people have data caps. Apple is changing this in ios10 however.