Page MenuHomePhabricator

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

Description

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.

Event Timeline

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

https://gerrit.wikimedia.org/r/392567

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

https://gerrit.wikimedia.org/r/392567

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. ;)

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

https://gerrit.wikimedia.org/r/413392

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

https://gerrit.wikimedia.org/r/413392

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