From 1fd8099a851bf43703c7f0b76a39dc6ffef7d4d6 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Tue, 18 Jul 2017 21:02:34 -0400 Subject: [PATCH] Made a small change adding a Video-Only button, which makes the video player take up the entire browser window. --- templates/channel.pug | 1 + www/js/util.js | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/templates/channel.pug b/templates/channel.pug index 6ed9f7fb..799d1683 100644 --- a/templates/channel.pug +++ b/templates/channel.pug @@ -23,6 +23,7 @@ html(lang="en") ul.dropdown-menu li: a(href="#" onclick="javascript:chatOnly()") Chat Only li: a(href="#" onclick="javascript:removeVideo(event)") Remove Video + li: a(href="#" onclick="javascript:videoOnly()") Video Only +navsuperadmin(true) +navloginlogout(cname) section#mainpage diff --git a/www/js/util.js b/www/js/util.js index ed67e79c..7aefe628 100644 --- a/www/js/util.js +++ b/www/js/util.js @@ -1845,6 +1845,23 @@ function chatOnly() { handleWindowResize(); } +function videoOnly() +{ + var video = $("#videowrap").detach(); + video.prependTo($("body")); + $("#wrap").remove(); + $("#videowrap-header").remove(); + $("footer").remove(); + $("#chatwrap").remove(); + video.css({ + "min-height": "100%", + "min-width": "100%", + margin: "0", + padding: "0" + }); + + handleWindowResize(); +} function handleWindowResize() { if ($("body").hasClass("chatOnly")) { var h = $("body").outerHeight() - $("#chatline").outerHeight() -