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

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

diff --git a/lib/oneboxer.rb b/lib/oneboxer.rb
index 863b1a782a..871e48c96e 100644
--- a/lib/oneboxer.rb
+++ b/lib/oneboxer.rb
@@ -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

GitHub sha: d5121e5d