Reputation: 8178
I have an audio player I built with HTML5 and JavaScript.
Clicking on the play button tells JavaScript to play the audio and change the src on the play button image (play.svg) to the pause.svg icon. The slowness here is noticeable. Takes time to go to the server and fetch that image.
What's a faster way to change the play button to a pause button?
Upvotes: 0
Views: 447
Reputation: 2932
The question is quite broad, but to give you some ideas:
Without seeing your code I don't know what the best solution for you is but one of these options should cover what you are looking for.
Upvotes: 4