Out-of-the-box fullscreen implementation (iOS SDK)

Built-in fullscreen implementation with minimal setup.


📘

The out-of-the-box fullscreen implementation is not customizable

To implement your own fullscreen, please refer to the custom fullscreen implementation page.



Supported features

The out-of-the-box implementation handles:

  • Orientation change: Portrait, reverse portrait, landscape and reverse landscape.
  • Native back button support: Fullscreen can be exited when user taps on the device software / physical back button or by tapping on the exit fullscreen button from the player controls.
  • Fullscreen will start in landscape mode.
  • PlayerView controls button fullscreen state change from enter fullscreen icon from/to exit fullscreen icon.

👍

Sample app available:

Out-of-the-box fullscreen showcased in the iOS SDK sample app.



Enable out-of-the-box fullscreen

To use the out-of-the-box fullscreen feature on your iOS app, implement DMPlayerDelegate and playerWillPresentFullscreenViewController function, which will return a UI view controller that can be presented on:

class ViewController: UIViewController {
 override func viewDidLoad() {
  super.viewDidLoad()
  Dailymotion.createPlayer(playerId: "PlayerID", playerDelegate: self) { playerView, error in
      
   }
 }
}
extension ViewController: DMPlayerDelegate {
 func playerWillPresentFullscreenViewController(_ player: DMPlayerView) -> 
 UIViewController {
    return self
  }
}