Hi guys, I would like to consume audio coming from <video>
element in a PositionalAudio
node (so it can be placed in the 3d space). I’ve found that Audio
node supports a method setMediaElementSource which works with media elements, the problem is that it is not positional (audio doesn’t change no matter where the listener is). Is there any hack/workaround to make it work with PositionalAudio
instead?
const video = document.getElementById('myVideo');
const listener = new THREE.AudioListener();
camera.add(listener);
const audio = new THREE.Audio(listener); // would like to use PositionalAudio instead
audio.setMediaElementSource(video);