flutter_ijkplayer icon indicating copy to clipboard operation
flutter_ijkplayer copied to clipboard

[Need help]

Open xhp281 opened this issue 5 years ago • 3 comments

直播过程中切断网络 --> 连接网络 --> 点击播放 状态会从playing直接变成complete,这个为什么不能继续播放?

xhp281 avatar Feb 24 '20 07:02 xhp281

参考 https://github.com/Bilibili/ijkplayer/issues/445#issuecomment-139990546

设置option

ijkMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_FORMAT, "reconnect", 1);

对应本插件代码:

mediaController.setIjkPlayerOptions(
      [TargetPlatform.iOS, TargetPlatform.android],
      [
        IjkOption(IjkOptionCategory.format, "reconnect", 1),
      ],
    );

在设置DataSource前设置

CaiJingLong avatar Feb 24 '20 07:02 CaiJingLong

然而 并不保证一定可行

CaiJingLong avatar Feb 24 '20 07:02 CaiJingLong

然而 并不保证一定可行

感谢作者回复,我试了一下确实是不可行,我是主动断开客户端网络,服务端的流还在,此方法行不通,这可咋弄大佬。

xhp281 avatar Feb 24 '20 08:02 xhp281