Re: [webrtc-pc] WHATWG streams for data channels

This would be super-great; I know developers who do both Node.js and Web RTC development, and their frustration in not having a streaming model for RTC data channels is part of what originally motivated the streams work.

The hardest part of designing this is the interaction with existing methods of reading/writing. That is, the most developer-friendly interface is (IMO) `dataChannel.writable` + `dataChannel.readable`, i.e. properties that always exist. See https://streams.spec.whatwg.org/#example-both. The issue then becomes figuring out what happens to your existing API when someone acquires a reader or writer from the stream. If possible, just making those APIs not function (e.g. never deliver events, or throw errors/reject promises) is the simplest way to do that.

Let me know how I can help; this would be very exciting to get working. I don't know much about RTC data channels at the moment myself, but perhaps I should read up.

-- 
GitHub Notification of comment by domenic
Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/1732#issuecomment-357017171 using your GitHub account

Received on Thursday, 11 January 2018 18:25:27 UTC