Commit d0daf7a3 authored by zhanglw's avatar zhanglw

乐橙云视频

parent fefb398e
......@@ -5,14 +5,14 @@ ENV = 'development'
#VUE_APP_BASE_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_LOCAL_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_BASE_API = 'http://192.168.3.216:9092'
VUE_APP_LOCAL_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_API2 = 'http://192.168.3.216:9092/'
VUE_APP_WS_API = 'ws://192.168.3.216:9092/webSocket'
VUE_APP_LOCAL_API2 = 'http://192.168.3.23:9092/'
VUE_APP_WS_API = 'ws://192.168.3.23:9092/webSocket'
# 是否启用 babel-plugin-dynamic-import-node插件
VUE_CLI_BABEL_TRANSPILE_MODULES = true
{
"map3d": {
"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,
"shadows": false,
"removeDblClick": true,
......
......@@ -167,15 +167,8 @@ export default {
};
},
mounted() {
this.getCode();
this.videoPlayer = videojs('videoRealtime', {
bigPlayButton: false,
textTrackDisplay: false,
posterImage: true,
errorDisplay: false,
controlBar: true
}, function () {
console.log('video ready!')
this.$nextTick(() => {
this.getCode();
})
},
methods: {
......@@ -191,8 +184,24 @@ export default {
})
},
videoPlay(){
this.videoPlayer.src({src:this.cameraSrc,type:'application/x-mpegURL'});
this.videoPlayer.play();
this.$nextTick(() => {
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) {
this.$parent.closeHkView();
......
......@@ -41,8 +41,8 @@ export default {
weilanName:[],
areaColorData:[],
allCarInforData:[],
defaultjd:117.12111,
defaultwd:36.679,
defaultjd:114.14911,
defaultwd:35.683,
}
},
......@@ -128,12 +128,12 @@ export default {
})
}
})
}
})
},
//创建地图
initMars3d(options) {
let that = this;
......@@ -150,7 +150,7 @@ export default {
// 创建三维地球场景
map = new mars3d.Map(`mars3d-container${this.mapKey}`, mapOptions)
this[`map${this.mapKey}`] = map
//围栏回显
that.zuobianData.forEach(function(item,index){
var graphicLayer = new mars3d.layer.GraphicLayer();
......@@ -254,7 +254,7 @@ export default {
}
})
}, 4000)
},
// 在图层绑定Popup弹窗
......@@ -265,7 +265,7 @@ export default {
})
}
}
}
</script>
......@@ -273,7 +273,7 @@ export default {
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style >
.cesium-viewer-toolbar{
display: none !important;
}
.mars3d-compass{
......
......@@ -77,7 +77,7 @@
<div class="monitorCover1" v-show="monitorCover1Show">
<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.
</video>
</div>
......@@ -209,7 +209,7 @@ export default {
}, 20000)
//与嵌入的地图页面进行交互
window.addEventListener('message', this.handleMessage);
this.videoPlayer = videojs('videoRealtime', {
this.videoPlayer = videojs('videoRealtime_i', {
bigPlayButton: false,
textTrackDisplay: false,
posterImage: true,
......@@ -491,7 +491,7 @@ export default {
//与iframe的页面进行数据交互
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 == '监控'){
let number = event.data.data.data;
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