我正在嘗試將HLS流集成到我的Chromecast應用中。對HLS的Chromecast支持,Amazon S3上的CORS錯誤
接收器部分很好,因爲我用多個HLS Stream url進行了檢查。
我只是不能讓CORS位正確操作。
我正在使用Amazon AWS S3。我爲我的桶設置了CORS。
<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
<AllowedMethod>PUT</AllowedMethod>
<AllowedMethod>POST</AllowedMethod>
<AllowedMethod>DELETE</AllowedMethod>
<AllowedHeader>*</AllowedHeader>
</CORSRule>
</CORSConfiguration>
在我的假設中,這應該允許來自所有域的訪問來訪問這個存儲桶中的資源。
但我仍然從Chromecast中獲得以下javascript錯誤。
XMLHttpRequest cannot load http://s3-eu-west-1.amazonaws.com/interactive-encoding-out/watermark-sintel-test/playlist.m3u8. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://s3-eu-west-1.amazonaws.com' is therefore not allowed access.