Move observeInboundRtpStreamStats$ into the appropriate file

This commit is contained in:
Robin
2026-02-27 17:08:04 +01:00
parent 6b51b7dc58
commit 9930288d1f
2 changed files with 11 additions and 10 deletions

View File

@@ -37,7 +37,7 @@ import { type EncryptionSystem } from "../../e2ee/sharedKeyManagement";
import { type ObservableScope } from "../ObservableScope";
import { observeTrackReference$ } from "../observeTrackReference";
import { E2eeType } from "../../e2ee/e2eeType";
import { observeRtpStreamStats$ } from "./observeRtpStreamStats";
import { observeInboundRtpStreamStats$ } from "./observeRtpStreamStats";
export enum EncryptionStatus {
Connecting,
@@ -181,15 +181,6 @@ export function createMemberMedia(
};
}
function observeInboundRtpStreamStats$(
participant: Participant,
source: Track.Source,
): Observable<RTCInboundRtpStreamStats | undefined> {
return observeRtpStreamStats$(participant, source, "inbound-rtp").pipe(
map((x) => x as RTCInboundRtpStreamStats | undefined),
);
}
function encryptionErrorObservable$(
room$: Behavior<LivekitRoom | undefined>,
participant: Participant,

View File

@@ -18,6 +18,7 @@ import {
type Observable,
startWith,
switchMap,
map,
} from "rxjs";
import { observeTrackReference$ } from "../observeTrackReference";
@@ -57,3 +58,12 @@ export function observeRtpStreamStats$(
startWith(undefined),
);
}
export function observeInboundRtpStreamStats$(
participant: Participant,
source: Track.Source,
): Observable<RTCInboundRtpStreamStats | undefined> {
return observeRtpStreamStats$(participant, source, "inbound-rtp").pipe(
map((x) => x as RTCInboundRtpStreamStats | undefined),
);
}