Stream a private channel with signed playback
Serve a Cloud Playout channel’s live HLS output as private and play it only with a signed JWT, driven through the REST API and the C# SDK.
Serve a Cloud Playout channel’s live output as private and let viewers play it only with a signed JWT, driving the whole flow through the REST API and the FastPix C# SDK.
How private playout works
A Cloud Playout channel broadcasts its program as a FastPix live stream, so you secure a channel the same way you secure any live stream: give the stream a private playback ID and require a signed JWT on every playback request. A public playback URL would let anyone watch, so the private channel keeps exactly one private playback ID and no public one.
The token is a short JSON Web Token signed with a key pair you create. FastPix keeps the public key and verifies the token when the player loads the stream. You keep the private key and mint a token per viewer on your server.
Before you begin
Make sure you have the following:
- A FastPix account, plus your Access Token ID and Secret Key. All REST calls use Basic auth against
https://api.fastpix.com/v1, with the Access Token ID as the username and the Secret Key as the password. See Activate your account. - Content imported and organized into playlists. See Import and organize content.
- A scheduled channel. See Create a scheduled channel.
- For C# examples, the FastPix C# SDK installed (
dotnet add package Fastpix). See C# SDK.
Note: Creating, reading, activating, deactivating, and deleting a channel use the Cloud Playout channel lifecycle endpoints. To access these endpoints, contact FastPix support to have them enabled for your workspace. You can also create and activate a scheduled channel from the dashboard. Everything in the signed-playback steps below (playback IDs, signing keys, tokens) is available in the REST API and the SDKs.
Set up and activate the channel
Create a scheduled channel and activate it so its live output starts. The channel must contain at least one scheduled event, and you activate it ahead of its start time.
- In the dashboard: follow Create a scheduled channel and Monitor and manage channels.
- Through the API, no dashboard: contact FastPix support to get access to the channel lifecycle endpoints for your workspace.
Adding scheduled content to an existing channel is available directly in the REST API. Add events to a scheduled channel with a single request:
Make the channel output private
Each channel broadcasts through an underlying live stream, identified by its live stream ID (destinationLiveId). Read it from the channel’s details (in the dashboard, or through the channel API if FastPix has enabled it for you).
Create a private playback ID on that live stream:
Then delete the channel’s public playback ID so no unsigned URL can reach the stream:
Note: You can further restrict a private playback ID to specific domains or user agents. See the live playback restriction endpoints in the API reference.
Create a signing key
A signing key is a 2048-bit RSA key pair. FastPix returns the private key once and stores only the public key, so save the private key securely.
The response returns the key ID (kid) and the Base64-encoded private key. Base64-decode the private key before you use it to sign tokens.
Generate a signed JWT
Sign a short-lived RS256 token on your server. Set the audience to the private playback ID so the token is only valid for this channel.
Caution: Sign tokens on your server and never ship the private key or a long-lived token in client code. For quick manual testing only, FastPix offers a hosted signer at
https://jwt.fastpix.co; do not use it in production.
Play the private channel
Append the token to the channel’s playback URL as a token query parameter:
With the FastPix Player web component, pass the token as an attribute:
Video.js, hls.js, and other HLS players load the same tokenized .m3u8 URL directly.
Renew tokens during playback
The token is checked when the player loads the playlist, not on every segment, so an expiring token does not interrupt a session already playing. Issue a fresh token on each source load (a reload, or the viewer re-joining). A 1 hour lifetime is a good default: short enough to limit a leaked token, long enough that most sessions never need a mid-session refresh.
What authorization protects
- The JWT is validated on the master playlist. A missing, expired, tampered, or wrong-playback-ID token returns 401.
- Rendition playlists and media segments are served through FastPix-signed URLs scoped to the playback ID. An unsigned segment request returns 404, and the CDN caches only signed URLs.
- The viewer’s JWT is not re-checked per segment. Authorization happens at playlist load, and segment access is enforced by the FastPix-signed URLs.
Revoke access
FastPix does not offer per-viewer revocation or a session validation callback. To cut off access you have two options, both broad:
- Delete the signing key. Every token signed with that key stops working immediately. See
DeleteAsynconSigningKeys. - Recreate the playback ID. Delete the private playback ID and create a new one, which changes the URL for everyone.
Continued-playback window after expiry: a session already in progress keeps playing until the player re-requests the master playlist (a reload or re-join). New sessions are refused once the token has expired. There is no immediate mid-session cutoff for a single viewer.
Stop and clean up
Deactivate the channel when the broadcast ends (it returns to an idle state), and delete it when you no longer need it. Like creation and activation, deactivate and delete use the channel lifecycle endpoints: run them from the dashboard, or contact FastPix support to get API access for API-only operation.
Frequently asked questions
Does Cloud Playout support signed playback for its live HLS output?
Yes. A channel broadcasts as a FastPix live stream, so you add a private playback ID to that stream and play it with a signed RS256 JWT. Create the private playback ID with POST /live/streams/{streamId}/playback-ids and a "private" access policy, create a signing key with POST /iam/signing-keys, and append ?token=<JWT> to https://stream.fastpix.com/<playbackId>.m3u8.
Are the media segments protected, or only the manifest?
Both. The JWT is validated on the master playlist, and the rendition playlists and segments are served through FastPix-signed URLs scoped to the playback ID. Unsigned segment requests return 404, and the CDN caches only signed URLs. The viewer JWT is checked at playlist load rather than on every segment.
Can I revoke a single viewer's playback token immediately?
Not individually. FastPix has no per-viewer revocation or session callback. You can delete the signing key, which invalidates every token signed with it, or recreate the playback ID, which changes the URL for everyone. A session already playing continues until the player re-requests the master playlist; new sessions are refused once the token has expired.
Can I create and activate a Cloud Playout channel entirely through the C# SDK?
The signed-playback pieces (playback IDs, signing keys) are in the REST API and the C# SDK. For the channel lifecycle operations (create, read, activate, deactivate, delete), contact FastPix support to get access to those endpoints for your workspace, so you can run the full lifecycle with no dashboard login.
What’s next
- Create a scheduled channel to program the channel this workflow secures.
- Monitor and manage channels to activate and watch the broadcast.
- Generate JWTs for secure media for the signing-key and token details shared with on-demand playback.