AudioContext.js 289 B

12345678910111213141516171819202122232425
  1. var context;
  2. var AudioContext = {
  3. getContext: function () {
  4. if ( context === undefined ) {
  5. context = new ( window.AudioContext || window.webkitAudioContext )();
  6. }
  7. return context;
  8. },
  9. setContext: function ( value ) {
  10. context = value;
  11. }
  12. };
  13. export { AudioContext };
粤ICP备19079148号