Ask A Question


You’re not receiving notifications from this thread.

How to build something like a Youtube advertisement system

Darren Booker asked in Rails

Hi Chris,

I am pretty sure they have a complex system implmented but at the basics of it, how could you go about implementing an autoplay advertise video before the actual video itself starts to play just like youtube? Never seen it done in a rails application. I created a clone youtube application for the fun of it and want to take it up a knotch a bit.

Is there third party service for advertisement you can implement?


You'd just need to find a video player that will do it for you (that way you don't have to build it yourself).

There are several other options.

If you wanted to build it yourself, you'd first play the ad, then when it is finished, replace the video with your content. All that will probably be in Javascript and you'd need videos for the ads and such to serve up. And you'd want to collect ad metrics for plays and clicks, etc probably.



JWPLAYER is exactly what I was looking for. Chris one more question. Rails uses the standard video_tag to actually render the video. Is there a way to count views like youtube. I know jwplayer might have the feature but if I wanted to do it from scratch, how would you go about implmenting this feature?


Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 82,969+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.