Skip to content
This repository was archived by the owner on Feb 3, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 4 additions & 15 deletions src/tinyMEDIA/src/tmedia_session_jsep.js
Original file line number Diff line number Diff line change
Expand Up @@ -638,28 +638,18 @@ tmedia_session_jsep01.prototype.__get_lo = function () {
try { tsk_utils_log_info("Video Contraints:" + JSON.stringify(o_video_constraints)); } catch (e) { }
}
var o_iceServers = this.ao_ice_servers;
if (!o_iceServers) { // defines default ICE servers only if none exist (because WebRTC requires ICE)
// HACK Nightly 21.0a1 (2013-02-18):
// - In RTCConfiguration passed to RTCPeerConnection constructor: FQDN not yet implemented (only IP-#s). Omitting "stun:stun.l.google.com:19302"
// - CHANGE-REQUEST not supported when using "numb.viagenie.ca"
// - (stun/ERR) Missing XOR-MAPPED-ADDRESS when using "stun.l.google.com"
// numb.viagenie.ca: 66.228.45.110:
// stun.l.google.com: 173.194.78.127
// stun.counterpath.net: 216.93.246.18
// "23.21.150.121" is the default STUN server used in Nightly
o_iceServers = tmedia_session_jsep01.mozThis
? [{ url: 'stun:23.21.150.121:3478' }, { url: 'stun:216.93.246.18:3478' }, { url: 'stun:66.228.45.110:3478' }, { url: 'stun:173.194.78.127:19302' }]
: [{ url: 'stun:stun.l.google.com:19302' }, { url: 'stun:stun.counterpath.net:3478' }, { url: 'stun:numb.viagenie.ca:3478' }];
if (!o_iceServers) {
o_iceServers = []; // empty array can be used to disable STUN/TURN
}
try { tsk_utils_log_info("ICE servers:" + JSON.stringify(o_iceServers)); } catch (e) { }
this.o_pc = new window.RTCPeerConnection(
(o_iceServers && !o_iceServers.length) ? null : { iceServers: o_iceServers, rtcpMuxPolicy: "negotiate" }, // empty array is used to disable STUN/TURN.
{ iceServers: o_iceServers, rtcpMuxPolicy: "negotiate" },
this.o_media_constraints
);
this.o_pc.onicecandidate = tmedia_session_jsep01.mozThis ? tmedia_session_jsep01.onIceCandidate : function (o_event) { tmedia_session_jsep01.onIceCandidate(o_event, This); };
this.o_pc.onnegotiationneeded = tmedia_session_jsep01.mozThis ? tmedia_session_jsep01.onNegotiationNeeded : function (o_event) { tmedia_session_jsep01.onNegotiationNeeded(o_event, This); };
this.o_pc.onsignalingstatechange = tmedia_session_jsep01.mozThis ? tmedia_session_jsep01.onSignalingstateChange : function (o_event) { tmedia_session_jsep01.onSignalingstateChange(o_event, This); };

this.subscribe_stream_events();
}

Expand Down Expand Up @@ -736,4 +726,3 @@ tmedia_session_jsep01.prototype.__set_ro = function (o_sdp, b_is_offer) {

return 0;
}