-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shareable combos #563
Comments
Can I do the implementation, or is it already in progress? |
I was thinking to share sound states within the URL, as query params, and get it with /?theme=THEME&sounds=SOUND_ID:VOLUME,SOUND_ID:VOLUME E.g.: /?theme=transition&sounds=rain:1,storm:0.4,drops:0.5 |
Could you make a draft pull request so I can take a look? |
Sure, here #582 |
I made some comments on PR, take a look 😃 Another points: On active: localSoundState.active && localSoundState.loaded, With this The same with isActive={localSoundState.active && localSoundState.loaded} |
I tested on Chrome and got the same error. It appears to be related to Google Chrome's new autoplay policies: https://developer.chrome.com/blog/autoplay/ On Firefox works as expected. |
Another solution could be to show a modal with a "Play" button and a message every time it detects a new combo in the URL, as soon as the user enters the site. |
Looks like on Chrome, the audio cannot autoplay if the user hasn't interacted with the website yet. We need to make user interact before autoplay sound. I think that the solution will be verifying this scenario (a case when user enters a link with shared combo and is on chrome based browser), like const needInteraction = (browser == "chorme") && (querySounds.length) and if this scenario is On the first render, if the useEffect(() => {
if (needInteraction && !userHasInteracted) return
// code...
}, [soundsStore, userHasInteracted]) and {(needInteraction && !userHasInteracted) && <InteractionModal />} |
Yeah, I think it's a good approach in this way |
@maiconloure It's ok, I tried this implementation that I mentioned. Take a look and see if there are any conflicts with your adjusts. |
I checked the implementations and I think that is it, I liked the modal, the only thing missing now would be the button to share the combo. |
from maiconloure/feat/shareable-combo fix #563
Describe new feat
Make combos shareable through URL states
Referencies
The text was updated successfully, but these errors were encountered: