webrtc icon indicating copy to clipboard operation
webrtc copied to clipboard

no ssrc-group:FID in sdp text

Open smaznet opened this issue 4 years ago • 5 comments

Your environment.

  • Version: Release
  • Other Information - stacktraces, related issues, suggestions how to fix, links for us to have context

What did you do?

I used this code to generate a sdp for telegram

	opts := webrtc.OfferOptions{
		OfferAnswerOptions: webrtc.OfferAnswerOptions{VoiceActivityDetection: false},
		ICERestart:         false,
	}

	offerl, _ := peerConnection.CreateOffer(&opts)
	if err = peerConnection.SetLocalDescription(offerl); err != nil {
		panic(err)
	}

	gatherComplete := webrtc.GatheringCompletePromise(peerConnection)

	<-gatherComplete
	sdpRes := peerConnection.LocalDescription().SDP

and i also used node-wrtc module in nodejs to generate sdp using this code

   const offer = await this.#connection!.createOffer({
      offerToReceiveVideo: true,
      offerToReceiveAudio: true,
    });
    await this.#connection!.setLocalDescription(offer);

What did you expect?

in output there should be a tag with this prefix a=ssrc-group:FID which is required for telegram(i think)

What happened?

in nodejs version that field exists in sdp and everything is okay while in go version there is no such field in sdp

And also a question

why in go version CreateOffer this options not exists?

      offerToReceiveVideo: true,
      offerToReceiveAudio: true,

smaznet avatar Oct 21 '21 10:10 smaznet

i also tested https://github.com/devopvoid/webrtc-java and it works fine

smaznet avatar Oct 21 '21 13:10 smaznet

Hey @smaznet sorry for the delay!

If you add a a=ssrc-group:FID to the SDP manually does it work? We don't send RTX with a distinct SSRC so we don't have a SSRC group. I would trying just defining one with the second SSRC being a random value.

offerToReceiveVideo and offerToReceiveAudio aren't valid parameters. I would be careful using a WebRTC implementation that still recommends them, it may still be Plan-B. If you want to receive audio + video I would create recvonly transceivers.

pc.addTransceiver('video', {direction: 'recvonly'})
pc.addTransceiver('audio', {direction: 'recvonly'})

Sean-Der avatar Nov 05 '21 16:11 Sean-Der

Hi @Sean-Der thanks for responding

No i tested it by putting ssrc-group manually but it doesn't work

actually i debuged with telegram logs seems packets doesn't sent to telegram

smaznet avatar Nov 05 '21 17:11 smaznet

@smaznet Is there a way I could test/debug this myself? I have some time and would love to try myself.

Sean-Der avatar Nov 06 '21 01:11 Sean-Der

@smaznet Is there a way I could test/debug this myself? I have some time and would love to try myself.

Yes sure Message me on telegram: @UnrealMosi

smaznet avatar Nov 06 '21 06:11 smaznet