Comments (20)
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.
I think I like this message better :P
from karaoke-rs.
Good call, thanks for the help!
from karaoke-rs.
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.
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.
Firefox doesn't have this restriction
from karaoke-rs.
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.
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.
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.
Agreed! I'll look into this over the next few days. Thanks for opening this!
from karaoke-rs.
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.
from karaoke-rs.
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.
Awesome suggestions, thanks!
from karaoke-rs.
How's this?
from karaoke-rs.
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.
Ahh, I see what you're going for :)
from karaoke-rs.
Getting closer...
from karaoke-rs.
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.
Think I finally landed on something I like
from karaoke-rs.
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)
- Project listed on GitHub
- Parse song file name as "[Artist] - [Title]" HOT 2
- Add settings page to website to edit player configuration options HOT 1
- Web player websocket port and handshake issues HOT 18
- Panic when occasionally loading a web player song HOT 27
- Add notification when player can't decode song HOT 3
- Option to display video scaled to full screen size without color-changing background HOT 12
- Option to set web server port HOT 1
- Error when opening web player HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from karaoke-rs.