Formatting.
This commit is contained in:
@@ -122,8 +122,7 @@ class MessagesView extends React.Component {
|
|||||||
this.handlePickReply = this.handlePickReply.bind(this);
|
this.handlePickReply = this.handlePickReply.bind(this);
|
||||||
this.handleCancelReply = this.handleCancelReply.bind(this);
|
this.handleCancelReply = this.handleCancelReply.bind(this);
|
||||||
this.handleQuoteClick = this.handleQuoteClick.bind(this);
|
this.handleQuoteClick = this.handleQuoteClick.bind(this);
|
||||||
this.handleRtcClick = this.handleRtcClick.bind(this);
|
this.handleCallHangup = this.handleCallHangup.bind(this);
|
||||||
this.handleTeleHangup = this.handleTeleHangup.bind(this);
|
|
||||||
|
|
||||||
this.chatMessageRefs = {};
|
this.chatMessageRefs = {};
|
||||||
this.getOrCreateMessageRef = this.getOrCreateMessageRef.bind(this);
|
this.getOrCreateMessageRef = this.getOrCreateMessageRef.bind(this);
|
||||||
@@ -175,7 +174,7 @@ class MessagesView extends React.Component {
|
|||||||
this.leave(prevState.topic);
|
this.leave(prevState.topic);
|
||||||
if (prevState.rtcPanel) {
|
if (prevState.rtcPanel) {
|
||||||
console.log('hangup: ', prevState.topic);
|
console.log('hangup: ', prevState.topic);
|
||||||
this.handleTeleHangup(prevState.topic, prevProps.callSeq);
|
this.handleCallHangup(prevState.topic, prevProps.callSeq);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -782,19 +781,12 @@ class MessagesView extends React.Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
handleRtcClick() {
|
handleCallHangup(topic, seq) {
|
||||||
this.setState({
|
|
||||||
rtcPanel: { topic: this.state.topic }
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
handleTeleHangup(topic, seq) {
|
|
||||||
this.props.onVideoCallClosed();
|
this.props.onVideoCallClosed();
|
||||||
this.setState({
|
this.setState({
|
||||||
rtcPanel: null
|
rtcPanel: null
|
||||||
});
|
});
|
||||||
this.props.onTeleHangup(topic, seq);
|
this.props.onCallHangup(topic, seq);
|
||||||
}
|
}
|
||||||
|
|
||||||
// sendImageAttachment sends the image bits inband as Drafty message.
|
// sendImageAttachment sends the image bits inband as Drafty message.
|
||||||
@@ -994,11 +986,11 @@ class MessagesView extends React.Component {
|
|||||||
avatar={this.state.avatar || true}
|
avatar={this.state.avatar || true}
|
||||||
|
|
||||||
onError={this.props.onError}
|
onError={this.props.onError}
|
||||||
onHangup={this.handleTeleHangup}
|
onHangup={this.handleCallHangup}
|
||||||
onInvite={this.props.onTeleInvite}
|
onInvite={this.props.onCallInvite}
|
||||||
onSendOffer={this.props.onTeleSendOffer}
|
onSendOffer={this.props.onCallSendOffer}
|
||||||
onIceCandidate={this.props.onTeleIceCandidate}
|
onIceCandidate={this.props.onCallIceCandidate}
|
||||||
onSendAnswer={this.props.onTeleSendAnswer}
|
onSendAnswer={this.props.onCallSendAnswer}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
+22
-23
@@ -157,14 +157,14 @@ class TinodeWeb extends React.Component {
|
|||||||
this.handleInfoMessage = this.handleInfoMessage.bind(this);
|
this.handleInfoMessage = this.handleInfoMessage.bind(this);
|
||||||
this.handleCallClose = this.handleCallClose.bind(this);
|
this.handleCallClose = this.handleCallClose.bind(this);
|
||||||
|
|
||||||
this.handleTeleInvite = this.handleTeleInvite.bind(this);
|
this.handleCallInvite = this.handleCallInvite.bind(this);
|
||||||
this.handleTeleRinging = this.handleTeleRinging.bind(this);
|
this.handleCallRinging = this.handleCallRinging.bind(this);
|
||||||
this.handleTeleHangup = this.handleTeleHangup.bind(this);
|
this.handleCallHangup = this.handleCallHangup.bind(this);
|
||||||
this.handleTeleSendOffer = this.handleTeleSendOffer.bind(this);
|
this.handleCallSendOffer = this.handleCallSendOffer.bind(this);
|
||||||
this.handleTeleIceCandidate = this.handleTeleIceCandidate.bind(this);
|
this.handleCallIceCandidate = this.handleCallIceCandidate.bind(this);
|
||||||
this.handleTeleSendAnswer = this.handleTeleSendAnswer.bind(this);
|
this.handleCallSendAnswer = this.handleCallSendAnswer.bind(this);
|
||||||
|
|
||||||
this.handleTeleAcceptCall = this.handleTeleAcceptCall.bind(this);
|
this.handleCallAcceptCall = this.handleCallAcceptCall.bind(this);
|
||||||
|
|
||||||
this.sendMessageToTopic = this.sendMessageToTopic.bind(this);
|
this.sendMessageToTopic = this.sendMessageToTopic.bind(this);
|
||||||
}
|
}
|
||||||
@@ -1681,7 +1681,7 @@ class TinodeWeb extends React.Component {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
handleTeleInvite(callTopic, callSeq, callState) {
|
handleCallInvite(callTopic, callSeq, callState) {
|
||||||
switch (callState) {
|
switch (callState) {
|
||||||
case CALL_STATE_OUTGOING_INITATED:
|
case CALL_STATE_OUTGOING_INITATED:
|
||||||
let head = {mime: 'application/tinode-video-call'};
|
let head = {mime: 'application/tinode-video-call'};
|
||||||
@@ -1709,7 +1709,7 @@ class TinodeWeb extends React.Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
handleTeleRinging(callTopic, callSeq) {
|
handleCallRinging(callTopic, callSeq) {
|
||||||
const topic = this.tinode.getTopic(callTopic);
|
const topic = this.tinode.getTopic(callTopic);
|
||||||
if (!topic) {
|
if (!topic) {
|
||||||
return;
|
return;
|
||||||
@@ -1718,7 +1718,7 @@ class TinodeWeb extends React.Component {
|
|||||||
topic.call('ringing', callSeq);
|
topic.call('ringing', callSeq);
|
||||||
}
|
}
|
||||||
|
|
||||||
handleTeleHangup(callTopic, callSeq) {
|
handleCallHangup(callTopic, callSeq) {
|
||||||
const topic = this.tinode.getTopic(callTopic);
|
const topic = this.tinode.getTopic(callTopic);
|
||||||
if (!topic) {
|
if (!topic) {
|
||||||
return;
|
return;
|
||||||
@@ -1727,7 +1727,7 @@ class TinodeWeb extends React.Component {
|
|||||||
topic.call('hang-up', callSeq);
|
topic.call('hang-up', callSeq);
|
||||||
}
|
}
|
||||||
|
|
||||||
handleTeleSendOffer(callTopic, callSeq, sdp) {
|
handleCallSendOffer(callTopic, callSeq, sdp) {
|
||||||
const topic = this.tinode.getTopic(callTopic);
|
const topic = this.tinode.getTopic(callTopic);
|
||||||
if (!topic) {
|
if (!topic) {
|
||||||
return;
|
return;
|
||||||
@@ -1736,7 +1736,7 @@ class TinodeWeb extends React.Component {
|
|||||||
topic.call('offer', callSeq, sdp);
|
topic.call('offer', callSeq, sdp);
|
||||||
}
|
}
|
||||||
|
|
||||||
handleTeleIceCandidate(callTopic, callSeq, candidate) {
|
handleCallIceCandidate(callTopic, callSeq, candidate) {
|
||||||
const topic = this.tinode.getTopic(callTopic);
|
const topic = this.tinode.getTopic(callTopic);
|
||||||
if (!topic) {
|
if (!topic) {
|
||||||
return;
|
return;
|
||||||
@@ -1744,7 +1744,7 @@ class TinodeWeb extends React.Component {
|
|||||||
|
|
||||||
topic.call('ice-candidate', callSeq, candidate);
|
topic.call('ice-candidate', callSeq, candidate);
|
||||||
}
|
}
|
||||||
handleTeleSendAnswer(callTopic, callSeq, sdp) {
|
handleCallSendAnswer(callTopic, callSeq, sdp) {
|
||||||
const topic = this.tinode.getTopic(callTopic);
|
const topic = this.tinode.getTopic(callTopic);
|
||||||
if (!topic) {
|
if (!topic) {
|
||||||
return;
|
return;
|
||||||
@@ -1764,7 +1764,7 @@ class TinodeWeb extends React.Component {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
handleTeleAcceptCall(topicName) {
|
handleCallAcceptCall(topicName) {
|
||||||
const topic = this.tinode.getTopic(topicName);
|
const topic = this.tinode.getTopic(topicName);
|
||||||
if (!topic) {
|
if (!topic) {
|
||||||
return;
|
return;
|
||||||
@@ -1961,13 +1961,12 @@ class TinodeWeb extends React.Component {
|
|||||||
callTopic={this.state.callTopic}
|
callTopic={this.state.callTopic}
|
||||||
callSeq={this.state.callSeq}
|
callSeq={this.state.callSeq}
|
||||||
callState={this.state.callState}
|
callState={this.state.callState}
|
||||||
onTeleHangup={this.handleTeleHangup}
|
onCallHangup={this.handleCallHangup}
|
||||||
|
|
||||||
onTeleInvite={this.handleTeleInvite}
|
onCallInvite={this.handleCallInvite}
|
||||||
onTeleSendOffer={this.handleTeleSendOffer}
|
onCallSendOffer={this.handleCallSendOffer}
|
||||||
onTeleIceCandidate={this.handleTeleIceCandidate}
|
onCallIceCandidate={this.handleCallIceCandidate}
|
||||||
onTeleSendAnswer={this.handleTeleSendAnswer}
|
onCallSendAnswer={this.handleCallSendAnswer}
|
||||||
//onTemeMedia
|
|
||||||
|
|
||||||
errorText={this.state.errorText}
|
errorText={this.state.errorText}
|
||||||
errorLevel={this.state.errorLevel}
|
errorLevel={this.state.errorLevel}
|
||||||
@@ -2030,9 +2029,9 @@ class TinodeWeb extends React.Component {
|
|||||||
topic={this.state.callTopic}
|
topic={this.state.callTopic}
|
||||||
seq={this.state.callSeq}
|
seq={this.state.callSeq}
|
||||||
callState={this.state.callState}
|
callState={this.state.callState}
|
||||||
onRinging={this.handleTeleRinging}
|
onRinging={this.handleCallRinging}
|
||||||
onAcceptCall={this.handleTeleAcceptCall}
|
onAcceptCall={this.handleCallAcceptCall}
|
||||||
onReject={this.handleTeleHangup}
|
onReject={this.handleCallHangup}
|
||||||
/>
|
/>
|
||||||
:
|
:
|
||||||
null
|
null
|
||||||
|
|||||||
Reference in New Issue
Block a user