Is there a way to init YouTube iframe player without actualy loading video itself?
If do not provide videoId video is not loaded (no errors is shown) and player instance remains in “ready” state.
ytPlayer = new YT.Player('video-player', {
height: '100%',
width: '100%',
videoId: 'video-id-goes-here',
playerVars: {
.....
.....
Thanks for answer!
Sure, if you want to, the following code does work:
Alternatively, if you know you’re going to be loading a playlist, you can leave out
videoIdand put inBut while both of those approaches do work, what are you trying to accomplish? There might be a better way of doing it than initializing a YT.Player without the
videoId.