in customer/src/customer/index.js [190:208]
async function initializeMeetingSession() {
const logger = new ConsoleLogger('ChimeMeetingLogs', LogLevel.INFO);
const deviceController = new DefaultDeviceController(logger);
const configuration = new MeetingSessionConfiguration(meeting, customerAttendee);
meetingSession = new DefaultMeetingSession(configuration, logger, deviceController);
meetingSession.audioVideo.addObserver(observer);
try {
domHide('meeting-info');
const audioInputs = await meetingSession.audioVideo.listAudioInputDevices();
await meetingSession.audioVideo.chooseAudioInputDevice(audioInputs[0].deviceId);
const videoInputs = await meetingSession.audioVideo.listVideoInputDevices();
await meetingSession.audioVideo.chooseVideoInputDevice(videoInputs[0].deviceId);
} catch (err) {
// handle error - unable to acquire audio device perhaps due to permissions blocking
console.log("Failed to access the audio video devices might be due permissions blocking");
}
meetingSession.audioVideo.bindAudioElement(domElement('customer-audio'));
meetingSession.audioVideo.start();
}