Open inglesuniversal opened 5 years ago
Hello There - It sounds like what you want is to not preload the audio. You can handle this when you create the howl by setting "preload" to false. Then when you are ready to load the sound, you just call load() on the howl before playing it. Simple example:
var myHowl = new Howl({
src: "file.mp3",
preload: false
});
//sometime later....
myHowl.load();
myHowl.play();
Worked as expected. Have an awesome week!
Now, if I have several play buttons on the same page... How do I stop the last play/pause if I press a different audio button? Do I have to assign an ID to every audio file or radio station?
thanks for the tip
if I have an educational webpage (single webpage) with about 80 mp3 audios to be played throughout the lesson... How can I handle the loading or lazy loading of those files without affecting the payload at launch time or initial page load?
What I mean is not to preload all those file, but load them as they are needed or clicked by the user.
Best regards