mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 18:41:47 +00:00
Add url to song info
This commit is contained in:
@ -39,6 +39,7 @@ const songInfo = {
|
|||||||
isPaused: true,
|
isPaused: true,
|
||||||
songDuration: 0,
|
songDuration: 0,
|
||||||
elapsedSeconds: 0,
|
elapsedSeconds: 0,
|
||||||
|
url: "",
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleData = async (_event, responseText) => {
|
const handleData = async (_event, responseText) => {
|
||||||
@ -50,6 +51,7 @@ const handleData = async (_event, responseText) => {
|
|||||||
songInfo.songDuration = data?.videoDetails?.lengthSeconds;
|
songInfo.songDuration = data?.videoDetails?.lengthSeconds;
|
||||||
songInfo.image = await getImage(songInfo.imageSrc);
|
songInfo.image = await getImage(songInfo.imageSrc);
|
||||||
songInfo.uploadDate = data?.microformat?.microformatDataRenderer?.uploadDate;
|
songInfo.uploadDate = data?.microformat?.microformatDataRenderer?.uploadDate;
|
||||||
|
songInfo.url = data?.microformat?.microformatDataRenderer?.urlCanonical;
|
||||||
};
|
};
|
||||||
|
|
||||||
const registerProvider = (win) => {
|
const registerProvider = (win) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user