-
Notifications
You must be signed in to change notification settings - Fork 6
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
MRKT-27: Update for song previews to prevent concurrent playback #681
MRKT-27: Update for song previews to prevent concurrent playback #681
Conversation
Visit the preview URL for this PR (updated for commit 519d5c8): https://newm-artist-portal--pr681-mrkt-27-single-item-gd4yec3r.web.app (expires Sun, 14 Jul 2024 09:13:07 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: ec3483d4c62309afc398865bfd6a9fc9e03e1d46 |
Visit the studio preview URL for this PR 🚀 : https://681.artist.preview.newm.io/ |
import { AudioState } from "./types"; | ||
|
||
const initialState: AudioState = { | ||
audio: undefined, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it better to set this as null?
Visit the tools preview URL for this PR (updated for commit e5a7dc7): |
Visit the wallet preview URL for this PR (updated for commit e5a7dc7): |
Visit the marketplace preview URL for this PR (updated for commit e5a7dc7): |
audio.stop(); | ||
dispatch(resetAudioState()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was having some issues with order of operations for the Howl onstop
callback when switching between song previews, but will revisit one more time to see if I can refactor the state resets.
* refactor: Move audio hook to own package * fix: Set port back to initial value * refactor: Improve use of types to reduce mistypes
Visit the tools preview URL for this PR (updated for commit fb04fcd): |
Visit the wallet preview URL for this PR (updated for commit fb04fcd): |
Visit the marketplace preview URL for this PR (updated for commit fb04fcd): |
Add:
Update:
audio.tsx
to prevent two different components playing song previews at the same time through the hook