tvOS: How to avoid skipping in AVPlayerViewController

Due to legal restrictions I need to avoid that the user of my App can skip the content that is currently playing by AVPlayerViewController.

To do so, I am setting false to the properties isSkipBackwardEnabled and isSkipForwardEnabled. But this does not seems to have any effect on the skipping behaviour, I can still click left or right on Siri Remote to seek 10 seconds back or forward.

This there a way to prevent skipping content in AVPlayerViewController?

You can find right below an example code reproducing the issue:

Code Block
import UIKit
import AVFoundation
import AVKit
class ViewController: AVPlayerViewController {
    override func viewDidAppear(_ animated: Bool) {
        super.viewDidAppear(animated)
        skippingBehavior = .default
        isSkipBackwardEnabled = false
        isSkipForwardEnabled = false
        play(stream: URL(string: "https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_ts/master.m3u8")!)
    }
    // MARK: - Private
    private func play(stream: URL) {
        let asset = AVAsset(url: stream)
        let playetItem = AVPlayerItem(asset: asset)
        player = AVPlayer(playerItem: playetItem)
        player?.play()
    }
}

isSkipBackwardEnabled/Forward are intended only for use with non-default skipping behaviors (in fact, these properties default to false). It's impact is limited to skipping (by item), and has no effect on scrubbing, scanning (fast-forward/rewind), chapter navigation, or Siri commands. When the skipping behavior is set to the default, the skip operations are disabled strictly according to the requiresLinearPlayback property.

The requiresLinearPlayback property is the only API that controls skip +/- 10. If you're wanting to disable skipping in *both* directions, we recommend setting requiresLinearPlayback.

You can control the default skipping behavior if you implement either of the delegate methods playerViewController(_:willResumePlaybackAfterUserNavigatedFrom:to:) and/or playerViewController(_:timeToSeekAfterUserNavigatedFrom:to:). See AVPlayerViewControllerDelegate for details. The most effective way to prevent the seek is to return the "from" time passed to the "timeToSeek" callback, since that prevents the seek from happening.

If you need to disable skipping in only one direction, be sure to file an enhancement request with the Feedback Assistant, if you haven't already, with the information about why you need it (i.e. legal restrictions).

tvOS: How to avoid skipping in AVPlayerViewController
 
 
Q