It is a gem to play youtube videos in our site.
Add this line to your application's Gemfile:
gem 'youtube_video'
And then execute:
$ bundle
Or install it yourself as:
$ gem install youtube_video
Get the id of your youtube url. for example the youtube url is "https://www.youtube.com/watch?v=GTGaenVHg14" from here we need to take the id that is "GTGaenVHg14".
And then next simply you need to pass this as like
youtube_url_code(id,width,height)
Thats it.
- Fork it ( https://github.com/[my-github-username]/youtube_video/fork )
- 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 a new Pull Request