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