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 47
47
margin-right : 10px ;
48
48
border-radius : 4px ;
49
49
}
50
+
51
+ .vac-audio-reply {
52
+ margin-right : 10px ;
53
+ }
50
54
}
51
55
52
56
@media only screen and (max-width : 768px ) {
Original file line number Diff line number Diff line change 14
14
<video v-else-if =" isVideoFile" controls class =" vac-image-reply" >
15
15
<source :src =" messageReply.file.url" />
16
16
</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 >
17
26
18
27
<div class =" vac-reply-info" >
19
28
<div class =" vac-reply-username" >
50
59
import SvgIcon from ' ../../../components/SvgIcon/SvgIcon'
51
60
import FormatMessage from ' ../../../components/FormatMessage/FormatMessage'
52
61
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' )
54
69
55
70
export default {
56
71
name: ' RoomMessageReply' ,
57
72
components: {
58
73
SvgIcon,
59
- FormatMessage
74
+ FormatMessage,
75
+ AudioPlayer
60
76
},
61
77
62
78
props: {
@@ -72,6 +88,9 @@ export default {
72
88
},
73
89
isVideoFile () {
74
90
return isVideoFile (this .messageReply .file )
91
+ },
92
+ isAudioFile () {
93
+ return isAudioFile (this .messageReply .file )
75
94
}
76
95
}
77
96
}
You can’t perform that action at this time.
0 commit comments