Use a custom domain

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

If your FastPix setup uses a custom CDN domain, you can configure it in the data source. This tells the player to construct URLs using your domain instead of FastPix defaults.

On-demand from a custom domain

1final dataSource = FastPixPlayerDataSource.hls(
2 playbackId: 'your-playback-id-here',
3 streamType: StreamType.onDemand,
4 customDomain: "custom-domain",
5 token: "jwt-token",
6);

Live stream from a custom domain

1final dataSource = FastPixPlayerDataSource.hls(
2 playbackId: 'your-playback-id-here',
3 streamType: StreamType.live,
4 customDomain: "custom-domain",
5 token: "jwt-token",
6);

Note: You don’t need to specify a domain if you’re using FastPix-hosted playback. This step is optional unless you’ve customized your delivery configuration.