Skip to content

Commit

Permalink
Add url to song info
Browse files Browse the repository at this point in the history
  • Loading branch information
th-ch committed Mar 28, 2021
1 parent f01ef5d commit 64c2b32
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions providers/song-info.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ const songInfo = {
isPaused: true,
songDuration: 0,
elapsedSeconds: 0,
url: "",
};

const handleData = async (_event, responseText) => {
Expand All @@ -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) => {
Expand Down

0 comments on commit 64c2b32

Please sign in to comment.