From 1857da8a54df25ebd068017b09071d580e789621 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 4 Mar 2015 18:15:26 -0600 Subject: [PATCH] FS-7509: mess with html5 --- html5/verto/video_demo/index.html | 61 ++++++++++++++++++++------- html5/verto/video_demo/verto.js | 68 ++++++++++++++++++++++++++++++- 2 files changed, 113 insertions(+), 16 deletions(-) diff --git a/html5/verto/video_demo/index.html b/html5/verto/video_demo/index.html index 03bbf469e4..fc04d7bd93 100644 --- a/html5/verto/video_demo/index.html +++ b/html5/verto/video_demo/index.html @@ -85,17 +85,21 @@ +
-
-
- -
-
-
+ + + +
+
+ + + User Controls +
@@ -106,19 +110,25 @@ + + + - - -
- - -
+

+
+

+ +
+ +
+ + -
-
+ +

@@ -160,6 +170,29 @@


+ +
+
+ +
+
+ +
+ + + + + + + +
+ + + + + +

+ diff --git a/html5/verto/video_demo/verto.js b/html5/verto/video_demo/verto.js index b577d0efd0..bccf167eb6 100644 --- a/html5/verto/video_demo/verto.js +++ b/html5/verto/video_demo/verto.js @@ -12,7 +12,7 @@ var vid_height = 180; var local_vid_width = 320; var local_vid_height = 180; - +var is_full_screen = false; var outgoingBandwidth; var incomingBandwidth; var vqual; @@ -517,8 +517,52 @@ $("#vmutebtn").click(function() { cur_call.dtmf("*0"); }); +var is_full = false; +var usrto; +function noop() { return; } + +$("#nofullbtn").click(function() { + + if (document.webkitFullscreenEnabled) { + document.webkitExitFullscreen(); + } else if (document.mozFullScreenEnabled) { + document.mozExitFullScreen(); + } + + +}); + +function on_full(which) +{ + is_full = which; + if (is_full) { + $("#rows").css("position", "absolute").css("z-index", "2"); + } else { + $("#rows").css("position", "static").css("z-index", "2"); + + clearTimeout(usrto); + } + +} + + +$(document).on('webkitfullscreenchange mozfullscreenchange fullscreenchange MSFullscreenChange', + function(e) { + if (!is_full) { + on_full(true); + } else { + on_full(false); + } + }); + + $("#fullbtn").click(function() { - full_screen("webcam"); + + full_screen("fs"); + + +// $("#mod1").css("position", "absolute").css("z-index", "2"); + }); $("#biggerbtn").click(function() { @@ -1137,6 +1181,26 @@ $(document).ready(function() { $('#devices').hide(); $('#showdemo').show(); +// $("#rows").css("position", "absolute").css("z-index", "2"); + + $("#usrctl").show(); + $("#usr2").hide(); + + $("#usrctl").mouseover(function() { + $("#mod2").hide(); + $("#usr2").show(); + }); + + $("#usr2").mouseover(function() { + $("#mod2").hide(); + clearTimeout(usrto); + }); + + $("#usr2").mouseleave(function() { + usrto = setTimeout(function() { $("#usr2").hide(); }, 2000); + }); + + init();