werift-webrtc icon indicating copy to clipboard operation
werift-webrtc copied to clipboard

Spec compliance?

Open achingbrain opened this issue 11 months ago • 4 comments

I'm trying to integrate this module with some isomorphic code that runs on node and in browsers but I've noticed some incompatibilities with the WebRTC types as supplied with TypeScript in lib.dom.d.ts.

These are just the errors tsc reported, there may be others.

achingbrain avatar Mar 14 '24 10:03 achingbrain

Spec compliance is planned in the roadmap, but no specific date has been set for when it will be implemented. https://github.com/shinyoshiaki/werift-webrtc?tab=readme-ov-file#road-map-towards-20

shinyoshiaki avatar Mar 20 '24 06:03 shinyoshiaki

Sounds great. Would PRs that move this module closer to the spec be accepted?

achingbrain avatar Mar 20 '24 11:03 achingbrain

Acceptable, but be prepared to modify all existing test code if you are modifying an existing PeerConnection. It may be easier to first implement a new PeerConnection with a different name like W3CPeerConnection

shinyoshiaki avatar Mar 24 '24 08:03 shinyoshiaki

It could be also in the form of a polyfill like https://github.com/murat-dogan/node-datachannel/tree/master/polyfill. It has been very helpful. I am just sharing ideas. These make life much easier as we can share the same code among multiple implementations (browser, wrtc-M87, wrtc-M94, libdatachannel).

ris-work avatar Mar 26 '24 12:03 ris-work