Browse Source

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

Lita-Tako 4 months ago
parent
commit
ebdbfcfd31
2 changed files with 4 additions and 3 deletions
  1. 2 2
      src/components/video/Live.vue
  2. 2 1
      src/components/video/Replay.vue

+ 2 - 2
src/components/video/Live.vue

@@ -273,8 +273,8 @@
273 273
 		console.log('选择摄像头', camera)
274 274
 		const { cameraIndexCode } = camera
275 275
 		getPreview({ cameraIndexCode, protocol: 'WS' }).then((resp) => {
276
-			if (!resp || !resp.url) return message.error('无法获取视频地址')
277
-
276
+			if (!resp || !resp.data || !resp.data.url) return message.error('无法获取视频地址')
277
+			const url = resp.data.url
278 278
 			const exists = Object.values(videoMap).findIndex((u) => u.url === url)
279 279
 			if (exists >= 0) {
280 280
 				return message.warning(`该视频已经在 ${exists + 1} 窗口播放`)

+ 2 - 1
src/components/video/Replay.vue

@@ -181,7 +181,8 @@
181 181
 		}
182 182
 		const { cameraIndexCode } = camera
183 183
 		getPlaybackVideo({ cameraIndexCode }).then((resp) => {
184
-			const { url } = resp
184
+			if (!resp || !resp.data || !resp.data.url) return message.error('无法获取视频地址')
185
+			const url = resp.data.url
185 186
 			if (url) {
186 187
 				const [realUrl, params] = url.split('?')
187 188
 				const [startTime, endTime] = date.value