Signed playback

Your backend decides who may watch: it signs a short-lived token with its own key, and Crumbcast checks it.

Sign a playback tokenjs
import jwt from "jsonwebtoken"; // Your backend decides who may watch, and for how longconst token = jwt.sign(  // The viewer: whose copy a forensic video marks  { sub: videoId, viewer: user.id },  process.env.CRUMBCAST_SIGNING_KEY,  {    algorithm: "RS256",    keyid: KEY_ID,    expiresIn: "1h",  },);

What you get

  • Your key, your tokensCrumbcast keeps only the public half of each signing key.
  • Standard JWTsRS256 tokens any JWT library can make, naming the video and when they expire.
  • On any linkAdd ?token= to a watch page or an embed.
  • A viewer in every tokenName the viewer, and a forensic video marks their copy as theirs.

More for developers