bilibili / ijkplayer

Android/iOS video player based on FFmpeg n3.4, with MediaCodec, VideoToolbox support.
GNU General Public License v2.0
32.44k stars 8.11k forks source link

iOS 播放rtsp后,即使重新初始化播放器也无法播放http视频 #5578

Closed climlove closed 8 months ago

climlove commented 8 months ago

播放rtsp时候正常,我重新初始化个播放器播放http后 ser-Agent: ijkplayer

Accept: /

Range: bytes=0-

Connection: close

Host: 192.168.1.254

Icy-MetaData: 1

HTTP error 405 Method Not Allowed

无法播放了,http视频之间不会出现这个问题 我试着使用[ _ijkplayer setOptionIntValue:1 forKey:@"dns_cache_clear" ofCategory:1],但是并没有生效

climlove commented 8 months ago

我发现在第二次初始化后调用[ _ijkplayer setOptionIntValue:1 forKey:@"dns_cache_clear" ofCategory:1]是可以解决问题的