Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 716840 - www-client/firefox-74.0.1 AudioContext API doesn't work with USE="-pulseaudio"
Summary: www-client/firefox-74.0.1 AudioContext API doesn't work with USE="-pulseaudio"
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 2 votes (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-09 18:10 UTC by Martin Doucha
Modified: 2024-01-07 03:05 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Doucha 2020-04-09 18:10:09 UTC
Most HTML5 games use the AudioContext API to play music and SFX. However, since at least Firefox 74, I get only the mute button on the tab bar but no sound from such games with USE="-pulseaudio".

I can reproduce the issue with this snippet of JavaScript:

var ctx = new window.AudioContext();
var elem = new Audio('some_file.mp3');
var track = ctx.createMediaElementSource(elem);
track.connect(ctx.destination);
elem.play();

The above snippet will produce a mute button on the tab bar but no sound. On the other hand, the following simplified snippet will play audio just fine:

var elem = new Audio('some_file.mp3');
elem.play();

After rebuilding Firefox with USE="pulseaudio" and linking it with media-sound/apulse, both snippets work correctly. Even if this issue doesn't get fixed anytime soon, the ebuild should at least print a warning.

Reproducible: Always

Steps to Reproduce:
1. Open a page that plays audio using AudioContext API
Actual Results:  
No sound

Expected Results:  
Sound
Comment 1 Ionen Wolkens gentoo-dev 2020-04-10 04:01:01 UTC
Possibly? related links for reference:
https://forums.gentoo.org/viewtopic-t-1110868.html
https://bugzilla.mozilla.org/show_bug.cgi?id=1624110
Which is also firefox 74+

I'd guess could force apulse for alsa as a "solution" (I imagine native alsa support will keep degrading in firefox until complete removal unless Mozilla changes stance), or at least until firefox fixes it.
Comment 2 Jonas Stein gentoo-dev 2020-04-10 21:06:26 UTC
do you report this for www-client/firefox-74.0.1?
Have you tried www-client/firefox-75 too?
Comment 3 Martin Doucha 2020-04-10 23:32:34 UTC
Yes, same results on www-client/firefox 74 and 75.
Comment 4 Kajzer 2020-04-11 22:15:42 UTC
I wouldn't force apulse as long as Alsa works.
One site with a problem isn't really a problem, I'm sure there are people who don't care about that site.
USE flag 'apulse' could be optional though.
Comment 5 Marian Kyral 2020-04-12 08:05:00 UTC
There are more sites and number will probably increase. But I don't like apulse as well. I had to use with old Skype an it was pain. Sound works, but KDE session management always started Skype without apulse so I had to re-run it with apulse.
Comment 6 Thomas Deutschmann (RETIRED) gentoo-dev 2020-10-10 17:42:23 UTC
I don't know what to do with this bug. What is the issue? What do you want us to do? Is this still a problem with latest www-client/firefox-78.3.1 or newer?
Comment 7 segmentation fault 2020-11-02 21:54:01 UTC
(In reply to Thomas Deutschmann from comment #6)
> I don't know what to do with this bug. What is the issue? What do you want
> us to do? Is this still a problem with latest www-client/firefox-78.3.1 or
> newer?

I can confirm similar problems with firefox 78.4.0. And yes, there is something that you, as the ebuild developer, can do, but I was not sure if it fitted 100% here, so I put my suggestion in a new bug: https://bugs.gentoo.org/752387 .
Comment 8 Martin Doucha 2020-11-21 20:37:31 UTC
(In reply to Thomas Deutschmann from comment #6)
> I don't know what to do with this bug. What is the issue? What do you want
> us to do? Is this still a problem with latest www-client/firefox-78.3.1 or
> newer?

Yes, the bug is still present in www-client/firefox-83.0 as well. The least you could do is add a warning (ewarn) that audio may not work on some websites if firefox is built with -pulseaudio.