feat: prefer proven H264 browser senders
This commit is contained in:
1 parent
6abd5c8030
commit
6b3c3de8a0
19 files changed
+812
-66
No files matched your search
@@ -48,8 +48,13 @@ function codecName(codec: string): string {
|
||||
|
||||
export function codecContractWarnings(metrics: ConnectionMetrics): string[] {
|
||||
const warnings: string[] = [];
|
||||
if (metrics.codec && metrics.codec.toLowerCase() !== "video/vp8") {
|
||||
warnings.push(`视频编码为 ${codecName(metrics.codec)},预期 VP8`);
|
||||
if (
|
||||
metrics.codec &&
|
||||
!["video/h264", "video/vp8"].includes(metrics.codec.toLowerCase())
|
||||
) {
|
||||
warnings.push(
|
||||
`视频编码为 ${codecName(metrics.codec)},预期 H264 或 VP8`,
|
||||
);
|
||||
}
|
||||
if (metrics.audioCodec && metrics.audioCodec.toLowerCase() !== "audio/opus") {
|
||||
warnings.push(`音频编码为 ${codecName(metrics.audioCodec)},预期 Opus`);
|
||||
|
||||
Reference in new issue
Block a user