Project

embed

0.01
No release in over 3 years
Low commit activity in last 3 years
An easy way to embed media to your Rails app
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

Embed

An easy way to embed media to your Rails app. Don't worry about messy embedding HTML anymore, just use the media URL.

As of now, it only supports YouTube, Vimeo, Wistia and SoundCloud.

Installation

Add this line to your application's Gemfile:

gem 'embed'

And then execute:

$ bundle

Or install it yourself as:

$ gem install embed

Usage

On your view

<%= embed("http://www.youtube.com/watch?v=fwncgZ15RVQ") %>
<%= embed('http://www.youtube.com/watch?v=fwncgZ15RVQ', {:width => 540, :height => 290}) %>

Can also specify the protocol («http» by default)

<%= embed('http://www.youtube.com/watch?v=fwncgZ15RVQ', {:width => 540, :height => 290, :protocol => 'https'}) %>

** Soundcloud always uses https ** Wistia does not allow using https

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