Project

video

0.0
No commit activity in last 3 years
No release in over 3 years
Parse and consume video links
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

GC::Video

Parse and consume video links

gem 'video'

Usage

Only youtube links are supported so far

link = GC::Video.new "http://www.youtube.com/watch?v=t9LMOydfc4k&feature=related"

link.id => "t9LMOydfc4k"

link.provider => :youtube

link.thumbnail => "//img.youtube.com/vi/t9LMOydfc4k/default.jpg"
link.thumbnail(:full) => "//img.youtube.com/vi/t9LMOydfc4k/0.jpg"

link.embed('560x315', autoplay: true)
 => <iframe width="560" height="315"
            src="http://www.youtube.com/embed/t9LMOydfc4k&html5=1&autoplay=1"
            frameborder="0" allowfullscreen>
    </iframe>

link.embed('560x315', load: false, thumbnail: :full, attr1: 'value1')
 => <iframe width="560" height="315"
            data-src="http://www.youtube.com/embed/t9LMOydfc4k&html5=1"
            data-attr1="value1"
            data-thumbnail="//img.youtube.com/vi/t9LMOydfc4k/0.jpg"
            frameborder="0" allowfullscreen>
    </iframe>