Permalink
Browse files

Add mime type to video source tags.

  • Loading branch information...
1 parent e91e29d commit 16fca457390c1770af5881236274a550cd2c371c Godisemo committed Sep 16, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 actionpack/lib/action_view/helpers/asset_tag_helper.rb
@@ -412,7 +412,7 @@ def video_tag(sources, options = {})
if sources.is_a?(Array)
content_tag("video", options) do
- sources.map { |source| tag("source", :src => path_to_video(source)) }.join.html_safe
+ sources.map { |source| tag("source", :src => path_to_video(source), :type => Mime::Type.lookup_by_extension(source.gsub(/^.*\./, ""))) }.join.html_safe
end
else
options[:src] = path_to_video(sources)

0 comments on commit 16fca45

Please sign in to comment.