gstwebrtc-api: create control data channel when offering

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1755>
This commit is contained in:
Mathieu Duponchelle 2024-08-27 07:52:12 +02:00
parent f0d42b88cb
commit 2f9bb62b6b

View file

@ -100,6 +100,8 @@ export default class ConsumerSession extends WebRTCSession {
if (this._offerOptions) {
this.ensurePeerConnection();
this._rtcPeerConnection.createDataChannel("control");
this._rtcPeerConnection.createOffer(this._offerOptions).then((desc) => {
if (this._rtcPeerConnection && desc) {
return this._rtcPeerConnection.setLocalDescription(desc);