mirror of
https://github.com/vector-im/element-call.git
synced 2026-02-02 04:05:56 +00:00
Initialize preferredTransport$ in a less unusual way
This commit is contained in:
@@ -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<Async<LivekitTransport>>;
|
||||
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())
|
||||
|
||||
Reference in New Issue
Block a user