# Embeddable [![Gem Version](https://img.shields.io/gem/v/embeddable.svg)](https://rubygems.org/gems/embeddable) [![Build Status](https://img.shields.io/travis/hyperoslo/embeddable.svg)](https://travis-ci.org/hyperoslo/embeddable) [![Dependency Status](https://img.shields.io/gemnasium/hyperoslo/embeddable.svg)](https://gemnasium.com/hyperoslo/embeddable) [![Code Climate](https://img.shields.io/codeclimate/github/hyperoslo/embeddable.svg)](https://codeclimate.com/github/hyperoslo/embeddable) [![Coverage Status](https://img.shields.io/coveralls/hyperoslo/embeddable.svg)](https://coveralls.io/r/hyperoslo/embeddable) Embeddable makes it easier to embed videos. ## Installation Add this line to your application's Gemfile: gem 'embeddable' And then execute: $ bundle Or install it yourself as: $ gem install embeddable ## Usage ```ruby # app/models/post.rb class Post < ActiveRecord::Base include Embeddable embeddable :video, from: :video_url end # ... post = Post.new video_url: 'http://www.youtube.com/watch?v=bEvNRmPzq9s' post.video_on_youtube? # => true post.video_id # => 'bEvNRmPzq9s' ``` ### Brightcove If you want to support brightcove, you'll need to add your own brightcove player by overriding the brightcove partial. 1. Create a partial in your project here: `app/views/embeddable/partials/_brightcove.html.erb` 2. Add your brightcove player code(see example below) 3. Remember to add the following parameters(included in the example below): `id`, `width`, `height` ```html