From 6fbdf0eab2c9640e673d9f9ec0331da24cbf2c4c Mon Sep 17 00:00:00 2001 From: Juliusz Chroboczek Date: Tue, 4 Jan 2022 13:09:07 +0100 Subject: [PATCH] Use the new MIME type for AV1. Chromium 91 and later uses "AV1" instead of "AV1X". Simulcast is still broken. --- codecs/codecs.go | 2 +- group/group.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/codecs/codecs.go b/codecs/codecs.go index 78c0395..e72c2e8 100644 --- a/codecs/codecs.go +++ b/codecs/codecs.go @@ -46,7 +46,7 @@ func Keyframe(codec string, packet *rtp.Packet) (bool, bool) { return (vp9.Payload[0] & 0xC) == 0, true } return (vp9.Payload[0] & 0x6) == 0, true - } else if strings.EqualFold(codec, "video/av1x") { + } else if strings.EqualFold(codec, "video/av1") { if len(packet.Payload) < 2 { return false, true } diff --git a/group/group.go b/group/group.go index 214ad74..4144832 100644 --- a/group/group.go +++ b/group/group.go @@ -168,7 +168,7 @@ func CodecPayloadType(codec webrtc.RTPCodecCapability) (webrtc.PayloadType, erro default: return 0, errors.New("unknown VP9 profile") } - case "video/av1x": + case "video/av1": return 35, nil case "video/h264": profile := fmtpValue(codec.SDPFmtpLine, "profile-level-id") @@ -231,7 +231,7 @@ func codecsFromName(name string) ([]webrtc.RTPCodecParameters, error) { case "av1": codecs = []webrtc.RTPCodecCapability{ { - "video/AV1X", 90000, 0, + "video/AV1", 90000, 0, "", fb, },