volume-meter
volume-meter copied to clipboard
Using with chrome ?
I was wondering how one would have to change this to get it working with chrome. For me it works well with Firefox, but on chrome and edge it only asks for mediaStream access but the meter does not animate after that....
I'm having similar problems with Chrome, no issues with Firefox.
Chrome has recently added some user-privacy features, preventing audio contexts from starting before the user has interacted with the page, otherwise the audio context is started in a paused state. You have to either:
- Create the audio context on a user event, like a button click (will work as normal)
- call
audioContext.resume()
on a user event, like a button click
There is a flag you can turn off in Chrome if you absolutely need it to run without user intervention.
Chrome has recently added some user-privacy features, preventing audio contexts from starting before the user has interacted with the page, otherwise the audio context is started in a paused state. You have to either:
- Create the audio context on a user event, like a button click (will work as normal)
- call
audioContext.resume()
on a user event, like a button clickThere is a flag you can turn off in Chrome if you absolutely need it to run without user intervention.
This worked. Thanks