|
|
@@ -73,6 +73,8 @@
|
|
|
|
|
|
const emits = defineEmits(['init', 'success', 'error', 'cancel', 'progress'])
|
|
|
|
|
|
+ let timer1 = null;
|
|
|
+
|
|
|
function noShowVideoBtn() {
|
|
|
showVideo.value = false
|
|
|
}
|
|
|
@@ -240,10 +242,10 @@
|
|
|
}
|
|
|
|
|
|
function onVideoSuccess() {
|
|
|
- setTimeout(() => {
|
|
|
+/* setTimeout(() => {
|
|
|
// 首次运行进行抓拍一次
|
|
|
handleZhua();
|
|
|
- }, 3000);
|
|
|
+ }, 3000);*/
|
|
|
}
|
|
|
|
|
|
function onVideoError() {
|
|
|
@@ -280,7 +282,7 @@
|
|
|
isBuffer.value = true;
|
|
|
console.log('onProgress')
|
|
|
// buffer时间增大到3秒 过滤掉后续的onTimeupdate
|
|
|
- setTimeout(() => {isBuffer.value = false}, 3000)
|
|
|
+ timer1 = setTimeout(() => {isBuffer.value = false}, 3000)
|
|
|
// 视频中途暂停被占用
|
|
|
stopTimer.value = setTimeout(() => {
|
|
|
emits('progress', false);
|
|
|
@@ -402,6 +404,11 @@
|
|
|
|
|
|
onUnmounted(() => {
|
|
|
stopFrameListener()
|
|
|
+
|
|
|
+ if (timer1) {
|
|
|
+ clearTimeout(timer1);
|
|
|
+ timer1 = null;
|
|
|
+ }
|
|
|
})
|
|
|
|
|
|
defineExpose({
|