com.unity.webrtc
com.unity.webrtc copied to clipboard
[REQUEST] I want pc.setRemoteDescription(type, desc)
Currently, it doesn't make sense to put it in RTCSessionDescription format and pass it to a method.
@gtk2k Sorry, I am not sure what you want. Could you tell me more detail?
Now
RTCSessionDescription _desc;
_desc.type = RTCSdpType.Offer;
_desc.sdp = e.sdp;
var opRemoteDesc = pc.SetRemoteDescription(ref _desc);
I want
var opRemoteDesc = pc.SetRemoteDescription(RTCSdpType.Offer, e.sdp);
https://github.com/Unity-Technologies/com.unity.webrtc/blob/e45209e8fc7f85d14a3e1078370d7282e1eddec7/Plugin~/WebRTCPlugin/PeerConnectionObject.cpp#L165 Inside the library, a SessionDescription instance is created again, and there is no point in passing it in the RTCSessionDescription .
(すいません。英語が苦手でGoogle翻訳で回答しましたが、ニュアンスが伝わらないようなので日本語でも回答させていただきます。) ライブラリ内部で、改めてSessionDescriptionインスタンスを生成しており、ユーザーがわざわざRTCSessionDescription型に変換して渡す意味がなくなっております。なので、RTCSessionDescription型の引数ではなく、(type, desc)の引数をもったsetRemoteDescriptionメソッドが欲しいということです。
Gotcha. We will refactor these APIs in near the future.
memo: WRS-224