mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 10:31:47 +00:00
use loadedmetadata instead of loadeddata
This commit is contained in:
@ -11,7 +11,7 @@ ipcRenderer.on("update-song-info", async (_, extractedSongInfo) => {
|
|||||||
|
|
||||||
module.exports = () => {
|
module.exports = () => {
|
||||||
document.addEventListener('apiLoaded', e => {
|
document.addEventListener('apiLoaded', e => {
|
||||||
document.querySelector('video').addEventListener('loadeddata', () => {
|
document.querySelector('video').addEventListener('loadedmetadata', () => {
|
||||||
const data = e.detail.getPlayerResponse();
|
const data = e.detail.getPlayerResponse();
|
||||||
ipcRenderer.send("song-info-request", JSON.stringify(data));
|
ipcRenderer.send("song-info-request", JSON.stringify(data));
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user