Web Audio API - Sometimes often no sound/audio but not always
Categories
(Firefox for Android :: Media, defect)
Tracking
()
People
(Reporter: slart, Unassigned)
Details
Steps to reproduce:
Teracube 2e
iodé OS Android 11
Firefox 128.0.1 (fenix-128.0.1.multi.android-arm64-v8a.apk)
I have coded a own webpage with a fingerboard for playing sound and a automatic playing the fingerboard. This works on my desktop device every time. But on my mobile device only sometimes. After many reloads of the webpage it works fine. But maybe after the next reload not.
Actual results:
- no sound / audio
- grafic osscilator flat (middle, 50% height).
So, i had installed on my mobile device Firefox 128.0.1 and in this the extension "Mobile DevTools". The console is always empty. No hint, no warning, no error.
I have no idea. Because sometimes it works fine. I am a little bit frustrated, because no hint, no warning, no error and sometimes it works. It is a bad situation, because I don't know if it works by all visitors or not.
Here a copy of the webpage (online to 20240728): https://www.zwixl.de/rsound/
Expected results:
maybe i have found the problem:
- Load/reload the webpage
- First: fingertouch in a empty area
- Next: fingertouch on the fingerboard.
So, it is a OS or browser problem? How solved it?
Comment 1•1 year ago
|
||
The severity field is not set for this bug.
:rsainani, could you have a look please?
For more information, please visit BugBot documentation.
Comment 2•1 year ago
|
||
Hi slart, the website is not reachable, could you provide a working url?
(In reply to Rahul Sainani [:rsainani] from comment #2)
Hi slart, the website is not reachable, could you provide a working url?
I have send you an email.
Updated•1 year ago
|
(In reply to Rahul Sainani [:rsainani] from comment #2)
Hi slart, the website is not reachable, could you provide a working url?
online to 20240831: https://nemumba.uber.space/rsound/
consider: it don't work only, when the first click is directly on the fingerboard. (use the smartphone in landscape)
Comment 5•1 year ago
|
||
The severity field is not set for this bug.
:tthibaud, could you have a look please?
For more information, please visit BugBot documentation.
Comment 6•1 year ago
|
||
Hey Slart,
I've tested on my device, and indeed the sound is not playing on Firefox.
I've tested on Chrome, there's no sound either.
I would suggest that you use directly the about:debugging page on your Firefox Desktop, connected to your Firefox Android, to debug your webpage. You can find the documentation here.
When doing that, I see the following error in the console:
An AudioContext was prevented from starting automatically. It must be created or resumed after a user gesture on the page. rsound:532:17
I'll close this bug as INVALID as this suggests the bug is actually on the webpage. Feel free to respond here if you think this was a mistake.
Hello Titouan Thibaud,
thanks for your answer.
Nothing starts automatically. It's always a user interaction necessary to start AudioContext. (onclick, onchange, oninput, mousedown, mouseover, mouseup, mouseleave, touchstart, touchmove, touchend, touchcancel).
var AudioContext;
var audioContext;
...
function initAudio(streamUrl) {
AudioContext = window.AudioContext || window.webkitAudioContext;
audioContext = new AudioContext();
...
Tested in Firefox (Desktop):
Load webpage
console:
AudioContext
function ()
length: 0
name: "AudioContext"
audioContext
undefined
Example: https://numiba.uber.space/rsound/
Description
•