Sha256: e4d4afb82c485370d8ca0b3d33cbc838181def292907c770b5f4747d89a4a97b
Contents?: true
Size: 489 Bytes
Versions: 8
Compression:
Stored size: 489 Bytes
Contents
module Onebox module Engine class VideoOnebox include Engine matches_regexp(/^(https?:)?\/\/.*\.(mov|mp4|webm|ogv)(\?.*)?$/i) def always_https? WhitelistedGenericOnebox.host_matches(uri, WhitelistedGenericOnebox.https_hosts) end def to_html url = ::Onebox::Helpers.normalize_url_for_output(@url) "<video width='100%' height='100%' controls><source src='#{url}'><a href='#{url}'>#{url}</a></video>" end end end end
Version data entries
8 entries across 8 versions & 1 rubygems