Add onIceCandidateError handler for video calls.
This commit is contained in:
@@ -62,6 +62,7 @@ class CallPanel extends React.PureComponent {
|
|||||||
this.handleICEConnectionStateChangeEvent = this.handleICEConnectionStateChangeEvent.bind(this);
|
this.handleICEConnectionStateChangeEvent = this.handleICEConnectionStateChangeEvent.bind(this);
|
||||||
this.handleSignalingStateChangeEvent = this.handleSignalingStateChangeEvent.bind(this);
|
this.handleSignalingStateChangeEvent = this.handleSignalingStateChangeEvent.bind(this);
|
||||||
this.handleICEGatheringStateChangeEvent = this.handleICEGatheringStateChangeEvent.bind(this);
|
this.handleICEGatheringStateChangeEvent = this.handleICEGatheringStateChangeEvent.bind(this);
|
||||||
|
this.handleIceCandidateErrorEvent = this.handleIceCandidateErrorEvent.bind(this);
|
||||||
this.handleTrackEvent = this.handleTrackEvent.bind(this);
|
this.handleTrackEvent = this.handleTrackEvent.bind(this);
|
||||||
|
|
||||||
this.handleVideoOfferMsg = this.handleVideoOfferMsg.bind(this);
|
this.handleVideoOfferMsg = this.handleVideoOfferMsg.bind(this);
|
||||||
@@ -181,6 +182,7 @@ class CallPanel extends React.PureComponent {
|
|||||||
this.state.pc.onsignalingstatechange = null;
|
this.state.pc.onsignalingstatechange = null;
|
||||||
this.state.pc.onicegatheringstatechange = null;
|
this.state.pc.onicegatheringstatechange = null;
|
||||||
this.state.pc.onnegotiationneeded = null;
|
this.state.pc.onnegotiationneeded = null;
|
||||||
|
this.state.pc.onicecandidateerror = null;
|
||||||
|
|
||||||
this.state.pc.close();
|
this.state.pc.close();
|
||||||
}
|
}
|
||||||
@@ -216,6 +218,7 @@ class CallPanel extends React.PureComponent {
|
|||||||
pc.onicegatheringstatechange = this.handleICEGatheringStateChangeEvent;
|
pc.onicegatheringstatechange = this.handleICEGatheringStateChangeEvent;
|
||||||
pc.onsignalingstatechange = this.handleSignalingStateChangeEvent;
|
pc.onsignalingstatechange = this.handleSignalingStateChangeEvent;
|
||||||
pc.onnegotiationneeded = this.handleNegotiationNeededEvent;
|
pc.onnegotiationneeded = this.handleNegotiationNeededEvent;
|
||||||
|
pc.onicecandidateerror = this.handleIceCandidateErrorEvent;
|
||||||
pc.ontrack = this.handleTrackEvent;
|
pc.ontrack = this.handleTrackEvent;
|
||||||
|
|
||||||
this.setState({pc: pc, waitingForPeer: false});
|
this.setState({pc: pc, waitingForPeer: false});
|
||||||
@@ -254,6 +257,10 @@ class CallPanel extends React.PureComponent {
|
|||||||
.catch(this.reportError);
|
.catch(this.reportError);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
handleIceCandidateErrorEvent(event) {
|
||||||
|
console.log('ICE candidate error: ', event);
|
||||||
|
}
|
||||||
|
|
||||||
handleICECandidateEvent(event) {
|
handleICECandidateEvent(event) {
|
||||||
if (event.candidate) {
|
if (event.candidate) {
|
||||||
this.props.onIceCandidate(this.props.topic, this.props.seq, event.candidate.toJSON());
|
this.props.onIceCandidate(this.props.topic, this.props.seq, event.candidate.toJSON());
|
||||||
|
|||||||
Reference in New Issue
Block a user