繁体   English   中英

来自Akamai的自定义接收器和Cookie

[英]Custom Receiver and Cookies from Akamai

我遇到了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/

在两种情况下,我都在重写Host.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. 

使用requestInfo.withCredentials = false; 将是403响应。

在Akamai中使用令牌实施Custom Player for HLS的正确方法是什么?

我知道这是一篇很老的文章,但是如果以后有人遇到同样的问题:如果将withCredentials设置为true,则Akamai响应必须通过其CORS标头明确授权您的ChromeCast接收器。

请要求Akamai将接收者的域添加到他们的CORS中,此问题将得到解决。 请查看此页面以获取更多信息: https : //developers.google.com/cast/docs/player

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM