position the inbound call box correctly, and fix various issues with when the video preview and callview are shown

This commit is contained in:
Matthew Hodgson 2015-12-17 02:49:09 +00:00
parent 186b727303
commit d979a028a5
7 changed files with 94 additions and 78 deletions

View file

@ -138,9 +138,17 @@ function _setCallListeners(call) {
function _setCallState(call, roomId, status) {
console.log(
"Call state in %s changed to %s (%s)", roomId, status, (call ? call.state : "-")
"Call state in %s changed to %s (%s)", roomId, status, (call ? call.call_state : "-")
);
calls[roomId] = call;
if (status === "ringing") {
play("ringAudio")
}
else if (call && call.call_state === "ringing") {
pause("ringAudio")
}
if (call) {
call.call_state = status;
}