

I tried with another OGG file (test.ogg). (?:mp4|mp3|ogg|webm)$ no-gzip dont-vary) but it still does not work. So I disabled caching in htaccess ( SetEnvIfNoCase Request_URI. I read that Apache does 206 by default, but not if caching/GZIP is enabled.
#Html5 audio ogg how to#
But I could not find out yet how to enable this in the Apache server. I assume that one way of solving this issue is to always supply OGG files with 206 Partial content, already with the first request. This header tells us that either the server supports download resume or downloading files.

The unit used by the remote web servers is in bytes. The Accept-Ranges header indicates that the server accept range requests for a resource. No request is sent.Ĭontrary it sends the Accept-Ranges: bytes which should enable seeking through the file: However, this does not happen when clicking on the audio playbar in Chrome. When hitting the playbar for a video it does a 206 Partial content request as needed.
#Html5 audio ogg code#
My Apache server replies with status code 200 for the first load. The response headers look like this (for the 25 seconds file): And this is strange, because the file is linked directly (file system location). So I guess the file length is not sent by the server. I have tried a Javascript plugin (green audio player). Of course I want that the playbar shows the entire audio length and that navigate-clicking is possible from the beginning. However, after 22 seconds (3 seconds before the end), the playbar suddenly appears and the user can jump through the audio times by clicking on the playbar.Īs we can see here, only after the entire OGG file has played (not only loaded, but played) the 206 partial content request suddenly works.

If the file is longer, in the example 25 seconds, the progressbar/playbar does not work, that means: Clicking on the playbar does not jump to the audio time: If the file is about 3 seconds long, the progressbar/playbar appears at the beginning as expected: I play the embedded file with Chrome (same issue with Internet Explorer/Edge). I have audio files in OGG format and embed them with:
