reversing the js logic to control the video controls attr
authorAnthony Talarico <talarico@gaslightmedia.com>
Fri, 3 Nov 2017 18:12:34 +0000 (14:12 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Fri, 3 Nov 2017 18:12:34 +0000 (14:12 -0400)
removing controls if in large view

js/app.js
js/custom/pageSetup.js
parts/video.php

index 2600fb5..9fc5ee9 100644 (file)
--- a/js/app.js
+++ b/js/app.js
@@ -39,8 +39,8 @@ $(document).ready(function () {
     //     headerVideo.play();
     // }
   
-    if($(window).width() < 1024){
+    if($(window).width() > 1024){
         console.log("asdf");
-        $(headerVideo).attr("controls",true); 
+        $(headerVideo).attr("controls",false); 
     }
 });
index 1842376..cd0e4e4 100644 (file)
@@ -30,8 +30,8 @@ $(document).ready(function () {
     //     headerVideo.play();
     // }
   
-    if($(window).width() < 1024){
+    if($(window).width() > 1024){
         console.log("asdf");
-        $(headerVideo).attr("controls",true); 
+        $(headerVideo).attr("controls",false); 
     }
 });
index ce53341..7b6f670 100644 (file)
@@ -1,6 +1,6 @@
 <?php if (is_front_page()) : ?>
        <div id="front-page-video-container">
-    <video src="<?php bloginfo('template_url'); ?>/assets/videos/header.mp4" id="front-page-video" autoplay="" loop="" muted=""></video>
+    <video src="<?php bloginfo('template_url'); ?>/assets/videos/header.mp4" controls id="front-page-video" autoplay="" loop="" muted=""></video>
     
         <!-- <div class="show-for-medium-down">
             <video id="front-page-video-mobile" autoplay="" loop="" muted="" controls="true">