I work on a publishing site and sometimes we use Youtube videos instead of a hero image at the top of articles. When Core Web Vitals rolled out, we noticed that the YT video became the LCP element and articles like this were slower to reach LCP. To address that issue, we replaced the iframe with a facade as recommended here: https://web.dev/third-party-facades/#how-to-defer-third-parties-with-a-facade. The video content loads upon user click.
That article does not explain how to make sure the video can be indexed by Google. I checked using the "site" command and going to the Video tab of search results, and my videos are not being indexed in the articles. Even the demo of one of the suggested libraries in that article does not have their embedded video indexed by Google two years later.
Now I'm looking for solutions. I looked into the noscript tag but it seems Google does not index this content consistently. John Mueller has previously said noscript is fine for images that are lazyloaded using JS but it's not clear if this would work for video iframes too. Another way Google suggests is dynamic rendering but it's a bit more complex to implement so I first want to check if there's a better method.
Example page: https://bit.ly/3CLgOSp
EDIT 11/09/2021: For those wondering the same thing, after reaching out to John Mueller, he recommended marking up the video using VideoObject structured data. I also asked if Google could misinterpret and think the page is in violation of the following guideline, since Google would not see the video iframe:
Don't mark up content that is not visible to readers of the page. For example, if the JSON-LD markup describes a performer, the HTML body must describe that same performer. (Source)
I was assured there is no risk of this happening.