add audio balise

This commit is contained in:
osaajani 2021-04-13 02:07:47 +02:00
parent fb919ff59f
commit 697300b575
1 changed files with 5 additions and 1 deletions

View File

@ -100,10 +100,14 @@
{
return '<div class="discussion-message-media"><a href="' + mediaUrl + '" target="_blank"><img src="' + mediaUrl + '"/></a></div>';
}
else if (['webm', 'ogg', 'ogv', 'mp4'].includes(extension))
else if (['webm', 'ogv', 'mp4'].includes(extension))
{
return '<video controls class="discussion-message-media"><source src="' + mediaUrl + '"/></video>';
}
else if (['wav', 'ogg', 'mp3'].includes(extension))
{
return '<audio controls class="discussion-message-media"><source src="' + mediaUrl + '"/></audio>';
}
else
{
return '<div class="discussion-message-media"><a href="' + mediaUrl + '" target="_blank">Voir le fichier ' + (Number(index) + 1) + '</a></div>';