Skip to content

armgit / Piik

Public Imported from GitHub
0

Free, open-source screen sharing for private live streams with friends. Watch together in a browser or self-host Piik. 免费开源的私密屏幕共享,支持游戏直播、一起看电影与自部署。

chore: keep codec selection silent

AAA3e42bfad02b9
diff --git a/src/client/webrtc/video-codec-preflight.ts b/src/client/webrtc/video-codec-preflight.ts
index 3ef5989a..93174768 100644
--- a/src/client/webrtc/video-codec-preflight.ts
+++ b/src/client/webrtc/video-codec-preflight.ts
@@ -261,16 +261,12 @@ export async function preferredVideoCodecForTrack(
profile: QualityProfile,
signal?: AbortSignal,
): Promise<BrowserVideoCodec> {
- let codec: BrowserVideoCodec = "vp8";
if (track.kind !== "video" || track.readyState === "ended") {
- console.debug("[Screener] video codec preflight", codec);
- return codec;
+ return "vp8";
}
try {
- codec = (await runH264Probe(track, profile, signal)) ? "h264" : "vp8";
- } catch {}
- if (!signal?.aborted) {
- console.debug("[Screener] video codec preflight", codec);
+ return (await runH264Probe(track, profile, signal)) ? "h264" : "vp8";
+ } catch {
+ return "vp8";
}
- return codec;
}