rustwasm / wasm-bindgen

Facilitating high-level interactions between Wasm modules and JavaScript
https://rustwasm.github.io/docs/wasm-bindgen/
Apache License 2.0
7.74k stars 1.07k forks source link

need change of set_local_description constructor #3394

Open JSmithOner opened 1 year ago

JSmithOner commented 1 year ago

Describe the Bug

set_local_description requires a &RtcSessionDescriptionInit to be executed I can't see the method restartIce neither

basically a lot the current js method and properties don't exist or are incomplete

Steps to Reproduce

look at the rustwasm doc and look a the MDN doc

Expected Behavior

The method should also be callable without argument.

Actual Behavior

the description doesn't get set automatically.

daxpedda commented 1 year ago

set_local_description requires a &RtcSessionDescriptionInit to be executed

I'm not sure what happened there, but the WebIDL was defined incorrectly in wasm-bindgen, the parameter should be optional: https://www.w3.org/TR/webrtc/#ref-for-dom-peerconnection-setlocaldescription-4.

Unfortunately this can only be fixed in the next breaking change release.

I can't see the method restartIce neither

This should be easy to add. Would you like to make a PR? wasm-bindgen Guide to add new Web APIs.