|
@@ -39,6 +39,13 @@ async function init() { |
|
|
eventEmitter.emit('mastervolumechange', event.target.value); |
|
|
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 |
|
|
// Load the file |
|
|
await playlist.load([{ |
|
|
await playlist.load([{ |
|
|
src: document.URL, |
|
|
src: document.URL, |
|
|