For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
StatusSupportDiscussionsLog inSign Up
Docs HomeAPI ReferenceVideo on DemandAI FeaturesLive StreamingVideo PlayerVideo DataCloud PlayoutRecipes
Docs HomeAPI ReferenceVideo on DemandAI FeaturesLive StreamingVideo PlayerVideo DataCloud PlayoutRecipes
  • Player SDKs
    • Introduction
  • Web player
    • Install the FastPix web player
    • Play uploaded videos
    • Handle playback errors
  • Android player
    • Install FastPix Android player
    • Set up the player
    • Play uploaded videos
    • Handle playback errors
  • iOS player
    • Install FastPix iOS player
    • Play uploaded videos
    • Handle playback errors
      • Secure video playback
      • Play DRM-protected content
      • Use a custom domain
      • Switch audio tracks
      • Switch subtitle tracks
      • Add seek preview thumbnails
      • Enable Picture-in-Picture
      • Enable full-screen mode
      • Manage playlists
      • Add skip controls
      • Handle network changes
  • Flutter player
    • Install FastPix Flutter player
    • Play uploaded videos
    • Handle playback errors
LogoLogo
StatusSupportDiscussionsLog inSign Up
On this page
  • Key behaviors
  • Configure skip segments
  • Initialize the skip manager
  • Handle skip button visibility
iOS playerAdvanced features

Add skip controls

Was this page helpful?
Previous

Handle network changes

Next
Built with

Learn how to add OTT-style skip controls (Skip Intro, Skip Song, Skip Credits) to the FastPix iOS Player.

The FastPix iOS Player SDK supports time-based skip segments that let users skip intros, songs, and credits during playback. The SDK manages skip logic and timing—you’re responsible for rendering the skip UI.

Key behaviors

  • Skip segments can be configured per playlist item.
  • The SDK automatically validates and applies skip ranges during playback.
  • Skip button visibility is managed based on the current playback time.
  • Skip state resets automatically during playlist transitions.
  • Fully compatible with custom player UIs.

Configure skip segments

Define skip segments when creating a playlist item:

1let item = FastPixPlaylistItem(
2 playbackId: "<PLAYBACK_ID>",
3 title: "Episode 1",
4 skipSegments: [
5 // Skip Intro from 10s to 90s
6 SkipSegment(startTime: 10, endTime: 90, type: .intro),
7
8 // Skip Song section from 6:00 to 8:00
9 SkipSegment(startTime: 360, endTime: 480, type: .song),
10
11 // Skip Credits from 9:00 to 9:56
12 SkipSegment(startTime: 540, endTime: 596, type: .credits)
13 ]
14)

Initialize the skip manager

Initialize the skip manager after the player is ready. This is recommended inside viewDidAppear:

1override func viewDidAppear(_ animated: Bool) {
2 super.viewDidAppear(animated)
3
4 DispatchQueue.main.async {
5 // Make sure the AVPlayer instance is initialized
6 guard self.playerViewController.player != nil else { return }
7
8 // Attach the skip manager and set the delegate
9 self.playerViewController.setupSkipManager(delegate: self)
10
11 // Set up your custom skip button UI
12 self.setupSkipButton()
13 }
14}

Handle skip button visibility

The SDK calls this delegate method when playback enters or exits a skip segment:

1func onSkipVisibilityChanged(isVisible: Bool) {
2 // Show skip button when a skip segment is active
3 // Hide it when playback is outside skip ranges
4 skipButton.isHidden = !isVisible
5}

Note: The SDK manages skip logic and timing. You’re responsible for rendering the skip button UI.