fix(audio): correct log the time needed for ice gathering
This commit is contained in:
parent
5fcbe5f477
commit
f5713869bf
@ -726,13 +726,18 @@ class SIPSession {
|
||||
}
|
||||
|
||||
onIceGatheringStateChange(event) {
|
||||
const secondsToGatherIce = (new Date() - this._sessionStartTime) / 1000;
|
||||
|
||||
const iceGatheringState = event.target
|
||||
? event.target.iceGatheringState
|
||||
: null;
|
||||
|
||||
if ((iceGatheringState === 'gathering') && (!this._iceGatheringStartTime)) {
|
||||
this._iceGatheringStartTime = new Date();
|
||||
}
|
||||
|
||||
if (iceGatheringState === 'complete') {
|
||||
const secondsToGatherIce = (new Date()
|
||||
- (this._iceGatheringStartTime || this._sessionStartTime)) / 1000;
|
||||
|
||||
logger.info({
|
||||
logCode: 'sip_js_ice_gathering_time',
|
||||
extraInfo: {
|
||||
|
Loading…
Reference in New Issue
Block a user