mirror of
https://github.com/vector-im/element-call.git
synced 2026-09-28 22:45:49 +00:00
Merge fixes
This commit is contained in:
+15
-12
@@ -32,7 +32,6 @@ import {
|
|||||||
Observable,
|
Observable,
|
||||||
Subject,
|
Subject,
|
||||||
combineLatest,
|
combineLatest,
|
||||||
distinctUntilChanged,
|
|
||||||
distinctUntilKeyChanged,
|
distinctUntilKeyChanged,
|
||||||
filter,
|
filter,
|
||||||
fromEvent,
|
fromEvent,
|
||||||
@@ -40,7 +39,6 @@ import {
|
|||||||
map,
|
map,
|
||||||
merge,
|
merge,
|
||||||
of,
|
of,
|
||||||
shareReplay,
|
|
||||||
startWith,
|
startWith,
|
||||||
switchMap,
|
switchMap,
|
||||||
throttleTime,
|
throttleTime,
|
||||||
@@ -114,11 +112,11 @@ function observeRemoteTrackReceivingOkay(
|
|||||||
};
|
};
|
||||||
|
|
||||||
return combineLatest([
|
return combineLatest([
|
||||||
observeTrackReference(participant, source),
|
observeTrackReference(of(participant), source),
|
||||||
interval(1000).pipe(startWith(0)),
|
interval(1000).pipe(startWith(0)),
|
||||||
]).pipe(
|
]).pipe(
|
||||||
switchMap(async ([trackReference]) => {
|
switchMap(async ([trackReference]) => {
|
||||||
const track = trackReference.publication?.track;
|
const track = trackReference?.publication?.track;
|
||||||
if (!track || !(track instanceof RemoteTrack)) {
|
if (!track || !(track instanceof RemoteTrack)) {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
@@ -269,12 +267,16 @@ abstract class BaseMediaViewModel extends ViewModel {
|
|||||||
v?.publication?.isEncrypted === false),
|
v?.publication?.isEncrypted === false),
|
||||||
).pipe(this.scope.state());
|
).pipe(this.scope.state());
|
||||||
|
|
||||||
if (participant.isLocal || encryptionSystem.kind === E2eeType.NONE) {
|
this.encryptionStatus = this.participant.pipe(
|
||||||
this.encryptionStatus = of(EncryptionStatus.Okay).pipe(
|
switchMap((participant): Observable<EncryptionStatus> => {
|
||||||
this.scope.state(),
|
if (
|
||||||
);
|
!participant ||
|
||||||
|
participant.isLocal ||
|
||||||
|
encryptionSystem.kind === E2eeType.NONE
|
||||||
|
) {
|
||||||
|
return of(EncryptionStatus.Okay);
|
||||||
} else if (encryptionSystem.kind === E2eeType.PER_PARTICIPANT) {
|
} else if (encryptionSystem.kind === E2eeType.PER_PARTICIPANT) {
|
||||||
this.encryptionStatus = combineLatest([
|
return combineLatest([
|
||||||
encryptionErrorObservable(
|
encryptionErrorObservable(
|
||||||
livekitRoom,
|
livekitRoom,
|
||||||
participant,
|
participant,
|
||||||
@@ -298,10 +300,9 @@ abstract class BaseMediaViewModel extends ViewModel {
|
|||||||
}),
|
}),
|
||||||
filter((x) => !!x),
|
filter((x) => !!x),
|
||||||
startWith(EncryptionStatus.Connecting),
|
startWith(EncryptionStatus.Connecting),
|
||||||
this.scope.state(),
|
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
this.encryptionStatus = combineLatest([
|
return combineLatest([
|
||||||
encryptionErrorObservable(
|
encryptionErrorObservable(
|
||||||
livekitRoom,
|
livekitRoom,
|
||||||
participant,
|
participant,
|
||||||
@@ -322,9 +323,11 @@ abstract class BaseMediaViewModel extends ViewModel {
|
|||||||
),
|
),
|
||||||
filter((x) => !!x),
|
filter((x) => !!x),
|
||||||
startWith(EncryptionStatus.Connecting),
|
startWith(EncryptionStatus.Connecting),
|
||||||
this.scope.state(),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}),
|
||||||
|
this.scope.state(),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user