Prevent "use desktop/electron app" error message ...when using that app!
See original GitHub issueDescribe the bug
A few years ago, Google Chrome prevented videos from being played without user intervention, when the tab is not focused.
In order to not let new users think that Openwhyd is not able to play tracks sequentially because of that new behavior, I decided to pause the playback whenever the user would switch to another track, so that they can see the following recommendation:
Oops, we could not play this track… Please try with Openwhyd Desktop App 👌
Indeed, the “Openwhyd Desktop App” (downloadable from https://openwhyd.org/download) is able to play tracks sequentially, even in the background.
Unfortunately, that same error message is displayed every time a track fails to be played, for any reason, including from the Openwhyd Desktop App itself! 😬
To Reproduce
- Start the Openwhyd Desktop App (you can download the latest versionfrom https://openwhyd.org/download)
- Open the following posted track from the App: https://openwhyd.org/c/53035251200c8a63270004b3
- Play the track, it should display the error message
Expected behavior
When a track fails to play from the Desktop App, it should displayed another error message. Something like:
Oops, we could not play this track…
But, when failing to play that track from openwhyd.org (in Google Chrome), the error message should be left as it currently is. (i.e. invite the user to install the Desktop App)
Screenshots
Here’s what the error looks like:
You can find the implementation of that error message in whydPlayer.js
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (6 by maintainers)
Top GitHub Comments
@adrienjoly I was able to test the electron app locally and a variable that exists in the whydPlayer.js file USING_ELECTRON is actually already detecting if we are in the electron app.
I added it to the if condition let me know if the message is now changing for you when using the electron app or an internet browser.
I will try out your suggestions and get back to you later 👍