paullouisageneau / datachannel-wasm

C++ WebRTC Data Channels and WebSockets for WebAssembly in browsers
MIT License
148 stars 25 forks source link

Implement Peerconnection::localDescription #13

Closed hanseuljun closed 3 years ago

hanseuljun commented 3 years ago

Done on top of #12.

This PR adds Peerconnection::localDescription(). It is implemented with a non-ideal trick of calling two javascript functions--rtcLocalDescriptionSdp and rtcLocalDescriptionType--which introduces some redundancy. Perhaps this can be improved by returning a string array or with use of multi-value return from javascript to c++, which I currently do not know how to implement...

hanseuljun commented 3 years ago

All the above feedback applied!