FIX: Add common HTML5 media extensions to onebox audio and video tags (#8216)

This commit is contained in:
Nacho Caballero 2019-10-21 18:10:40 +02:00 committed by Robin Ward
parent 3085b923f6
commit d5121e5ddb
1 changed files with 2 additions and 2 deletions

View File

@ -171,9 +171,9 @@ module Oneboxer
def self.local_upload_html(url)
case File.extname(URI(url).path || "")
when /^\.(mov|mp4|webm|ogv)$/i
when /^\.(mov|mp4|m4v|webm|ogv|3gp)$/i
"<video width='100%' height='100%' controls><source src='#{url}'><a href='#{url}'>#{url}</a></video>"
when /^\.(mp3|ogg|wav|m4a)$/i
when /^\.(mp3|og[ga]|opus|wav|m4[abpr]|aac|flac)$/i
"<audio controls><source src='#{url}'><a href='#{url}'>#{url}</a></audio>"
end
end