# frozen_string_literal: true
module Onebox
module Engine
class RedditMediaOnebox
include Engine
include StandardEmbed
always_https
matches_domain("reddit.com", "www.reddit.com")
def to_html
if raw[:type] == "image"
<<-HTML
HTML
elsif raw[:type] =~ %r{^video[/\.]}
<<-HTML
HTML
else
html = Onebox::Engine::AllowlistedGenericOnebox.new(@url, @timeout).to_html
html.presence
end
end
end
end
end