Check fullscreen state (iOS SDK)
There are 2 ways to check the fullscreen status:
- You can check at any time after Player creation if the Player is in fullscreen by calling
playerView.isFullscreen. This will returntrueif it is in fullscreen mode, orfalseif it's not. - Implementing from
DMPlayerDelegatetheplayerDidPresentationModeChangefunction, you will get aDMPlayerView.PresentationModeenum that will contain all possible Player presentation states :inline,pictureInPictureandfullscreen:
extension ViewController: DMPlayerDelegate {
func playerDidPresentationModeChange(_ player: DMPlayerView, presentationMode: DMPlayerView.PresentationMode) {
switch presentationMode {
case .fullscreen: break
case .inline: break
case .pictureInPicture: break
default: break
}
}
}Updated 17 days ago
