| | |
| | | <div class="video-area"> |
| | | <!-- 播放器区域 --> |
| | | <div class="players" ref="playerWrap"> |
| | | <div class="single"></div> |
| | | <template v-if="guid == 1"> |
| | | <div |
| | | class="video-item" |
| | | class="video-item single" |
| | | :ref="`gridVideoItem_${index}`" |
| | | v-for="(item, index) in videoWrapArr" |
| | | :key="item.id" |
| | |
| | | <div style="display: none"></div> |
| | | <div class="currentPlayer"> |
| | | <ali-player |
| | | @pause="isStop = true" |
| | | @play="isStop = false" |
| | | @pause="singlePause" |
| | | @play="singlePlay" |
| | | @timeupdate="timeUpdate" |
| | | :source="curVideo.VideoPath | fixPath" |
| | | :markers="curVideo.marks" |
| | | :markers="marks_filter" |
| | | :ref="`player_${curVideo.id}`" |
| | | /> |
| | | </div> |
| | |
| | | <ali-player |
| | | @timeupdate="timeUpdate(e, index)" |
| | | :source="videoArrs[index].VideoPath | fixPath" |
| | | :markers="videoArrs[index].marks" |
| | | :markers="marks_filter_arr[index].marks" |
| | | @pause="isStop = true" |
| | | @play="isStop = false" |
| | | :ref="`player_${videoArrs[index].id}`" |
| | |
| | | <div class="progress-bar"> |
| | | <el-tooltip |
| | | placement="top" |
| | | v-for="(item, index) in eventMarks" |
| | | v-for="(item, index) in eventMarks_filter" |
| | | :key="item.offset + index" |
| | | > |
| | | <div slot="content"> |
| | |
| | | curTime(newVal) { |
| | | this.curPlayTime = this.getTimeStr(newVal); |
| | | }, |
| | | /* showHand() { |
| | | let arr = this.videoArrs.map((item) => { |
| | | item.marks = item.marks.filter((mark) => { |
| | | console.log(mark.text); |
| | | return mark.text != "手比: 手比"; |
| | | }); |
| | | }); |
| | | console.log(arr); |
| | | }, */ |
| | | }, |
| | | mounted() { |
| | | setTimeout(() => { |
| | | console.log(this.yinhuanArr); |
| | | }, 1000); |
| | | this.renderLabelOpts(); |
| | | |
| | | this.setGuid(1); |
| | | |
| | | this.getCurVideos(this.videoDetails); |
| | | |
| | | this.getRelatedVideos(this.videoDetails); |
| | | // this.getRelatedVideos(this.videoDetails); |
| | | }, |
| | | destroyed() { |
| | | this.videoArrs.length = 0; |
| | |
| | | this.progressChange(this.curTime); |
| | | }, |
| | | progressChange(val) { |
| | | this.showPlayBtn = false; |
| | | this.showPlayBtn = true; |
| | | let that = this; |
| | | if (this.guid == 1) { |
| | | this.$refs[`player_${this.curVideo.id}`][0].pause(); |
| | |
| | | } else { |
| | | this.videoArrs.forEach((v, i) => { |
| | | this.$refs[`player_${v.id}`][0].seek(val); |
| | | this.$refs[`player_${v.id}`][0].pause(); |
| | | if (i == 0) { |
| | | let curT = this.$refs[`player_${v.id}`][0].getCurrentTime(); |
| | | } |
| | |
| | | console.log(this.$refs); |
| | | }); |
| | | }, |
| | | |
| | | // 分窗口 |
| | | setGuid(guid) { |
| | | let _this = this; |
| | | this.guid = guid; |
| | |
| | | this.showLocChoise = true; |
| | | } else { |
| | | this.showLocChoise = false; |
| | | console.log(this.$refs[`player_${this.curVideo.id}`]); |
| | | this.$refs[`player_${this.curVideo.id}`][0].pause(); |
| | | this.$refs[`player_${this.curVideo.id}`][0].seek(0); |
| | | } |
| | |
| | | closeHand() { |
| | | this.showHand = false; |
| | | }, |
| | | singlePause() { |
| | | this.isStop = true; |
| | | this.showPlayBtn = true; |
| | | }, |
| | | singlePlay() { |
| | | this.isStop = false; |
| | | this.showPlayBtn = false; |
| | | }, |
| | | }, |
| | | computed: { |
| | | yinhuanArr() { |
| | | console.log(this.curVideo.IsOperate); |
| | | if (this.curVideo.IsOperate == 0) { |
| | | return []; |
| | | } |
| | | console.log(this.eventMarks); |
| | | return this.eventMarks.filter((x) => { |
| | | return ( |
| | | (x.text.indexOf("进出站") > -1 || |
| | |
| | | x.state == 0 |
| | | ); |
| | | }); |
| | | }, |
| | | marks_filter() { |
| | | if (this.showHand) { |
| | | return this.curVideo.marks; |
| | | } else |
| | | return this.curVideo.marks.map((item) => { |
| | | if (item.text != "手比: 手比") { |
| | | return item; |
| | | } |
| | | }); |
| | | }, |
| | | marks_filter_arr() { |
| | | if (this.showHand) { |
| | | return this.videoArrs; |
| | | } else { |
| | | let arr = this.videoArrs.map((item) => { |
| | | let obj = { ...item }; |
| | | let temp = []; |
| | | obj.marks.forEach((mark) => { |
| | | if (mark.text != "手比: 手比") { |
| | | temp.push(mark); |
| | | } |
| | | }); |
| | | obj.marks = temp; |
| | | return obj; |
| | | }); |
| | | return arr; |
| | | } |
| | | }, |
| | | eventMarks_filter() { |
| | | if (this.showHand) { |
| | | return this.eventMarks; |
| | | } else { |
| | | let arr = []; |
| | | this.eventMarks.map((item) => { |
| | | if (item.text != "手比: 手比") { |
| | | arr.push(item); |
| | | } |
| | | }); |
| | | return arr; |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | height: 512px; |
| | | .single { |
| | | .prism-controlbar { |
| | | display: none !important; |
| | | } |
| | | } |
| | | .video-item { |
| | | background: black; |
| | | box-sizing: border-box; |
| | |
| | | } |
| | | } |
| | | } |
| | | .el-tooltip__popper { |
| | | * { |
| | | color: #fff; |
| | | } |
| | | } |
| | | |
| | | .prism-marker-text { |
| | | p { |
| | | color: #fff; |
| | | } |
| | | } |
| | | |
| | | .video-box-top b { |
| | | color: #fff; |
| | | } |
| | | </style> |