mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 10:31:47 +00:00
use $('video') srcChanged event instead of loadeddata/metadata
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
module.exports = () => {
|
||||
document.addEventListener('apiLoaded', () => {
|
||||
document.querySelector('video').addEventListener('loadeddata', e => {
|
||||
document.querySelector('video').addEventListener('srcChanged', e => {
|
||||
e.target.pause();
|
||||
})
|
||||
}, { once: true, passive: true })
|
||||
|
||||
Reference in New Issue
Block a user