Code Monkey home page Code Monkey logo

video_thumb's Introduction

Youtube, Vimeo and İzlesene thumbnails

Gem Version

Get the thumbnails from Youtube, Vimeo and İzlesene videos for Ruby.

And it may support more video hoster with your contributions.

Installation

Add it to your Gemfile:

gem 'video_thumb'

and run on terminal:

$ bundle

or install the gem on terminal.

$ gem install video_thumb

Parameters

url

Youtube or Vimeo video link

http://www.youtube.com/watch?v=iEPTlhBmwRg

or

http://vimeo.com/101419884

or

http://www.izlesene.com/video/feder-goodbye-feat-lyse/7886121

size (not compatible with izlesene)

default = large

small (Youtube: 120x90, Vimeo: 100x75)

medium (Youtube: 320x180, Vimeo: 200x150)

large (Youtube: 640x480, Vimeo: 640xauto)

max (Youtube: original, Vimeo: 640xauto)

Usage

require 'video_thumb' # if you're not use Rails 4
VideoThumb::get("http://vimeo.com/101419884")
# returns large thumbnail from Vimeo video
# http://i.vimeocdn.com/video/483188148_640.jpg

VideoThumb::get("http://www.youtube.com/watch?v=iEPTlhBmwRg", "medium")
# returns medium thumbnail from Youtube video
# https://img.youtube.com/vi/iEPTlhBmwRg/mqdefault.jpg

VideoThumb::get("http://www.izlesene.com/video/feder-goodbye-feat-lyse/7886121")
# returns large thumbnail from Vimeo video
# http://i2.imgiz.com/rshots/7886/feder-goodbye-feat-lyse_7886121-8807_1200x630.jpg

Dependencies

  • open-uri
  • json
  • nokogiri

Contributing

  1. Fork it ( https://github.com/tgezginis/video_thumb/fork )
  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 a new Pull Request

Thanks deegz - akosipc - adzierzanowski

video_thumb's People

Contributors

adzierzanowski avatar akosipc avatar deegz avatar fig avatar tgezginis avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.