A music player that connects to your cloud/distributed storage.
5
fork

Configure Feed

Select the types of activity you want to include in your feed.

Unlock audio context

+13
+13
src/Javascript/audio-engine.js
··· 41 41 } 42 42 43 43 44 + function unlockAudioContext() { 45 + if (context.state !== "suspended") return 46 + const b = document.body 47 + const events = [ "touchstart", "touchend", "mousedown", "keydown" ] 48 + events.forEach(e => b.addEventListener(e, unlock, false)) 49 + function unlock() { context.resume().then(clean) } 50 + function clean() { events.forEach(e => b.removeEventListener(e, unlock)) } 51 + } 52 + 53 + 54 + unlockAudioContext() 55 + 56 + 44 57 45 58 // Container for <audio> elements 46 59 // ------------------------------