Instance Property

requiresLinearPlayback

A Boolean value that determines whether the user is allowed to skip media content.

Declaration

@property(nonatomic) BOOL requiresLinearPlayback;

Discussion

If this value is NO (the default), the AVPlayerViewController UI allows a user to fast forward, scrub, or skip ahead to content later in the player’s presentation. To prevent the user from skipping content—for example, while presenting a legal notice or other mandatory interstitial content—set this property’s value to YES.

To keep track of when the player is presenting content for which you might require linear playback, use the interstitialTimeRanges property of the view controller’s player item. You can define the time ranges of the interstitial content and the view controller then sends playerViewController:willPresentInterstitialTimeRange: and playerViewController:didPresentInterstitialTimeRange: messages to its delegate object when playing interstitial content. You can implement these callbacks to enable or disable the requiresLinearPlayback property as needed.

See Also

Accessing Player View Controller Attributes

showsPlaybackControls

A Boolean value that indicates whether the player view controller shows playback controls.

playbackControlsIncludeInfoViews

A Boolean value that indicates whether the receiver shows information views when requested by the user.

playbackControlsIncludeTransportBar

A Boolean value that indicates whether the receiver shows the transport bar and related controls.

allowsPictureInPicturePlayback

A Boolean value that indicates whether the player view controller allows Picture in Picture playback on iPad.

contentOverlayView

A view displayed between the video content and the playback controls.

entersFullScreenWhenPlaybackBegins

A Boolean value that determines whether the player automatically displays in full screen when the play button is tapped.

exitsFullScreenWhenPlaybackEnds

A Boolean value that indicates whether the player exits full screen when playback ends.

readyForDisplay

A Boolean value indicating that the first video frame, of the current item of the associated AVPlayer object, is ready for display.

videoBounds

The current size and position of the video image as displayed within the bounds of the player view controller’s view.

videoGravity

A string that specifies how the video is displayed within the bounds of the player view controller’s view.

unobscuredContentGuide

A layout guide representing an area that will not be permanently obscured by fixed-position playback controls when they are visible.

updatesNowPlayingInfoCenter

A Boolean value that indicates whether the player view controller updates the now playing info center.

appliesPreferredDisplayCriteriaAutomatically

A Boolean value that indicates whether the receiver automatically changes the screen's preferred display criteria to that of the asset being played.

customInfoViewController

A view controller that provides client-specific content and controls alongside system-provided information and settings panels.