I'm trying to instantiate the YTPlayerView from the youtube_ios_player_helper pod programmatically, with the following code:
let player = YTPlayerView()
player.cueVideo(byId: "someId", startSeconds: 0)
then the needed constraints are created and the youtubeplayer view is added to the containerview.
But, the internal webview, remains for ever nil, and is not created. I suppose I'm not instantiating the player correctly, but I did not found any information about how to do it.
Any Help?
thanks
If you look at the source code,
cueVideoById
does not actually create the internal webview, you need to first call one of the following: