|
@@ -1,7 +1,8 @@
|
|
<template>
|
|
<template>
|
|
<div class="H5PlayerVideo">
|
|
<div class="H5PlayerVideo">
|
|
<div :id="videoData.id" :ref="videoData.id"></div>
|
|
<div :id="videoData.id" :ref="videoData.id"></div>
|
|
- <!--<p class="el-icon-full-screen full-screen-button" @click="fullScreen"></p>-->
|
|
|
|
|
|
+ <p class="full-screen-button" @click="fullScreen"></p>
|
|
|
|
+ <!--<p class="full-failed-button" v-if="fullScreenType" @click="outFullScreen"></p>-->
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -13,6 +14,7 @@
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ fullScreenType:false,
|
|
videoCover: localStorage.getItem('fileBrowseEnvironment') + localStorage.getItem('videoCover'),
|
|
videoCover: localStorage.getItem('fileBrowseEnvironment') + localStorage.getItem('videoCover'),
|
|
videoData: {},
|
|
videoData: {},
|
|
}
|
|
}
|
|
@@ -32,6 +34,36 @@
|
|
})
|
|
})
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ //全屏
|
|
|
|
+ fullScreen() {
|
|
|
|
+ let self = this;
|
|
|
|
+ this.myPlugin.JS_FullScreenDisplay(true).then(
|
|
|
|
+ (res) => {
|
|
|
|
+ console.info('JS_FullScreenDisplay success');
|
|
|
|
+ // do you want...
|
|
|
|
+ },
|
|
|
|
+ (err) => {
|
|
|
|
+ console.info('JS_FullScreenDisplay failed');
|
|
|
|
+ // do you want...
|
|
|
|
+ }
|
|
|
|
+ );
|
|
|
|
+ self.$set(self,'fullScreenType',true);
|
|
|
|
+ },
|
|
|
|
+ //退出全屏
|
|
|
|
+ outFullScreen() {
|
|
|
|
+ let self = this;
|
|
|
|
+ this.myPlugin.JS_FullScreenDisplay(false).then(
|
|
|
|
+ (res) => {
|
|
|
|
+ console.info('JS_FullScreenDisplay success');
|
|
|
|
+ // do you want...
|
|
|
|
+ },
|
|
|
|
+ (err) => {
|
|
|
|
+ console.info('JS_FullScreenDisplay failed');
|
|
|
|
+ // do you want...
|
|
|
|
+ }
|
|
|
|
+ );
|
|
|
|
+ self.$set(self,'fullScreenType',false);
|
|
|
|
+ },
|
|
initH5Player(split) {
|
|
initH5Player(split) {
|
|
this.myPlugin = new window.JSPlugin({
|
|
this.myPlugin = new window.JSPlugin({
|
|
szId: this.videoData.id, //需要英文字母开头,唯一性,必填
|
|
szId: this.videoData.id, //需要英文字母开头,唯一性,必填
|
|
@@ -48,31 +80,43 @@
|
|
iMaxSplit: split,
|
|
iMaxSplit: split,
|
|
iCurrentSplit: split
|
|
iCurrentSplit: split
|
|
})
|
|
})
|
|
|
|
+ let iWndNum = 1;
|
|
|
|
+ let InterruptTime = 5;
|
|
|
|
+ this.myPlugin.JS_SetInterruptTime(iWndNum, InterruptTime).then(
|
|
|
|
+ () => {
|
|
|
|
+ // console.info('JS_SetInterruptTime success');
|
|
|
|
+ // do you want...
|
|
|
|
+ },
|
|
|
|
+ (err) => {
|
|
|
|
+ // console.info('JS_SetInterruptTime failed');
|
|
|
|
+ // do you want...
|
|
|
|
+ }
|
|
|
|
+ );
|
|
// 事件回调绑定
|
|
// 事件回调绑定
|
|
this.myPlugin.JS_SetWindowControlCallback({
|
|
this.myPlugin.JS_SetWindowControlCallback({
|
|
- windowEventSelect: function(iWndIndex) { //插件选中窗口回调
|
|
|
|
- console.log('windowSelect callback: ', iWndIndex)
|
|
|
|
|
|
+ windowEventSelect: function (iWndIndex) { //插件选中窗口回调
|
|
|
|
+ // console.log('windowSelect callback: ', iWndIndex)
|
|
},
|
|
},
|
|
- pluginErrorHandler: function(iWndIndex, iErrorCode, oError) { //插件错误回调
|
|
|
|
- console.log('pluginError callback: ', iWndIndex, iErrorCode, oError)
|
|
|
|
|
|
+ pluginErrorHandler: function (iWndIndex, iErrorCode, oError) { //插件错误回调
|
|
|
|
+ // console.log('pluginError callback: ', iWndIndex, iErrorCode, oError)
|
|
},
|
|
},
|
|
- windowEventOver: function(iWndIndex) { //鼠标移过回调
|
|
|
|
|
|
+ windowEventOver: function (iWndIndex) { //鼠标移过回调
|
|
//console.log(iWndIndex);
|
|
//console.log(iWndIndex);
|
|
},
|
|
},
|
|
- windowEventOut: function(iWndIndex) { //鼠标移出回调
|
|
|
|
|
|
+ windowEventOut: function (iWndIndex) { //鼠标移出回调
|
|
//console.log(iWndIndex);
|
|
//console.log(iWndIndex);
|
|
},
|
|
},
|
|
- windowEventUp: function(iWndIndex) { //鼠标mouseup事件回调
|
|
|
|
|
|
+ windowEventUp: function (iWndIndex) { //鼠标mouseup事件回调
|
|
//console.log(iWndIndex);
|
|
//console.log(iWndIndex);
|
|
},
|
|
},
|
|
- windowFullCcreenChange: function(bFull) { //全屏切换回调
|
|
|
|
- console.log('fullScreen callback: ', bFull)
|
|
|
|
|
|
+ windowFullCcreenChange: function (bFull) { //全屏切换回调
|
|
|
|
+ // console.log('fullScreen callback: ', bFull)
|
|
},
|
|
},
|
|
- firstFrameDisplay: function(iWndIndex, iWidth, iHeight) { //首帧显示回调
|
|
|
|
- console.log('firstFrame loaded callback: ', iWndIndex, iWidth, iHeight)
|
|
|
|
|
|
+ firstFrameDisplay: function (iWndIndex, iWidth, iHeight) { //首帧显示回调
|
|
|
|
+ // console.log('firstFrame loaded callback: ', iWndIndex, iWidth, iHeight)
|
|
},
|
|
},
|
|
- performanceLack: function() { //性能不足回调
|
|
|
|
- console.log('performanceLack callback: ')
|
|
|
|
|
|
+ performanceLack: function () { //性能不足回调
|
|
|
|
+ // console.log('performanceLack callback: ')
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -136,7 +180,8 @@
|
|
}
|
|
}
|
|
position: relative;
|
|
position: relative;
|
|
.full-screen-button {
|
|
.full-screen-button {
|
|
- color: #fff;
|
|
|
|
|
|
+ background: url("../../assets/ZDimages/basicsModules/icon_0.png");
|
|
|
|
+ background-size: 100%;
|
|
position: absolute;
|
|
position: absolute;
|
|
font-size: 20px;
|
|
font-size: 20px;
|
|
height: 30px;
|
|
height: 30px;
|
|
@@ -145,7 +190,21 @@
|
|
text-align: center;
|
|
text-align: center;
|
|
top: 0;
|
|
top: 0;
|
|
right: 0;
|
|
right: 0;
|
|
- z-index: 1;
|
|
|
|
|
|
+ z-index: 999;
|
|
|
|
+ cursor: pointer;
|
|
|
|
+ }
|
|
|
|
+ .full-failed-button {
|
|
|
|
+ background: url("../../assets/ZDimages/basicsModules/icon_0.png");
|
|
|
|
+ background-size: 100%;
|
|
|
|
+ position: fixed;
|
|
|
|
+ font-size: 20px;
|
|
|
|
+ height: 30px;
|
|
|
|
+ width: 30px;
|
|
|
|
+ line-height: 30px;
|
|
|
|
+ text-align: center;
|
|
|
|
+ bottom: 0;
|
|
|
|
+ right: 0;
|
|
|
|
+ z-index: 999999;
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
}
|
|
}
|
|
}
|
|
}
|