Swift-YouTube-Player icon indicating copy to clipboard operation
Swift-YouTube-Player copied to clipboard

Prevent Youtube Player from displaying info in Info Center

Open ZiadAli opened this issue 7 years ago • 1 comments

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.

ZiadAli avatar May 19 '17 06:05 ZiadAli

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...

kiroskirin avatar Aug 21 '17 19:08 kiroskirin