mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 05:07:41 +00:00
GUACAMOLE-905: Automatically resume AudioContext when recording starts.
The AudioContext is paused by default in Google Chrome as a defense against autoplay. It can be explicitly resumed with resume() as long as there has been enough interaction with the page.
This commit is contained in:
@@ -435,6 +435,11 @@ Guacamole.RawAudioRecorder = function RawAudioRecorder(stream, mimetype) {
|
||||
source = context.createMediaStreamSource(stream);
|
||||
source.connect(processor);
|
||||
|
||||
// Attempt to explicitly resume AudioContext, as it may be paused
|
||||
// by default
|
||||
if (context.state === 'suspended')
|
||||
context.resume();
|
||||
|
||||
// Save stream for later cleanup
|
||||
mediaStream = stream;
|
||||
|
||||
|
Reference in New Issue
Block a user