-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
Feature Proposal
I'm putting together a web page that receives JSON data containing, among other things, a URL to an MP3. The JSON is pushed via websockets to the page.
When the page first loads I need to play a clip to allow the browser to permit audio so I play a 2 second silent MP3.
Using the solution outlined here:
I can use a single instance of Howler and can change the audio source but the duration does not change so only the first 2 seconds of my clips play.
If I increase the size of the silent MP3 file that I first play to 10 seconds then reload the page, the first 10 seconds of my clips play but they can vary in length from 2 to 60 seconds.
I've tried changing the proposed changeSrc function so that:
self.unload(true);
becomes:
self.unload(false);
but that makes no difference. Is there a way to force Howler to pick up the new duration ?
Possible Implementation
No response