|
@@ -72,12 +72,6 @@ export default async function init() { |
|
|
|
|
|
|
|
|
// Bind window hash change to update player |
|
|
// Bind window hash change to update player |
|
|
window.addEventListener('hashchange', async () => { |
|
|
window.addEventListener('hashchange', async () => { |
|
|
if(playlist.isPlaying()) { |
|
|
|
|
|
eventEmitter.emit('stop') |
|
|
|
|
|
// pause needs a small delay, coz the lib doesn't |
|
|
|
|
|
// update player view (drawRequest) when isPlaying() = true. |
|
|
|
|
|
await delay(10); |
|
|
|
|
|
} |
|
|
|
|
|
await syncFragmentToSelection(); |
|
|
await syncFragmentToSelection(); |
|
|
eventEmitter.emit('play'); |
|
|
eventEmitter.emit('play'); |
|
|
}); |
|
|
}); |
|
|