seanbehan / videojs_rails

Video JS for Rails 3.1 Asset Pipeline
91 stars 71 forks source link

Please update your readme #1

Closed simmogs closed 13 years ago

simmogs commented 13 years ago

Hi there,

It's a great idea for a gem, but I'm struggling to get it working. Any chance of adding basic usage instructions to the readme?

From looking at the code, I think I should be doing this....

= videojs_rails(:source => video_url)

But it doesn't work :-( All the HTML is there, but the video doesn't play. I know the URL is ok, because it appears underneath as a working download link.

Many thanks, Graeme

seanbehan commented 13 years ago

Added a readme.

Try adding a width


<%= videojs_rails :source=> path, :width=>"400px" %>
simmogs commented 13 years ago

That was quick, thanks!

Still no joy though. I added a width and checked the readme to make sure I'd followed the other steps.

seanbehan commented 13 years ago

it is an html5 video player, what browser (&version) are you using? try adding modernizer.js in the head

http://www.modernizr.com/download/ (configure with video html5 )

simmogs commented 13 years ago

Sorry for the delay. It's Firefox 7.0.1. I've also tested on the latest Safari, which does drop back to Flash, unlike Firefox which does nothing. I'll try adding modernizr and let you know how I get on.

simmogs commented 13 years ago

Got it!

I had to put the following bit of code above the call to videojs_rails. Everything worked fine after that. It was in the getting started guide - http://videojs.com/#getting-started. I should read the manual more.

:javascript
  VideoJS.setupAllWhenReady();

(note that I'm using HAML).

Great gem, thanks Sean.

simmogs commented 13 years ago

I should add that I had to include a height as well as a width before it would work. Cheers, Graeme

seanbehan commented 13 years ago

Thanks.