shinyoshiaki / werift-webrtc

WebRTC Implementation for TypeScript (Node.js), includes ICE/DTLS/SCTP/RTP/SRTP/WEBM/MP4
MIT License
463 stars 29 forks source link

Spec compliance? #375

Open achingbrain opened 5 months ago

achingbrain commented 5 months ago

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.

shinyoshiaki commented 5 months ago

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

achingbrain commented 5 months ago

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

shinyoshiaki commented 5 months ago

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

ris-work commented 5 months ago

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).