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
|
* The transport that we would personally prefer to publish on (if not for the
|
||||||
* transport preferences of others, perhaps).
|
* 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
|
* Lists the transports used by ourselves, plus all other MatrixRTC session
|
||||||
@@ -1802,10 +1804,6 @@ export class CallViewModel extends ViewModel {
|
|||||||
) {
|
) {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
this.preferredTransport$ = async$(
|
|
||||||
makeTransport(this.matrixRTCSession),
|
|
||||||
).pipe(this.scope.bind());
|
|
||||||
|
|
||||||
// Start and stop local and remote connections as needed
|
// Start and stop local and remote connections as needed
|
||||||
this.connectionInstructions$
|
this.connectionInstructions$
|
||||||
.pipe(this.scope.bind())
|
.pipe(this.scope.bind())
|
||||||
|
|||||||
Reference in New Issue
Block a user