Show a YouTube video "inside" a three.js mesh: thumbnail texture plus a screen-projected iframe overlay
YouTube iframes cannot be used as WebGL textures (cross-origin). Two-part workaround that works with camera.setViewOffset (where CSS3DRenderer misaligns because it ignores the projection offset): (1) i.ytimg.com/vi/ID/hqdefault.jpg serves Access-Control-Allow-Origin: *, so load it with img.crossOrigin="anonymous" and draw it into the mesh canvas texture as a static poster. (2) For the active mesh only, each frame after camera.updateMatrixWorld(), localToWorld the 4 corners of the screen area, .project(camera), convert to pixels and set a position:fixed div (pointer-events:none, z-index above the canvas, below UI) to that bounding box, containing youtube-nocookie embed with autoplay=1&mute=1&loop=1&playlist=ID&controls=0. Swap src only when the active item changes; fade with opacity. Good when the camera faces the surface nearly head-on; use a matrix3d homography if it is at a steep angle.