MediaElement.js版本2.15.1
Chrome版本37.0.2062.102 m
播放分块的mp3音频时,除Chrome外,所有浏览器均可正常工作。 Chrome会在mediaElement.js中引发以下错误:
net::ERR_CONTENT_LENGTH_MISMATCH
请求/ Resonse标题如下:
// Request Headers ========================
Accept:*/*
Accept-Encoding:identity;q=1, *;q=0
Accept-Language:en-US,en;q=0.8,nb;q=0.6
Cache-Control:no-cache
Connection:keep-alive
Cookie:__utma=74155917.349885350.1406820465.1400689847.1409751290.19; __utmb=74155917.7.10.1409752290; __utmc=74155917; __utmz=74155917.1402820465.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); PHPSESSID=sj8mcfcq8qevfi1cks2cke3vr1
Host:www.thesite.com
Pragma:no-cache
Range:bytes=0-
Referer:https://thesite.com/listen.php?id=647
User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.102 Safari/537.36
// Response Headers =======================
Accept-Ranges:bytes
Cache-Control:
Connection:close
Content-Disposition:inline; filename=/var/www/thesite.com/www/mp3/20/xjy7q4ew7d9vq7i-09-Stereogenosis_etc.mp3
Content-Length:3592068
Content-Range:bytes 0-3592067/3592068
Content-Transfer-Encoding:binary
Content-Type:audio/mpeg
Date:Wed, 03 Sep 2014 14:17:09 GMT
Expires:Thu, 19 Nov 1981 08:52:00 GMT
Last-Modified:Fri, 23 Mar 2012 19:13:21 -0400
Pragma:
Server:Apache
Set-Cookie:PHPSESSID=sj8mcfcq8qevfi1cks9cke3vr5; path=/
我已检查过服务器端,似乎整个文件都是在第一次请求时发送的,但Chrome不知道这一点,尝试请求额外的范围,并发现连接已关闭。
任何指针都会有所帮助。