From 1946b4655bcd20ebef34c11a2dfd2a7cf2feb2cc Mon Sep 17 00:00:00 2001 From: CrunkLord420 Date: Fri, 26 Feb 2021 02:45:41 +0000 Subject: [PATCH] add html5 video/audio --- html/index.html | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/html/index.html b/html/index.html index c280ab8..29d83e5 100644 --- a/html/index.html +++ b/html/index.html @@ -206,6 +206,16 @@ imgDiv.className = 'postImg'; imgDiv.innerHTML = ''; div.appendChild(imgDiv); + } else if (posts[i].returnValues.mime === 'video/mp4' || posts[i].returnValues.mime === 'video/webm') { + const imgDiv = document.createElement('div'); + imgDiv.className = 'postImg'; + imgDiv.innerHTML = ''; + div.appendChild(imgDiv); + } else if (posts[i].returnValues.mime === 'audio/mpeg' || posts[i].returnValues.mime === 'audio/ogg' || posts[i].returnValues.mime === 'audio/opus') { + const imgDiv = document.createElement('div'); + imgDiv.className = 'postImg'; + imgDiv.innerHTML = ''; + div.appendChild(imgDiv); } else { const downloadDiv = document.createElement('div'); downloadDiv.className = 'postDownload';