com.unity.webrtc icon indicating copy to clipboard operation
com.unity.webrtc copied to clipboard

[REQUEST] I want pc.setRemoteDescription(type, desc)

Open gtk2k opened this issue 4 years ago • 4 comments

Currently, it doesn't make sense to put it in RTCSessionDescription format and pass it to a method.

gtk2k avatar Jan 03 '21 13:01 gtk2k

@gtk2k Sorry, I am not sure what you want. Could you tell me more detail?

karasusan avatar Jan 04 '21 01:01 karasusan

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メソッドが欲しいということです。

gtk2k avatar Jan 04 '21 02:01 gtk2k

Gotcha. We will refactor these APIs in near the future.

karasusan avatar Jan 12 '21 02:01 karasusan

memo: WRS-224

karasusan avatar Jan 28 '22 09:01 karasusan