lib/onebox/engine/video_onebox.rb in onebox-1.5.21 vs lib/onebox/engine/video_onebox.rb in onebox-1.5.22
- old
+ new
@@ -3,9 +3,13 @@
class VideoOnebox
include Engine
matches_regexp /^(https?:)?\/\/.*\.(mov|mp4|webm|ogv)(\?.*)?$/
+ def always_https?
+ WhitelistedGenericOnebox.host_matches(uri, WhitelistedGenericOnebox.https_hosts)
+ end
+
def to_html
"<video width='100%' height='100%' controls><source src='#{@url}'><a href='#{@url}'>#{@url}</a></video>"
end
end
end