I am trying to get videojs to play a local video file within rails.
I am using the video.js library
I have tried 2 different gems (github: seanbehan/videojs and
alexesDev/videojs)
I have tried in line javascript
I have tried precompiling the video as an asset by placing in
assets/video/test-meeting.m4v
config.serve_static_assets = true << is set in production.rb
*= require video-js << is set in application.css
//= require video-js << is set in application.js
When trying seanbehans gem:
in my view file I have tried the following
<%= videojs_rails sources: { mp4:
"file:///app/assets/video/test-meeting.m4v", webm:
"
http://another.com/path/to/video.webm" }, width:"640", height:"400" %>
and
<%= videojs_rails sources: { mp4: "assets/video/test-meeting.m4v", webm:
"
http://another.com/path/to/video.webm" }, width:"640", height:"400" %>
When I go to the page nothing renders, just a black box.
However when I use a link to a videofile on the web it works.
with alexesDev gem:
I installed the gem however the libraries are not showing.
when I use:
<%= video_player src: { mp4: '/assets/video/test-meeting.m4v' },
controls: true %>
I get "undefined method `video_player'"
when I use js in line with html and place the library in
assets/javascripts I get a blank black box as well.
Can anyone help?
--
Posted via
http://www.ruby-forum.com/.