【发布时间】:2013-09-05 20:39:04
【问题描述】:
嘿,我是网络编程的新手,所以请原谅我的无知。 我在 .html.haml 视图文件中有以下代码。
%video{:controls => "controls", :height => "240", :width => "320"}
%source{:src => @video_resource.file_path, :type => "video/mp4"}/
%source{:src => @video_resource.file_path, :type => "video/webm"}/
%source{:src => @video_resource.file_path, :type => "video/ogg"}/
%object{:data => "flashmediaelement.swf", :height => "240", :type => "application/x-shockwave-flash", :width => "320"}
%param{:name => "movie", :value => "flashmediaelement.swf"}/
%param{:name => "flashvars", :value => "controls=true&file=movie.url"}/
= t('html5_video_error')
如何将@video_resource.file_path 放入flashvars 对象参数文件变量(当前设置为movie.url)。我可能误解了它的工作方式。
【问题讨论】:
-
:value => "controls=true&file=#{@video_resource.file_path}"应该这样做
标签: html ruby-on-rails flash haml