Merge pull request #43 from LoveEevee/fix-audioctx-safari

SoundBuffer: Fix AudioContext on Safari
This commit is contained in:
Bui 2018-10-06 20:06:27 +01:00 committed by GitHub
commit c0db4119a9

View File

@ -1,5 +1,6 @@
class SoundBuffer{
constructor(){
var AudioContext = window.AudioContext || window.webkitAudioContext
this.context = new AudioContext()
pageEvents.once(window, "click").then(() => {
if(this.context.state == "suspended"){