What works for me is to take it in chunks. Watch a little video, pause it, write a little code. Rinse and repeat until the video is done, then move on to the next work. Experimenting is the best way to commit knowledge to memory. It's way more effective than watching the video 2 or 3 times in entirety and not typing a single line.