有没有办法停止avplayer发送范围http标头字段 [英] Is there a way to stop the avplayer sending a range http header field

查看:86
本文介绍了有没有办法停止avplayer发送范围http标头字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果您使用AVPlayer加载远程文件,它将发送一个http请求,该请求的请求标头中包含一个范围字段,例如

If you load remote files with the AVPlayer it sends a http request with a range field in the request header, something like

Range: bytes=0-8148096

我喜欢使用SevenDigital商业API来播放歌曲,但它们不能处理此Range标头.有没有办法更改AVPlayer发送的URL请求?

I like to use the SevenDigital commercial API for streaming songs but they cannot handle this Range header. Is there a way to change the URL requests the AVPlayer sends?

推荐答案

不是,这是一种苹果标准,媒体提供商需要使用范围标头来支持http 1.1(例如,请查看iTunes商店中有关播客的准则),所以我不会很快见到它.抱歉,您需要在这里放个自己的东西.

Nope, and it is an apple standard that media providers need to support http 1.1 with the range header (check out the iTunes store guidelines for podcasts for example), so I wouldn't expect it anytime soon. You'll need to roll your own here, sorry.

这篇关于有没有办法停止avplayer发送范围http标头字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆