Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

safari doesn't play .ogg files, so how does it work on wiktionary.org?

Safari does not support .ogg files, but that does not stop wiktionary.org from playing ogg files. I have looked through the source there and I cannot find how they are playing the files.

Here is the link where they are using an .ogg file. https://en.wiktionary.org/wiki/File:en-us-the-unstressed.ogg

like image 896
Joff Avatar asked Jul 26 '16 05:07

Joff


People also ask

Can safari play OGG files?

Ogg Vorbis audio format is Partially Supported on Safari 15, which means that any user who'd be accessing your page through Safari 15 can see it perfectly. Browser incompatibility may be due to any other web technology apart from Ogg Vorbis audio format.

How do I play OGG files on IOS?

OGG files are similar to MP3 files, but they offer slightly better audio quality than MP3's of similar size. You can play OGG files on iPhone and iPad using VLC, or Olimsoft OPlayer lite for iPhone, and Olimsoft OPlayer HD lite for iPad.


1 Answers

When you take a look at the XHRs of the site, you'll notice, that they actually load the EN-us-the-unstressed.ogg file along with these two scripts:

ogv-worker-audio.js
ogv-decoder-audio-vorbis.js

The scripts are part of the ogv.js JavaScript library:

JavaScript media player using Ogg/Vorbis/Theora/Opus/WebM libs compiled with Emscripten

The library does basically this:

Long-form goal is to create a drop-in replacement for the HTML5 video and audio tags which can be used for basic playback of Ogg Theora and Vorbis or WebM media on browsers that don't support Ogg or WebM natively.

So instead of using native audio|video-elements, they use JavaScript to playback audio, that is imported from .ogg-files.

like image 109
insertusernamehere Avatar answered Oct 21 '22 22:10

insertusernamehere