|
|
@@ -39,6 +39,13 @@ async function init() { |
|
|
|
eventEmitter.emit('mastervolumechange', event.target.value); |
|
|
|
} |
|
|
|
|
|
|
|
document.body.addEventListener('keydown', event => { |
|
|
|
if (event.target !== document.body) return; |
|
|
|
if (event.code === 'Space') { |
|
|
|
playpause(); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
// Load the file |
|
|
|
await playlist.load([{ |
|
|
|
src: document.URL, |
|
|
|