-
Notifications
You must be signed in to change notification settings - Fork 64
Tighten the condition for audio playback to continue across pages #2147
Conversation
Storybook and Tailwind configuration previews: Ready Storybook: https://wordpress.github.io/openverse-frontend/_preview/2147 Please note that GitHub pages takes a little time to deploy newly pushed code, if the links above don't work or you see old versions, wait 5 minutes and try again. You can check the GitHub pages deployment action list to see the current status of the deployments. |
Size Change: -3.96 kB (0%) Total Size: 890 kB
ℹ️ View Unchanged
|
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.
Wouldn't we need to add the same handling to the VGlobalAudioTrack
?
Since the bug report was for the desktop UX, I kept the changes focused around that. It later occurred to me that this fix is not needed for the global audio player for these reasons: The user cannot play a track from the mixed media results on mobile. The boxed audio player does not show that control. If the user does open a track single result page and play an audio, going back stops the playback and hides global the audio player. Not a problem. If you narrow down to just audio results, playing a track from the results is now possible. In this case, if you play a track, the global audio player is shown and remains visible if you navigate to any other page. So it's okay to continue the playback as it can be paused by the user. PS: There is an edge case issue that the global audio player remains visible across the site if you play a track and jump to the homepage using the logo but bringing that into the scope of this issue will prevent us from fixing the more likely issue. Also there has to be a way to handle all these audio shenanigans using a cleaner solution so I want to keep this fix simple. |
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.
The audio stops immediately 👍
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.
LGTM. Appreciate the deliberate blocking of scope creep.
Fixes
Fixes #2118 by @obulat
Description
This PR tightens the condition that allows playback to continue by using the router matching composable. This fixes the condition where audio playback would continue on any page.
Testing Instructions
Checklist
Update index.md
).main
) ora parent feature branch.
errors.
Developer Certificate of Origin
Developer Certificate of Origin