File tree Expand file tree Collapse file tree 2 files changed +25
-2
lines changed
src/lib/Room/RoomMessageReply Expand file tree Collapse file tree 2 files changed +25
-2
lines changed Original file line number Diff line number Diff line change 4747 margin-right : 10px ;
4848 border-radius : 4px ;
4949 }
50+
51+ .vac-audio-reply {
52+ margin-right : 10px ;
53+ }
5054}
5155
5256@media only screen and (max-width : 768px ) {
Original file line number Diff line number Diff line change 1414 <video v-else-if =" isVideoFile" controls class =" vac-image-reply" >
1515 <source :src =" messageReply.file.url" />
1616 </video >
17+ <audio-player
18+ v-else-if =" isAudioFile"
19+ :src =" messageReply.file.url"
20+ class =" vac-audio-reply"
21+ >
22+ <template v-for =" (i , name ) in $scopedSlots " #[name ]=" data " >
23+ <slot :name =" name" v-bind =" data" />
24+ </template >
25+ </audio-player >
1726
1827 <div class =" vac-reply-info" >
1928 <div class =" vac-reply-username" >
5059import SvgIcon from ' ../../../components/SvgIcon/SvgIcon'
5160import FormatMessage from ' ../../../components/FormatMessage/FormatMessage'
5261
53- const { isImageFile , isVideoFile } = require (' ../../../utils/media-file' )
62+ import AudioPlayer from ' ../../Message/AudioPlayer/AudioPlayer'
63+
64+ const {
65+ isAudioFile ,
66+ isImageFile ,
67+ isVideoFile
68+ } = require (' ../../../utils/media-file' )
5469
5570export default {
5671 name: ' RoomMessageReply' ,
5772 components: {
5873 SvgIcon,
59- FormatMessage
74+ FormatMessage,
75+ AudioPlayer
6076 },
6177
6278 props: {
@@ -72,6 +88,9 @@ export default {
7288 },
7389 isVideoFile () {
7490 return isVideoFile (this .messageReply .file )
91+ },
92+ isAudioFile () {
93+ return isAudioFile (this .messageReply .file )
7594 }
7695 }
7796}
You can’t perform that action at this time.
0 commit comments