张延森 2 years ago
parent
commit
8d71a1e8d7
2 changed files with 21 additions and 1 deletions
  1. 12
    0
      resources/static/css/common.css
  2. 9
    1
      resources/templates/main/dashboard.html

+ 12
- 0
resources/static/css/common.css View File

379
   width: 10%;
379
   width: 10%;
380
   box-shadow: none;
380
   box-shadow: none;
381
 }
381
 }
382
+.dashboard-page .dash-carousel .left,
383
+.dashboard-page .dash-carousel .right {
384
+  height: calc(100% - 100px);
385
+}
382
 .dashboard-page .dash-carousel .item {
386
 .dashboard-page .dash-carousel .item {
383
   height: 100vh;
387
   height: 100vh;
384
 }
388
 }
393
   background-origin: border-box;
397
   background-origin: border-box;
394
   background-size: contain;
398
   background-size: contain;
395
 }
399
 }
400
+.dashboard-page .dash-carousel .item .item-video {
401
+  height: 100%;
402
+  width: 100%;
403
+}
404
+.dashboard-page .dash-carousel .item .item-video video {
405
+  width: 100%;
406
+  height: 100%;
407
+}
396
 .dashboard-page .act-list {
408
 .dashboard-page .act-list {
397
   margin: 96px 0;
409
   margin: 96px 0;
398
 }
410
 }

+ 9
- 1
resources/templates/main/dashboard.html View File

173
       parent.onNavMenuClick(menuId);
173
       parent.onNavMenuClick(menuId);
174
       parent.subMenuClick(subMenuName);
174
       parent.subMenuClick(subMenuName);
175
     }
175
     }
176
+
177
+    function videoOnPlay() {
178
+      $('#myNiceCarousel').carousel('pause')
179
+    }
180
+
181
+    function videoOnPause() {
182
+      $('#myNiceCarousel').carousel('cycle')
183
+    }
176
     
184
     
177
     function loadPage2() {
185
     function loadPage2() {
178
       var imageTpl = [
186
       var imageTpl = [
186
       var videoTpl = [
194
       var videoTpl = [
187
         '<div class="item {active}">',
195
         '<div class="item {active}">',
188
         '  <div class="item-video">',
196
         '  <div class="item-video">',
189
-        '    <video src="{src}" controls="controls"></video>',
197
+        '    <video src="{src}" controls="controls" onplay="videoOnPlay()" onpause="videoOnPause()" onended="videoOnPause()"></video>',
190
         '  </div>',
198
         '  </div>',
191
         '</div>',
199
         '</div>',
192
       ].join('');
200
       ].join('');