diff --git a/examples/demo/demo.ts b/examples/demo/demo.ts index f616cdef1b..1b562c2768 100644 --- a/examples/demo/demo.ts +++ b/examples/demo/demo.ts @@ -43,7 +43,7 @@ const state = { isFrontFacing: false, encoder: new TextEncoder(), decoder: new TextDecoder(), - defaultDevices: new Map(), + defaultDevices: new Map([['audioinput', 'default']]), bitrateInterval: undefined as any, e2eeKeyProvider: new ExternalE2EEKeyProvider(), }; @@ -440,7 +440,6 @@ const appActions = { } if (currentRoom) { - console.log('handling device select due to change in select element'); await currentRoom.switchActiveDevice(kind, deviceId); } }, @@ -500,7 +499,6 @@ function handleChatMessage(msg: ChatMessage, participant?: LocalParticipant | Re function participantConnected(participant: Participant) { appendLog('participant', participant.identity, 'connected', participant.metadata); - console.log('tracks', participant.trackPublications); participant .on(ParticipantEvent.TrackMuted, (pub: TrackPublication) => { appendLog('track was muted', pub.trackSid, participant.identity); @@ -871,7 +869,6 @@ const elementMapping: { [k: string]: MediaDeviceKind } = { } as const; async function handleDevicesChanged() { - console.log('devices changed'); Promise.all( Object.keys(elementMapping).map(async (id) => { const kind = elementMapping[id]; @@ -880,14 +877,12 @@ async function handleDevicesChanged() { } const devices = await Room.getLocalDevices(kind); const element = $(id); - console.log('default device', kind, state.defaultDevices.get(kind)); populateSelect(element, devices, state.defaultDevices.get(kind)); }), ); } async function handleActiveDeviceChanged(kind: MediaDeviceKind, deviceId: string) { - console.trace('active device changed to', kind, deviceId); state.defaultDevices.set(kind, deviceId); const devices = await Room.getLocalDevices(kind); const element = $( diff --git a/src/room/Room.ts b/src/room/Room.ts index 022493038c..de0f9c64d9 100644 --- a/src/room/Room.ts +++ b/src/room/Room.ts @@ -1658,7 +1658,6 @@ class Room extends (EventEmitter as new () => TypedEmitter) // check for available devices, but don't request permissions in order to avoid prompts for kinds that haven't been used before const availableDevices = await DeviceManager.getInstance().getDevices(undefined, false); - console.log({ previousDevices, availableDevices }); const browser = getBrowser(); if (browser?.name === 'Chrome' && browser.os !== 'iOS') { for (let availableDevice of availableDevices) { diff --git a/src/room/participant/LocalParticipant.ts b/src/room/participant/LocalParticipant.ts index 42b77328e6..8ae667ab84 100644 --- a/src/room/participant/LocalParticipant.ts +++ b/src/room/participant/LocalParticipant.ts @@ -478,7 +478,6 @@ export default class LocalParticipant extends Participant { break; case Track.Source.Microphone: - console.log('acquiring mic with', options ?? true); localTracks = await this.createTracks({ audio: (options as AudioCaptureOptions | undefined) ?? true, }); @@ -589,8 +588,6 @@ export default class LocalParticipant extends Participant { const constraints = constraintsForOptions(mergedOptions); let stream: MediaStream | undefined; try { - console.log('acquiring media devices with', constraints); - stream = await navigator.mediaDevices.getUserMedia(constraints); } catch (err) { if (err instanceof Error) { diff --git a/src/room/track/LocalTrack.ts b/src/room/track/LocalTrack.ts index 6d2e16a5a5..a736389958 100644 --- a/src/room/track/LocalTrack.ts +++ b/src/room/track/LocalTrack.ts @@ -129,7 +129,6 @@ export default abstract class LocalTrack< } private async setMediaStreamTrack(newTrack: MediaStreamTrack, force?: boolean) { - console.trace('setting new media stream track'); if (newTrack === this._mediaStreamTrack && !force) { return; }