Use a custom domain

Learn how to stream videos from your own domain using the FastPix iOS Player.

The FastPix iOS Player lets you play videos from a custom domain. You don’t need to specify stream types, tokens, or additional playback configurations — just provide your custom domain, and the player handles the rest.

Play videos from a custom domain

Pass the customDomain parameter in PlaybackOptions:

1// Play with a custom domain
2playerViewController.prepare(
3 playbackID: playbackID,
4 playbackOptions: PlaybackOptions(customDomain: "customDomain")
5)

Play with a custom domain and token

Combine custom domain with token-based authentication:

1// Play with a custom domain and playback token
2playerViewController.prepare(
3 playbackID: playbackID,
4 playbackOptions: PlaybackOptions(
5 customDomain: "customDomain",
6 playbackToken: playbackToken
7 )
8)

Play live streams from a custom domain

For live streams, include the streamType along with the custom domain:

1// Play a live stream from a custom domain with a token
2playerViewController.prepare(
3 playbackID: playbackID,
4 playbackOptions: PlaybackOptions(
5 customDomain: "customDomain",
6 playbackToken: playbackToken,
7 streamType: "live"
8 )
9)