|
@@ -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" v-if="!fullScreenType" @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, //需要英文字母开头,唯一性,必填
|
|
@@ -146,7 +178,8 @@
|
|
}
|
|
}
|
|
|
|
|
|
.full-screen-button {
|
|
.full-screen-button {
|
|
- color: #fff;
|
|
|
|
|
|
+ background: url("../assets/icon_0.png");
|
|
|
|
+ background-size: 100%;
|
|
position: absolute;
|
|
position: absolute;
|
|
font-size: 20px;
|
|
font-size: 20px;
|
|
height: 30px;
|
|
height: 30px;
|
|
@@ -155,7 +188,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/icon_1.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;
|
|
}
|
|
}
|
|
|
|
|