Configure external playback settings (iOS)

Configure how the player interacts with external playback devices.

If you load a video that is a transition animation in your application, you likely do not want this animation to play on an AirPlay device. By configuring the iOS SDK external playback setting, you can define how the player interacts with external playback devices.

The JWExternalPlaybackSettings object is optional. By default, all videos have external playback enabled.



Requirement

  • JWPlayerKit 4.7.0+


Configure settings

When defining your settings, the following properties exist. Each is analogous to a setting in AVPlayer.

PropertyDefaultAVPlayer Setting
playbackEnabledtrueallowsExternalPlayback
usesExternalPlaybackWhileExternalScreenIsActivefalseusesExternalPlaybackWhileExternalScreenIsActive
videoGravity.resizeAspectFitexternalPlaybackVideoGravity


The following recipe demonstrates how to configure external playback settings using the default settings.