我使用的HTML5视频播放器在大多数情况下运行良好 - 除了Chrome之外。这是一个包含源元素的简单视频元素,导致浏览器向瘦服务器发出视频文件(XXX.mp4)的GET请求,该服务器将302重定向返回到Amazon S3上MP4文件的位置。 Chrome通常(但并不总是)陷入(待定)状态,当它预计会从amazonaws.com发出第二个文件请求时,因此视频永远不会出现。请求标头如下所示:
GET /api/s3/xxxxxx/xxxxxx.mp4 HTTP/1.1
Host: localhost:3000
Connection: keep-alive
Accept-Encoding: identity;q=1, *;q=0
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.107 Safari/537.36
Accept: */*
Referer: http://xxxxxxx/
Accept-Language: en-US,en;q=0.8
Cookie: rack.session=XXXXXXXXXX
Range: bytes=0-
Thin的响应标题如下所示:
HTTP/1.1 302 Moved Temporarily
content-type: text/plain;charset=utf-8
cache-control: public, no-store, max-age=0
access-control-allow-origin: *
access-control-allow-methods: GET
location: https://xxxxxxxx/xxxxxxxxx.mp4?AWSAccessKeyId=XXXXXXXXXXXX&Expires=1391823471&Signature=enXXXXXXXXXX
content-length: 0
set-cookie: rack.session=XXXXXXXXXX; path=/; expires=Sat, 08 Feb 2014 01:47:51 -0000; HttpOnly
x-content-type-options: nosniff
connection: keep-alive
server: thin 1.5.1 codename Straight Razor
Date: Sat, 08 Feb 2014 01:17:51 GMT
我一直在做很多谷歌搜索但尚未找到解决方案。任何帮助将不胜感激。