jiankongfangda
This commit is contained in:
parent
34e968f849
commit
c2c9f32908
|
@ -911,17 +911,21 @@ export default {
|
||||||
newEle.appendChild(title);
|
newEle.appendChild(title);
|
||||||
newEle.appendChild(close);
|
newEle.appendChild(close);
|
||||||
let newEle2 = document.createElement("video");
|
let newEle2 = document.createElement("video");
|
||||||
|
newEle2.controls = true;
|
||||||
|
newEle2.autoplay = true;
|
||||||
newEle2.id = item.markers[0].id + 'videoPlayer';
|
newEle2.id = item.markers[0].id + 'videoPlayer';
|
||||||
|
newEle2.name = item.markers[0].id + 'videoPlayer';
|
||||||
newEle2.setAttribute("style", "width: 327px;height:183px;background:url('/img/v_mask.png') no-repeat;background-size: 100% 100%;");
|
newEle2.setAttribute("style", "width: 327px;height:183px;background:url('/img/v_mask.png') no-repeat;background-size: 100% 100%;");
|
||||||
// 在对应dom 下追加创建的dom
|
// 在对应dom 下追加创建的dom
|
||||||
otest.appendChild(newEle);
|
otest.appendChild(newEle);
|
||||||
otest.appendChild(newEle2);
|
otest.appendChild(newEle2);
|
||||||
|
let flvPlayer = null,URLS=null;
|
||||||
newEle2.onclick = () => {
|
newEle2.onclick = () => {
|
||||||
newEle2.setAttribute("style", "width: 327px;height:183px;background:url(/img/rotate_line.png) no-repeat;background-size:60px 60px;background-position:center center;");
|
newEle2.setAttribute("style", "width: 327px;height:183px;background:url(/img/rotate_line.png) no-repeat;background-size:60px 60px;background-position:center center;");
|
||||||
this.$API.am.video.item.req(this.params).then(res => {
|
this.$API.am.video.item.req(this.params).then(res => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
this.url = res.url;
|
this.url = res.url;
|
||||||
let URLS = res.url.replace('192.168.10.253',sysConfig.VUE_APP_VIDEOHOST);
|
URLS = res.url.replace('192.168.10.253',sysConfig.VUE_APP_VIDEOHOST);
|
||||||
if (flvjs.isSupported()) {
|
if (flvjs.isSupported()) {
|
||||||
let videoElement = document.getElementById(item.markers[0].id + 'videoPlayer');
|
let videoElement = document.getElementById(item.markers[0].id + 'videoPlayer');
|
||||||
var mediaDataSource = {
|
var mediaDataSource = {
|
||||||
|
@ -932,7 +936,7 @@ export default {
|
||||||
withCredentials:false,
|
withCredentials:false,
|
||||||
url:URLS
|
url:URLS
|
||||||
};
|
};
|
||||||
let flvPlayer = flvjs.createPlayer(mediaDataSource, {
|
flvPlayer = flvjs.createPlayer(mediaDataSource, {
|
||||||
enableWorker: false,
|
enableWorker: false,
|
||||||
lazyLoadMaxDuration: 3 * 60,
|
lazyLoadMaxDuration: 3 * 60,
|
||||||
seekType: 'range',
|
seekType: 'range',
|
||||||
|
@ -940,12 +944,18 @@ export default {
|
||||||
flvPlayer.attachMediaElement(videoElement);
|
flvPlayer.attachMediaElement(videoElement);
|
||||||
newEle2.setAttribute("style", "width: 327px;height:183px;background:url(/img/rotate_line.png) no-repeat;background-size:60px 60px;background-position:center center;");
|
newEle2.setAttribute("style", "width: 327px;height:183px;background:url(/img/rotate_line.png) no-repeat;background-size:60px 60px;background-position:center center;");
|
||||||
flvPlayer.load();
|
flvPlayer.load();
|
||||||
|
flvPlayer.play();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
close.onclick = () => {
|
close.onclick = () => {
|
||||||
let nodeMark = document.getElementById(item.markers[0].id);
|
let nodeMark = document.getElementById(item.markers[0].id);
|
||||||
nodeMark.remove();
|
nodeMark.remove();
|
||||||
|
flvPlayer.pause();
|
||||||
|
flvPlayer.unload();
|
||||||
|
flvPlayer.detachMediaElement();
|
||||||
|
flvPlayer.destroy();
|
||||||
|
flvPlayer = null;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//人员
|
//人员
|
||||||
|
@ -1153,6 +1163,9 @@ export default {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.$API.ecm.event.cateAgg.req(that.cateAggForm).then(res => {
|
that.$API.ecm.event.cateAgg.req(that.cateAggForm).then(res => {
|
||||||
if (res.err_msg) { } else {
|
if (res.err_msg) { } else {
|
||||||
|
if(that.warningData.total != res.count){
|
||||||
|
that.getWarnings();
|
||||||
|
}
|
||||||
that.wStatistics = res;
|
that.wStatistics = res;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -3889,4 +3902,32 @@ export default {
|
||||||
color: cyan;
|
color: cyan;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
}
|
}
|
||||||
|
#bigScreeWrap{
|
||||||
|
position: fixed;
|
||||||
|
z-index: 9999;
|
||||||
|
top: 0;
|
||||||
|
display: none;
|
||||||
|
width: 100vw;
|
||||||
|
height: 100vh;
|
||||||
|
text-align: center;
|
||||||
|
background-color: rgba(0,0,0,0.8);
|
||||||
|
padding: 40px 20px 20px 20px;
|
||||||
|
}
|
||||||
|
.bigScreeImg{
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
background-color: red;
|
||||||
|
}
|
||||||
|
.bigScreeClose{
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
top: 10px;
|
||||||
|
right: 10px;
|
||||||
|
position: absolute;
|
||||||
|
background: url(/public/img/close.png) no-repeat;
|
||||||
|
}
|
||||||
|
#videoElement{
|
||||||
|
width: auto;
|
||||||
|
height: 60vh;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue