You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The API for data channel is slightly different from WebSocket. So it makes more sense to copy/modify the relevant steps instead of requiring to follow WebSocket. The reference to WebSocket sections should be informative instead.
For binaryType, the following paragraph should be copied:
On setting, if the new value is either the string "blob" or the string "arraybuffer", then set the IDL attribute to this new value. Otherwise, throw a SyntaxError exception.
Alternatively, an enum could be defined for binaryType attribute.
For onmessage, detailed steps should be written that include the following steps copied from WebSocket:
Let event be an event that uses the MessageEvent interface, with the event type message, which does not bubble, is not cancelable, and has no default action.
If binaryType is set to "blob", then initialize event's data attribute to a new Blob object that represents data as its raw data. [FILEAPI]
If binaryType is set to "arraybuffer", then initialize event's data attribute to a new read-only ArrayBuffer object whose contents are data. [TYPEDARRAY]
Note that unlike WebSocket, RTCDataChannel do not have the concept of frame type, and there is no text message. It is also not clear what should be the origin value for the MessageEvent.
The text was updated successfully, but these errors were encountered:
The API for data channel is slightly different from WebSocket. So it makes more sense to copy/modify the relevant steps instead of requiring to follow WebSocket. The reference to WebSocket sections should be informative instead.
For
binaryType
, the following paragraph should be copied:Alternatively, an enum could be defined for
binaryType
attribute.For
onmessage
, detailed steps should be written that include the following steps copied from WebSocket:Note that unlike WebSocket, RTCDataChannel do not have the concept of frame type, and there is no text message. It is also not clear what should be the
origin
value for theMessageEvent
.The text was updated successfully, but these errors were encountered: