Add audio/mp4 message preview support

This commit is contained in:
lowcarbdev
2025-11-15 10:03:48 -07:00
parent b22c7f45c2
commit 557ad1fc46
4 changed files with 116 additions and 10 deletions
+4 -2
View File
@@ -36,7 +36,8 @@ function MessageThread({ conversation, startDate, endDate }) {
const waitForMediaInElement = (elem) => {
const images = Array.from(elem.querySelectorAll('img'))
const videos = Array.from(elem.querySelectorAll('video'))
const media = [...images, ...videos]
const audios = Array.from(elem.querySelectorAll('audio'))
const media = [...images, ...videos, ...audios]
if (media.length === 0) {
return Promise.resolve()
@@ -131,7 +132,8 @@ function MessageThread({ conversation, startDate, endDate }) {
const waitForMediaInElement = (elem) => {
const images = Array.from(elem.querySelectorAll('img'))
const videos = Array.from(elem.querySelectorAll('video'))
const media = [...images, ...videos]
const audios = Array.from(elem.querySelectorAll('audio'))
const media = [...images, ...videos, ...audios]
if (media.length === 0) {
return Promise.resolve()