befovy / fijkplayer

ijkplayer for flutter. ijkplayer 的 flutter 封装。 Flutter video/audio player. Flutter media player plugin for android/iOS based on ijkplayer. fijkplayer 是基于 ijkplayer 封装的 flutter 媒体播放器,开箱即用,无需编译 ijkplayer
https://fijkplayer.befovy.com
MIT License
1.65k stars 353 forks source link

Catch 404 #642

Closed jokopitoyosby closed 2 weeks ago

jokopitoyosby commented 2 weeks ago

Howto catch error 404:

I/IJKMEDIA(14636): header='HTTP/1.1 404 Not Found'
W/IJKMEDIA(14636): HTTP error 404 Not Found
E/IJKMEDIA(14636): https://mydomain.com:8088/live/0/862798052126048.flv: Server returned 404 Not Found

I getting above error, but I can't catch error with this code

player.setDataSource(url, autoPlay: true).onError((error, trace) {
        print("ERROR $error");
        print("");
        print("TRACE ${trace}");

        requestStartBroadcast();
        _timer = Timer(Duration(seconds: 5), () {
          play();
        });
      });

what wrong?