视频播放调整
This commit is contained in:
parent
a763880dac
commit
51e700a2ad
@ -1,8 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog v-dialogDrag :title="sceneName" :visible.sync="dialogVisible" width="50%" :before-close="handleClose" center :close-on-click-modal="false">
|
<el-dialog v-dialogDrag :title="sceneName" :visible.sync="dialogVisible" width="50%" :before-close="handleClose" center :close-on-click-modal="false">
|
||||||
<div v-loading="loading">
|
<div>
|
||||||
<video-player
|
<video-player
|
||||||
v-show="!loading"
|
|
||||||
ref="videoPlayer"
|
ref="videoPlayer"
|
||||||
:playsinline="false"
|
:playsinline="false"
|
||||||
:options="playOptions"
|
:options="playOptions"
|
||||||
@ -18,7 +17,6 @@ import { getContextSenceDetail } from '@/api/contest';
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
loading: false,
|
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
sceneName:'播放视频',
|
sceneName:'播放视频',
|
||||||
playedTime: '',
|
playedTime: '',
|
||||||
@ -62,12 +60,10 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(sceneId) {
|
doShow(sceneId) {
|
||||||
this.dialogVisible = true;
|
|
||||||
this.loading = true;
|
|
||||||
getContextSenceDetail(sceneId).then((res) => {
|
getContextSenceDetail(sceneId).then((res) => {
|
||||||
|
this.dialogVisible = true;
|
||||||
this.playOptions.sources[0].src = `${this.urlPrefix}/${res.data.scene.url}`;
|
this.playOptions.sources[0].src = `${this.urlPrefix}/${res.data.scene.url}`;
|
||||||
this.sceneName = res.data.name;
|
this.sceneName = res.data.name;
|
||||||
this.loading = false;
|
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$message.error(error.message);
|
this.$message.error(error.message);
|
||||||
});
|
});
|
||||||
@ -117,5 +113,11 @@ export default {
|
|||||||
.el-dialog__body{
|
.el-dialog__body{
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
}
|
}
|
||||||
|
.video-js .vjs-big-play-button {
|
||||||
|
top: 50% !important;
|
||||||
|
left: 50% !important;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
background-color: black;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
Loading…
Reference in New Issue
Block a user