Merge pull request #1215 from picklesrus/speech-extension-audiocontext

Add webkitAudioContext if AudioContext does not exist. This might fix…
This commit is contained in:
Ray Schamp authored and GitHub committed 2018-06-07 10:53:45 -04:00
commit 7de83bea07
1 file changed
+2 -1
+2 -1
View File
@@ -546,7 +546,8 @@ class Scratch3SpeechBlocks {
* @private
*/
_initializeMicrophone () {
this._context = new AudioContext();
// Safari still needs a webkit prefix for audio context
this._context = new (window.AudioContext || window.webkitAudioContext)();
this._audioPromise = navigator.mediaDevices.getUserMedia({
audio: {
echoCancellation: true,