Giter Club home page Giter Club logo

videawesome's Introduction

Videawesome

**Videawesome has not been maintained for sometime now and is now defunct **

Videawesome (pronounced Vid e awesome) is a Video URL parser designed to take the "Share" links you can get form the likes of Youtube and Vimeo and convert them into actual videos right there on your screen.

Install

It's pretty simple to install in your Gemfile add the following line:

gem 'videawesome'

If you are not working specifically in a Rails application then do the following:

gem install 'videawesome'

Run the 'bundle' command and you're good to go.

Usage

Once you've added Videawesome to your Gemfile and bundled next you'll be wanting to know how to use it; well this is actually really simple. Say we have a blog we want to display videos in, your blog consists of a title and body, using Videawesome your view would look something like this:

<%= @article.title %>
<%= raw(Videawesome::Convertor.parse_video(@article.body, 480, 640) %>

If you do not want to display the message for those who don't have flash installed all you have to do is the following:

<%= @article.title %>
<%= raw(Videawesome::Convertor.parse_video(@article.body, 480, 640, show_message = false) %>

basically the main parameters you need to pass to this helper are:

  1. the text in which you video may or may not be inlcuded in in this case (@article.body)
  2. the width you want the video to be (480)
  3. the height of your video (640)

Which video services does this work with?

At present it only works with YouTube and Vimeo however I am in the process of working on adding others and I will update the Readme as I add them.

What should the links used look like and where can I get them from?

This differs depending on the Site the video is hosted on:

Youtube

When viewing the Youtube site there is usually a button underneath the video window which says "Share" click this and it will open up and inside there you will find a text field inside that text field is a URL, copy and paste that anywhere in the body of your text and watch the magic happen right before your eyes.

The URL should be along these lines: http://www.youtube.com/watch?v=xSE9Qk9wkig and the newer URL format looks like this http://youtu.be/xhLxnlNcxv8 the gem will pick up on both of these.

Vimeo

When Viewing the Vimeo site actually on the video window you will see a button which says "Share" click this and a popup will open, in this popup there will be a link which reads "Preview your share email" click this and the URL you need to copy will be revealed.

Once again paste this URL anywhere in the body of your article and watch as the tiny robots dance.

The URL should look similar to this: http://vimeo.com/20833462

If when using this you do find any problems please feel free to let me know.

videawesome's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

videawesome's Issues

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.