RESOLVED CONFIGURATION CHANGED264569
Default binaryType value in RTCDataChannel should be 'Blob'
https://bugs.webkit.org/show_bug.cgi?id=264569
Summary Default binaryType value in RTCDataChannel should be 'Blob'
Ahmad Saleem
Reported 2023-11-10 05:08:29 PST
Hi Team, While looking into WebRTC WPT failures, I came across another failing test: WPT Test Case (Live Link) - http://wpt.live/webrtc/RTCDataChannel-binaryType.window.html Web-Spec: https://w3c.github.io/webrtc-pc/#dom-datachannel-binarytype "When an RTCDataChannel object is created, the binaryType attribute MUST be initialized to the string "blob"." While in above test case, we get 'ArrayBuffer'. Could it be to just update this? https://searchfox.org/wubkat/rev/eaadafa59570232390736829d85d65c69bd8d91d/Source/WebCore/Modules/mediastream/RTCDataChannel.h#128 From: BinaryType m_binaryType { BinaryType::Arraybuffer }; to: BinaryType m_binaryType { BinaryType::Blog }; ____ Just wanted to raise so we can track it and fix it. Thanks!
Attachments
Ahmad Saleem
Comment 1 2023-11-10 05:10:03 PST
Typo: BinaryType m_binaryType { BinaryType::Blog }; ^ Wrong, I meant: BinaryType m_binaryType { BinaryType::Blob };
Ahmad Saleem
Comment 2 2023-11-10 05:43:18 PST
(In reply to Ahmad Saleem from comment #1) > Typo: > > BinaryType m_binaryType { BinaryType::Blog }; > > ^ Wrong, I meant: > > BinaryType m_binaryType { BinaryType::Blob }; this change indeed fix the failing test case.
youenn fablet
Comment 3 2023-11-10 06:51:29 PST
This change is controversial as Chrome is not supporting blob binaryType and is defaulting to arrayBuffer. We would need to identify the potential breakage to actually align with the spec (or change the spec if we cannot).
Ahmad Saleem
Comment 4 2023-11-10 06:52:29 PST
(In reply to youenn fablet from comment #3) > This change is controversial as Chrome is not supporting blob binaryType and > is defaulting to arrayBuffer. > We would need to identify the potential breakage to actually align with the > spec (or change the spec if we cannot). Oh! Should I close my PR? https://github.com/WebKit/WebKit/pull/20305
Ahmad Saleem
Comment 5 2023-11-10 06:56:12 PST
WebRTC bug mentioned by Chromium for future reference: https://bugs.chromium.org/p/webrtc/issues/detail?id=2276
youenn fablet
Comment 6 2023-11-10 07:15:31 PST
> Oh! Should I close my PR? https://github.com/WebKit/WebKit/pull/20305 Let's do that until we are ready for it.
Ahmad Saleem
Comment 7 2023-11-10 07:31:53 PST
(In reply to youenn fablet from comment #6) > > Oh! Should I close my PR? https://github.com/WebKit/WebKit/pull/20305 > > Let's do that until we are ready for it. Perfect! No worries. For future reference for anyone else: https://github.com/WebKit/WebKit/pull/20305
Ahmad Saleem
Comment 8 2023-11-10 07:36:32 PST
@youenn - just one thing to clarify that we do implement 'RTCDataChannel: Blob' support (unlike Chromium / Blink) but we don't use it as 'default' value? Why question is stemming from that Blink fails following test as well: >> Failed to set the 'binaryType' property on 'RTCDataChannel': Blob support not implemented yet While Safari / WebKit - we pass this. I think Chromium / Blink has issue even in supporting 'Blob' while we just have issue around setting it as 'default'. Is Chromium / Blink looking to drop 'Blob' altogether from web-spec?
Ahmad Saleem
Comment 9 2023-11-10 07:58:38 PST
NOTE - this also progress following failing WPT test cases: > RTCDataChannel-send.html [http://wpt.live/webrtc/RTCDataChannel-send.html] Datachannel binaryType should receive message as Blob by default Negotiated datachannel binaryType should receive message as Blob by default > RTCPeerConnection-createDataChannel.html [http://wpt.live/webrtc/RTCPeerConnection-createDataChannel.html] createDataChannel attribute default values createDataChannel with provided parameters should initialize attributes to provided values
Radar WebKit Bug Importer
Comment 10 2023-11-17 05:09:13 PST
Ahmad Saleem
Comment 11 2023-11-27 15:55:37 PST
This got merged in Web-Spec: https://github.com/w3c/webrtc-pc/pull/2909 Just two weeks ago: Here: https://www.w3.org/TR/webrtc/#dom-datachannel-binarytype The change seems to be approved by Google Engineer (https://github.com/henbos) as well.
youenn fablet
Comment 12 2023-11-28 03:13:47 PST
The plan for now is to change the spec and make the default value 'arrayBuffer' which should put WebKit conformant.
youenn fablet
Comment 13 2023-12-11 06:30:31 PST
Spec has changed to align with WebKit behaviour, closing. We should rebase the WPT tests once updated according the latest spec.
Note You need to log in before you can comment on or make changes to this bug.