Watching Videos

Our rumbl application will allow us to add messages to videos in real time. We’ll do some groundwork to make this process more convenient when the time comes. We’ll tweak our views to make it easy to watch videos. Then, we’ll create a new controller explicitly for watching a video, along with its view and template. Next, we’ll tweak the router to pick up our new routes. Finally, we’ll add some JavaScript to plug in to YouTube’s API. You’ll work through these features quickly, because they don’t involve much new ground.

Let’s let the user watch a video. First let’s enhance our layout header with a link to My Videos for the current user in lib/rumbl_web/templates/layout/app.html.eex:

Get Programming Phoenix 1.4 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.