我有一个特殊的用例,我需要在流式传输HLS播放列表时跟踪AVPlayer的响应头.我在互联网上搜索并阅读了AVPlayer文档,并没有找到任何具体的方法来获得这个.我知道有一种方法可以从应用程序发出的请求中获取HTTP响应头,但是我找不到任何东西来获取AVPlayer发出的请求的响应头.
I spent weeks looking for a way to do this for both requests and responses for the playlist and chunk requests. The only way I was able to find that worked was by passing the playback request through a reverse proxy on the device. This allows you to intercept the request, add headers, send it to the real server, and then extract the headers from the response before returning it to the AVPlayer.
我在这里制作了一个简单的示例项目(带有大量注释和文档): https ://github.com/kevinjameshunt/AVPlayer-HTTP-Headers-Example
| 归档时间: |
|
| 查看次数: |
447 次 |
| 最近记录: |