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
  • Get started
    • Overview
    • Quickstart
  • Upload videos
    • Upload videos from device
    • Upload videos from a URL
    • Upload 4K videos
    • Speed up video processing
  • Playback and delivery
    • Play your videos
    • Embed a video in your app
    • Configure media quality levels
    • Enable MP4 Support for offline viewing
    • Create and manage playlists
  • Edit and transform videos
    • Add metadata to videos
    • Add a watermark to a video
    • Add an intro and outro to a video
    • Clip and trim videos
    • Merge and stitch videos
    • Remove unwanted video segments
  • Manage audio and subtitle tracks
    • Upload and play audio and subtitle tracks
    • Add subtitles to a video
    • Generate subtitles automatically
    • Add audio to a video
    • Replace a video's audio track
    • Normalize audio loudness
    • Overlay audio on a video timeline
  • Extract images from video
    • Create thumbnails from a video
    • Create GIFs from a video
    • Create timeline hovers from a video
  • Video security
    • Generate JWTs for secure media
    • Secure media access with JWTs
    • Restrict playback access
    • Set up DRM encryption
    • FairPlay DRM integration
  • VOD events
    • Media events
    • Transform media events
LogoLogo
StatusSupportDiscussionsLog inSign Up
On this page
  • 1. Set restrictions when creating media
  • 2. Set restrictions when uploading media
  • 3. Set restrictions when creating a playback ID
  • Domain restrictions
  • User agent restrictions
  • Managing restrictions
  • 1. View playback restrictions
  • 2. Update domain restrictions
  • 3. Update user agent Restrictions
  • Webhook notifications
  • Testing your restrictions
Video security

Restrict playback access

Learn how to control video access using domain and user agent restrictions to ensure secure content protection.
Was this page helpful?
Previous

Set up DRM encryption

Implement DRM protection with Widevine, PlayReady, and FairPlay for secure video streaming.
Next
Built with

FastPix lets you control exactly where and how your videos can be played - whether you’re securing premium content, limiting access to trusted domains, or blocking certain browsers or apps. You can apply playback restrictions at three points in your workflow:

  • When creating media using URL (Pull)
  • When uploading media directly (Push)
  • When creating a playback ID

For existing media, you can update restrictions at any time using:

  • Update domain restrictions
    PATCH https://api.fastpix.com/v1/on-demand/{mediaId}/playback-ids/{playbackId}/domains
  • Update user agent restrictions
    PATCH https://api.fastpix.com/v1/on-demand/{mediaId}/playback-ids/{playbackId}/user-agents

These controls give you fine-grained protection by limiting access by domain or by user agent.




1. Set restrictions when creating media

You can define restrictions directly into your media creation request (Create media from URL).

Example request:

POST
1{
2 "inputs": [
3 {
4 "type": "video",
5 "url": "https://static.fastpix.com/fp-sample-video.mp4"
6 }
7 ],
8 "metadata": {
9 "key1": "value1"
10 },
11 "accessPolicy": "public",
12 "maxResolution": "1080p",
13 "mediaQuality": "standard",
14 "accessRestrictions": {
15 "domains": {
16 "defaultPolicy": "allow",
17 "allow": ["example.com"],
18 "deny": []
19 },
20 "userAgents": {
21 "defaultPolicy": "allow",
22 "allow": ["Mozilla/5.0"],
23 "deny": []
24 }
25 }
26}


2. Set restrictions when uploading media

If you’re pushing media to FastPix (Upload media from device), include restrictions inside pushMediaSettings.

Example request:

POST
1{
2 "corsOrigin": "*",
3 "pushMediaSettings": {
4 "metadata": {
5 "key1": "value1"
6 },
7 "accessPolicy": "public",
8 "mediaQuality": "standard",
9 "accessRestrictions": {
10 "domains": {
11 "defaultPolicy": "allow",
12 "allow": ["example.com"],
13 "deny": []
14 },
15 "userAgents": {
16 "defaultPolicy": "allow",
17 "allow": ["Mozilla/5.0"],
18 "deny": []
19 }
20 },
21 "maxResolution": "1080p"
22 }
23}


3. Set restrictions when creating a playback ID

When creating a playback ID, you can set their own restrictions, separate from the media’s default rules.

Example request:

POST
1{
2 "accessPolicy": "public",
3 "accessRestrictions": {
4 "domains": {
5 "defaultPolicy": "allow",
6 "allow": [
7 "players.akamai.com",
8 "livepush.io"
9 ],
10 "deny": [
11 "wowza.com",
12 "5centscdn.net"
13 ]
14 },
15 "userAgents": {
16 "defaultPolicy": "deny",
17 "allow": [
18 "Mozilla/5.0",
19 "Chrome/90.0"
20 ],
21 "deny": [
22 "curl/7.68.0"
23 ]
24 }
25 }
26}


Domain restrictions

Domain restrictions control which websites can embed or stream your content. Here’re the configuration options:

  • Default policy – Allow or deny all domains by default.
  • Allow list – Add up to 25 domains that are always allowed.
  • Deny list – Add up to 25 domains that are always blocked.
  • Wildcard support – Use patterns like *.example.com to include all subdomains.

Default PolicyAllow ListDeny ListResult
allow—[“blocked.com”]All domains allowed except blocked.com
deny[“trusted.com”]—Only trusted.com allowed
allow[“example.com”][“*.bad.com”]All domains allowed except any ending in .bad.com


User agent restrictions

User agent restrictions filter access by browser, app, or device. Here’re the configuration options:

  • Default Policy – Choose to allow or deny all user agents by default.
  • Allow List – Add up to 25 exact user agent strings that are allowed.
  • Deny List – Add up to 25 exact user agent strings that are blocked.

Note: User agent strings are case-sensitive.


Default PolicyAllow ListDeny ListResult
allow—[“Bot/1.0”]All browsers/apps allowed except Bot/1.0
deny[“Chrome/91.0”]—Only Chrome/91.0 allowed


Managing restrictions

Once playback restrictions are in place, you can review or adjust them without recreating your media or playback IDs. FastPix provides API endpoints to view current settings, update allowed/denied domains, or change user agent rules at any time.


1. View playback restrictions

Use this endpoint to retrieve a list of all playback IDs for a media item, along with the domain and user agent rules currently applied. This is useful for auditing access policies or confirming changes have taken effect.

1GET https://api.fastpix.com/v1/on-demand/{mediaId}/playback-ids

2. Update domain restrictions

Change which websites can embed or stream your content. You can switch the default policy, add/remove domains from the allow list, or block specific domains - all without impacting the media file itself.

Use this endpoint:

1PATCH https://api.fastpix.com/v1/on-demand/{mediaId}/playback-ids/{playbackId}/domains

Sample payload:

Request payload
1{
2 "defaultPolicy": "allow",
3 "allow": ["example.com", "*.example.com"],
4 "deny": ["blocked.com"]
5}

3. Update user agent Restrictions

Adjust which browsers, apps, or devices can play your content. Use this to block suspicious crawlers, allow only specific app versions, or apply stricter rules for certain streams.

Use this endpoint:

1PATCH https://api.fastpix.com/v1/on-demand/{mediaId}/playback-ids/{playbackId}/user-agents

Sample payload:

Request payload
1{
2 "defaultPolicy": "deny",
3 "allow": ["Chrome/91.0", "Mozilla/5.0"],
4 "deny": ["Bot/1.0", "Crawler/2.0"]
5}

LIMITATIONS

Playback restriction settings have a few boundaries to ensure consistent enforcement across the FastPix platform:

  • Maximum 25 entries in allow or deny lists (per type).
  • Only valid domain names are accepted (wildcards supported like *.example.com).
  • User agent strings are case-sensitive and must match exactly.

Webhook notifications

If you’ve connected webhooks to your FastPix workspace, you can automatically receive notifications whenever domain or user agent restrictions are updated. This helps teams stay in sync, trigger automation workflows, or log changes for security audits.

Events sent:

video.playbackId.user-agents.updated – Fired when user agent restrictions are added, removed, or changed.

video.playbackId.domains.updated – Fired when domain restrictions are modified.



Testing your restrictions

Before going live, verify that your rules behave as expected. Testing helps you catch configuration mistakes early and avoid blocking legitimate viewers.

  • Try loading the playback URL from both allowed and blocked domains.
  • Switch between different browsers, apps, or devices to confirm user agent rules work.
  • Use developer tools like curl or Postman to send requests with custom User-Agent headers and simulate various clients.