diff --git a/src/state/CallViewModel.ts b/src/state/CallViewModel.ts index e8f49d71..a2a224f3 100644 --- a/src/state/CallViewModel.ts +++ b/src/state/CallViewModel.ts @@ -288,7 +288,9 @@ export class CallViewModel extends ViewModel { * The transport that we would personally prefer to publish on (if not for the * transport preferences of others, perhaps). */ - private readonly preferredTransport$: Observable>; + private readonly preferredTransport$ = this.scope.behavior( + async$(makeTransport(this.matrixRTCSession)), + ); /** * Lists the transports used by ourselves, plus all other MatrixRTC session @@ -1802,10 +1804,6 @@ export class CallViewModel extends ViewModel { ) { super(); - this.preferredTransport$ = async$( - makeTransport(this.matrixRTCSession), - ).pipe(this.scope.bind()); - // Start and stop local and remote connections as needed this.connectionInstructions$ .pipe(this.scope.bind())