> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://fastpix.com/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://fastpix.com/docs/_mcp/server.

# Add skip segments

> Declare intro and credits ranges on a FastPix Flutter Player source. The player reports when playback enters one and offers skipCurrentSegment to jump past it.

An item can declare the ranges a viewer usually skips, such as an intro or the credits. The player reports when playback enters one and offers `skipCurrentSegment()` to jump to its end.

```dart
FastPixPlayerDataSource.hls(
  playbackId: 'your-playback-id',
  skipSegments: const [
    FastPixSkipSegment(
      start: Duration(seconds: 5),
      end: Duration(seconds: 35),
      type: FastPixSkipType.intro,
    ),
    FastPixSkipSegment(
      start: Duration(minutes: 22),
      end: Duration(minutes: 24),
      type: FastPixSkipType.credits,
    ),
  ],
)
```

\


## Show a skip button

The player fires `skipAvailable` when playback enters a segment and `skipHidden` when it leaves. Draw your own button from these events, then call `skipCurrentSegment()`.

```dart
controller.addEventListener(FastPixPlayerEventTypes.skipAvailable, (event) {
  final segment = (event as FastPixSkipAvailableEvent).segment;
  showSkipButton(segment.type);
});
controller.addEventListener(FastPixPlayerEventTypes.skipHidden, (_) => hideSkipButton());

await controller.skipCurrentSegment(); // false when nothing is active
```

\


## How segments are validated

The SDK holds segments until the item's duration is known, then validates them once at that point, because two of the four rules (a start at or beyond the duration, an end beyond it) need a duration that does not exist when the playlist is supplied. The SDK rejects an invalid segment on its own with a `skipFailed` event that names the reason, and its valid siblings keep working. On a live source, where the duration never settles, segments stay pending: the SDK offers no skip and reports no failure.

The built-in skin draws no skip-segment button, so your app draws its own from the events above. `enableSkips` on `FastPixPlayerControlsConfiguration` is unrelated: it turns on the skin's plus and minus 10 second seek buttons.

\


## What's next

* [Manage a playlist](/docs/flutter-player/manage-a-playlist) to add skip segments per item across a queue.