For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
StatusSupportDiscussionsLog inSign Up
Docs HomeAPI ReferenceVideo on DemandAI FeaturesLive StreamingVideo PlayerVideo DataCloud PlayoutRecipes
Docs HomeAPI ReferenceVideo on DemandAI FeaturesLive StreamingVideo PlayerVideo DataCloud PlayoutRecipes
  • Player SDKs
    • Introduction
  • Web player
    • Install the FastPix web player
    • Play uploaded videos
    • Handle playback errors
      • Use keyboard shortcuts
      • Customize thumbnails and posters
      • Configure preload and CORS settings
      • Set a custom domain
      • Secure video playback
      • Play DRM-protected content
      • Enable lazy loading
      • Monitor video data
      • Add shoppable video overlays
  • Android player
    • Install FastPix Android player
    • Set up the player
    • Play uploaded videos
    • Handle playback errors
  • iOS player
    • Install FastPix iOS player
    • Play uploaded videos
    • Handle playback errors
  • Flutter player
    • Install FastPix Flutter player
    • Play uploaded videos
    • Handle playback errors
LogoLogo
StatusSupportDiscussionsLog inSign Up
On this page
  • Default behavior
  • Set up a custom domain
  • Provide the custom domain to FastPix player
  • Understand custom domain behavior
  • Troubleshoot for custom domains
Web playerAdvanced features

Set a custom domain

Was this page helpful?
Previous

Secure video playback

Next
Built with

Use a custom domain in FastPix player to brand video playback, boost trust, and control domain routing.

You can use custom domains to stream video assets from a domain of your choice rather than the default fastpix.io. This guide will help you set up and use a custom domain with the FastPix player, enhancing your control over media delivery. Leveraging custom domains can enhance your branding, improve SEO, and increase user trust.


Default behavior

By default, all FastPix video assets—including posters, storyboards, and media sources—are hosted on fastpix.io. This means that when you use the FastPix player without a custom domain, your video and image assets are streamed directly from FastPix servers.


Set up a custom domain


To set up a custom domain with the FastPix player, follow these steps:

  1. Configure your DNS: Point your custom domain to the appropriate FastPix asset servers. This typically involves setting up CNAME records in your DNS settings. For example:
    • media.example.com should point to assets.fastpix.io
    • image.media.example.com should point to images.fastpix.com
    • stream.media.example.com should point to videos.fastpix.io
  2. Verify domain configuration: Ensure your DNS settings are correctly configured and propagated across the network.

Provide the custom domain to FastPix player

Once your custom domain is set up, the next step is to inform the FastPix player about it using the custom-domain attribute or the customDomain property.


HTML element example

To use a custom domain with the FastPix player in an HTML element, include the custom-domain attribute with your domain:

1<fastpix-player
2 playback-id="PlaybackId"
3 custom-domain="example.com"
4 stream-type="on-demand"
5></fastpix-player>

In this example, media.example.com is your custom domain. Internally, the FastPix player will expand this value to image.media.example.com for images and stream.media.example.com for video streaming.


Here’s a more detailed example of how to integrate the FastPix player with a custom domain:

1<!DOCTYPE html>
2<html lang="en">
3<head>
4 <meta charset="UTF-8">
5 <meta name="viewport" content="width=device-width, initial-scale=1.0">
6 <script src="https://cdn.jsdelivr.net/npm/@fastpix/fp-player@latest"></script>
7 <title>FastPix Player with Custom Domain</title>
8</head>
9<body>
10 <h1>Welcome to My Custom Video Player</h1>
11 <p>This video is served from my custom domain, enhancing branding and trust.</p>
12 <fastpix-player
13 playback-id="your-playback-id"
14 custom-domain="example.com"
15 ></fastpix-player>
16</body>
17</html>

Understand custom domain behavior

When you specify a custom domain, the behavior is as follows:

  • Videos will be streamed from stream.<your-custom-domain>.
  • Images will be loaded from image.<your-custom-domain>.

For example, if your custom domain is media.example.com:

  • Videos will be streamed from stream.media.example.com.
  • Images will be loaded from image.media.example.com.

Troubleshoot for custom domains

If you run into issues while setting up or using a custom domain with the FastPix player, consider these troubleshooting tips:

Check your DNS configuration: Ensure your DNS records are correctly configured and fully propagated.

Inspect network requests: Use your browser’s developer tools to inspect network requests and confirm that assets are being loaded from the correct custom domain.

Review console logs: Look for any errors or warnings in the browser console that could point to configuration issues.