adapter icon indicating copy to clipboard operation
adapter copied to clipboard

Shims/fixes for `RTCDataChannel.binaryType`

Open Liamolucko opened this issue 2 years ago • 2 comments

Description

  • Shims RTCDataChannel.binaryType: 'blob' in Chrome (which doesn't support it)
  • Makes 'blob' the default value for RTCDataChannel.binaryType in Chrome and Safari, as the spec states it should be.

Purpose Make RTCDataChannel.binaryType work consistently across browsers.

Liamolucko avatar May 27 '22 09:05 Liamolucko

the code looks nice but how will it deal with attempts to send a large blob (e.g. a whole file) over the datachannel?

(in general the resistance of the webrtc working group to adapt to the sad reality of chrome not implementing blob is surprising... the default should have been changed years ago)

fippo avatar Jun 02 '22 08:06 fippo

the code looks nice but how will it deal with attempts to send a large blob (e.g. a whole file) over the datachannel?

I don't think that'd really be possible, while still sending it as a single message.

My understanding is that WebRTC currently has quite a small maximum message size anyway though.

Liamolucko avatar Jun 11 '22 08:06 Liamolucko