Use StartAudioContext to fix mobile safari audio contexts

This commit is contained in:
Paul Kaplan committed 2017-08-15 09:18:21 -04:00
1 parent 59968ba031
commit 70587a3f2e
2 files changed
+5

No files matched your search

+1
View File
@@ -88,6 +88,7 @@
"scratch-storage": "^0.2.0",
"scratch-vm": "latest",
"selenium-webdriver": "^3.5.0",
"startaudiocontext": "1.2.1",
"style-loader": "^0.18.0",
"svg-to-image": "1.1.3",
"svg-url-loader": "2.1.0",
+4
View File
@@ -1,5 +1,9 @@
import StartAudioContext from 'startaudiocontext';
const AUDIO_CONTEXT = new (window.AudioContext || window.webkitAudioContext)();
StartAudioContext(AUDIO_CONTEXT);
/**
* Wrap browser AudioContext because we shouldn't create more than one
* @return {AudioContext} The singleton AudioContext