Closed tekkeon closed 11 months ago
Yeah that's actually exactly what this TODO comments was for lol: https://github.com/SynQApp/Extension/pull/14/files#diff-08b2395b22df5b80e3a4d98fcbe616db9a91811741b8a7231f2a6357746a6a4aR396
I'm fixing it in my next PR since I didn't have toggleMute
implemented in the controllers yet lol.
Overview
When you load up Spotify or Amazon Music, the player is already loaded with music ready to go (unlike YouTube and Apple Music). Opening the SynQ mini player and pressing play to get the loaded music going did not work because browsers block audio autoplay without the user first interacting with the page (click, press, keypress, etc). As such, we needed to detect when the player was loaded and ready and then embed a button on the page that the user can press, enabling autoplay. Additionally, using the Spotify and Amazon Music APIs only seem to become enabled once a native button press happens. As such, when the user presses the embedded button, the extension will simulate a click to initialize the players.
Note that this is an edge case. Generally, the user will begin listening to music before opening the mini player, and ideally they'll learn naturally that doing that allows them to not have to deal with this popup. But for the low rate of cases where this does happen, this PR solves it.
User Flow and Screenshots