fix: improve mp4 embedding

This commit is contained in:
Andy Burke 2025-07-26 17:07:44 -07:00
parent f6a530dd86
commit a144c88c17
2 changed files with 4 additions and 2 deletions

View file

@ -233,7 +233,8 @@
aspect-ratio: 1 / 1 !important; aspect-ratio: 1 / 1 !important;
} }
#talk .embed-container iframe { #talk .embed-container iframe,
#talk .embed-container video {
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
@ -241,5 +242,6 @@
bottom: 0; bottom: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
overflow: hidden;
border-style: none; border-style: none;
} }

View file

@ -167,7 +167,7 @@ const URL_MATCH_HANDLERS = [
} }
if (mime_types.includes("video/mp4")) { if (mime_types.includes("video/mp4")) {
return `<div class="embed-container image gif"><video autoplay muted loop><source src="${link_info.url}" type="video/mp4">Your browser does not support video embeds.</video></div>`; return `<div class="embed-container image gif letterbox"><video autoplay="true" muted="true" loop="true" playsinline="true"><source src="${link_info.url}" type="video/mp4"><a href="${link_info.url}">${link_info.url}</a></video></div>`;
} }
if (mime_types[0].indexOf("image") === 0) { if (mime_types[0].indexOf("image") === 0) {