[snap] Web Midi API doesn't work

Bug #1854676 reported by Lonnie Lee Best
34
This bug affects 6 people
Affects Status Importance Assigned to Milestone
chromium-browser (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

With aspirations of creating a web based Midi tool, using Ubuntu 20.04 LTS, I'm trying to test out the Web Midi API:
https://www.w3.org/TR/webmidi/

The Web Midi API is supposed to be supported in Chromium (and therefore Brave too because Brave is based on Chromium):
https://caniuse.com/#feat=midi

Yet, none of these samples work in Ubuntu 20.04's snap-package installations of Chromium or Brave:
https://webaudio.github.io/demo-list/

In the meantime, please recommend a work-around of how I can work with the Web Midi API while using Ubuntu Linux as my operating system.

Tags: focal snap
Revision history for this message
Ryan Frazier (pianomanfrazier) wrote :

My current work around is to remove the snap version of Chromium and replace it with Debian-stable.

You can find the instructions on StackOverflow at https://askubuntu.com/a/1206502

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in chromium-browser (Ubuntu):
status: New → Confirmed
Olivier Tilloy (osomon)
summary: - Web Midi API Doesn't Work in Snap-Version of Chromium
+ [snap] Web Midi API doesn't work
Revision history for this message
Olivier Tilloy (osomon) wrote :

I've tested the demo list, and at least a couple of them work here (tested on 19.10 and 20.04):
  http://www.cappel-nord.de/webaudio/conways-melodies/
  http://webaudiodemos.appspot.com/pitchdetect/index.html

In the second one, microphone input doesn't seem to be detected though, but as far as MIDI playback is concerned, it's working. This is with version 80.0.3987.162 of the chromium snap.

Would you mind testing again and letting me know whether things have improved since you originally reported the bug?

Revision history for this message
Lonnie Lee Best (launchpad-startport) wrote :

I'll need some time. I already have the debian repo version of Chromium installed and I'm concerned that if I also install the snap version of Chromium it might corrupt that setup.

I have another computer that I can set up to test this, I'll post back when I do. I'll try to do it tonight.

Revision history for this message
Emil Bøgh Harder (kasteklar) wrote :

Olivier, it's not the webaudio that does not work. It's the webmidi.
As in the 2 last examples on the demo list:

https://ryoyakawai.github.io/smfplayer/
http://webaudiodemos.appspot.com/MIDIDrums/index.html

In my testing the drum machine doesn't ask for permission to use midi. So that might be a bug on the websites part. But when smfplayer loads, this comes up in the teminal:

ALSA lib conf.c:3916:(snd_config_update_r) Cannot access file /usr/share/alsa/alsa.conf
ALSA lib seq.c:935:(snd_seq_open_noupdate) Unknown SEQ hw

Might be usefull :)

Changed in chromium-browser (Ubuntu):
importance: Undecided → Low
Revision history for this message
Nicolas Clavaud (nclavaud) wrote :

I can confirm that since I updated from Ubuntu 18.04 (Chromium deb) to Ubuntu 20.04 (Chromium snap), I can no longer connect to my device using WebMIDI (nor WebUSB).

For information, the web app asks permission to "Use your MIDI devices", but the call to "navigator.requestMIDIAccess()" fails.

In /var/log/syslog I get the same log entries as in the previous post:

chromium_chromium.desktop[11556]: ALSA lib conf.c:3916:(snd_config_update_r) Cannot access file /usr/share/alsa/alsa.conf
chromium_chromium.desktop[11556]: ALSA lib seq.c:935:(snd_seq_open_noupdate) Unknown SEQ hw

description: updated
description: updated
tags: added: focal
description: updated
description: updated
Revision history for this message
Maurits Lamers (mauritslamers) wrote :

Based on comment #6, I found a post at https://forum.snapcraft.io/t/cannot-access-file-usr-share-alsa-alsa-conf-if-not-using-devmode-flag/15317 which suggests that Chromium should add the alsa plug to allow communications and with it hopefully also webmidi support.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.