Implement call FSM. All works.
This commit is contained in:
parent
ecd1f09095
commit
7ffd97b5dc
3 changed files with 56 additions and 52 deletions
|
@ -32,8 +32,8 @@ module.exports = React.createClass({
|
|||
|
||||
var callButtons;
|
||||
if (this.state) {
|
||||
switch (this.state.callState) {
|
||||
case "INBOUND":
|
||||
switch (this.state.call_state) {
|
||||
case "ringing":
|
||||
callButtons = (
|
||||
<div>
|
||||
<div className="mx_RoomHeader_button" onClick={this.onAnswerClick}>
|
||||
|
@ -45,14 +45,8 @@ module.exports = React.createClass({
|
|||
</div>
|
||||
);
|
||||
break;
|
||||
case "OUTBOUND":
|
||||
callButtons = (
|
||||
<div className="mx_RoomHeader_button" onClick={this.onHangupClick}>
|
||||
BYEBYE
|
||||
</div>
|
||||
);
|
||||
break;
|
||||
case "IN_CALL":
|
||||
case "ringback":
|
||||
case "connected":
|
||||
callButtons = (
|
||||
<div className="mx_RoomHeader_button" onClick={this.onHangupClick}>
|
||||
BYEBYE
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue