Skip to content

Commit cba718f

Browse files
committed
Fix unit test
1 parent 79c8114 commit cba718f

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/audiovideocontroller/DefaultAudioVideoController.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1299,8 +1299,18 @@ export default class DefaultAudioVideoController
12991299

13001300
/* istanbul ignore next: toString is optional */
13011301
const meetingErrorMessage = (error && error.message) || status.toString?.() || '';
1302-
attributes.meetingErrorMessage = meetingErrorMessage;
1303-
this.eventController.publishEvent('meetingFailed', attributes);
1302+
if (this.meetingSessionContext.startTimeMs === null) {
1303+
attributes.meetingErrorMessage = meetingErrorMessage;
1304+
delete attributes.meetingDurationMs;
1305+
delete attributes.attendeePresenceDurationMs;
1306+
delete attributes.meetingStartDurationMs;
1307+
this.eventController.publishEvent('meetingStartFailed', attributes);
1308+
} else if (status.isFailure() || status.isAudioConnectionFailure()) {
1309+
attributes.meetingErrorMessage = meetingErrorMessage;
1310+
this.eventController.publishEvent('meetingFailed', attributes);
1311+
} else {
1312+
this.eventController.publishEvent('meetingEnded', attributes);
1313+
}
13041314
}
13051315
}
13061316

0 commit comments

Comments
 (0)