A Boolean value that determines whether the user is allowed to skip media content.
SDK
- tvOS 9.0+
Framework
- AVKit
Declaration
var requiresLinearPlayback: Bool { get set }
Discussion
If this value is false
(the default), the AVPlayer
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 true
.
To keep track of when the player is presenting content for which you might require linear playback, use the interstitial
property of the view controller’s player item. You can define the time ranges of the interstitial content and the view controller then sends player
and player
messages to its delegate
object when playing interstitial content. You can implement these callbacks to enable or disable the requires
property as needed.