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

feature: cache sounds #5

Open
marcobiedermann opened this issue Feb 1, 2016 · 4 comments
Open

feature: cache sounds #5

marcobiedermann opened this issue Feb 1, 2016 · 4 comments

Comments

@marcobiedermann
Copy link
Contributor

I would suggest caching the sound effect after the first request.
This will prevent the browser from loading the file more than one time.

loud-links-request

As you can see, I hovered the logo and the sound file got downloaded on every event.

@MahdiF
Copy link
Owner

MahdiF commented Feb 2, 2016

hmmmm, how do you cache sounds?

@marcobiedermann
Copy link
Contributor Author

I'm not quite sure this will work but my suggestion would be something like this:

onhover (look in array for filename)
  if (not exists)
    load sound
    add filename to array
    play sound
  otherwise
    play sound

@shshaw
Copy link
Contributor

shshaw commented Feb 8, 2016

This would be solved by the method I mention under #2

@Oxicode
Copy link

Oxicode commented Feb 11, 2016

+1

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

No branches or pull requests

4 participants