File tree Expand file tree Collapse file tree 4 files changed +11
-6
lines changed
Message/MessageFiles/MessageFile Expand file tree Collapse file tree 4 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -168,7 +168,7 @@ export default {
168168 scrollDistance: { type: Number , default: 60 },
169169 acceptedFiles: { type: String , default: ' *' },
170170 templatesText: { type: Array , default: null },
171- mediaModalPreview : { type: Boolean , default: true }
171+ mediaPreviewEnabled : { type: Boolean , default: true }
172172 },
173173
174174 emits: [
@@ -341,7 +341,7 @@ export default {
341341 this .$emit (' delete-message' , { message, roomId: this .room .roomId })
342342 },
343343 openFile ({ message, file }) {
344- if (this .mediaModalPreview && file .action === ' preview' ) {
344+ if (this .mediaPreviewEnabled && file .action === ' preview' ) {
345345 this .filePreview = file .file
346346 this .showMediaPreview = true
347347 } else {
Original file line number Diff line number Diff line change 1616 />
1717 </div >
1818
19- <div v-else-if =" isVideo" class =" vac-video -preview" >
20- <video width =" 100%" height =" 100%" controls >
19+ <div v-else-if =" isVideo" class =" vac-media -preview-container " >
20+ <video width =" 100%" height =" 100%" controls autoplay >
2121 <source :src =" file.url" />
2222 </video >
2323 </div >
@@ -45,7 +45,7 @@ export default {
4545 file: { type: Object , required: true }
4646 },
4747
48- emits: [' open-file ' ],
48+ emits: [' close-media-preview ' ],
4949
5050 computed: {
5151 isImage () {
Original file line number Diff line number Diff line change 5555 width : 350px ;
5656 max-width : 100% ;
5757 margin : 4px auto 5px ;
58+ cursor : pointer ;
5859
5960 video {
6061 border-radius : 4px ;
Original file line number Diff line number Diff line change 5858 </div >
5959 </div >
6060
61- <div v-else-if =" isVideo" class =" vac-video-container" >
61+ <div
62+ v-else-if =" isVideo"
63+ class =" vac-video-container"
64+ @click.stop.prevent =" openFile('preview')"
65+ >
6266 <video width =" 100%" height =" 100%" controls >
6367 <source :src =" file.url" />
6468 </video >
You can’t perform that action at this time.
0 commit comments