Tum 3 anni fa
parent
commit
8f81e059c6
2 ha cambiato i file con 7 aggiunte e 5 eliminazioni
  1. 1 1
      templates/base.html
  2. 6 4
      templates/index.html

+ 1 - 1
templates/base.html

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

+ 6 - 4
templates/index.html

5
         <div class='row p-2'>
5
         <div class='row p-2'>
6
             <input x-model="search" placeholder="Search..." class='form-control'>
6
             <input x-model="search" placeholder="Search..." class='form-control'>
7
         </div>
7
         </div>
8
+                           <video x-init="vdo($el)"  class="video-js vjs-default-skin m-auto" controls preload autoplay muted>
9
+                               <source src="./video/cctv.m3u8" type="application/x-mpegURL">
10
+                           </video>
8
             <div class='row'>
11
             <div class='row'>
9
                 <template x-for="item in filteredItems" :key="item">
12
                 <template x-for="item in filteredItems" :key="item">
10
                     <div class='col-md-6 mb-2 text-center'>
13
                     <div class='col-md-6 mb-2 text-center'>
12
                     <img src="http://localhost:9099/video_feed/0/" width="480">
15
                     <img src="http://localhost:9099/video_feed/0/" width="480">
13
                           
16
                           
14
                         </template>
17
                         </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>
18
+                        <template x-if="item == '3001'">
19
+                    <img src="http://localhost:9024/video_feed/0/" width="480">
20
+                          
19
                         </template>
21
                         </template>
20
                         <p>
22
                         <p>
21
                         <strong x-text='item'></strong></p>
23
                         <strong x-text='item'></strong></p>