<img src="https://img.shields.io/badge/%20-ENTERPRISE-B10031" style="float:left"/><br /> <img src="https://img.shields.io/badge/iOS-V4-009727?logo=apple" style="float:left"/><br />
Full-screen mode enables viewers to expand the player to fill up the entire device screen.
When using `JWPlayerViewController
` or `JWPlayerObjCViewController
`, full screen can be entered and exited in several ways.
Approach | Description |
**Automatic** | Full screen engaged automatically when device orientation changes from portait to landscape if `forceFullScreenOnLandscape ` on `JWPlayerViewController ` is `true ` |
**Manual** | Full screen engaged by viewer tapping the full screen icon ( <img src="https://files.readme.io/e051d22-ios-v4-fullscreen.png" width="25px"/> ) |
**Programmatic** | Full screen engaged by calling `transitionToFullScreen ` and `dismissFullScreen ` methods on the view controller |
<!--

-->
<br />

If you are only using `
JWPlayerView
`, you must implement full screen capability yourself or display the view in full screen with your own interface.
<br /> <hr />
## Programmatically enter and exit full screen
The `transitionToFullScreen
` and `dismissFullScreen
` methods can be used on either the `JWPlayerViewController
` or `JWPlayerObjCViewController
` to enter and exit full screen programmatically.
The following recipe shows how to use these methods in a class that has a full-screen toggle to enter and exit full-screen mode.
<br /> <br />
### transitionToFullScreen()
_Transitions the player to full-screen mode_
If the player is already in full-screen mode, this method does not perform any actions. The completion closer will not be executed.
<br />
Argument | Description |
`animated `Â Bool | Determines if the player should animate into full screen |
`completion ` | Closure called after the player has transitioned to full-screen mode |
<br />
### dismissFullScreen()
_Transitions the player away from full-screen mode_
If the player is not in full-screen mode this method does not perform any actions. The completion closure will not be executed.
<br />
Argument | Description |
`animated `Â Bool | Determines if the player should animate away from full-screen mode |
`completion `Â Closure | Closure called after the player has transitioned away from full-screen mode |
<br /> <hr />
## Respond to Full-Screen Events
There are several full screen events that you can respond to using `JWPlayerViewControllerDelegate.
`
The following example shows a class conforming to `JWPlayerViewControllerDelegate
`.
<br /> <br />
### playerViewControllerWillGoFullScreen()
_Called before the player is enlarged to the size of the screen_
This method returns the `JWFullScreenViewController
` that will be used for full screen. If `nil
` is returned, the default `JWFullScreenViewController
` will be used.
<br />
Argument | Description |
`controller `Â JWPlayerViewerController | `JWPlayerViewController ` emitting the event |
<br />
### playerViewControllerDidGoFullScreen()
_Called after the player has enlarged to the size of the screen_
<br />
Argument | Description |
`controller `Â JWPlayerViewerController | `JWPlayerViewController ` emitting the event |
<br />
### playerViewControllerWillDismissFullScreen()
_Called before the player dismisses full screen, and shrinks back to its normal size_
<br />
Argument | Description |
`controller `Â JWPlayerViewerController | `JWPlayerViewController ` emitting the event |
<br />
### playerViewControllerDidDismissFullScreen()
_Called after the player dismisses full screen, and shrinks back to its normal size_
<br />
Argument | Description |
`controller `Â JWPlayerViewerController | `JWPlayerViewController ` emitting the event |
<br /> <hr />
## Customize the JWFullScreenController

`
JWFullScreenController
` is only customizable with `JWPlayerViewController
`.
You have the option to use your own subclass of `JWFullScreenController
` rather than the default.
<br>
Complete the following steps to use a custom `JWFullScreenController
`:
Override the `
playerViewControllerWillGoFullScreen
` method.Use your custom `
CustomJWFullScreenViewController
` to subclass `JWFullScreenViewController
`.
<br />
Return an instance of your custom `
JWFullScreenController
`.
<br />