Is it possible to change the audio
# general-english
h
Is it possible to change the audio device for the call when using the Vapi web SDK? We have an issue where the audio stops working when a user changes their audio device (e.g. plugs in their headphones)
k
Yes, you can handle audio device changes in the Vapi Web SDK by using navigator.mediaDevices.ondevicechange and updating the audio output with setSinkId() on the audio element to ensure seamless transitions.
h
Awesome, thanks @Kings_big💫
@Kings_big💫 do you know how I do the equivilent with the camera stream too? I don't see a video element to set the sinkId on
k
Use Tavus’ Conversational Video Interface for video-enabled digital twins, and configure a element in your web application, the sinkId property to set the audio output device for the video stream and ensure the video content is streamed properly to the element..
h
I can't introduce Tavus really so I need to find another way. Thanks for the pointers though
k
2 Views