最简单的方法来嵌入Flash视频在Rails - 必须是跨浏览器兼容 [英] Easiest way to embed flash videos in Rails - must be cross browser compatible
问题描述
我需要在flav 2.3.5应用程序中嵌入flv,mp4和可能的其他视频。
I need to embed flv, mp4 and possibily other videos in a rails 2.3.5 application.
我有很多问题,使视频显示
I'm having quite a lot of problems making the videos show up in Safari 5 and Firefox 3.5.
有没有简单的方法来实现跨浏览器视频播放器并将其嵌入到rails应用程序中?
Is there an easy way to achieve a cross-browser video player and embed it in a rails app?
我试过用jw_player和flowplayer但没有结果的swfobject 1.5和2.2。
I tried swfobject 1.5 and 2.2 with jw_player and also flowplayer but with no result.
推荐答案
我在rails 2.3.5中使用应用程序JW Player with rails plugin jw-playr-hlpr
I use in rails 2.3.5 application JW Player with rails plugin jw-playr-hlpr.
易于使用:
- 安装插件
- 运行rake jw_player:install
- 插入
- install plugin
- run rake jw_player:install
- insert
<%= javascript_include_tag 'swfobject' %>
/ li>
into your layout
<%= player({:file => path_to_flv}, {:width => 680, :height => 420}) %>
我在Firefox 3.6.8,Opera,Chrome 5和Safari 5它的工作很好...
I tested it in Firefox 3.6.8, Opera, Chrome 5 and Safari 5 and it's working well...
这篇关于最简单的方法来嵌入Flash视频在Rails - 必须是跨浏览器兼容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!