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

Incapsulate logic of getting file url in Sound manager #7433

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ViktorVovk
Copy link

@ViktorVovk ViktorVovk commented Feb 27, 2025

This PR is intended for a minor refactoring of the howler-sound-manager.

  • Two private methods, _getSoundUrlsFromResource and _getDefaultSoundUrl, have been created to handle the formation of src.
  • In the loadResource method, the preloadAudioFile function was being created each time, despite not using any data from the closure. The preloadAudioFile function has been extracted as a private method.

This minor refactoring can help extend the functionality of the class by inheriting from SoundManager without the need to override much of its implementation.

@ViktorVovk ViktorVovk marked this pull request as ready for review February 27, 2025 14:09
@ViktorVovk ViktorVovk requested a review from 4ian as a code owner February 27, 2025 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant