use loadedmetadata instead of loadeddata

This commit is contained in:
Araxeus
2021-11-01 20:03:57 +02:00
parent b1ffd93bc2
commit 7b9415033f

View File

@ -11,7 +11,7 @@ ipcRenderer.on("update-song-info", async (_, extractedSongInfo) => {
module.exports = () => {
document.addEventListener('apiLoaded', e => {
document.querySelector('video').addEventListener('loadeddata', () => {
document.querySelector('video').addEventListener('loadedmetadata', () => {
const data = e.detail.getPlayerResponse();
ipcRenderer.send("song-info-request", JSON.stringify(data));
});