Set autoplay and loop

Learn how to configure automatic playback and looping in the FastPix iOS Player.

Autoplay

Autoplay starts playback automatically as soon as the content is ready, without requiring the user to tap play.

1// Enable autoplay (disabled by default)
2playerViewController.isAutoPlayEnabled = true
3
4// Disable autoplay
5playerViewController.isAutoPlayEnabled = false

When autoplay is enabled with a playlist, the player automatically transitions to the next item after the current one finishes.

Playback loop

Playback loop restarts the video automatically when it reaches the end. This is useful for previews, short videos, or continuous playback experiences.

1// Enable loop (disabled by default)
2playerViewController.isLoopEnabled = true
3
4// Disable loop
5playerViewController.isLoopEnabled = false

Loop works across inline playback, full-screen, and Picture-in-Picture (PiP) modes.