tvillarete / ipod-classic-js

An iPod Classic emulator that connects to Apple Music and Spotify. Built with React & Styled Components
http://tannerv.com/ipod
MIT License
1.43k stars 100 forks source link

js(useAudioPlayer): Add `activateElement` function to playSpotify #125

Closed tvillarete closed 1 year ago

tvillarete commented 1 year ago

This is a small fix for Spotify playback on iOS. When playing a song for the first time, it wouldn't start without pressing the play button again once you're on the now playing screen.

I've added a function called activateElement described in the Spotify player docs. This will be invoked when the user plays any song and will allow songs to be played without needing users to press play again