Player Controls
The player object returned by useYouTubePlayer exposes direct playback controls, async getters, and dynamic video loading methods.
Async getter methods are useful after the player is ready. Before
YoutubeViewattaches the underlying controller, a getter can returnundefined, so subscribe toreadybefore relying on these values.
Playback actions
Volume and mute
Player state and video info
Playback rate
Load or cue another video
loadVideoByIdstarts loading the target video immediately.cueVideoByIdprepares the target video without starting playback.
Resize the player
This is mostly useful when you need imperative size control after initial render.
Practical toolbar example
What belongs here vs events
Use player methods for actions and on-demand reads. Use useYouTubeEvent for reactive updates that should drive UI automatically.
