Bug 275829
| Summary: | setCodecPreferences should accept or video codecs regardless of mimeType case | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Ahmad Saleem <ahmad.saleem792> |
| Component: | WebRTC | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | Normal | CC: | webkit-bug-importer, youennf |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Ahmad Saleem
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!
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/130928226>
Ahmad Saleem
Gecko is right here - https://github.com/w3c/webrtc-pc/pull/2975
Thanks Youenn for input. :-)
Ahmad Saleem
I fixed it will find relevant commit and link, never realized, I filed this.
Ahmad Saleem
*** This bug has been marked as a duplicate of bug 307157 ***