Next.js Discord

Discord Forum

@next/third-party/google YouTube embed JS API

Unanswered
Pixiebob posted this in #help-forum
Open in Discord
PixiebobOP
Hey, I'm curious what the best advice is on accessing the [JS API on lite-youtube-embed](https://github.com/paulirish/lite-youtube-embed?tab=readme-ov-file#access-the-youtube-iframe-player-api).

I would think about accessing the element using Ref, but the YouTubeEmbed doesn't accept ref as a parameter. Using document.querySelector is usually discouraged.

5 Replies

PixiebobOP
PixiebobOP
RIP
PixiebobOP
Buff-bellied Hummingbird
any update on this?
Brown bear
Would like to know more about this too. Is this the way to access Youtube player events?