Play live and on-demand streams

Learn how to configure the FastPix iOS Player for live and on-demand video playback.

The streamType parameter controls how the FastPix iOS Player handles media. Set it based on the type of content you’re streaming.

Supported stream types

The FastPix iOS Player supports two stream types:

  • on-demand: For pre-recorded, non-live content. This is the default.
  • live: For real-time streaming content.

Play on-demand videos

To play an on-demand video, set the streamType to "on-demand" in PlaybackOptions. If you don’t specify a stream type, the player defaults to on-demand.

1// Play an on-demand video (explicit stream type)
2playerViewController.prepare(
3 playbackID: playbackID,
4 playbackOptions: PlaybackOptions(streamType: "on-demand")
5)

Note: If you omit the streamType, the player treats the content as on-demand by default.

Play live streams

To play a live stream, set the streamType to "live" and provide the playback ID for the live stream.

1// Play a live stream
2playerViewController.prepare(
3 playbackID: playbackID,
4 playbackOptions: PlaybackOptions(streamType: "live")
5)

What’s next