Generate html to embed videos based on a url.
Currently supported services:
- YouTube
- Vimeo
Add this line to your application's Gemfile:
gem 'video_embed'
And then execute:
$ bundle
Or install it yourself as:
$ gem install video_embed
Default settings:
VideoEmbed.embed('http://www.youtube.com/watch?v=NtgtMQwr3Ko')
=> "<iframe source=\"...
Specify a width and height:
VideoEmbed.embed('http://www.youtube.com/watch?v=NtgtMQwr3Ko',
:width => 1280,
:height => 720
)
=> "<iframe source=\"...
Install the dependencies:
bundle
Run the tests:
bundle exec rspec .
Install Docker.
Build a Docker image with all dependencies:
make build
make test
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request