Skip to content

Commit

Permalink
Fix prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
HermanBilous committed Mar 5, 2024
1 parent cd7d13f commit 8b828b6
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions src/room/RTCEngine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -451,8 +451,11 @@ export default class RTCEngine extends (EventEmitter as new () => TypedEventEmit
try {
await this.pcManager.setPublisherAnswer(sd);
} catch (error) {
const errorMessage = error instanceof Error ? error.message : 'unknown error'
log.error(`failed to setPublisherAnswer: ${errorMessage}`, { ...this.logContext, RTCSdpType: sd.type })
const errorMessage = error instanceof Error ? error.message : 'unknown error';
log.error(`failed to setPublisherAnswer: ${errorMessage}`, {
...this.logContext,
RTCSdpType: sd.type,
});
}
};

Expand All @@ -462,10 +465,12 @@ export default class RTCEngine extends (EventEmitter as new () => TypedEventEmit
return;
}
this.log.trace('got ICE candidate from peer', { ...this.logContext, candidate, target });
this.pcManager.addIceCandidate(candidate, target).catch(error => {
this.pcManager.addIceCandidate(candidate, target).catch((error) => {
log.error(`failed to addIceCandidate: ${error.message}`, {
...this.logContext, candidate, target
})
...this.logContext,
candidate,
target,
});
});
};

Expand All @@ -479,10 +484,10 @@ export default class RTCEngine extends (EventEmitter as new () => TypedEventEmit
const answer = await this.pcManager.createSubscriberAnswerFromOffer(sd);
await this.client.sendAnswer(answer);
} catch (error) {
const errorMessage = error instanceof Error ? error.message : 'unknown error'
const errorMessage = error instanceof Error ? error.message : 'unknown error';
log.error(`failed to createSubscriberAnswerFromOffer: ${errorMessage}`, {
...this.logContext
})
...this.logContext,
});
}
};

Expand Down

0 comments on commit 8b828b6

Please sign in to comment.