Browse Source

Merge branch 'refs/heads/dev-2.19.0' into dev

Lita-Tako 4 months ago
parent
commit
f8ed8d66d3
1 changed files with 17 additions and 6 deletions
  1. 17 6
      src/components/video/Live.vue

+ 17 - 6
src/components/video/Live.vue

@@ -212,6 +212,13 @@
212
 		}
212
 		}
213
 	}
213
 	}
214
 
214
 
215
+	const doControl1 = (command) => {
216
+		doControl(command, 0)
217
+		setTimeout(() => {
218
+			doControl(command, 1)
219
+		}, 2000)
220
+	}
221
+
215
 	const startTrack = () => {
222
 	const startTrack = () => {
216
 		doControl('START_TRACK', 0)
223
 		doControl('START_TRACK', 0)
217
 	}
224
 	}
@@ -366,10 +373,14 @@
366
 							>
373
 							>
367
 								<div class="control-row">
374
 								<div class="control-row">
368
 									<template v-for="item in list">
375
 									<template v-for="item in list">
369
-										<a-button v-if="item.code !== 'GOTO_PRESET'" :key="item.code" class="small-btn"
376
+										<a-button
377
+											v-if="item.code !== 'GOTO_PRESET'"
378
+											:key="item.code"
379
+											class="small-btn"
380
+											@click="doControl1(item.code)"
370
 											>{{ item.label }}
381
 											>{{ item.label }}
371
 										</a-button>
382
 										</a-button>
372
-										<a-button v-else class="small-btn">
383
+										<a-button v-else class="small-btn" @click="doControl(item.code)">
373
 											<template #icon>
384
 											<template #icon>
374
 												<UndoOutlined />
385
 												<UndoOutlined />
375
 											</template>
386
 											</template>
@@ -380,12 +391,12 @@
380
 						</div>
391
 						</div>
381
 					</div>
392
 					</div>
382
 					<div class="row">
393
 					<div class="row">
383
-						<a-button type="primary" class="mr-5 btn"> + 聚焦 </a-button>
384
-						<a-button type="primary" class="btn">- 聚焦</a-button>
394
+						<a-button type="primary" class="mr-5 btn" @click="doControl1('FOCUS_NEAR')"> + 聚焦 </a-button>
395
+						<a-button type="primary" class="btn" @click="doControl1('FOCUS_FAR')">- 聚焦</a-button>
385
 					</div>
396
 					</div>
386
 					<div class="row">
397
 					<div class="row">
387
-						<a-button type="primary" class="mr-5 btn"> + 调焦 </a-button>
388
-						<a-button type="primary" class="btn">- 调焦</a-button>
398
+						<a-button type="primary" class="mr-5 btn" @click="doControl1('ZOOM_IN')"> + 调焦 </a-button>
399
+						<a-button type="primary" class="btn" @click="doControl1('ZOOM_OUT')">- 调焦</a-button>
389
 					</div>
400
 					</div>
390
 					<!--					<div class="row">-->
401
 					<!--					<div class="row">-->
391
 					<!--						<a-button type="primary" class="mr-5 btn"> 录像开始 </a-button>-->
402
 					<!--						<a-button type="primary" class="mr-5 btn"> 录像开始 </a-button>-->