无法在chrome中查找html5视频或音频 [英] can't seek html5 video or audio in chrome
问题描述
现在我已经摆弄了几个星期的HTML5视频/音频。通常情况下,一段时间后出现故障的原因会弹出,但我一直无法找到为什么我会在Chrome中出现转发和倒带问题。
无论如何...
在请求视频或音频文件时,视频或音频标签正在加载到extjs面板中。这些文件是以流的形式发送的,并且在IE和firefox中工作正常(在向响应头添加持续时间之后)
Safari浏览器存在问题,但显然整个网站都运行在HTTPS中(正在处理
在chrome(这是我的问题,并在最新版本)视频和音频加载很好,但我无法倒带或转发。尝试查找视频时,只需持续几秒钟,直至到达流的末尾。音频也播放得很好,但试图多次回放(或转发)只是打破了进度条并停止播放音频。
我并不完全确定什么是从服务器发送的,但我想知道这是否可能是由于响应中缺少数据造成的。如果没有其他任何指向我的解决方案是同样受欢迎的。我想我已经覆盖了整个设置,并且确保每个浏览器都有一个源标签。
编辑:这是javascript为其中一个文件生成的代码:
< video width =1889height =2preload =autoautoplay =1controls =1id =videoPlayerstyle =width: 1889px; height:233px;>
<信源SRC = HTTP://本地主机:8080 / epaServer / EPA /文档/ 496.ds_webm的sessionId = 5616fde4-50af-43d6-a57c-f06540b64fcb 类型= 视频/ WEBM >
<信源SRC = HTTP://本地主机:8080 / epaServer / EPA /文档/ 496.ds_mp4的sessionId = 5616fde4-50af-43d6-a57c-f06540b64fcb 类型= 视频/ MP4 >
< div>您的浏览器不支持html5视频。 < a>升级Chrome< / a>< / div>
< / video>
我也发现,即使我单独打开它们,我也无法找到任何文件
我试图在我自己的网站上找到更多信息,这些是网络标签中的标题chrome显示:
'BLOCKQUOTE>
请求的URL:https://本地主机:8443 / epaServer / EPA /文档/ 496.ds_webm的sessionId = 5616fde4-50af-43d6-a57c-f06540b64fcb
请求方法:GET
状态码:200 OK
<强>请求头
接受: /
接受字符集:ISO-8859-1,utf-8 ; q = 0.7,*; q = 0.3
Accept-Encoding:identity; q = 1,*; q = 0
接受语言:en-US,en; q = 0.8
连线:保持活动状态
的Cookie:的sessionId = 5616fde4-50af-43d6-a57c-f06540b64fcb
主机:本地主机:8443
用户代理:Mozilla / 5.0(Windows NT 6.1; WOW64)AppleWebKit / 535。 19(KHTML,如Gecko)Chrome / 18.0.1025.168 Safari / 535.19
sessionId:5616fde4-50af-43d6-a57c-f06540b64fcb 响应标题
Cache-Control:private
Content-Length:1588816
内容类型:video / webm
日期:2012年5月14日星期一14:23:02 GMT
$ b 到期日:1970年1月1日星期四01:00 :00 CET
服务器:Apache-Coyote / 1.1
X-Content-Duration:17.31
>
为什么它不能解决这个问题:
我们的服务器现在无法理解部分内容。
因此,chrome发送的内容没有得到回应,这反过来使我们的视频和音频变得不可察觉(并且不可恢复)。
I've been fiddling with the hell that is HTML5 video/audio for a couple of weeks now. Usually the reason why something failed popped up after a while, but I've been, unable to find why I get forwarding and rewinding problems in chrome.
Anyhow...
The video or audio tag is being loaded in an extjs panel when a video or audio file is requested. The files are sent as streams and they work fine in IE and firefox (after adding duration to the response header) There's an issue with safari, but it's apparently the fact that the whole site runs in HTTPS (that's being worked on right now).
In chrome (which is my issue and is at the latest version) the video and audio loads just fine, but I'm unable to rewind or forward. When trying to seek videos just go ahead a few seconds until it reaches the end of the stream. the audio also plays just fine but trying to rewind (or forward) multiple times simply breaks the progress bar and stops the audio from playing on.
I'm not entirely sure what's being sent from the server, but I'm wondering if this might be caused by missing data in the response. If it's not that anything else to point me towards a fix is just as welcome. I think I've covered pretty much the whole set up and I've made sure that there's a source tag for each browser.
edit: this is the code generated by the javascript for one of the files:
<video width="1889" height="2" preload="auto" autoplay="1" controls="1" id="videoPlayer" style="width: 1889px; height: 233px; ">
<source src="http://localhost:8080/epaServer/epa/documents/496.ds_webm?sessionId=5616fde4-50af-43d6-a57c-f06540b64fcb" type="video/webm">
<source src="http://localhost:8080/epaServer/epa/documents/496.ds_mp4?sessionId=5616fde4-50af-43d6-a57c-f06540b64fcb" type="video/mp4">
<div>Your browser doesn't support html5 video. <a>Upgrade Chrome</a></div>
</video>
I've also found that I can't seek any of the files even if I open them separately from the application.
I've tried to find more info on my own these are the headers chrome shows in the network tab:
Request URL:https://localhost:8443/epaServer/epa/documents/496.ds_webm?sessionId=5616fde4-50af-43d6-a57c-f06540b64fcb
Request Method:GET
Status Code:200 OK
Request Headers
Accept:/ Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3
Accept-Encoding:identity;q=1, *;q=0
Accept-Language:en-US,en;q=0.8
Connection:keep-alive
Cookie:sessionId=5616fde4-50af-43d6-a57c-f06540b64fcb
Host:localhost:8443
User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19
Query String Parametersview URL encoded
sessionId:5616fde4-50af-43d6-a57c-f06540b64fcb
Response Headers
Cache-Control:private
Content-Length:1588816
Content-Type:video/webm
Date:Mon, 14 May 2012 14:23:02 GMT
Expires:Thu, 01 Jan 1970 01:00:00 CET
Server:Apache-Coyote/1.1
X-Content-Duration:17.31
>
I found the reason why it's not working on this question:
Our server doesn't understand partial content right now. As a result chrome is sending requests for content that doesn't get answered which in turn makes our video's and audio unseekable (and unloopable).
这篇关于无法在chrome中查找html5视频或音频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!