Allow ICE server hostname to be set

This commit is contained in:
Rashad Sookram 2023-10-13 17:56:36 -04:00 committed by GitHub
parent 0578c02a2f
commit c1124288a3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View file

@ -62,6 +62,7 @@ namespace webrtc {
typedef struct {
const char* username_borrowed;
const char* password_borrowed;
const char* hostname_borrowed;
const char** urls_borrowed;
size_t urls_size;
} RffiIceServer;

View file

@ -389,6 +389,7 @@ RUSTEXPORT PeerConnectionInterface* Rust_createPeerConnection(
webrtc::PeerConnectionInterface::IceServer rtc_ice_server;
rtc_ice_server.username = std::string(ice_server.username_borrowed);
rtc_ice_server.password = std::string(ice_server.password_borrowed);
rtc_ice_server.hostname = std::string(ice_server.hostname_borrowed);
for (size_t i = 0; i < ice_server.urls_size; i++) {
rtc_ice_server.urls.push_back(std::string(ice_server.urls_borrowed[i]));
}