Intent to ship: Add-On-Gated WebMIDI

505 views
Skip to first unread message

Bobby Holley

unread,
Nov 22, 2022, 6:52:12 PM11/22/22
to dev-pl...@mozilla.org
In Firefox 108, we plan to enable the WebMIDI API along with an experimental mechanism for controlling access to dangerous capabilities.

Standards Body: W3C
Platform Coverage: Desktop
Preference: dom.webmidi.enabled
Other browsers: Shipped in Chrome since version 43 [1], unsupported in Safari.

We prototyped WebMIDI in 2017, but never shipped it due to safety concerns. MIDI devices are not generally hardened against adversarial input, so WebMIDI is only safe if you trust the site. This is not how the Web ordinarily works, nor how we want it to work. Browsing should be casual and low-friction, which means it must be safe to visit a site whether or not that site is trustworthy [2].

The historical escape hatch from the casual Web is software installation. Users can waive the protections of the Web sandbox by installing native packages or browser extensions, which offer elevated capabilities but require trusting the source not to harm you. This matches the characteristics of WebMIDI, and indeed, users can already enable WebMIDI in Firefox by installing an add-on [3].

Site permission add-ons are an experimental mechanism in Firefox designed to eliminate the incidental friction of add-on-based polyfills while maintaining the essential friction of a high-trust installation experience. The add-on is automatically generated and offered to the user when the site requests MIDI access (and at least one MIDI device is connected), so the site doesn't need any special handling or instructions for Firefox users. The installation experience is similar to that of ordinary self-hosted add-ons, with slightly modified language and a dedicated "learn more" link [4]. The add-on only exposes capabilities to the site for which it was generated.

Please reach out to me directly with any questions.

Bobby



[1] Chrome automatically grants MIDI access to any site without user consent, though they have expressed an interest in changing this.
Reply all
Reply to author
Forward
0 new messages