【发布时间】:2016-10-18 20:10:51
【问题描述】:
我正在通过 Amazon S3 和 Cloud Front 使用 HLS 流式传输,并使用 JWplayer。 (使用 Rails)
我使用签名 URL 对 URL 进行加密,并创建了 Amazon Cloud Front 文档中给出的原始访问身份。 签名 URL 生成良好。
我的存储桶中还有一个 'crossdomain.xml' 文件,该文件允许所有来源(我已给出“*”) 现在,当我尝试播放存储桶中的 Hls 视频文件时,我遇到了跨域访问被拒绝问题
我认为 JW Player 试图在没有签名哈希的情况下访问“crossdomain.xml”文件。所以,它得到了那个错误。
我已经在演示 JWplayer Stream 测试器中测试了我的文件,这是我在控制台中遇到的错误。
Fetch API cannot load http://xxxxxxxx.cloudfront.net/xxx/1/1m_test.ts.
No 'Access-Control-Allow-Origin' header is present on the requested resource.
Origin 'http://demo.jwplayer.com' is therefore not allowed access.
The response had HTTP status code 403.
If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
这是截图。
请帮帮我。谢谢。
This is the link I followed to configure my CloudFront Distribution
【问题讨论】:
标签: amazon-s3 jwplayer amazon-cloudfront