Lita-Tako 4 maanden geleden
bovenliggende
commit
a54666eedc
1 gewijzigde bestanden met toevoegingen van 12 en 6 verwijderingen
  1. 12 6
      src/components/common/player/live_v2.vue

+ 12 - 6
src/components/common/player/live_v2.vue

@@ -254,7 +254,7 @@ export default {
254 254
         return this.$message.warning('该窗口没有正在录制的视频')
255 255
       }
256 256
     },
257
-    doControl(command, action = 0, speed = 50, presetIndex = 10) {
257
+    doControl(command, action = 0, speed = 20, presetIndex = 10) {
258 258
       if(this.videoMap[this.currentWindowIndex]) {
259 259
         const data = this.videoMap[this.currentWindowIndex]
260 260
         const cameraId = data.cameraId
@@ -274,6 +274,12 @@ export default {
274 274
         return this.$message.warning('请选择播放中的窗口')
275 275
       }
276 276
     },
277
+    doControl1(command) {
278
+      this.doControl(command, 0)
279
+      setTimeout(() => {
280
+        this.doControl(command, 1)
281
+      }, 2000)
282
+    },
277 283
     startTrack() {
278 284
       this.doControl('START_TRACK', 0)
279 285
     },
@@ -378,25 +384,25 @@ export default {
378 384
                   [{label: '←', code: 'LEFT'}, {label: 'center', code: 'GOTO_PRESET'}, {label: '→', code: 'RIGHT'}],
379 385
                   [{label: '↙', code: 'LEFT_DOWN'}, {label: '↓', code: 'DOWN'}, {label: '↘', code: 'RIGHT_DOWN'}]]">
380 386
             <el-row class="row">
381
-              <el-button v-if="item.code !== 'GOTO_PRESET'" v-for="item in list" :key="item.code" class="small-btn" @click="doControl(item.code)">{{item.label}}</el-button>
387
+              <el-button v-if="item.code !== 'GOTO_PRESET'" v-for="item in list" :key="item.code" class="small-btn" @click="doControl1(item.code)">{{item.label}}</el-button>
382 388
               <el-button v-else class="small-btn" icon="el-icon-refresh" @click="doControl(item.code)"></el-button>
383 389
             </el-row>
384 390
           </template>
385 391
         </el-row>
386 392
         <el-row class="row">
387 393
           <el-col :span="12">
388
-            <el-button type="primary" class="btn" icon="el-icon-plus" @click="doControl('FOCUS_NEAR', 1)">聚焦</el-button>
394
+            <el-button type="primary" class="btn" icon="el-icon-plus" @click="doControl1('FOCUS_NEAR')">聚焦</el-button>
389 395
           </el-col>
390 396
           <el-col :span="12">
391
-            <el-button type="primary" class="btn" icon="el-icon-remove" @click="doControl('FOCUS_FAR', 1)">聚焦</el-button>
397
+            <el-button type="primary" class="btn" icon="el-icon-remove" @click="doControl1('FOCUS_FAR')">聚焦</el-button>
392 398
           </el-col>
393 399
         </el-row>
394 400
         <el-row class="row">
395 401
           <el-col :span="12">
396
-            <el-button type="primary" class="btn" icon="el-icon-plus"  @click="doControl('ZOOM_IN', 1)">调焦</el-button>
402
+            <el-button type="primary" class="btn" icon="el-icon-plus"  @click="doControl1('ZOOM_IN')">调焦</el-button>
397 403
           </el-col>
398 404
           <el-col :span="12">
399
-            <el-button type="primary" class="btn" icon="el-icon-remove"  @click="doControl('ZOOM_OUT', 1)">调焦</el-button>
405
+            <el-button type="primary" class="btn" icon="el-icon-remove"  @click="doControl1('ZOOM_OUT')">调焦</el-button>
400 406
           </el-col>
401 407
         </el-row>
402 408
 <!--        <el-row class="row">-->