howler.js
howler.js copied to clipboard
Support for accessing the HTMLAudioElement when using html5 player
Feature Proposal
AFAIK there is no way to access and modify the html5 Audio element
this is a must have feature as without it it is not possible to set attributes that sometime are mandatory for the player to be used like the 'crossorigin' attribute
ATM one has to hack the player API and do something like
if (howl._sounds && howl._sounds[0]._node) {
const audioNode = howl._sounds[0]._node;
audioNode.crossOrigin = "use-credentials";
}
Are there PRs open? or even forked projects?
I could not find anything
thank you
Possible Implementation
No response
I subscribe to this, because it's a real issue : our audio hosting provider invalidates urls and do redirects every 15 minutes to better identify sessions and have more precise analytics, and this is now restricted by Chrome. So if the audio file is longer than 15 minutes, it stops playing a few minutes after the 15min mark. The Chromium team told my hosting provider that we just have to add the attribute crossOrigin="anonymous" to make this work, but since we can't access the audio element...