Commit d0daf7a3 authored by zhanglw's avatar zhanglw

乐橙云视频

parent fefb398e
...@@ -5,14 +5,14 @@ ENV = 'development' ...@@ -5,14 +5,14 @@ ENV = 'development'
#VUE_APP_BASE_API = 'http://39.164.225.220:5002' #VUE_APP_BASE_API = 'http://39.164.225.220:5002'
#VUE_APP_LOCAL_API = 'http://39.164.225.220:5002' #VUE_APP_LOCAL_API = 'http://39.164.225.220:5002'
#VUE_APP_BASE_API = 'http://192.168.3.23:9092' VUE_APP_BASE_API = 'http://192.168.3.23:9092'
#VUE_APP_LOCAL_API = 'http://192.168.3.23:9092' VUE_APP_LOCAL_API = 'http://192.168.3.23:9092'
VUE_APP_BASE_API = 'http://192.168.3.216:9092' #VUE_APP_BASE_API = 'http://192.168.3.216:9092'
VUE_APP_LOCAL_API = 'http://192.168.3.216:9092' #VUE_APP_LOCAL_API = 'http://192.168.3.216:9092'
VUE_APP_LOCAL_API2 = 'http://192.168.3.216:9092/' VUE_APP_LOCAL_API2 = 'http://192.168.3.23:9092/'
VUE_APP_WS_API = 'ws://192.168.3.216:9092/webSocket' VUE_APP_WS_API = 'ws://192.168.3.23:9092/webSocket'
# 是否启用 babel-plugin-dynamic-import-node插件 # 是否启用 babel-plugin-dynamic-import-node插件
VUE_CLI_BABEL_TRANSPILE_MODULES = true VUE_CLI_BABEL_TRANSPILE_MODULES = true
{ {
"map3d": { "map3d": {
"scene": { "scene": {
"center": {"lat":37.4900,"lng":122.04849,"alt":1000,"heading":360,"pitch":-90}, "center": {"lat":35.683,"lng":114.14911,"alt":1000,"heading":360,"pitch":-90},
"scene3DOnly": false, "scene3DOnly": false,
"shadows": false, "shadows": false,
"removeDblClick": true, "removeDblClick": true,
......
...@@ -167,15 +167,8 @@ export default { ...@@ -167,15 +167,8 @@ export default {
}; };
}, },
mounted() { mounted() {
this.getCode(); this.$nextTick(() => {
this.videoPlayer = videojs('videoRealtime', { this.getCode();
bigPlayButton: false,
textTrackDisplay: false,
posterImage: true,
errorDisplay: false,
controlBar: true
}, function () {
console.log('video ready!')
}) })
}, },
methods: { methods: {
...@@ -191,8 +184,24 @@ export default { ...@@ -191,8 +184,24 @@ export default {
}) })
}, },
videoPlay(){ videoPlay(){
this.videoPlayer.src({src:this.cameraSrc,type:'application/x-mpegURL'}); this.$nextTick(() => {
this.videoPlayer.play(); if (this.videoPlayer) {
this.videoPlayer.src({src: this.cameraSrc, type: 'application/x-mpegURL'});
this.videoPlayer.play();
} else {
this.videoPlayer = videojs('videoRealtime', {
bigPlayButton: false,
textTrackDisplay: false,
posterImage: true,
errorDisplay: false,
controlBar: true
}, () => {
this.videoPlayer.src({src: this.cameraSrc, type: 'application/x-mpegURL'});
this.videoPlayer.play();
console.log('video ready!')
})
}
})
}, },
handleNodeClick(data) { handleNodeClick(data) {
this.$parent.closeHkView(); this.$parent.closeHkView();
......
...@@ -41,8 +41,8 @@ export default { ...@@ -41,8 +41,8 @@ export default {
weilanName:[], weilanName:[],
areaColorData:[], areaColorData:[],
allCarInforData:[], allCarInforData:[],
defaultjd:117.12111, defaultjd:114.14911,
defaultwd:36.679, defaultwd:35.683,
} }
}, },
...@@ -128,12 +128,12 @@ export default { ...@@ -128,12 +128,12 @@ export default {
}) })
} }
}) })
} }
}) })
}, },
//创建地图 //创建地图
initMars3d(options) { initMars3d(options) {
let that = this; let that = this;
...@@ -150,7 +150,7 @@ export default { ...@@ -150,7 +150,7 @@ export default {
// 创建三维地球场景 // 创建三维地球场景
map = new mars3d.Map(`mars3d-container${this.mapKey}`, mapOptions) map = new mars3d.Map(`mars3d-container${this.mapKey}`, mapOptions)
this[`map${this.mapKey}`] = map this[`map${this.mapKey}`] = map
//围栏回显 //围栏回显
that.zuobianData.forEach(function(item,index){ that.zuobianData.forEach(function(item,index){
var graphicLayer = new mars3d.layer.GraphicLayer(); var graphicLayer = new mars3d.layer.GraphicLayer();
...@@ -254,7 +254,7 @@ export default { ...@@ -254,7 +254,7 @@ export default {
} }
}) })
}, 4000) }, 4000)
}, },
// 在图层绑定Popup弹窗 // 在图层绑定Popup弹窗
...@@ -265,7 +265,7 @@ export default { ...@@ -265,7 +265,7 @@ export default {
}) })
} }
} }
} }
</script> </script>
...@@ -273,7 +273,7 @@ export default { ...@@ -273,7 +273,7 @@ export default {
<!-- Add "scoped" attribute to limit CSS to this component only --> <!-- Add "scoped" attribute to limit CSS to this component only -->
<style > <style >
.cesium-viewer-toolbar{ .cesium-viewer-toolbar{
display: none !important; display: none !important;
} }
.mars3d-compass{ .mars3d-compass{
......
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
<div class="monitorCover1" v-show="monitorCover1Show"> <div class="monitorCover1" v-show="monitorCover1Show">
<div class="monitorCover1_closePic" @click="closeMonitorCoverFn"></div> <div class="monitorCover1_closePic" @click="closeMonitorCoverFn"></div>
<video id="videoRealtime" class="video-js vjs-default-skin vjs-big-play-centered monitorCover1_Video" controls preload="auto" data-setup="{}"> <video id="videoRealtime_i" class="video-js vjs-default-skin vjs-big-play-centered monitorCover1_Video" controls preload="auto" data-setup="{}">
您的浏览器不支持:HTML5 video. 您的浏览器不支持:HTML5 video.
</video> </video>
</div> </div>
...@@ -209,7 +209,7 @@ export default { ...@@ -209,7 +209,7 @@ export default {
}, 20000) }, 20000)
//与嵌入的地图页面进行交互 //与嵌入的地图页面进行交互
window.addEventListener('message', this.handleMessage); window.addEventListener('message', this.handleMessage);
this.videoPlayer = videojs('videoRealtime', { this.videoPlayer = videojs('videoRealtime_i', {
bigPlayButton: false, bigPlayButton: false,
textTrackDisplay: false, textTrackDisplay: false,
posterImage: true, posterImage: true,
...@@ -491,7 +491,7 @@ export default { ...@@ -491,7 +491,7 @@ export default {
//与iframe的页面进行数据交互 //与iframe的页面进行数据交互
handleMessage(event){//event.data为传递的参数 handleMessage(event){//event.data为传递的参数
//这里的判断是因为此方法会多次触发,通过参数是否存在可以判断是否为子页面传递的参数,再做出相应的操作 //这里的判断是因为此方法会多次触发,通过参数是否存在可以判断是否为子页面传递的参数,再做出相应的操作
if(event.data.data.hasOwnProperty("url")){ if(event.data && event.data.data && event.data.data.hasOwnProperty("url")){
if(event.data.data.url == '监控'){ if(event.data.data.url == '监控'){
let number = event.data.data.data; let number = event.data.data.data;
HttpReq.truckDispatching.jkcarMonitorFind({carNumber: number}).then((res) => { HttpReq.truckDispatching.jkcarMonitorFind({carNumber: number}).then((res) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment