diff --git a/config.json b/config.json index dfc8e15..70d00e8 100644 --- a/config.json +++ b/config.json @@ -1,4 +1,4 @@ { - "serverIp": "http://localhost:9007", + "serverIp": "http://192.168.8.140:9007", "webRtcIp": "192.168.8.140:8083" } \ No newline at end of file diff --git a/index.html b/index.html index 4eb8c39..e444519 100644 --- a/index.html +++ b/index.html @@ -16,28 +16,28 @@ let webRtc = data["webRtcIp"] WebRtcPlayer.setServer(webRtc); $.ajax({ - url:ip+'/api/realTime/allCameras', - type:'get', - data:{}, - dataType:'json', - success:function(data){ - for(camera of data.data){ - var video = document.createElement('video') - video.setAttribute('id',camera.id) - video.autoplay = true - video.controls = true - video.muted = true - video.style = 'width:700px;' - video.setAttribute('class','video') - body.appendChild(video) - let player = new WebRtcPlayer(camera.id,'camera'+camera.id); - player.load('camera'+camera.id) + url:ip+'/api/realTime/allCameras', + type:'get', + data:{}, + dataType:'json', + success:function(data){ + for(camera of data.data){ + var video = document.createElement('video') + video.setAttribute('id',camera.id) + video.autoplay = true + video.controls = true + video.muted = true + video.style = 'width:700px;' + video.setAttribute('class','video') + body.appendChild(video) + let player = new WebRtcPlayer(camera.id,'camera'+camera.id); + player.load('camera'+camera.id) + } + }, + error:function(){ + console.log('请求出错!'); } - }, - error:function(){ - console.log('请求出错!'); - } - }) + }) }); diff --git a/street.html b/street.html new file mode 100644 index 0000000..dc0d626 --- /dev/null +++ b/street.html @@ -0,0 +1,110 @@ + + + +
+