sendrecv instead of sendonly and recvonly

71 views
Skip to first unread message

Neil Young

unread,
Oct 20, 2021, 6:52:13 PM10/20/21
to kurento
I'm in a node app.

I'm creating a publisher, creating an offer using generateOffer() 
I'm creating a subscriber, creating an offer,  also using generateOffer()

While the publisher's WebRTCEndpoint is created like so and looped back

pipeline = await this.kurentoClient.create('MediaPipeline')
webRtcEndpoint = await pipeline.create('WebRtcEndpoint')
await webRtcEndpoint.connect(webRtcEndpoint)
let offer = await webRtcEndpoint.generateOffer()
await webRtcEndpoint.gatherCandidates()


the subscriber endpoint is created from the publisher's pipeline (I'm not creating a new pipeline, but storing the publisher's pipeline in a session object) and connect it to the publisher's WebRTCEndpoint

webRtcEndpoint = await publisher.pipeline.create('WebRtcEndpoint')
await publisher.webRtcEndpoint.connect(webRtcEndpoint)
let offer = await webRtcEndpoint.generateOffer()
await webRtcEndpoint.gatherCandidates()

Both offers contain:

a=sendrecv

I was hoping to be able to produce a "sendonly" publisher OFFER and a "recvonly" subscriber OFFER subsequently by changing the publisher's generateOffer to

let offer = await webRtcEndpoint.generateOffer({ offerToReceiveAudio: false, offerToReceiveVideo: false })

which IMHO is basically completely OK, since the publisher doesn't want to receive.

But the publisher's OFFER still comes "sendrecv", just the subscriber is now neither producing an OFFER nor ICE candidates anymore...

Weird?



Neil Young

unread,
Oct 20, 2021, 6:59:34 PM10/20/21
to kurento
Well, it should maybe the other way around: The publisher should at least indicate to receive video, while the subscriber should be sendonly...

I think I will just munging the SDP and good.

Neil Young

unread,
Oct 20, 2021, 7:20:35 PM10/20/21
to kurento
This issue has a little history. https://groups.google.com/g/kurento/c/Q32AZ4mKyjA

My "loopback publishers's webrtcendpoint" was the reason for the hanging subscriber (not necessary), but the generateOffer options  - as long as they are recognized at all - don't change the "sendrecv" to something else. But this is by design, according to the quoted post. 

Munging works fine.

No issue
Reply all
Reply to author
Forward
0 new messages