YouTube has fixed a glitch that prevented videos from appearing across its platforms worldwide, impacting hundreds of thousands of users before services were restored.