From e504b26abafd655fea96be35c1d8dcd68585cad7 Mon Sep 17 00:00:00 2001 From: Simon Eisenmann Date: Sat, 19 Apr 2014 20:17:56 +0200 Subject: [PATCH] Implemented ui to switch video layout renderers. --- src/styles/components/_audiovideo.scss | 29 ++++++++++++++++++++++++++ src/styles/components/_webrtc.scss | 7 ++++++- static/js/directives/audiovideo.js | 4 ++++ static/js/services/videolayout.js | 4 ++++ static/partials/audiovideo.html | 16 +++++++++----- 5 files changed, 54 insertions(+), 6 deletions(-) diff --git a/src/styles/components/_audiovideo.scss b/src/styles/components/_audiovideo.scss index e71c7e23..bcfc04c7 100644 --- a/src/styles/components/_audiovideo.scss +++ b/src/styles/components/_audiovideo.scss @@ -48,6 +48,34 @@ right:260px; right:520px; } +.audioVideo { + position:relative; + width:100%; + height:100%; +} + +.audioVideo .overlayactions { + position: absolute; + left:0px; + top:0px; + bottom:0px; + height:70px; + margin:auto 0; + width:40px; + opacity:0.5; + padding:3px 0; + background: rgba(0,0,0,0.2); + text-shadow: 0 0 5px black; + z-index:5; + + button { + width:40px; + display: block; + color:#ccc; + cursor:pointer; + } +} + .remoteVideo .peerlabel { -webkit-transition: color 500ms ease-out; -moz-transition: color 500ms ease-out; @@ -112,6 +140,7 @@ right:520px; text-align:center; background:rgba(0,0,0,0.4); padding-right:192px; + min-height:108px; >div { height:108px; width:192px; diff --git a/src/styles/components/_webrtc.scss b/src/styles/components/_webrtc.scss index 6fb46999..3e969b0a 100644 --- a/src/styles/components/_webrtc.scss +++ b/src/styles/components/_webrtc.scss @@ -41,8 +41,9 @@ transition-duration: 2s; -webkit-transition-duration: 2s; transform: rotateY(0deg); -webkit-transform: rotateY(0deg); +z-index:2; } -#card.active { +.active #card { transform: rotateY(180deg); -webkit-transform: rotateY(180deg); } @@ -55,6 +56,7 @@ bottom:0px; transform: scale(-1, 1); -webkit-transform: scale(-1, 1); pointer-events:none; +z-index:2; } #remote { position: absolute; @@ -64,6 +66,8 @@ top:0px; bottom:0px; transform: rotateY(180deg); -webkit-transform: rotateY(180deg); +pointer-events:none; +z-index:2; } #mini { position: absolute; @@ -140,6 +144,7 @@ color:rgba(255,255,255,0.3); text-align:center; font-size:80px; margin-top:-40px; +pointer-events:auto; } .remoteVideo.onlyaudio video { display:none; diff --git a/static/js/directives/audiovideo.js b/static/js/directives/audiovideo.js index 1e02f0dd..6c5a0ad2 100644 --- a/static/js/directives/audiovideo.js +++ b/static/js/directives/audiovideo.js @@ -252,6 +252,10 @@ define(['jquery', 'underscore', 'text!partials/audiovideo.html', 'text!partials/ } }; + scope.setRenderer = function(name) { + scope.rendererName = name; + }; + var needsRedraw = false; scope.redraw = function() { needsRedraw = true; diff --git a/static/js/services/videolayout.js b/static/js/services/videolayout.js index 2af0e3e1..217bd594 100644 --- a/static/js/services/videolayout.js +++ b/static/js/services/videolayout.js @@ -225,6 +225,10 @@ define(["jquery", "underscore"], function($, _) { ConferenceKiosk.prototype.close = function(container, scope, controller) { this.closed = true; + if (this.big) { + this.remoteVideos.append(this.big); + } + this.big = null; this.bigVideo.remove() this.bigVideo = null; this.remoteVideos = null; diff --git a/static/partials/audiovideo.html b/static/partials/audiovideo.html index 9a2671e4..2c4e7045 100644 --- a/static/partials/audiovideo.html +++ b/static/partials/audiovideo.html @@ -1,7 +1,8 @@ -
-
- - +
+
+
+ +
@@ -9,4 +10,9 @@
-
+
+
+ + +
+
\ No newline at end of file