diff --git a/public/index.html b/public/index.html index a55c9f2..a5b5ed7 100644 --- a/public/index.html +++ b/public/index.html @@ -18,6 +18,8 @@ + + diff --git a/public/js/embeds/mkv.js b/public/js/embeds/mkv.js new file mode 100644 index 0000000..7a18d05 --- /dev/null +++ b/public/js/embeds/mkv.js @@ -0,0 +1,13 @@ +function embed_mkv(link_info) { + if (typeof link_info.extension !== "string") { + return; + } + + const is_mkv = link_info.extension?.toLowerCase().indexOf("mkv") === 1; + + if (!is_mkv) { + return; + } + + return `
`; +} diff --git a/public/js/embeds/mov.js b/public/js/embeds/mov.js new file mode 100644 index 0000000..59e1dc7 --- /dev/null +++ b/public/js/embeds/mov.js @@ -0,0 +1,13 @@ +function embed_mov(link_info) { + if (typeof link_info.extension !== "string") { + return; + } + + const is_mov = get_mime_types(link_info.extension).includes("video/quicktime"); + + if (!is_mov) { + return; + } + + return ``; +} diff --git a/public/js/htmlify.js b/public/js/htmlify.js index c42b713..231846e 100644 --- a/public/js/htmlify.js +++ b/public/js/htmlify.js @@ -8,6 +8,8 @@ const EMBEDS = [ embed_vimeo, embed_audio, embed_gif, + embed_mkv, + embed_mov, embed_mp4, embed_image, embed_link,