Earlier quoted context omitted.
It doesn't break any laws since I don't play any videos which have forbidden embedding. Plus, technology like that has been mainstream in VLC, youtube-dl, etc, for ages. It uses the official YouTube API, and respects mosts of the Terms of Service, except the video fetching, which doesn't use the API at all, just loads the page on the server and catches the video stream.
Embedding and scraping into a video tag aren't the same thing. As soon as you store any of their content on your server, even if in just RAM, you're fucked, because that's copyright infringement.
Tell this to the hundreds of online youtube downloaders which are downloading youtube videos to their servers and then making it available for the user to download it from them: https://www.google.hu/search?q=online+youtube+downloader