Embedding videos to Rails App

I'm still fairly new to ruby and I'm working on an app that embeds videos, can I use carrierwave or would I have to use something else? Also, would I have to store it on Amazon S3 if I were launching the site live

Posted almost 5 years ago by Ryan Bent
Posted almost 5 years ago by Alex Yang

You don't need to use carrierwave (or paperclip) to embed videos. Instead, I recommend choosing a video hosting provider (YouTube, Vimeo, and Wistia are all excellent choices) and following their embed instructions. They'll just give you a few lines of code to copy and paste into your webpage.

The format of their embed code usually differs only by some kind of video ID, a random string of numbers and/or letters. So for your app, you just need to add a youtube_id/vimeo_id/wistia_id column in your database. Then, when you need to embed a video, you can swap out the video ID portion of the embed code.

Hope that makes sense - happy to provide more details if you need.

0
Posted almost 5 years ago by Ryan Bent

Okay, so what you're saying is that if I used Wistia for example, I would couldn't just embed the code to one of my pages on the app. I would have to create a database first?

0
Posted almost 5 years ago by Alex Yang

Oh sorry, I assumed that you wanted to add a video for each object in your database (e.g. every Listing has a video or every Restaurant has an accompanying video). If you're looking to do one-off embeds instead (e.g. a homepage video), then you can just use Wistia's embed code in your View page directly.

0
Posted almost 5 years ago by Ryan Bent

Worked out great. Thanks, Alex!

0