webrtc: always use iceServers
instead of ice_servers
This commit is contained in:
parent
836d3177b0
commit
01b0e969b3
@ -753,6 +753,10 @@
|
||||
stopStream();
|
||||
show(videoContainer);
|
||||
|
||||
const iceServers = [
|
||||
[ { urls: ['stun:stun.l.google.com:19302'] } ]
|
||||
];
|
||||
|
||||
fetch(webrtcURL, {
|
||||
body: JSON.stringify({type: 'request'}),
|
||||
headers: {'Content-Type': 'application/json'},
|
||||
|
@ -47,10 +47,8 @@
|
||||
|
||||
<script>
|
||||
function startWebRTC() {
|
||||
// syntax: https://github.com/paullouisageneau/libdatachannel/blob/master/DOC.md#rtcwebrtc_peer_connection
|
||||
const ice_servers = [
|
||||
// 'stun:stun.l.google.com:19302',
|
||||
//'turn://7295a68e2381585126c6a19e:zDd3R415oPPXJKQT@a.relay.metered.ca:80'
|
||||
const iceServers = [
|
||||
[ { urls: ['stun:stun.l.google.com:19302'] } ]
|
||||
];
|
||||
|
||||
var pc = null;
|
||||
@ -62,7 +60,7 @@
|
||||
body: JSON.stringify({
|
||||
type: 'request',
|
||||
res: params.res,
|
||||
ice_servers: ice_servers
|
||||
iceServers: iceServers
|
||||
}),
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
|
@ -212,7 +212,7 @@ static std::shared_ptr<ClientTrackData> webrtc_add_video(const std::shared_ptr<r
|
||||
|
||||
static void webrtc_parse_ice_servers(rtc::Configuration &config, const nlohmann::json &message)
|
||||
{
|
||||
auto ice_servers = message.find("ice_servers");
|
||||
auto ice_servers = message.find("iceServers");
|
||||
if (ice_servers == message.end() || !ice_servers->is_array())
|
||||
return;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user