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