|
@@ -252,7 +252,6 @@ export default ({
|
252
|
252
|
// })
|
253
|
253
|
|
254
|
254
|
let res = await getDevice()
|
255
|
|
- console.log('s12312123', res);
|
256
|
255
|
if (res.code !== 200) {
|
257
|
256
|
ElMessage.error("数据请求出错");
|
258
|
257
|
}
|
|
@@ -268,32 +267,28 @@ export default ({
|
268
|
267
|
|
269
|
268
|
monitor.map((res) => {
|
270
|
269
|
console.log('sadhi2', res.activeMonitor);
|
271
|
|
-
|
272
|
|
- res.activeMonitor.array.map(array => {
|
273
|
|
-
|
|
270
|
+ if(res.activeMonitor.array){
|
|
271
|
+ res.activeMonitor.array.map(array => {
|
274
|
272
|
//视频转码
|
275
|
273
|
getvideo({
|
276
|
274
|
"rtsp": array.src,
|
277
|
275
|
}).then((res) => {
|
278
|
|
- console.log('sadnuq21', res.data);
|
279
|
|
- console.log('sadnuq2121', res.data.httpFlv);
|
280
|
276
|
// array.src = 'http://kbs-dokdo.gscdn.com/dokdo_300/_definst_/dokdo_300.stream/playlist.m3u8'
|
281
|
|
- array.src=res.data.httpFlv
|
|
277
|
+ array.src=res.data.httpFlv
|
282
|
278
|
})
|
283
|
|
-
|
284
|
|
-
|
285
|
|
- })
|
286
|
|
- res.activeMonitor.array1.map(array1 => {
|
287
|
|
- console.log('asdui1231', array1);
|
|
279
|
+ })
|
|
280
|
+ }
|
|
281
|
+ if ( res.activeMonitor.array1) {
|
|
282
|
+ res.activeMonitor.array1.map(array1 => {
|
288
|
283
|
//视频转码
|
289
|
284
|
getvideo({
|
290
|
285
|
"rtsp": array1.src,
|
291
|
286
|
}).then((res) => {
|
292
|
|
- console.log('sadnuq212123s2', res.data);
|
293
|
287
|
// array1.src = 'http://kbs-dokdo.gscdn.com/dokdo_300/_definst_/dokdo_300.stream/playlist.m3u8'
|
294
|
288
|
array1.src=res.data.httpFlv
|
295
|
289
|
})
|
296
|
290
|
})
|
|
291
|
+ }
|
297
|
292
|
|
298
|
293
|
|
299
|
294
|
})
|