mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-16 12:42:06 +00:00
use loadeddata instead of loadedmetadata
send event closer to actual initial start time of video
This commit is contained in:
@ -29,7 +29,7 @@ function setup() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function injectListener() {
|
function injectListener() {
|
||||||
document.querySelector('video').addEventListener('loadedmetadata', () => {
|
document.querySelector('video').addEventListener('loadeddata', () => {
|
||||||
const data = api.getPlayerResponse();
|
const data = api.getPlayerResponse();
|
||||||
ipcRenderer.send("song-info-request", JSON.stringify(data));
|
ipcRenderer.send("song-info-request", JSON.stringify(data));
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user