use loadeddata instead of loadedmetadata

send event closer to actual initial start time of video
This commit is contained in:
Araxeus
2021-10-23 16:21:42 +03:00
parent 2224786478
commit 978aca1f9a

View File

@ -29,7 +29,7 @@ function setup() {
}
function injectListener() {
document.querySelector('video').addEventListener('loadedmetadata', () => {
document.querySelector('video').addEventListener('loadeddata', () => {
const data = api.getPlayerResponse();
ipcRenderer.send("song-info-request", JSON.stringify(data));
});