Merge pull request #1215 from picklesrus/speech-extension-audiocontext
Add webkitAudioContext if AudioContext does not exist. This might fix…
This commit is contained in:
1 file changed
+2
-1
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user