forked from snxraven/LinkUp-P2P-Chat
auto play audio messages
This commit is contained in:
parent
aa70e42fdc
commit
70bc69ddea
2
app.js
2
app.js
@ -1076,6 +1076,7 @@ function addAudioMessage(name, audioUrl, avatar, topic) {
|
||||
const audioElement = document.createElement('audio');
|
||||
audioElement.src = audioUrl;
|
||||
audioElement.controls = true;
|
||||
audioElement.autoplay = true;
|
||||
audioElement.classList.add('message-audio');
|
||||
|
||||
messageContent.appendChild(senderName);
|
||||
@ -1089,6 +1090,7 @@ function addAudioMessage(name, audioUrl, avatar, topic) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function addMessage(name, message, avatar, topic) {
|
||||
const container = document.querySelector('#messages');
|
||||
if (!container) {
|
||||
|
Loading…
Reference in New Issue
Block a user