Skip to content
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

Improvements in sound player #1720

Open
1 of 6 tasks
ffont opened this issue Dec 18, 2023 · 0 comments
Open
1 of 6 tasks

Improvements in sound player #1720

ffont opened this issue Dec 18, 2023 · 0 comments
Labels
Bug Something that doesn't work as it should Improvement A functional improvement to an existing feature, that isn't urgently a bug New feature Something that doesn't yet exist in Freesound

Comments

@ffont
Copy link
Member

ffont commented Dec 18, 2023

Some ideas for improvements/fixes for the sound player:

  • Add a loading indicator after clicking the play button and before the sound is ready to play.
  • Issue with player in safari, not playing sounds from the start when having been played once, and doing weird things with the playhead position. E.g. https://freesound.org/people/kramsttop/sounds/170910/

This seems to happen on "oldish" desktop MacOS systems only. It can be fixed by calling audioElement.load() before calling audioElement.play() again once the sound has already been played, but this triggers a reload of the data (which I'm not sure if it uses cache or not). In any case, this is the best solution so far and the one we implemented. We only use it when we detect a desktop macOS system (there also seems to be no way to distinguish old macs from newer macs).

  • Issue with playhead position in Safari which seems to glitch quite a lot

I tried quite hard to fix that but I don't seem to find a way to do it. The audioElement.currentTime value returned by Safari makes sudden jumps (it goes back unexpectedly) and therefore it is impossible to know where the playhead should be positioned. We'd probably need a completely different player implementation using web audio API...

  • Add a volume slider when hovering the player and holding some key combination?
  • While adding the volume player, we might plan for adding extra controls in the future like pitch (?)
  • When a player is loaded, request information related to the particular sound and the logged user (e.g. if the user already rated the sound and which rating was given, or if the sound is bookmarked) so that we can show the user rating instead of the global rating and the bookmark button opened/closed. This means many more requests made to the server, so it should be though carefully how to design the way to get this information. Most likely it could be a single request the retrieves information for all sound players in a page (?).
@ffont ffont added Bug Something that doesn't work as it should New feature Something that doesn't yet exist in Freesound Improvement A functional improvement to an existing feature, that isn't urgently a bug labels Dec 18, 2023
@ffont ffont added this to To do in Bugs, optimizations and maintenance via automation Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something that doesn't work as it should Improvement A functional improvement to an existing feature, that isn't urgently a bug New feature Something that doesn't yet exist in Freesound
Projects
No open projects
Development

No branches or pull requests

1 participant