Hi i’m fairly new to javascript and I’m having a problem with my async function inside the AddEventListener method that is not awaiting the fetch result, so when i try to console.log(track_info.tracks) it prints out undefined. Answer Solution You need to add an await to the call of getTrack. var track_info = await getTrack(urlTrack); Helpful Tips How to await fetch
Tag: spotify
How to play and pause Spotify embed with JAVASCRIPT?
Can someone explain me how can I play and pause this spotify embed object? I have tried to find the id of the player but I couldn’t. URL → https://open.spotify.com/embed-podcast/show/5iKz9gAsyuQ1xLG6MFLtQg This is the iframe code: Thanks!! Answer It is odd that I couldn’t find this documented anywhere, but I was able to look through the embed code to figure out
Getting OAuthCallbackError with nextjs Auth
I am trying to make a spotify analysis app that would analyse your Spotify data. But I am getting this error on authorization. Here is my auth file. this is my middleware this is my login.js It would be really great if someone could help me out here. Everytime I am trying to login,it’s throwing me this error.(http://localhost:3000/login?callbackUrl=http://localhost:3000/&error=OAuthCallback) Answer I
Chrome identity API spotify oauth2 login
I’m trying to implement spotify login in my chrome extension but I get always this error and I’m able to see the auth window only when the browser is loaded for the first time. This is the code I’m using Is there any fix? I just want to access the spotify API to play users playlist in my chrome ext