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

[BUG] iOS: HTTP error 405 Method Not Allowed. #603

Open kostov opened 1 year ago

kostov commented 1 year ago

Deal with DVR over rtsp/http.

  1. Play video-files over HTTP -- works (many times).
  2. If just once we play video streaming over RTSP, then try to playing video-files over HTTP -- it doesn't work until restart app. Log:
flutter: [inf] 2023-09-04 15:17:50.446174 [fijk] FijkPlayer{id:3} state changed to FijkState.asyncPreparing <= FijkState.initialized
Hit DNS cache hostname = 192.168.1.1
flutter: [inf] 2023-09-04 15:17:50.446318 [fijk] FijkPlayer{id:3} invoke prepareAsync and start #2 -> done
flutter: [inf] 2023-09-04 15:17:50.446579 [fijk] FijkPlayer{id:3} state changed to FijkState.initialized <= FijkState.idle
flutter: [inf] 2023-09-04 15:17:50.446713 [fijk] FijkPlayer{id:3} state changed to FijkState.asyncPreparing <= FijkState.initialized
HTTP error 405 Method Not Allowed
http://192.168.1.1/mnt/mmc/Normal/FILE230904-101424.TS: Server returned 4XX Client Error, but not one of 40{0,1,3,4}
flutter: [err] 2023-09-04 15:17:50.457799 [fijk] FijkPlayer{id:3} errorListener: FijkException(-1482175736, Server returned 4XX Client Error, but not one of 40{0,1,3,4})
flutter: [inf] 2023-09-04 15:17:50.458085 [fijk] FijkPlayer{id:3} state changed to FijkState.error <= FijkState.asyncPreparing

This bug appears only on iOS. On Android all works perfectly. (There is a vague assumption that HTTP-ranges somehow get corrupted after streaming).