0

is there a way to access the HTMLMediaElement from a Howler.js sound? I need the HTMLMediaElement for the WebAudioAPI.

Current Code:

this.audio = new Howl({
    src: this.url
})
Lucas_Okkk
  • 33
  • 3
  • Howler.js is an abstraction built on top of the Web Audio API and HTML5 Audio. Is there a reason why you're not just using the Web Audio API directly? – Julia Feb 11 '22 at 21:50
  • @Julia I cannot use the Web Audio API directly because i need to get the source of the sound, and i need a HTMLMediaElement for that. let source = this.context.createMediaElementSource(audio); – Lucas_Okkk Feb 11 '22 at 21:59

1 Answers1

0

For anyone like me still looking:

var node = audio._sounds[0]._node
//node is an HTMLAudioElement

Found it from here.