I want to add a class (e.g. yt-fullscreen
) to the <body>
element when the player goes fullscreen.
Is there a way to get when the player goes in the fullscreen mode?
In the docs I didn't find any relevant event for that.
Maybe is there a way to check if the player is or not in the fullscreen state?
Try like this:
Player can't be checked because we get only iframe. So only thing that's left is to work with iframe.