-
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? |
Beta Was this translation helpful? Give feedback.
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(); |
Beta Was this translation helpful? Give feedback.
-
Has anyone got this to work with a webrtc stream? We are using the webrtc-player from Softvelum. Analyzer gets created. Sources look to be connected. Just no visualizations. AudioContext claims it is running. Thoughts? |
Beta Was this translation helpful? Give feedback.
It should be possible to use the remote stream as the
srcObject
of an HTMLAudioElement object and connect this object to audioMotion.