Tum 3 yıl önce
ebeveyn
işleme
c46f361ce9
2 değiştirilmiş dosya ile 13 ekleme ve 12 silme
  1. 1 1
      templates/base.html
  2. 12 11
      templates/index.html

+ 1 - 1
templates/base.html

@@ -34,7 +34,7 @@
34 34
                   player.play()
35 35
               }, 
36 36
               search: '',
37
-              items: ['1001', '2001', '3001', '4001'],
37
+              items: ['1001', '2001'],
38 38
                 get filteredItems() {
39 39
                     return this.items.filter(
40 40
                         i => i.startsWith(this.search)

+ 12 - 11
templates/index.html

@@ -7,19 +7,20 @@
7 7
         </div>
8 8
             <div class='row'>
9 9
                 <template x-for="item in filteredItems" :key="item">
10
-                    <div class='col-md-6 mb-2 text-center' x-if="item == '1001'">
11
-                    <img src="http://localhost:9099/video_feed/0/" width="100%">
12
-                          <br>
13
-                        <strong x-text='item'></strong>
10
+                    <div class='col-md-6 mb-2 text-center'>
11
+                        <template x-if="item == '1001'">
12
+                    <img src="http://localhost:9099/video_feed/0/" width="480">
13
+                          
14
+                        </template>
15
+                        <template x-if="item != '1001'">
16
+                           <video x-init="vdo($el)"  class="video-js vjs-default-skin m-auto" controls preload autoplay muted>
17
+                               <source src="./video/cctv.m3u8" type="application/x-mpegURL">
18
+                           </video>
19
+                        </template>
20
+                        <p>
21
+                        <strong x-text='item'></strong></p>
14 22
                         
15 23
                     </div>
16
-                    <div class='col-md-6 mb-2 text-center' x-if="item != '1001'">
17
-                       <video x-init="vdo($el)"  class="video-js vjs-default-skin" controls preload autoplay muted>
18
-                           <source src="./video/cctv.m3u8" type="application/x-mpegURL">
19
-                       </video>
20
-                        <br>
21
-                        <strong x-text='item'></strong>
22
-                    </div>
23 24
                 </template>
24 25
             </div>
25 26
     </div>