0.0
No release in over 3 years
Low commit activity in last 3 years
Embed youtube videos by saving url
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0

Runtime

 Project Readme

YoutubeEmbed

Embed youtube videos in on site saving URL and get relevant output in view

  1. Simple Embed

  2. Embed with title, description & thumbnail

Installation

Add this line to your application's Gemfile:

gem 'youtube_embed'

And then execute:

$ bundle

Or install it yourself as:

$ gem install youtube_embed

And add CSS and JS

CSS in application.css

*= require youtube_embed

JS in application.js

//= require youtube_embed

Usage

It can be used in model where we can specify simple iframe embed or embedding with thumbnail & description

Simple:

youtube_embed :field_name, {:with_description => false, :width => 450, :height => 300}

With Thumbnail & Description:

youtube_embed :field_name, {:with_description => true, :width => 450, :height => 300}

This will modify the youtube link into html required to embed, If you don't want to modify html or simple change the view you can call method in view like this:

<?=  YoutubeEmbed::youtube_embed(attr_here) ?>

Working on further improvements

Contributing

youtube_embed