mirror of
https://github.com/vector-im/element-call.git
synced 2026-10-16 23:45:50 +00:00
adjust to encrypted$ -> encrypted and VideoProcessor independent of LK
This commit is contained in:
@@ -25,8 +25,8 @@ import {
|
|||||||
trackBySource$,
|
trackBySource$,
|
||||||
type TransportMetadata,
|
type TransportMetadata,
|
||||||
type VideoCaptureSettings,
|
type VideoCaptureSettings,
|
||||||
|
type VideoProcessor,
|
||||||
} from "@element-hq/matrixrtc-sdk";
|
} from "@element-hq/matrixrtc-sdk";
|
||||||
import { type Track, type TrackProcessor } from "livekit-client";
|
|
||||||
import {
|
import {
|
||||||
KnownMembership,
|
KnownMembership,
|
||||||
type Room as MatrixRoom,
|
type Room as MatrixRoom,
|
||||||
@@ -180,7 +180,7 @@ export interface CallViewModelOptions {
|
|||||||
*/
|
*/
|
||||||
capture?: CaptureSettings;
|
capture?: CaptureSettings;
|
||||||
/** Background blur and the like, applied to the camera as it changes. */
|
/** Background blur and the like, applied to the camera as it changes. */
|
||||||
videoProcessor$?: Behavior<TrackProcessor<Track.Kind.Video> | undefined>;
|
videoProcessor$?: Behavior<VideoProcessor | undefined>;
|
||||||
/**
|
/**
|
||||||
* The application hosting Element Call, which can ask it to hang up and wants
|
* The application hosting Element Call, which can ask it to hang up and wants
|
||||||
* to know when the user joins or leaves. Defaults to no host.
|
* to know when the user joins or leaves. Defaults to no host.
|
||||||
|
|||||||
@@ -91,13 +91,7 @@ export function createMemberMedia(
|
|||||||
const unencrypted$ = (
|
const unencrypted$ = (
|
||||||
track$: Behavior<MediaTrack | undefined>,
|
track$: Behavior<MediaTrack | undefined>,
|
||||||
): Observable<boolean> =>
|
): Observable<boolean> =>
|
||||||
track$.pipe(
|
track$.pipe(map((track) => track !== undefined && !track.encrypted));
|
||||||
switchMap((track) =>
|
|
||||||
track === undefined
|
|
||||||
? of(false)
|
|
||||||
: track.encrypted$.pipe(map((encrypted) => !encrypted)),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...createBaseMedia(inputs),
|
...createBaseMedia(inputs),
|
||||||
|
|||||||
+1
-1
@@ -310,7 +310,7 @@ export function mockMediaTrack(
|
|||||||
kind: "video",
|
kind: "video",
|
||||||
id: "track",
|
id: "track",
|
||||||
muted$: constant(false),
|
muted$: constant(false),
|
||||||
encrypted$: constant(true),
|
encrypted: true,
|
||||||
stats$: constant(undefined),
|
stats$: constant(undefined),
|
||||||
isActive$: constant(false),
|
isActive$: constant(false),
|
||||||
attach: vi.fn(),
|
attach: vi.fn(),
|
||||||
|
|||||||
Reference in New Issue
Block a user