diff --git a/clientapp/models/contact.js b/clientapp/models/contact.js
index a6f1616..ffe5098 100644
--- a/clientapp/models/contact.js
+++ b/clientapp/models/contact.js
@@ -47,8 +47,7 @@ module.exports = HumanModel.define({
topResource: 'string',
unreadCount: ['number', true, 0],
_forceUpdate: ['number', true, 0],
- // options: incomingCall, ringing, activeCall, starting
- callState: ['string', true, ''],
+ onCall: ['boolean', true, false],
stream: 'object'
},
derived: {
diff --git a/clientapp/pages/chat.js b/clientapp/pages/chat.js
index 3b5a3ea..86142a4 100644
--- a/clientapp/pages/chat.js
+++ b/clientapp/pages/chat.js
@@ -40,7 +40,7 @@ module.exports = BasePage.extend(chatHelpers).extend({
formattedTZO: 'header .tzo'
},
classBindings: {
- callState: '.conversation'
+ onCall: '.conversation'
},
show: function (animation) {
BasePage.prototype.show.apply(this, [animation]);
diff --git a/clientapp/templates.js b/clientapp/templates.js
index 3e41133..a1ccccd 100644
--- a/clientapp/templates.js
+++ b/clientapp/templates.js
@@ -169,7 +169,7 @@ exports.misc.growlMessage = function anonymous(locals) {
exports.pages.chat = function anonymous(locals) {
var buf = [];
with (locals || {}) {
- buf.push('');
+ buf.push('
');
}
return buf.join("");
};
diff --git a/clientapp/templates/pages/chat.jade b/clientapp/templates/pages/chat.jade
index aed9795..fb85465 100644
--- a/clientapp/templates/pages/chat.jade
+++ b/clientapp/templates/pages/chat.jade
@@ -5,6 +5,13 @@ section.page.chat
h1.name
.tzo
button.call call
+ .activeCall
+ video.remote
+ video.local
+ aside.buttons
+ button.end End
+ button.mute Mute
+ button.unmute Unmute
ul.messages.scroll-container
.chatBox
form
diff --git a/public/css/app/chat.styl b/public/css/app/chat.styl
index 2c85d54..5d088cf 100644
--- a/public/css/app/chat.styl
+++ b/public/css/app/chat.styl
@@ -13,15 +13,7 @@
padding: 0px
width: 100%
borderbox()
-
- .remoteVideo
- display: none
-
- &.activeCall
- .remoteVideo
- width: 100%
- display: block
-
+
header
padding: 5px
border-bottom: 2px solid $grayOutline
@@ -72,6 +64,40 @@
line-height: 25px
min-width: 60px
+ .activeCall
+ transition(height 250ms)
+ height: 0px
+ position: relative
+ top: 0px
+
+ .remote
+ position: absolute
+ top: 60px
+ left: 10px
+ height: 50%
+ border: 2px solid $grayOutline
+
+ .local
+ position: absolute
+ bottom: 10px
+ right: 10px
+ height: 20%
+ border: 2px solid $grayOutline
+
+ .buttons
+ position: absolute
+ left: 10px
+ bottom: 10px
+
+ button
+ margin-right: 10px
+
+ // while on video call the parent has
+ // this class so we animate the height
+ &.onCall
+ .activeCall
+ height: 400px
+
.messages
margin: 0px
padding: 0px
diff --git a/public/css/otalk.css b/public/css/otalk.css
index ebafa1f..2125500 100644
--- a/public/css/otalk.css
+++ b/public/css/otalk.css
@@ -653,13 +653,6 @@ h3 {
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
-.conversation .remoteVideo {
- display: none;
-}
-.conversation.activeCall .remoteVideo {
- width: 100%;
- display: block;
-}
.conversation header {
padding: 5px;
border-bottom: 2px solid #e4e4e4;
@@ -725,6 +718,40 @@ h3 {
line-height: 25px;
min-width: 60px;
}
+.conversation header .activeCall {
+ -webkit-transition: height 250ms;
+ -o-transition: height 250ms;
+ transition: height 250ms;
+ -moz-transition: height 250ms;
+ height: 0px;
+ position: relative;
+ top: 0px;
+}
+.conversation header .activeCall .remote {
+ position: absolute;
+ top: 60px;
+ left: 10px;
+ height: 50%;
+ border: 2px solid #e4e4e4;
+}
+.conversation header .activeCall .local {
+ position: absolute;
+ bottom: 10px;
+ right: 10px;
+ height: 20%;
+ border: 2px solid #e4e4e4;
+}
+.conversation header .activeCall .buttons {
+ position: absolute;
+ left: 10px;
+ bottom: 10px;
+}
+.conversation header .activeCall .buttons button {
+ margin-right: 10px;
+}
+.conversation.onCall .activeCall {
+ height: 400px;
+}
.messages {
margin: 0px;
padding: 0px;
diff --git a/public/x-manifest.cache b/public/x-manifest.cache
index b806d1e..60e8102 100644
--- a/public/x-manifest.cache
+++ b/public/x-manifest.cache
@@ -1,5 +1,5 @@
CACHE MANIFEST
-# 0.0.1 1381889614306
+# 0.0.1 1381892587123
CACHE:
/app.js