WebAudioTrack
WebAudioTrack copied to clipboard
Recording does not work on Chrome M71
I can confirm this is an issue, and that @Jaikant's proposed fix does indeed solve the problem.
I am not much of a JavaScript expert but I believe that audioContext.resume() is an asynchronous function and should be called like this:
this.context.resume().then(function() {
/* proceed */
});
It might also be good to check the state of the audioContext prior to resuming it, like this:
if (this.context.state === 'suspended') {
this.context.resume().then(function() {
/* proceed */
});
}
However, I have spent some time trying to implement that in WebAudioTrack and haven't had any luck. So, I am just going to implement the change as @Jaikant submitted it, as that seems to be working in 100% of cases for me.