|
I've built a video/audio chatting web app using PeerJS for WebRTC connections. I'm currently using audio-motion to visualize local audio from the user's microphone, which works well. However, I'm having trouble visualizing the audio from remote streams received from other peers. Is it possible to use audio-motion to visualize these remote audio streams? If so, what's the best approach to connect a remote MediaStream to audio-motion for visualization? My current setup:
Any guidance on how to properly set up audio-motion with remote WebRTC streams would be greatly appreciated. If audio-motion isn't suitable for this use case, are there any alternative libraries you'd recommend? |
Replies: 2 comments
|
It should be possible to use the remote stream as the const audio = new Audio();
audio.srcObject = yourRemoteStream;
audioMotion.connectInput( audio );
audio.play(); |


It should be possible to use the remote stream as the
srcObjectof an HTMLAudioElement object and connect this object to audioMotion.