Chrome starts buffering from finding a point in an OGG file, but not in an MP3 file

I installed an HTML5 audio tag with two sources, an ogg file and an MP3 file as shown below:

<audio controls="controls" id="audioplayer1"> <source src="podcast.mp3" type="audio/mpeg" /> <source src="podcast.ogg" type="audio/ogg" /> </audio> 

When playing an OGG file in Chrome and looking for an unbuffered position, buffering stops at the same position and continues from this new position, so playback continues almost immediately. This also works correctly for MP3 in Internet Explorer 9 and OGG in Firefox 14.0.1 and Opera 12.01 build 1532. However, when playing an MP3 file in Chrome, buffering simply continues from the very beginning, and playback stops until new buffering is reached. playback position. For a large audio file, this may take some time. Example: http://mvcpeer.be/uhbpmedia/web/test.html

My server should be configured correctly:

 AddType audio/mpeg mp3 AddType audio/ogg ogg 
Are supported

and byte ranges. I compared the requests the browser makes for OGG and MP3, and noticed something strange:

For OGG, Chrome first makes a request containing Range: bytes=0- , it receives a 206 response containing the total file size in its header (136.320.012 bytes in this example) as follows:

REQUEST

 GET /audio/podcast.ogg HTTP/1.1 Host: inderdaad.be Connection: keep-alive Accept-Encoding: identity;q=1, *;q=0 User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.83 Safari/537.1 Accept: */* Referer: http://mvcpeer.be/uhbpmedia/web/web.php Accept-Language: en-US,en;q=0.8 Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3 Range: bytes=0- 

REACTION

 HTTP/1.1 206 Partial Content Date: Mon, 27 Aug 2012 18:18:41 GMT Server: Apache/2 Last-Modified: Mon, 27 Aug 2012 10:08:56 GMT ETag: "26016c4-820140c-4c83c837ab335" Accept-Ranges: bytes Content-Length: 136.320.012 Vary: Accept-Encoding,User-Agent Content-Range: bytes 0-136320011/136320012 Keep-Alive: timeout=1, max=100 Connection: Keep-Alive Content-Type: audio/ogg 

When I move to an unbuffered position, the second request is made in a small part at the end of the file, then the Range: property is equal to bytes=136241821-136255487 (maybe for some metadata the answer is 200), and then the third request with Range: set to bytes=37340471-136242175 (answer 206). Buffering now starts at this point.

However, for MP3, Chrome only makes one request containing Range: bytes=0- . The second or third query is not executed when I search for an unbuffered position, and therefore, buffering cannot start at the search point.

Is this a Chrome issue? (using Chrome 21.0.1180.83 m)

Thanks a lot!

+4
source share

All Articles