From de264e1c36687c234c3fc1b7ba3f93275b356823 Mon Sep 17 00:00:00 2001 From: Chris Chudzicki Date: Thu, 26 Feb 2026 13:20:36 -0500 Subject: [PATCH 1/2] hardcode allowing to embed videos from ovs --- .../TiptapEditor/extensions/node/MediaEmbed/lib.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frontends/main/src/page-components/TiptapEditor/extensions/node/MediaEmbed/lib.ts b/frontends/main/src/page-components/TiptapEditor/extensions/node/MediaEmbed/lib.ts index 5a7e8dbe2d..7edbb66ee2 100644 --- a/frontends/main/src/page-components/TiptapEditor/extensions/node/MediaEmbed/lib.ts +++ b/frontends/main/src/page-components/TiptapEditor/extensions/node/MediaEmbed/lib.ts @@ -44,6 +44,11 @@ export function convertToEmbedUrl(url: string): string | null { return id ? `https://player.vimeo.com/video/${id}` : null } + // --- ODL VIDEO EMBED --- + if (hostname === "video.odl.mit.edu" && parsed.pathname.endsWith("/embed/")) { + return url + } + // Not a supported video platform return null } From 4d8fbbd71d4e80bf5310e6f6ed9481663ebf639b Mon Sep 17 00:00:00 2001 From: Chris Chudzicki Date: Thu, 26 Feb 2026 14:23:36 -0500 Subject: [PATCH 2/2] be less strict --- .../TiptapEditor/extensions/node/MediaEmbed/lib.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontends/main/src/page-components/TiptapEditor/extensions/node/MediaEmbed/lib.ts b/frontends/main/src/page-components/TiptapEditor/extensions/node/MediaEmbed/lib.ts index 7edbb66ee2..3a4d2f6f54 100644 --- a/frontends/main/src/page-components/TiptapEditor/extensions/node/MediaEmbed/lib.ts +++ b/frontends/main/src/page-components/TiptapEditor/extensions/node/MediaEmbed/lib.ts @@ -45,7 +45,7 @@ export function convertToEmbedUrl(url: string): string | null { } // --- ODL VIDEO EMBED --- - if (hostname === "video.odl.mit.edu" && parsed.pathname.endsWith("/embed/")) { + if (hostname === "video.odl.mit.edu") { return url }