0.0
Repository is archived
No release in over 3 years
Low commit activity in last 3 years
Generate HTML to embed videos based on a 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
 Project Readme

VideoEmbed

Generate html to embed videos based on a url.

Currently supported services:

  • YouTube
  • Vimeo

Installation

Add this line to your application's Gemfile:

gem 'video_embed'

And then execute:

$ bundle

Or install it yourself as:

$ gem install video_embed

Usage

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=\"...

Development

Install the dependencies:

bundle

Run the tests:

bundle exec rspec .

Development using Docker

Setup

Install Docker.

Build a Docker image with all dependencies:

make build

Run the tests

make test

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request