rails to play videos in rails. But when i giving dynamic path to jwplayer it is not recognizing.

My script

jwplayer("myElement").setup({ file: "/uploads/ckeditor/attachments/90/HTML5_video_tutorial__Creating_a_WebM_video___lynda.com.flv", width: 540 });

In console the object tag returns like this

<div id="myElement_wrapper" style="position: relative; width: 540px; height: 270px;">
<object id="myElement" height="100%" width="100%" type="application/x-shockwave-flash" data="http://localhost:3000/assets/jwplayer.flash.swf" bgcolor="#000000" name="myElement" tabindex="0">
 <param name="allowfullscreen" value="true">
<param name="allowscriptaccess" value="always">
<param name="seamlesstabbing" value="true">
<param name="wmode" value="opaque">
</object>

I obseved that i thas not taken any source url. Let me know what's the problem.

有帮助吗?

解决方案

Thanks for your Response.

The problem is it is not recognizing flash player in rails. I given the path to player works great.

       jwplayer('myElement').setup({'flashplayer': "/assets/flash.swf", 'id': 'playerID', 'width': '540','height': '360', 'file': videopath });

It may help to somebody who working on this.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top