Coder Social home page Coder Social logo

Comments (20)

Keavon avatar Keavon commented on May 19, 2024 1

Detecting the problem when it does show up and dealing with it, instead of leaving a black screen and having to check the console, would definitely be the best user experience!

from karaoke-rs.

tarkah avatar tarkah commented on May 19, 2024 1

I think I like this message better :P

image

from karaoke-rs.

tarkah avatar tarkah commented on May 19, 2024 1

Good call, thanks for the help!

image002

from karaoke-rs.

tarkah avatar tarkah commented on May 19, 2024

Yeah I'm aware of this one... There really is no way around it that isn't ridiculously hacky that I could find. You'll just have to load the index page first, then click on the player link in the header. Loading the player page directly doesn't give you time to interact with the page, preventing the audio from automatically playing.

from karaoke-rs.

tarkah avatar tarkah commented on May 19, 2024

If you do load the player page directly, you can click on the background very fast and it'll register as an interaction and everything will work fine.

from karaoke-rs.

tarkah avatar tarkah commented on May 19, 2024

Firefox doesn't have this restriction

from karaoke-rs.

Keavon avatar Keavon commented on May 19, 2024

It's not pretty but I would suggest adding a graceful handling of this that adds a button to "load" the player when necessary.

from karaoke-rs.

tarkah avatar tarkah commented on May 19, 2024

Hmmm, I'll have to think about this. It'd be easy to add, but navigating to the page by clicking the link in the header already circumvents this problem. And for browsers like Firefox where this isn't an issue, the extra button would be pointless.

At the same time though, it's undefined behavior that may trip people up even if it's documented somewhere to always navigate through the link.

from karaoke-rs.

tarkah avatar tarkah commented on May 19, 2024

I guess I can only create the button in scenarios where this is an issue (check if AudioContext is in a suspended state after being created). So I'll definitely add this and make it only appear when applicable.

from karaoke-rs.

tarkah avatar tarkah commented on May 19, 2024

Agreed! I'll look into this over the next few days. Thanks for opening this!

from karaoke-rs.

tarkah avatar tarkah commented on May 19, 2024

@Keavon, see #23.

It creates the following modal, only if AudioContext is suspended due to the above problem. Once closed, song playback will resume appropriately. Any recommendations on what the message should say, or if it should be displayed / styled differently would be appreciated.

image

from karaoke-rs.

Keavon avatar Keavon commented on May 19, 2024

Here's a couple options for text and [button] names.

  • "Ready to load player. [Begin]"
  • "Get ready for some karaoke! [Load Player]"

For styling, maybe keep it centered at 50% horizontally and vertically, give it some rounded corners, a single line of text with the button to the right or maybe below the text, and a color theme that fits the beautiful background imagery/logo (perhaps a border or box-shadow that fits with the look of the neon tubes).

from karaoke-rs.

tarkah avatar tarkah commented on May 19, 2024

Awesome suggestions, thanks!

from karaoke-rs.

tarkah avatar tarkah commented on May 19, 2024

How's this?

image

from karaoke-rs.

Keavon avatar Keavon commented on May 19, 2024

The second iteration looks much nicer! I'd still suggest a thicker outline (like the thickness of the neon tubes) and maybe a more rounded outer border. And see if it's possible to add the glow (pink shadow) on the inside too with https://css-tricks.com/snippets/css/css-box-shadow/

from karaoke-rs.

tarkah avatar tarkah commented on May 19, 2024

Ahh, I see what you're going for :)

from karaoke-rs.

tarkah avatar tarkah commented on May 19, 2024

Getting closer...

image

from karaoke-rs.

Keavon avatar Keavon commented on May 19, 2024

Nice! Maybe shrink the width of the shadow and make it more transparent so emphasize the solid border but just give it a subtle glow.

from karaoke-rs.

tarkah avatar tarkah commented on May 19, 2024

Think I finally landed on something I like

chrome_nlxvKxdcfJ

from karaoke-rs.

Keavon avatar Keavon commented on May 19, 2024

Lovely! Final small suggestion, make the button text larger and maybe see also if bolding the button text looks nicer.

from karaoke-rs.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.