在正常的主机上完美工作,但一旦链接视频与机架空间cdn网址,Chrome将冻结(完全冻结,网站UI完全阻止 – 一段时间后,Chrome弹出一条消息,说“以下页面已经变得无响应的bla bla bla “).
对请求进行了一些监视,我最初认为问题是webm文件默认为serverd / octet-stream mime-type.我提供了一个机架空间的机票,他们给我一个方法来强制mime类型上传文件.这样做,文件现在已正确发送为video / webm ..但Chrome仍然冻结.
任何想法在这里可能会出现什么问题?
编辑:使用iheartvideo,从机架空间加载视频触发MEDIA_ERR_SRC_NOT_SUPPORTED.相同的视频关闭本地Web服务器工作完全正常(??)
编辑2:发生在Mac和Windows与最新的主流铬
编辑3:卷曲 – 结果:
Rackspace(没有工作):
HTTP/1.1 200 OK Server: Nginx/0.7.65 Content-Type: video/webm Last-Modified: Thu,24 Feb 2011 23:45:12 GMT ETag: 7029f83b241aa691859012dfa047e20d Content-Length: 20173074 Cache-Control: public,max-age=900 Expires: Fri,25 Feb 2011 01:32:11 GMT Date: Fri,25 Feb 2011 01:17:11 GMT Connection: keep-alive
Web服务器(工作)
HTTP/1.1 200 OK Date: Fri,25 Feb 2011 01:17:51 GMT Server: Apache Last-Modified: Thu,24 Feb 2011 03:56:26 GMT ETag: "11a0b47-133d112-49cff32940e80" Accept-Ranges: bytes Content-Length: 20173074 Content-Type: text/plain
编辑4:对于那些感兴趣的人,这是机架人员告诉我要做的一个webm内容类型的文件:
The file browser is not smart enough
to determine the content type
video/webm. Unfortunately,there is
not a way to change the content type
of a file that has already been
uploaded.You’ll need to use one of the API to
re-upload your files with the correct
content type.You can also use curl from a
linux/MacOS command line if available.Using your username and api key run
this command…
curl -I -X GET -H "X-Auth-User: USERNAME" -H "X-Auth-Key: API_KEY" https://auth.api.rackspacecloud.com/v1.0
From the output there are 2 important
values.
X-Storage-Url: https://storage101....... X-Storage-Token: Long hash
You can upload the files with,
curl -X PUT -T test.webm -H "Content-Type: video/webm" -H "Content-Length: FILESIZEINBYTE" -H "X-Auth-Token: TOKEN FROM RESPONSE ABOVE" https://STORAGE URL FROM RESPONSE ABOVE/test.webm
You must specify the content type,and
you must give the correct length of
bytes of what is being uploaded. If
not you will get an invalid request
error.
解决方法
他们的API实际上允许您将容器设置为启用流.我的第一本能告诉我你没有这样做.
我流式传输各种文件类型,它们都是绝对的对待.
有关CDN Streaming Enabled容器的更多信息,请参见:
http://docs.rackspace.com/files/api/v1/cf-devguide/content/Streaming-CDN-Enabled_Containers-d1f3721.html
希望这有帮助,但如果不让我知道,我不介意把一些PHP示例代码放在一起来帮助你.这一切都很容易,但是让您的头脑围绕着Rackspace实施的各种API操作有时候是一项艰巨的任务.