question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Prevent "use desktop/electron app" error message ...when using that app!

See original GitHub issue

Describe 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

  1. Start the Openwhyd Desktop App (you can download the latest versionfrom https://openwhyd.org/download)
  2. Open the following posted track from the App: https://openwhyd.org/c/53035251200c8a63270004b3
  3. 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:

Capture d’écran 2020-03-15 à 11 10 04

You can find the implementation of that error message in whydPlayer.js

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
compiutacommented, Mar 22, 2020

@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.

1reaction
compiutacommented, Mar 21, 2020

I will try out your suggestions and get back to you later 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to avoid warning for signed electron app for Windows?
I sign it on CI with certificate from www.digicert.com. But when users try to install it, they get a warning "Windows protected your...
Read more >
App Starts and Stops Immediately Without Launching Window ...
Adding ELECTRON ENABLE LOGGING=true doesn't change the app behavior but simply increasing chances for more info gets printed to console which ...
Read more >
Security | Electron
A set of guidelines for building secure Electron apps.
Read more >
Desktop Applications in Electron: Pro Tips and Tricks - InfoQ
So Electron is a way to build desktop applications that run on Mac and Linux and Windows PCs using web technologies. So we...
Read more >
Prevent System from Entering Sleep mode in ElectronJS
ElectronJS is an Open Source Framework used for building Cross-Platform native desktop applications using web technologies such as HTML, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found