Hi, how are you?
I’m facing a problem with audio.
I see a example of audio.onEnded that I need to override, but I can’t acess .source of audio because it says ‘undefined’.
this.audioLoader.load(soundPath, ( buffer ) => {
this.soundVoice = new THREE.Audio(listener);
this.soundVoice.setBuffer( buffer );
this.soundVoice.play();
console.log(this.soundVoice.source); //returns undefined
}
Mugen87
September 8, 2019, 9:18am
2
Are there any warnings in the browser console? It seems that Audio.source gets not set in Audio.play()
for some reasons.
BTW: It seems to work fine in this live demo: https://jsfiddle.net/a5sd0tkj/
Man, lol. I woke up and I ran the code without change anything and the audio.source just worked.
I’m not crazy, I swear hahah. Thanks for your attention.
1 Like
Mugen87
September 8, 2019, 1:45pm
4
I’m happy it’s not a bug in THREE.Audio
1 Like