How to build something like a Youtube advertisement system
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).
https://www.jwplayer.com/video-ad-support/
https://cloudinary.com/product_updates/video_player_ads
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.
Perfect.
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?
Thanks!