mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-24 15:02:52 -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
|
* @private
|
||||||
*/
|
*/
|
||||||
_initializeMicrophone () {
|
_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({
|
this._audioPromise = navigator.mediaDevices.getUserMedia({
|
||||||
audio: {
|
audio: {
|
||||||
echoCancellation: true,
|
echoCancellation: true,
|
||||||
|
|
Loading…
Reference in a new issue