I have a licensed version of JW Player 6. I downloaded the files and placed them in the assets / javascript directory. In addition to the skins catalog, there is a JS file for the HTML5 player, as well as a flash.swf file for a flash player. Everything I have done so far has worked locally, but as soon as I click on Heroku, I get errors.
First try:
In my application.js file:
... //= require jwplayer/jwplayer //= require jwplayer/jwplayer.html5
After starting rake assets:clean ; rake assets:precompile rake assets:clean ; rake assets:precompile I get the following error in the view (on Heroku):
An ActionView::Template::Error occurred in nodes
Second attempt:
In my application.js file:
... //= require jwplayer/jwplayer ...
Then I added this to the production.rb environment configuration file:
After cleaning and pre-compiling the assets and clicking on Heroku, the original ActionView::Template::Error no longer occurs, but now JW Player displays this message:
Error loading player: HTML5 player not found
This is the initialization of the JW Player in the HAML view:
:javascript jwplayer("video_display_object_#{display_object.id}").setup({ width: "948", height: "533", image: "#{display_object.video_screenshot_url}", file: "#{display_object.resource_url}", modes: [ { type: 'flash', src: "#{asset_path('jwplayer/jwplayer.flash.swf')}", config: { skin: "#{asset_path('jwplayer/skins/beelden.xml')}", 'controlbar.position': 'over', 'controlbar.idlehide': 'true' } }, // I've also tried "#{javascript_path('jwplayer/jwplayer.html5.js}" // And "/assets/jwplayer/jwplayer.html5.js" { type: 'html5', src: "#{asset_path('jwplayer/jwplayer.html5.js')}" } ] });
I really don't know what to do at this moment. As I mentioned earlier, everything works locally, not on Heroku.
Any suggestions?
ruby-on-rails heroku asset-pipeline jwplayer jwplayer6
mmichael
source share