- )
+ EmbedRenderer.arcade(video_id)
end
end
diff --git a/lib/embed_renderer.rb b/lib/embed_renderer.rb
new file mode 100644
index 000000000..0a747bbb3
--- /dev/null
+++ b/lib/embed_renderer.rb
@@ -0,0 +1,87 @@
+module EmbedRenderer
+ def self.youtube(video_id)
+ %(
+
+
+
+ )
+ end
+
+ def self.loom(video_id)
+ %(
+
+
+
+ )
+ end
+
+ def self.vimeo(video_id)
+ %(
+
+
+
+ )
+ end
+
+ def self.video(link_url)
+ %(
+
+ )
+ end
+
+ # Generates an HTML embed for a Wistia video.
+ # @param wistia_match [MatchData] A match object from the WISTIA_REGEX regex, where wistia_match[2] contains the video ID.
+ def self.wistia(video_id)
+ %(
+
+
+
+
+
+
+
+ )
+ end
+
+ def self.arcade(video_id)
+ %(
+
+
+
+ )
+ end
+end
diff --git a/spec/lib/custom_markdown_renderer_spec.rb b/spec/lib/custom_markdown_renderer_spec.rb
index 550e7b637..939965e91 100644
--- a/spec/lib/custom_markdown_renderer_spec.rb
+++ b/spec/lib/custom_markdown_renderer_spec.rb
@@ -143,6 +143,17 @@ describe CustomMarkdownRenderer do
end
end
+ context 'when link is a wistia URL' do
+ let(:wistia_url) { 'https://chatwoot.wistia.com/medias/kjwjeq6f9i' }
+
+ it 'renders a custom element with Wistia embed code' do
+ output = render_markdown_link(wistia_url)
+ expect(output).to include('')
+ expect(output).to include('