简体   繁体   中英

Playing m3u8/MPEG-ts files with video_player plugin for flutter

I'm using flutter to develop an app for the web(chrome only), android and iOS. I need to play live video streams in the app, so I'm using the video_player (v 2.1.1) plugin.

When ever I try to play a live streamed video from network (I use VLC to stream in mpeg2-ts) or when I use m3u8, the video doesn't play and gives the following error.

MEDIA_ERR_SRC_NOT_SUPPORTED

But when I use the following video, it plays without any issues.

http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/Sintel.mp4

PS: I use the following link to test m3u8 stream https://live-hls-aje-ak.getaj.net/AJE/02.m3u8

If you are trying to make a web application and you want to integrate an hls player so you can play your m3u8 then check this: https://github.com/video-dev/hls.js/

but if you are only looking to make your google chrome supporting m3u8 format you need then to install this extention: https://chrome.google.com/webstore/detail/native-hls-playback/emnphkkblegpebimobpbekeedfgemhof

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM