Enable secure video playback

Learn how to protect video content using token-based authentication in the FastPix Android Player.

Set up token-based playback

Pass a playbackToken in your setFastPixMediaItem configuration to secure the stream:

1private fun startPlayback() {
2 player?.setFastPixMediaItem {
3 playbackId = "YOUR_PLAYBACK_ID"
4 playbackToken = "SET_PLAYBACK_TOKEN"
5 }
6}

How tokens protect your content

  • Unique playback ID identifies each video asset individually for secure and trackable playback.
  • Signed token authentication grants access only if a valid, cryptographically signed token is present in the playback URL.
  • Time-limited access — tokens can include expiration timestamps, allowing playback only within a defined time window.
  • User-specific control — tokens can be generated per user or session, restricting access based on identity or device.
  • Prevents unauthorized sharing — signed tokens stop others from reusing the URL, protecting content from piracy and hotlinking.
  • Customizable restrictions — tokens can include rules like IP restrictions, usage limits, or geo-blocking.

What’s next