Sha256: 4d654d7473cd7862c42125d4a927b7a2fe9fafdcb98949c88efbe7df09fe77bc
Contents?: true
Size: 399 Bytes
Versions: 17
Compression:
Stored size: 399 Bytes
Contents
module Onebox module Engine class AudioOnebox include Engine matches_regexp /^(https?:)?\/\/.*\.(mp3|ogg|wav|m4a)(\?.*)?$/ def always_https? WhitelistedGenericOnebox.host_matches(uri, WhitelistedGenericOnebox.https_hosts) end def to_html "<audio controls><source src='#{@url}'><a href='#{@url}'>#{@url}</a></audio>" end end end end
Version data entries
17 entries across 17 versions & 1 rubygems