最简单的方法来嵌入Flash视频在Rails - 必须是跨浏览器兼容 [英] Easiest way to embed flash videos in Rails - must be cross browser compatible

查看:140
本文介绍了最简单的方法来嵌入Flash视频在Rails - 必须是跨浏览器兼容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在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.

易于使用:


  1. 安装插件

  2. 运行rake jw_player:install

  3. 插入
  1. install plugin
  2. run rake jw_player:install
  3. insert
 <%= javascript_include_tag 'swfobject' %> 

/ li>

  • 之后,您可以使用以下帮助器:

    into your layout

  • after that you can use following helper:

    <%= 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屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆