Commit c6ddf29b by 潘建波

提交视屏播放

1 parent 188bc9f0
...@@ -2,8 +2,20 @@ ...@@ -2,8 +2,20 @@
<div class="item"> <div class="item">
<div class="player"> <div class="player">
<div class="ocx-box"> <div class="ocx-box">
<object id="VionVideo" classid="clsid:96DFBBAF-4220-4978-9681-4ABA534A7718" <!-- <object id="VionVideo" classid="clsid:96DFBBAF-4220-4978-9681-4ABA534A7718"
width="98%" height="850" style="margin-left:.9%"> width="98%" height="450" style="margin-left:.9%">
</object> -->
<object height="90%" width="100%" id="nvrTotalOcx" name="nvrTotalOcx"
classid="CLSID:96DFBBAF-4220-4978-9681-4ABA534A7718"
style="margin-top:20px"
>
<param name="BorderStyle" value="1" />
<param name="MousePointer" value="0" />
<param name="Enabled" value="1" />
<param name="Min" value="0" />
<param name="Max" value="10" />
<embed wmode="opaque"></embed>
<param name="wmode" value="transparent">
</object> </object>
</div> </div>
</div> </div>
...@@ -45,22 +57,30 @@ export default { ...@@ -45,22 +57,30 @@ export default {
this.checkIE(); this.checkIE();
}, },
computed(){ computed(){
this.initocx();
}, },
mounted() { mounted() {
VionVideo.Init(0, 'Null', 4); var testStr = 'Null';
try { nvrTotalOcx.Init(0, testStr, 4);
if (document.getElementById("VionVideo").GetVersion()) { nvrTotalOcx.SetSingleWindow(true);
} nvrTotalOcx.SetParam("SetLanguage", "Chinese");
} catch (error) { nvrTotalOcx.SetParam("VideoSize", 0);
this.downloadOCx(); var medianame = '视频0';
} var hostname = window.location.hostname;
var port,url;
port=8554;
url = "rtsp://192.168.9.133:8554//opt/data/vedio/1579253441478.264";
let a = ''
setTimeout(()=>{
a = nvrTotalOcx.PlayRealVideo(url,1,'video','192.168.9.133',0);
},500)
setTimeout(()=>{
a = nvrTotalOcx.PlayRealVideo(url,1,'video','192.168.9.133',0);
},1000)
console.log('shipin'+a)
}, },
watch: { watch: {
playersrc(val) {
alert(1)
document.getElementById("VionVideo").StartPlay(val, 0);
},
}, },
beforeDestroy: function () { beforeDestroy: function () {
if (this.videoplayer.techName_ == "Flash" && this.videoplayer.pause) { if (this.videoplayer.techName_ == "Flash" && this.videoplayer.pause) {
...@@ -72,5 +92,8 @@ export default { ...@@ -72,5 +92,8 @@ export default {
</script> </script>
<style lang="stylus" scoped> <style lang="stylus" scoped>
.ocx-box{
height 50vh
width 35vw
}
</style> </style>
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
<!-- <eventList></eventList> --> <!-- <eventList></eventList> -->
<devInfo></devInfo> <devInfo></devInfo>
</div> </div>
<div class="video-box"> <div class="video-box" v-show="ocxstatus">
<div class="video-box-close"></div> <div class="video-box-close" @click="closeocx"></div>
<!-- <mPlayvideo :playersrc="playurl"></mPlayvideo> --> <!-- <mPlayvideo :playersrc="playurl"></mPlayvideo> -->
<!-- <videoPlay ref="mapvideo1" :playurl="playurl"></videoPlay> --> <!-- <videoPlay ref="mapvideo1" :playurl="playurl"></videoPlay> -->
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
<script> <script>
// import mPlayvideo from "../public/mapvideo" // import mPlayvideo from "../public/mapvideo"
import videoPlay from "../public/mapvideo"; // import videoPlay from "../public/mapvideo";
import videoPlay2 from "../public/mapvideo2"; import videoPlay2 from "../public/mapvideo2";
import showmap from "./map"; import showmap from "./map";
import illegaltrend from "./illegaltrend"; import illegaltrend from "./illegaltrend";
...@@ -122,10 +122,11 @@ export default { ...@@ -122,10 +122,11 @@ export default {
keyVehicleData: [], keyVehicleData: [],
illageList: [], illageList: [],
setShow: false, setShow: false,
ocxstatus:true,
archiveUnid: 0, archiveUnid: 0,
snap_num: 0, snap_num: 0,
playurl: {}, playurl: {},
playurl2:{}, playurl2:"",
audit_num: 0, audit_num: 0,
snapData: { snapData: {
illega_total_snap_num: 0, illega_total_snap_num: 0,
...@@ -138,7 +139,7 @@ export default { ...@@ -138,7 +139,7 @@ export default {
components: { components: {
showmap, showmap,
// mPlayvideo, // mPlayvideo,
videoPlay, // videoPlay,
videoPlay2, videoPlay2,
illegaltrend, illegaltrend,
eventTypedis, eventTypedis,
...@@ -158,14 +159,7 @@ export default { ...@@ -158,14 +159,7 @@ export default {
// this.$refs.mapvideo.videoPlay(); // this.$refs.mapvideo.videoPlay();
// },100) // },100)
// }) // })
let obj = {}
obj.rtsp_url = "rtsp://192.168.9.133:8554//opt/data/vedio/1579253441478.264";
this.playurl = obj
this.playurl2 = obj
setTimeout(() => {
this.$refs.mapvideo1.videoPlay();
this.$refs.mapvideo2.videoPlay();
}, 1000);
}, },
methods: { methods: {
...@@ -173,6 +167,9 @@ export default { ...@@ -173,6 +167,9 @@ export default {
//移动地图 //移动地图
this.$refs.map.movemap(data); this.$refs.map.movemap(data);
}, },
closeocx(){
this.ocxstatus=false;
},
getTrafficSnap() { getTrafficSnap() {
this.$api.show.getTrafficSnap().then(res => { this.$api.show.getTrafficSnap().then(res => {
this.snapData = res; this.snapData = res;
...@@ -412,8 +409,8 @@ export default { ...@@ -412,8 +409,8 @@ export default {
.video-box { .video-box {
position: absolute; position: absolute;
height: 46.5vh; height 48vh
width: 30vw; width 35vw
margin-bottom: 1vh; margin-bottom: 1vh;
background: #f0f0f0; background: #f0f0f0;
left: 0; left: 0;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!