Add url to song info

This commit is contained in:
TC
2021-03-28 22:17:57 +02:00
parent f01ef5d955
commit 64c2b32b24

View File

@ -39,6 +39,7 @@ const songInfo = {
isPaused: true,
songDuration: 0,
elapsedSeconds: 0,
url: "",
};
const handleData = async (_event, responseText) => {
@ -50,6 +51,7 @@ const handleData = async (_event, responseText) => {
songInfo.songDuration = data?.videoDetails?.lengthSeconds;
songInfo.image = await getImage(songInfo.imageSrc);
songInfo.uploadDate = data?.microformat?.microformatDataRenderer?.uploadDate;
songInfo.url = data?.microformat?.microformatDataRenderer?.urlCanonical;
};
const registerProvider = (win) => {