Page MenuHomePhabricator

Use wasm version of ogv.js on supporting browsers (Safari 12, Edge 16)
Closed, ResolvedPublic


ogv.js 1.4.1 includes a Web Assembly (.wasm) build of the decoders, but doesn't switch it on by default on supporting browsers. Latest versions of Safari and Edge both support wasm; it performs about the same as the asm.js version for now but should compile and load faster due to the smaller, more efficient binary format.

Add a feature check in the loader code and switch on the wasm mode where available.


Related Gerrit Patches:
mediawiki/extensions/TimedMediaHandler : masterEnable WebAssembly (wasm) version of ogv.js
mediawiki/core : masterAdd WebAssembly application/wasm MIME type

Event Timeline

brion created this task.Oct 26 2017, 7:50 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 26 2017, 7:50 PM

ogv.js got updated this week, but having some trouble with the production config that didn't appear in mediawiki-vagrant. (T181022)

Change 392567 had a related patch set uploaded (by Brion VIBBER; owner: Brion VIBBER):
[mediawiki/core@master] Add WebAssembly application/wasm MIME type

Change 392567 merged by jenkins-bot:
[mediawiki/core@master] Add WebAssembly application/wasm MIME type

Jdforrester-WMF added a subscriber: Jdforrester-WMF.

What needs fixing in TMH now MW recognises the MIME type?

Should be possible to remove the 'wasm: false' from the 'new OGVPlayer({...})' invocation now, assuming no other breakages, but I want to wait until T181451 gets shaken out a little more before turning it back on. And also test it on beta cluster before pushing it accidentally, this time. ;)

brion added a comment.Jan 18 2018, 4:36 AM

One snag -- there's an Safari wasm regression in iOS 11.2.2 due to bugs in the spectre mitigations for webkit.

Upstream issue:

Change 413392 had a related patch set uploaded (by Brion VIBBER; owner: Brion VIBBER):
[mediawiki/extensions/TimedMediaHandler@master] Enable WebAssembly (wasm) version of ogv.js

Change 413392 merged by jenkins-bot:
[mediawiki/extensions/TimedMediaHandler@master] Enable WebAssembly (wasm) version of ogv.js

brion closed this task as Resolved.Apr 24 2018, 6:38 PM

This went out a while ago, can confirm it's running. \o/