Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 3 additions & 1 deletion examples/answerer.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class Answerer {
// `candidate` will be the empty string if the event indicates that there are no further candidates
// to come in this generation, or null if all ICE gathering on all transports is complete.
// https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/icecandidate_event
if (candidate) {
if (candidate && candidate.candidate) {
console.log(this._loggingPrefix, 'Generated ICE candidate for', this._remoteClientId || 'remote');
console.debug(this._loggingPrefix, 'ICE candidate:', candidate);

Expand All @@ -110,6 +110,8 @@ class Answerer {
console.log(this._loggingPrefix, 'Not sending ICE candidate to', this._remoteClientId || 'remote');
}
}
} else if (candidate && !candidate.candidate) {
//firefox special case, candidate with null candidate field
} else {
console.log(this._loggingPrefix, 'All ICE candidates have been generated for', this._remoteClientId || 'remote');

Expand Down
4 changes: 3 additions & 1 deletion examples/viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@ async function startViewer(localView, remoteView, formValues, onStatsReport, rem

// Send any ICE candidates to the other peer
viewer.peerConnection.addEventListener('icecandidate', ({ candidate }) => {
if (candidate) {
if (candidate && candidate.candidate) {
console.log('[VIEWER] Generated ICE candidate');
console.debug('ICE candidate:', candidate);

Expand All @@ -782,6 +782,8 @@ async function startViewer(localView, remoteView, formValues, onStatsReport, rem
console.log('[VIEWER] Not sending ICE candidate');
}
}
} else if (candidate && !candidate.candidate) {
//firefox special case, candidate with null candidate field
} else {
console.log('[VIEWER] All ICE candidates have been generated');

Expand Down