Comment by Nina_F
It uses an embed player, like how IMDb or any website uses it. When I added YouTube videos to my website, I observed that ads never show there, so I made it and added a sponsor block too. Now, I can watch videos on any device or share links without anyone installing anything.
I also noticed embedded YouTube videos don't seem to play ads. I am planning to make a beat-aware YouTube player, so I was wondering how ads would affect the timing...