没有扩展名,Flutter better_player 无法播放视频 url

Flutter better_player cannot play video url without extension

这是一个视频url:

https://d6b09034.tekurarere.tk/mq/NNUVmAXzjPHmdFAxvlmOAXjNYAmNAgjVmZJiRmX_lp

我的代码:

@override
void initState(){
    super.initState();
    BetterPlayerDataSource betterPlayerDataSource = BetterPlayerDataSource(
        BetterPlayerDataSourceType.network,
        "https://d6b09034.tekurarere.tk/mq/NNUVmAXzjPHmdFAxvlmOAXjNYAmNAgjVmZJiRmX_lp",
        headers: {"User-Agent:":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0", "Content-Type:":"application/vnd.apple.mpegurl"}
        );
    _betterPlayerController = BetterPlayerController(
        BetterPlayerConfiguration(),
        betterPlayerDataSource: betterPlayerDataSource);
  }

预期行为: 播放来自 url 的不带文件扩展名

的视频

扑博士

医生总结(查看所有详情,运行flutter doctor -v):

[✓] Flutter(频道主控,1.26.0-2.0.pre.168,Linux,语言环境 tr_TR.utf8)

[✓] Android 工具链 - 为 Android 设备开发(Android SDK 版本 29.0.2)

更好的播放器版本: ^0.0.48

截图:

可以播放url(vlc、js视频播放器bla bla) enter image description here

已在 0.0.49 中修复

新建 - -> 视频格式选项

BetterPlayerDataSource betterPlayerDataSource = BetterPlayerDataSource(
        BetterPlayerDataSourceType.network,
        "https://d6b09034.tekurarere.tk/mi/NNUVmAXzjPHmdFAxvlmOAXjNYAmNAgjVmZJiRmX_lp",
        videoFormat: BetterPlayerVideoFormat.hls,
        headers: {
          "User-Agent:":
              "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0",
          "Content-Type:": "application/vnd.apple.mpegurl"
        });