From 0e09affb8f623483bbe060c39c7842e19139a0d6 Mon Sep 17 00:00:00 2001 From: Dan Shaw Date: Thu, 6 Jun 2024 14:16:55 -0700 Subject: [PATCH] Remove debug logging from Engine Connection (#2623) * Remove debug logging from Engine Connection Left console.log('connectionstatechange: ' + event.target?.connectionState) intentionally * Bring that beat back @lf94 request that we keep this one and also make sure it's in coredump. --- src/lang/std/engineConnection.ts | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/lang/std/engineConnection.ts b/src/lang/std/engineConnection.ts index 0467d6656..5463e9cb1 100644 --- a/src/lang/std/engineConnection.ts +++ b/src/lang/std/engineConnection.ts @@ -312,8 +312,6 @@ class EngineConnection extends EventTarget { if (next.type === EngineConnectionStateType.Disconnecting) { const sub = next.value if (sub.type === DisconnectingType.Error) { - console.log(sub) - // Record the last step we failed at. // (Check the current state that we're about to override that // it was a Connecting state.) @@ -756,8 +754,6 @@ class EngineConnection extends EventTarget { // when assuming we're the only consumer or that all messages will // be carefully formatted here. - console.log(event) - if (typeof event.data !== 'string') { return } @@ -778,7 +774,6 @@ class EngineConnection extends EventTarget { `Error in response to request ${message.request_id}:\n${errorsString} failed cmd type was ${artifactThatFailed?.commandType}` ) - console.log(artifactThatFailed) } else { console.error(`Error from server:\n${errorsString}`) } @@ -869,7 +864,6 @@ class EngineConnection extends EventTarget { this.pc ?.createOffer() .then((offer: RTCSessionDescriptionInit) => { - console.log(offer) this.state = { type: EngineConnectionStateType.Connecting, value: { @@ -941,7 +935,6 @@ class EngineConnection extends EventTarget { case 'trickle_ice': let candidate = resp.data?.candidate - console.log('trickle_ice: using this candidate: ', candidate) void this.pc?.addIceCandidate(candidate as RTCIceCandidateInit) break @@ -1344,8 +1337,6 @@ export class EngineCommandManager extends EventTarget { this.engineConnection?.addEventListener( EngineConnectionEvents.NewTrack, (({ detail: { mediaStream } }: CustomEvent) => { - console.log('received track', mediaStream) - mediaStream.getVideoTracks()[0].addEventListener('mute', () => { console.error( 'video track mute: check webrtc internals -> inbound rtp' @@ -1676,7 +1667,6 @@ export class EngineCommandManager extends EventTarget { command.type === 'modeling_cmd_req' && command.cmd.type !== lastMessage ) { - console.log('sending command', command.cmd.type) lastMessage = command.cmd.type } if (command.type === 'modeling_cmd_batch_req') {