Skip to content

Commit

Permalink
VIH-0000 Changed the reconnectWowzaAgent function to an arrow function (
Browse files Browse the repository at this point in the history
#2349)

* Changed the reconnectWowzaAgent function to an arrow function, as it loses 'this' context, and is treating audioRecordingService as undefined when being called as a callback from the toaster. Should now inherit this from its lexical scope meaning it wont jump over these functions.

* lint
  • Loading branch information
will-craig authored Jan 14, 2025
1 parent 366ee43 commit 11db8c7
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -522,10 +522,10 @@ export class JudgeWaitingRoomComponent extends WaitingRoomBaseDirective implemen
this.audioErrorRetryToast = this.notificationToastrService.showAudioRecordingErrorWithRestart(this.reconnectWowzaAgent);
}

private reconnectWowzaAgent(): void {
private reconnectWowzaAgent = (): void => {
this.audioRecordingService.cleanupDialOutConnections();
this.audioRecordingService.reconnectToWowza.bind(this, () => {
this.audioRecordingService.reconnectToWowza(() => {
this.notificationToastrService.showAudioRecordingRestartFailure(this.audioRestartCallback.bind(this));
});
}
};
}

0 comments on commit 11db8c7

Please sign in to comment.