...
|
...
|
@@ -104,7 +104,7 @@ |
104
|
104
|
|
105
|
105
|
// type 1:放大 2:缩小
|
106
|
106
|
const handleScale = (type: number) => {
|
107
|
|
- console, log(type);
|
|
107
|
+ console.log(type);
|
108
|
108
|
};
|
109
|
109
|
|
110
|
110
|
const isPlay = ref<Boolean | null | undefined>(true);
|
...
|
...
|
@@ -113,26 +113,26 @@ |
113
|
113
|
init();
|
114
|
114
|
await nextTick();
|
115
|
115
|
// isPlay.value = unref(videoPlayInstance)?.paused();
|
116
|
|
- videoPlayInstance.value.on('loadedmetadata', () => {
|
|
116
|
+ videoPlayInstance.value?.on('loadedmetadata', () => {
|
117
|
117
|
console.log('视频长度');
|
118
|
118
|
});
|
119
|
|
- videoPlayInstance.value.on('waiting', () => {
|
|
119
|
+ videoPlayInstance.value?.on('waiting', () => {
|
120
|
120
|
isPlay.value = false;
|
121
|
121
|
console.log('视频加载中');
|
122
|
122
|
});
|
123
|
|
- videoPlayInstance.value.on('play', () => {
|
|
123
|
+ videoPlayInstance.value?.on('play', () => {
|
124
|
124
|
isPlay.value = true;
|
125
|
125
|
console.log('视频开始播放');
|
126
|
126
|
});
|
127
|
|
- videoPlayInstance.value.on('playing', () => {
|
|
127
|
+ videoPlayInstance.value?.on('playing', () => {
|
128
|
128
|
isPlay.value = true;
|
129
|
129
|
console.log('正在播放');
|
130
|
130
|
});
|
131
|
|
- videoPlayInstance.value.on('pause', () => {
|
|
131
|
+ videoPlayInstance.value?.on('pause', () => {
|
132
|
132
|
isPlay.value = false;
|
133
|
133
|
console.log('暂停播放');
|
134
|
134
|
});
|
135
|
|
- videoPlayInstance.value.on('ended', () => {
|
|
135
|
+ videoPlayInstance.value?.on('ended', () => {
|
136
|
136
|
isPlay.value = false;
|
137
|
137
|
console.log('结束播放');
|
138
|
138
|
});
|
...
|
...
|
@@ -162,7 +162,7 @@ |
162
|
162
|
<h1>云台控制</h1>
|
163
|
163
|
|
164
|
164
|
<div class="home mt-5">
|
165
|
|
- <Button class="front-sty-center child center" shape="circle" @click="handleClick(5)">
|
|
165
|
+ <Button class="front-sty-center child center" shape="circle" @click="handleClick()">
|
166
|
166
|
<PauseOutlined v-if="isPlay" class="child-icon" style="color: #fffbfb" />
|
167
|
167
|
<CaretRightOutlined v-else class="child-icon" style="color: #fffbfb" />
|
168
|
168
|
</Button>
|
...
|
...
|
|