Closed christinachanhk closed 1 year ago
No issue in my case. Do you have a reproducible example project?
Thank you for confirming that is not an issue related to the library.
As we will play YouTube automatically in full screen mode, so the YTPlayerView is set to be 0 width and height, may be that is considered as to hide the player view even in full screen mode which cause a black screen as result.
To fix this, we simply set some value for the width and height and set the view to be hidden.
@christinachanhk I'm facing the same issue. Setting the width and height worked. But did you manage to play the video in fullscreen? Appreciate your help.
To play with fullscreen, just set "playerVars" with "playsinline" will be fine.
playerView.load(withVideoId: "M7lc1UVf-VE",
playerVars: ["playsinline": 0])
Please refer to the link "YouTube Embedded Players and Player Parameters" for your reference: https://developers.google.com/youtube/player_parameters
Despite of they mentioned "playsinline" default value should be "0" which refer to "Results in fullscreen playback", seems we need to set that explicitly.
That's exactly what I have done but when the video goes fullscreen the video stops showing and only the audio plays.
@abhi7054 did you ever resolve this issue?
We are using Youtube Player on iOS 15 for a long time and that works fine. But once the device had been updated to iOS 16, the player will only play video with black screen (no image will be shown).
Please help.