GithubHelp home page GithubHelp logo

adexin / refinerycms-videojs Goto Github PK

View Code? Open in Web Editor NEW
41.0 6.0 60.0 802 KB

Manage videos in RefineryCMS using Video.js player for playback

License: MIT License

CSS 1.42% Ruby 78.31% JavaScript 2.71% HTML 17.57%
refinery-cms video ruby videojs video-js

refinerycms-videojs's Introduction

Refinery CMS Video.js

Simple video extension for Refinery CMS. It adds a 'Videos' tab to admin menu where you can manage videos. And adds an 'add video' link to WYMeditor on 'Pages'.

There are three ways to include videos in your project.

  • You can embedded video (like youtube or vimeo iframes)
  • You can upload files
  • You can use link to external source

Video (instance of Refinery::Videos::Video model) aggregates different sources (files and links, one or many).

The instance method Video#to_html renders an html video tag like:

<video id="my_video_1" class="video-js vjs-default-skin" controls
  preload="auto" width="640" height="264"
  poster="my_video_poster.png"
  data-setup="{}">
  <source src="oceans-clip.mp4" type='video/mp4'>
  <source src="http://video-js.zencoder.com/oceans-clip.webm" type='video/webm'>
</video>

This content can be added to a page in WYMeditor, or everywhere in your view like:

<div class='video'>
  <%= @my_video.to_html %>
</div>

This extension:

  • Uses the Video.js player to playback video (except embedded video, of course).
  • Allows you to manage playback configuration (poster image, width, height, autoplay, controls, etc).
  • Allows you to insert video to pages using WYMeditor, by inserting an HTML code with video (or iframe) tag.
  • Automatically downloads the video.js library on your website frontend.

Requirements

Refinery CMS version 4.0.2 or above

Install

Open up your Gemfile and add at the bottom this line:

gem 'refinerycms-videojs'

Get the latest version with:

gem 'refinerycms-videojs', git: '[email protected]:adexin/refinerycms-videojs.git'

Now, run:

bundle install

Next, to install the video extension run:

rails generate refinery:videos

Run database migrations:

rake db:migrate

And you're done.

More Information

Check out Refinery CMS guides

Issues and Bugs

Let us know if you found a bug!

Support and Contact

Have a quick question or need some help? Please do not hesitate to contact us via email at [email protected].

Credits

This component is developed by consulting agency Adexin.

License

Refinery CMS Video.js is released under MIT license. You are free to use, modify and distribute this software, as long as the copyright header is left intact.

refinerycms-videojs's People

Contributors

adexin-team avatar alexemerson avatar antonmi avatar carlospontual avatar marcelopazzo avatar matho avatar parndt avatar pedropag avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

refinerycms-videojs's Issues

Routing Error

I just installed the gem, and restarted rails, when I click on the "Add Video" in the page editor, I get this error:

Routing Error

refinery/videos/insert
Try running rake routes for more information on available routes.

I am mounting RefineryCMS at routes.rb like this:

mount Refinery::Core::Engine, :at => '/cms'

My admin page:
http://0.0.0.0:3000/cms/refinery

Notice that
http://0.0.0.0:3000/cms/refinery/videos/insert
works fine, but the video link (http://0.0.0.0:3000/refinery/videos/insert ) at the editor missing the 'cms' where Refinery is mounted .. how can I solve this?

Thanks.

rails g refinery:videos command line failed - Dragonfly::App is deprecated

Hi,

I'm trying to test out your refinerycm-videojs plugin.

After following the instructions, I tried executing the following command line.

rails g refinery:videos

I get the following errors.

andy@LINUXAWCM:~/Projects/Ruby/refinerycms$ rails g refinery:videos
/home/andy/.rvm/gems/ruby-2.1.1/gems/dragonfly-1.0.5/lib/dragonfly/app.rb:33:in []': Dragonfly::App[:refinery_videos] is deprecated - use Dragonfly.app (for the default app) or Dragonfly.app(:refinery_videos) (for extra named apps) instead. See docs at http://markevans.github.io/dragonfly for details (RuntimeError) from /home/andy/.rvm/gems/ruby-2.1.1/gems/dragonfly-1.0.5/lib/dragonfly.rb:27:in[]'
from /home/andy/.rvm/gems/ruby-2.1.1/bundler/gems/refinerycms-videojs-54078087d6d4/config/routes.rb:2:in block in <top (required)>' from /home/andy/.rvm/gems/ruby-2.1.1@global/gems/actionpack-4.1.1/lib/action_dispatch/routing/mapper.rb:526:ininstance_exec'
from /home/andy/.rvm/gems/ruby-2.1.1@global/gems/actionpack-4.1.1/lib/action_dispatch/routing/mapper.rb:526:in block in with_default_scope' from /home/andy/.rvm/gems/ruby-2.1.1@global/gems/actionpack-4.1.1/lib/action_dispatch/routing/mapper.rb:740:inscope'
from /home/andy/.rvm/gems/ruby-2.1.1@global/gems/actionpack-4.1.1/lib/action_dispatch/routing/mapper.rb:525:in with_default_scope' from /home/andy/.rvm/gems/ruby-2.1.1@global/gems/actionpack-4.1.1/lib/action_dispatch/routing/route_set.rb:333:ineval_block'
from /home/andy/.rvm/gems/ruby-2.1.1@global/gems/actionpack-4.1.1/lib/ac

Looking at the errors, my first suspect was that I had to install dragonfly gem (which I didn't have in the beginning).

I did gem install dragonfly, and then in Gemfile, gem dragonfly, '~>1.0.5'.

and then do the rails generate command again.

Still the same problem.

What else do I need to do in order to get the video plugin to work?

iFrames removed from wymeditor when page is re-opened/re-saved

I don't see mention of this elsewhere, but in my experience embedded videos seem to be stripped out by the wymeditor each time you re-open and re-save a page.

Is this perhaps a peculiarity of the wymeditor that we just have to deal with? Or perhaps there is a way to work-around this behavior?

Thanks.

Too much memory consumption by Dragonfly

Hi

I'm using this gem for playing videos from 1 hour to 3hours in length. Videos are stored on my VPS disk, I don't embed them from YouTube. I saw a lot of memory consumption by Dragonfly when playing 170MB webm video (1hour length), it tried to eat 1GB in memory.

Sorry what a little stupid question - but how Dragonfly works? Is it purpose to do on-the-fly video converting to dimensions specified in refinery backend? Could you add info to readme about high memory consumption? My server crashed twice, I'm using only 512MB ram. Now I prefer including videos by absolute url to do playback without Dragonfly processing. Thanks.

Video from source file not showing after save

Hello,

I'm using refinerycms-videojs 0.5.5.1. When I upload video file, add it to page with WYMeditor and save, it's disappeared on next open. In HTML editor I see this:

There are also only video player skin on public side. What could be the problem?

Adding video will hide the text cursor

I tried to use this lovely engine, I added new page, and added a video, but then, I can't add text, and the text cursor is not visible ..

I tried this scenario on the demo page, any Idea?

p.s: This will happen when I add the video in a fresh new page (blank page with nothing inside it)

Also, another note, when adding a video, there is no visual indicator or icon to tell that there is a video here at the rich editor, such icon will be a great idea to make sure that video is added when looking at page while editing without have to look at HTML or preview the page, I thought this would make it better :-)

Provide two video type choosen

Hi. I add use_type configure option to make it possible to choose what video way to use.
But I'm not sure how you can rspec refinerycms-videojs?

Videos with a link source

Hey, I've encountered some problems when trying out the demo site. Embedded file videos seem to be working, but those with link sources don't appear to be working at all.

I'm not sure if this link will stay up, but here's an example page: http://refinerycms-videojs-demo.herokuapp.com/refinery/pages/beatles/edit

For one, when I add the video, all the content in the editor becomes hidden/invisible. And when viewing the page, the content is there with the video box, but the video does not actually work. This seems to be the case with all link-sourced videos.

Video button added to every '.wym_area_top'

Since we add the "add video" link to '.wym_area_top', the link could be displayed where it should not.

For example, when using both refinerycms-videojs and refinerycms-page-images, the "add video" link is displayed in the "image-bar" in the images tab.

Not sure how it could be avoided though :-(

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.