|
@@ -3,9 +3,9 @@
|
|
|
<!-- -->
|
|
|
|
|
|
<div class="v-wrap-marks"></div>
|
|
|
- <video-player id="myVideo" class="video-player-box" ref="videoPlayer" :playsinline="true" @pause="onPlayerPause($event)"
|
|
|
- @timeupdate="onPlayerTimeupdate($event)" @play="onPlayerStart($event)" @ready="playerReadied" @ended="onPlayerEnded($event)"
|
|
|
- :globalOptions="{controls:true}" :options="options">
|
|
|
+ <video-player id="myVideo" class="video-player-box" ref="videoPlayer" :playsinline="true"
|
|
|
+ @pause="onPlayerPause($event)" @timeupdate="onPlayerTimeupdate($event)" @play="onPlayerStart($event)"
|
|
|
+ @ready="playerReadied" @ended="onPlayerEnded($event)" :globalOptions="{controls:true}" :options="options">
|
|
|
</video-player>
|
|
|
<div class="dialog-footer pt30">
|
|
|
<el-row class="media-footer">
|
|
@@ -15,14 +15,16 @@
|
|
|
<span>{{media.duration|useTime}}</span>
|
|
|
</el-col>
|
|
|
<el-col :span="4" class="media-center">
|
|
|
- <el-button class="bicon" v-if="!onPlay" type="primary" @click="doPlay" icon="el-icon-video-play" circle></el-button>
|
|
|
+ <el-button class="bicon" v-if="!onPlay" type="primary" @click="doPlay" icon="el-icon-video-play"
|
|
|
+ circle></el-button>
|
|
|
<el-button class="bicon" v-else type="warning" @click="doPause" icon="el-icon-video-pause" circle></el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="10" class="media-select">
|
|
|
<el-button class="bicon" type="danger" icon="el-icon-close" @click="onClose" style="float: right;">
|
|
|
</el-button>
|
|
|
<div style="margin-top:0px;float: right;">
|
|
|
- <el-select placeholder="流畅" :value="mediaType" class="media-el-select" @change="(val)=>{$emit('changeMedia', val)}">
|
|
|
+ <el-select placeholder="流畅" :value="mediaType" class="media-el-select"
|
|
|
+ @change="(val)=>{$emit('changeMedia', val)}">
|
|
|
<el-option label="流畅" value="ld"></el-option>
|
|
|
<el-option label="标清" value="hls"></el-option>
|
|
|
</el-select>
|
|
@@ -132,7 +134,7 @@
|
|
|
methods: {
|
|
|
setMarks() {
|
|
|
console.log("setMarks")
|
|
|
- if( !this.options.marks ) return;
|
|
|
+ if (!this.options.marks) return;
|
|
|
var div = document.getElementById('myVideo')
|
|
|
var div1 = div.firstChild
|
|
|
var div3 = document.createElement("div");
|
|
@@ -166,14 +168,14 @@
|
|
|
console.log("playerReadied", audio)
|
|
|
let that = this;
|
|
|
// if (this.media.position) {
|
|
|
- // this.setposition(this.media.position);
|
|
|
+ // this.setposition(this.media.position);
|
|
|
if (this.media.position > 5 && this.media.position < this.media.duration) {
|
|
|
setTimeout(() => {
|
|
|
this.setposition(this.media.position)
|
|
|
}, 2000)
|
|
|
}
|
|
|
this.isReady = true
|
|
|
- setTimeout(()=> this.setMarks(), 600);
|
|
|
+ setTimeout(() => this.setMarks(), 600);
|
|
|
},
|
|
|
onPlayerTimeupdate(player) {
|
|
|
let myPlayer = this.$refs.videoPlayer.player;
|
|
@@ -242,6 +244,33 @@
|
|
|
// that.doPlay()
|
|
|
}
|
|
|
});
|
|
|
+ // 监听F12
|
|
|
+ document.addEventListener("keydown", function(e) {
|
|
|
+ if (e.key == "F12") {
|
|
|
+ that.reportErr("play", 'keydownF12');
|
|
|
+ e.preventDefault();
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ setInterval(function() { check() }, 1000);
|
|
|
+
|
|
|
+ var check = function() {
|
|
|
+ function doCheck(a) {
|
|
|
+ if (("" + a / a)["length"] !== 1 || a % 20 === 0) {
|
|
|
+ (function() {}
|
|
|
+ ["constructor"]("debugger")())
|
|
|
+ } else {
|
|
|
+ (function() {}
|
|
|
+ ["constructor"]("debugger")())
|
|
|
+ }
|
|
|
+ doCheck(++a)
|
|
|
+ }
|
|
|
+ try {
|
|
|
+ doCheck(0)
|
|
|
+ } catch (err) {}
|
|
|
+ };
|
|
|
+
|
|
|
+
|
|
|
},
|
|
|
// startMonitor() {
|
|
|
// let that = this
|
|
@@ -301,6 +330,10 @@
|
|
|
if (!isFinish) {
|
|
|
if (!this.onPlay) return;
|
|
|
}
|
|
|
+ if(window.navigator.webdriver){
|
|
|
+ this.doPause()
|
|
|
+ return
|
|
|
+ }
|
|
|
// 强制完成
|
|
|
let param = {
|
|
|
id: media.id,
|