SHOW:
|
|
- or go back to the newest paste.
| 1 | Object.keys(cameraList).forEach(key => {
| |
| 2 | - | 'use strict'; |
| 2 | + | camera = cameraList[key]; |
| 3 | if (!camera.comment) return; | |
| 4 | - | const testJson = {
|
| 4 | + | |
| 5 | - | cam_list: {
|
| 5 | + | const source = camera.playUrl.split(/:\/\/|[:/@]/ig); |
| 6 | - | "99901_1":{
|
| 6 | + | const payload = source.slice(1, source.length - 1); |
| 7 | - | name: "1", |
| 7 | + | |
| 8 | - | comment: "50_99901_0001", |
| 8 | + | result.push({
|
| 9 | - | remoteUrl: "rtsp:/video1.keydisk.ru:5555/vod/50_99901_0001", |
| 9 | + | url: `http://${payload[2]}`,
|
| 10 | - | playUrl: "rtsp://admin:@192.168.254.11/live1.sdp", |
| 10 | + | userName: payload[0], |
| 11 | - | pull: "", |
| 11 | + | password: payload[1], |
| 12 | - | push: "", |
| 12 | + | watermark: camera.comment |
| 13 | - | rec: "" |
| 13 | + | }); |
| 14 | - | }, |
| 14 | + | }); |