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.
@@ -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;
