YouTube on the web is testing a miniplayer-bar feature that will allow you to continue watching videos while you scroll down the page. This views a lot like the way videos play on Facebook's desktop site if you scroll beyond the video during playback, though there are some key differences. With YouTube's feature, the video transitions from a large panel down to a small panel in the top left corner just like it does on Facebook, but instead of just a small popout player of the video itself there is also a white bar next to it that shows video details like who the video is from and what the video's title is, and there are buttons for thumbs up and thumbs down alongside "share" and "add to" buttons.
This doesn't appear to be a feature that you can enable easily and there is no detail mentioned for how to get it working, but it is reported that it can be triggered. Without any information on how to do that though, users who are interested in giving this feature a whirl will simply have to wait and see if YouTube makes this a feature available to everyone. That said it's entirely possible that it may never come to pass as it is a similar feature to another one in testing at the moment - the picture-in-picture mode.
With the picture-in-picture mode the functionality is very much the same as the miniplayer-bar, but the video panel sits in the bottom right corner of the YouTube user interface instead of across the top, and there are less buttons to interact with. Regardless, the features are pretty much the same as they serve the same function, so it's possible that YouTube will end up continuing to test both and choose to implement one down the line that's the most popular with users. That said it's just as possible that YouTube will end up utilizing both.