paullouisageneau / libdatachannel

C/C++ WebRTC network library featuring Data Channels, Media Transport, and WebSockets
https://libdatachannel.org/
Mozilla Public License 2.0
1.81k stars 365 forks source link

candidate #144

Closed alicera closed 4 years ago

alicera commented 4 years ago

I want to set candidate by myself. Is it possible?

For example I open the offer and get the candidate "a=candidate:2 1 UDP 2122317823 192.168.2.71 60484 typ host".

Next time, I open the offer again and get the candidate "a=candidate:2 1 UDP 2122317823 192.168.2.71 60484 typ host".

paullouisageneau commented 4 years ago

This is not possible directly. You can set a port range of only one port in rtc::Configuration to select the port manually, but candidates of type srflx can still change according to the NAT mapping.

alicera commented 4 years ago

If I have a video,how to use client(c++) send it to another client (javascript)?

paullouisageneau commented 4 years ago

The media transport for streaming video or audio is experimental for now. You can however send the video as a file (like the benchmark client, but sending the actual video data).

alicera commented 4 years ago

(like the benchmark client, but sending the actual video data).

you say this https://github.com/paullouisageneau/libdatachannel/blob/152eacc22d2e5c76a8cd2e9ab89c11dc746d1a7d/test/benchmark.cpp#L93

paullouisageneau commented 4 years ago

That's right, instead of generating a random message for benchmark, you send chunks of the video file.