Swift-YouTube-Player
Swift-YouTube-Player copied to clipboard
Prevent Youtube Player from displaying info in Info Center
Whenever a video starts playing on the Youtube Player, if you lock the phone and then turn it on again you can usually see a play button, an blank image, and then the name of the video on the device's lock screen. Is there any way to prevent this from happening? I'm asking because when the Youtube Player does this it messes up the format for the Info Center for other, non-Youtube media items. Ideally I would like for nothing to appear on the lock screen when a Youtube video is loaded.
I facing the same issue but I think you can playing around with this delegate method
func playerStateChanged(_ videoPlayer: YouTubePlayerView, playerState: YouTubePlayerState)
and
MPNowPlayingInfoCenter.default().nowPlayingInfo
you can set it to nil
or other info...