[Webkit-unassigned] [Bug 275829] New: setCodecPreferences should accept or video codecs regardless of mimeType case

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jun 24 16:38:18 PDT 2024


https://bugs.webkit.org/show_bug.cgi?id=275829

            Bug ID: 275829
           Summary: setCodecPreferences should accept or video codecs
                    regardless of mimeType case
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebRTC
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: ahmad.saleem792 at gmail.com
                CC: youennf at gmail.com

Hi Team,

While investigating WPT failures, I noticed that Safari / WebKit (including Chrome due to relying on libwebrtc) fails following:

Test Case: https://wpt.fyi/results/webrtc/RTCRtpTransceiver-setCodecPreferences.html?label=master&label=experimental&aligned&q=Safari%3Afail

This assert following error: "InvalidModificationError: RTCRtpCodecCapability bad mimeType"

Which stems from: https://searchfox.org/wubkat/rev/38fb2ecadd89df8d6d7114cc2b030188d744aeb0/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCRtpTransceiverBackend.cpp#92

webrtc::RtpCodecCapability rtcCodec;
    if (codec.mimeType.startsWith("video/"_s))
        rtcCodec.kind = cricket::MEDIA_TYPE_VIDEO;
    else if (codec.mimeType.startsWith("audio/"_s))
        rtcCodec.kind = cricket::MEDIA_TYPE_AUDIO;
    else
        return Exception { ExceptionCode::InvalidModificationError, "RTCRtpCodecCapability bad mimeType"_s };

So this might need tweaking.

Web-Spec: https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver-setcodecpreferences

While spec says in Step 7:

For each codec in codecs,

If codec does not match any codec in codecCapabilities, throw InvalidModificationError.

_____

So if I am not mistaken Chrome and Safari are doing right thing while Firefox / Gecko is wrong here.

Just wanted to get input before suggesting that we should update WPT or not.

Thanks!

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20240624/39973b17/attachment.htm>


More information about the webkit-unassigned mailing list