I’m developing a streaming radio in 3D, and I’m sending music as a PeerConnection to my clients attaching a THREE.AudioAnalyser()
to display 3D bars that move according to frequencies.
Sound is working great in all platforms, but THREE.AudioAnalyser()
with an input source of stream type only works on Chrome, Safari is not working at all
var listener = new THREE.AudioListener();
var audio = new THREE.Audio( listener );
audio.setMediaStreamSource( stream );
audioAnalyser = new THREE.AudioAnalyser( audio, 128 );
function loop(){
//This should contain an Array of Integers
console.log(audioAnalyser.getFrequencyData());
}
What could be causing this issue? It seems to work everywhere but not on Safari, and also it only seems to fail when the source is a stream.