mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-23 14:32:59 -05:00
Add webkitAudioContext if AudioContext does not exist. This might fix the speech extension in safari, but it is tricky to tell since I am running into problems with permissions and localhost.
This commit is contained in:
parent
ca6a7f9311
commit
391f47d100
1 changed files with 2 additions and 1 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue