Check fullscreen state (iOS SDK)

There are 2 ways to check the fullscreen status:

  1. You can check at any time after Player creation if the Player is in fullscreen by calling playerView.isFullscreen. This will return true if it is in fullscreen mode, or false if it's not.
  2. Implementing from DMPlayerDelegate the playerDidPresentationModeChange function, you will get a DMPlayerView.PresentationMode enum that will contain all possible Player presentation states : inline , pictureInPicture and fullscreen :
extension ViewController: DMPlayerDelegate {
func playerDidPresentationModeChange(_ player: DMPlayerView, presentationMode: DMPlayerView.PresentationMode) {
switch presentationMode {
    case .fullscreen: break
    case .inline: break
    case .pictureInPicture: break
    default: break
    }
}
}