Cookies 来自Akamai的自定义接收器和cookie

Cookies 来自Akamai的自定义接收器和cookie,cookies,google-cast,akamai,custom-receiver,http-live-streaming,Cookies,Google Cast,Akamai,Custom Receiver,Http Live Streaming,我遇到来自Akamai的HLS问题。 我将Akamai的HLS与令牌一起使用,为了启动流,应在主m3u8播放列表响应之后设置cookie Akamai的回应: Access-Control-Allow-Credentials:true Access-Control-Allow-Origin:* Access-Control-Expose-Headers:Content-Type Cache-Control:max-age=0, no-cache, no-store Connection:keep

我遇到来自Akamai的HLS问题。 我将Akamai的HLS与令牌一起使用,为了启动流,应在主
m3u8
播放列表响应之后设置cookie

Akamai的回应:

Access-Control-Allow-Credentials:true
Access-Control-Allow-Origin:*
Access-Control-Expose-Headers:Content-Type
Cache-Control:max-age=0, no-cache, no-store
Connection:keep-alive
Content-Length:818
Content-Type:application/vnd.apple.mpegurl
Date:Wed, 17 Sep 2014 12:15:54 GMT
Expires:Wed, 17 Sep 2014 12:15:54 GMT
Mime-Version:1.0
Pragma:no-cache
Server:AkamaiGHost
Set-Cookie:_alid_=/cropped/
Set-Cookie:hdntl=/cropped/
我正在重写主机.updateManifestRequestInfo在这两种情况下都存在死胡同

如果使用
requestInfo.withCredentials=true,响应将为:

XMLHttpRequest cannot load /*MEDIA_URL*/. A wildcard '*' cannot be used in the 'Access-Control-Allow-Origin' header when the credentials flag is true. Origin '/*PLAYERS_HOST*/' is therefore not allowed access. 
With
requestInfo.withCredentials=false将是403响应


使用令牌从Akamai为HLS实现自定义播放器的正确方法是什么?

您需要编写一个自定义接收器(使用MPL)并使用主机覆盖updateManifestRequestInfo/updateSegmentRequestInfo以实现所需的行为。

我知道这是一篇非常古老的帖子,但如果将来有人遇到同样的问题:如果您将
with credentials
设置为true,则Akamai响应必须通过其CORS标头明确授权您的ChromeCast接收器


请要求Akamai将您的接收者的域添加到其CORS中,问题将得到解决。请查看此页面以了解更多信息:。

此问题似乎与主题无关,因为它针对的是我正在使用的
Google Cast Media Player库。
。然后您需要覆盖我指定的MPL主机方法。请参阅MPL文档: