Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add local candidate when peer connection of ion-sfu is set ice-lite. #674

Open
lugy-bupt opened this issue Dec 23, 2022 · 1 comment

Comments

@lugy-bupt
Copy link

lugy-bupt commented Dec 23, 2022

Hi team,

I created a peer connection and set it as ice-lite and passive status like below, but I failed to find the way setting local candidate for it. How to set the local candidate when peer connection is ice-lite?

	se := webrtc.SettingEngine{}
	se.SetLite(true)
	se.SetEphemeralUDPPortRange(9090, 9090)
        se.SetAnsweringDTLSRole(webrtc.DTLSRoleServer)
	se.SetNetworkTypes([]webrtc.NetworkType{webrtc.NetworkTypeUDP4})
	se.SetNAT1To1IPs([]string{"x.x.x.x"}, webrtc.ICECandidateTypeHost)
        ...

       	api := webrtc.NewAPI(webrtc.WithMediaEngine(&me), webrtc.WithSettingEngine(se))
	pc, err := api.NewPeerConnection(webrtc.Configuration{})
       

The answer generated is below, and there is no candidate.

answer v=0
o=- 1455384849914031032 1671779282 IN IP4 0.0.0.0
s=-
t=0 0
a=fingerprint:sha-256 BD:8B:B0:31:BC:6E:41:76:A4:BF:BB:FA:2C:3D:51:42:48:D7:CC:7F:02:7B:98:25:4E:FE:C7:9A:03:54:9B:3B
a=ice-lite
a=extmap-allow-mixed
a=group:BUNDLE 0
m=audio 9 UDP/TLS/RTP/SAVPF 111 9 0 8
c=IN IP4 0.0.0.0
a=setup:passive
a=mid:0
a=ice-ufrag:ZwwyifEGbkkDlyOG
a=ice-pwd:syeKIeSKHXDootmMhfeOgLzWSLmkBDgb
a=rtcp-mux
a=rtcp-rsize
a=rtpmap:111 opus/48000/2
a=fmtp:111 minptime=10;useinbandfec=1
a=rtcp-fb:111 transport-cc 
a=rtpmap:9 G722/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=recvonly
@birdyGrong
Copy link

I have the same question, how did you solve it ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants