Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
JavaScript
const audioInputDevices = CometChatCalls.getAudioInputDevices(); console.log(audioInputDevices);
const audioOutputDevices = CometChatCalls.getAudioOutputDevices(); console.log(audioOutputDevices);
const videoInputDevices = CometChatCalls.getVideoInputDevices(); console.log(videoInputDevices);
const currentMic = CometChatCalls.getCurrentAudioInputDevice(); console.log("Current microphone:", currentMic);
const currentSpeaker = CometChatCalls.getCurrentAudioOutputDevice(); console.log("Current speaker:", currentSpeaker);
const currentCamera = CometChatCalls.getCurrentVideoInputDevice(); console.log("Current camera:", currentCamera);
CometChatCalls.setAudioInputDevice(deviceId);
CometChatCalls.setAudioOutputDevice(deviceId);
CometChatCalls.setVideoInputDevice(deviceId);
CometChatCalls.addEventListener("onAudioInputDeviceChanged", (device) => { console.log("Microphone changed:", device); }); CometChatCalls.addEventListener("onAudioOutputDeviceChanged", (device) => { console.log("Speaker changed:", device); }); CometChatCalls.addEventListener("onVideoInputDeviceChanged", (device) => { console.log("Camera changed:", device); });
CometChatCalls.addEventListener("onAudioInputDevicesChanged", (devices) => { console.log("Available microphones updated:", devices); }); CometChatCalls.addEventListener("onAudioOutputDevicesChanged", (devices) => { console.log("Available speakers updated:", devices); }); CometChatCalls.addEventListener("onVideoInputDevicesChanged", (devices) => { console.log("Available cameras updated:", devices); });
// Show settings dialog CometChatCalls.showSettingsDialog(); // Hide settings dialog CometChatCalls.hideSettingsDialog();
deviceId
label
kind
audioinput
audiooutput
videoinput
Was this page helpful?