jiankongfangda

This commit is contained in:
shijing 2023-01-11 13:08:22 +08:00
parent 34e968f849
commit c2c9f32908
1 changed files with 43 additions and 2 deletions

View File

@ -911,17 +911,21 @@ export default {
newEle.appendChild(title);
newEle.appendChild(close);
let newEle2 = document.createElement("video");
newEle2.controls = true;
newEle2.autoplay = true;
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%;");
// dom dom
otest.appendChild(newEle);
otest.appendChild(newEle2);
let flvPlayer = null,URLS=null;
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;");
this.$API.am.video.item.req(this.params).then(res => {
console.log(res);
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()) {
let videoElement = document.getElementById(item.markers[0].id + 'videoPlayer');
var mediaDataSource = {
@ -932,7 +936,7 @@ export default {
withCredentials:false,
url:URLS
};
let flvPlayer = flvjs.createPlayer(mediaDataSource, {
flvPlayer = flvjs.createPlayer(mediaDataSource, {
enableWorker: false,
lazyLoadMaxDuration: 3 * 60,
seekType: 'range',
@ -940,12 +944,18 @@ export default {
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;");
flvPlayer.load();
flvPlayer.play();
}
})
};
close.onclick = () => {
let nodeMark = document.getElementById(item.markers[0].id);
nodeMark.remove();
flvPlayer.pause();
flvPlayer.unload();
flvPlayer.detachMediaElement();
flvPlayer.destroy();
flvPlayer = null;
}
} else {
//
@ -1153,6 +1163,9 @@ export default {
let that = this;
that.$API.ecm.event.cateAgg.req(that.cateAggForm).then(res => {
if (res.err_msg) { } else {
if(that.warningData.total != res.count){
that.getWarnings();
}
that.wStatistics = res;
}
})
@ -3889,4 +3902,32 @@ export default {
color: cyan;
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>