Question

I am using JW Player to play videos. But its throwing Error loading player: HTML5 player not found.

My Code:

 <%= jwplayer_assets %>
 <div id="mediaplayer", align="center">
 </div>
 <script type="text/javascript">jwplayer.key="wjl6yMFUQPDP";</script>
 <script type="text/javascript">


 jwplayer("mediaplayer").setup({
 flashplayer: "<%= asset_path('player.swf') %>", 
 file: "<%=@video_url%>",
 height: 360,
 width: 640
 });

 </script>

please help me to solve this problem.

Was it helpful?

Solution

Here is a working copy.

You can clone or download it as zip file

https://github.com/shamsulsham89/jwplayer-rails3.2 

and run it on your system. But update the browser to latest version so that it supports the html5 otherwise it will throw error.

Steps to run:

1> bundle install
2> rails s

Go to the show page after starting rails server from index page.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top