简体   繁体   English

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

[英]Custom Receiver and Cookies from Akamai

I'm experiencing problem with HLS from Akamai. 我遇到了Akamai的HLS问题。 I'm using HLS from Akamai with tokens, in order to start stream, Cookies should be set after master m3u8 playlist response. 我将Akamai的HLS与令牌配合使用,为了启动流,应在主m3u8播放列表响应后设置Cookie。

Response from Akamai: 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/

I'm rewriting Host.updateManifestRequestInfo in both scenarios there is a dead end. 在两种情况下,我都在重写Host.updateManifestRequestInfo

If you use requestInfo.withCredentials = true; 如果使用requestInfo.withCredentials = true; , response will be: ,响应将是:

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; 使用requestInfo.withCredentials = false; will be 403 response. 将是403响应。

What is correct way in implementation of Custom Player for HLS from Akamai with tokens? 在Akamai中使用令牌实施Custom Player for HLS的正确方法是什么?

I know it is a very old post, but in case somebody gets the same problem in the future: If you set withCredentials to true, then the Akamai response has to explicitly authorise your ChromeCast receiver through their CORS header. 我知道这是一篇很老的文章,但是如果以后有人遇到同样的问题:如果将withCredentials设置为true,则Akamai响应必须通过其CORS标头明确授权您的ChromeCast接收器。

Please ask Akamai to add the domain of your receiver to their CORS and the issue will be resolved. 请要求Akamai将接收者的域添加到他们的CORS中,此问题将得到解决。 Please have a look at this page for more info: https://developers.google.com/cast/docs/player . 请查看此页面以获取更多信息: https : //developers.google.com/cast/docs/player

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

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

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