SaaS and developers

Video inside your own product: upload from your app, react to webhooks, and decide who watches from your backend.

What it takes

  • An API for everythingEverything the dashboard does, through a REST API, with SDKs for TypeScript, Python and PHP.
  • Told when it's readySigned webhooks tell your backend when a video is ready, fails or is deleted.
  • Only your users watchYour backend signs each playback token with its own key.
  • Your storageKeep the files in your own S3-compatible bucket; Crumbcast encodes and serves them from there.Own storage on Business

The products behind it

From token to playing video

  1. Make an API token

    In your project's settings, under API tokens. Keep it on your server, never in a web page or an app.

    Your terminalbash
    export CRUMBCAST_TOKEN=cc_… # The answer has your project's IDcurl https://your-crumbcast/api/v1/projects/ \  -H "Authorization: Bearer $CRUMBCAST_TOKEN"
  2. Send a video from your code

    One call imports a file from a link and encodes it, or upload a test file by hand.

    Your terminalbash
    curl https://your-crumbcast/api/v1/projects/$PROJECT_ID/videos/import/ \  -H "Authorization: Bearer $CRUMBCAST_TOKEN" \  -H "Content-Type: application/json" \  -d '{"url": "https://example.com/launch.mp4", "title": "Launch day"}'
  3. Play it in your product

    Once the video.ready webhook arrives, embed the player with a script tag, or give its HLS link to a player of your own.

    Your pagehtml
    <script async src="https://your-crumbcast/embed/script.js"  data-video="<video id>"  data-ratio="16 / 9"  data-title="Launch day"></script>
Bring your library from Vimeo, YouTube, Wistia or Mux

Where it meets your code

A video touches your product in three places. Each one is code you own.

Your app

Your users upload

Files go from your code straight to storage in parts, side by side, or Crumbcast fetches them from a link.

  • Straight to storageEach part goes to a signed URL of your storage, never through the API.
  • In parts, side by sideSend parts at once, and try a failed one again on its own.
  • Or from a linkName a file that's online, and Crumbcast downloads it for you.
Upload a file

Your backend

Your backend hears

A signed request to your backend whenever something happens to a video or a live stream.

  • Signed with your secretA Crumbcast-Signature header with a timestamp and an HMAC-SHA256 of the body.
  • Retried until it landsA delivery that fails is tried again, further apart each time, up to 7 times over about 42 hours.
  • Only the events you wantEvery event, or just the ones you pick, for each webhook.
Check a webhook

Your backend

Your backend decides

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

  • 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.

Signed videos need a storage without a public URL.

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 your backend hears

One request for each thing that happens to a video. What you do with it is up to your code.

EventWhenYour code
video.createdA video comes into the projectSave its ID beside your own record
video.readyIt can play, while the rest still encodesShow the player
video.encodedNothing of it is encoding any moreMark the job finished
video.captions.readyCaptions made from its speech are readyTell the people who asked for them
video.erroredIts file couldn't be madeTell your user why, and offer a retry
video.deletedIt was deletedRemove it from your product

Every request is signed, and one that fails is tried again for about 42 hours.Every event

More to build with

Before you build on it

Is there an SDK?

Yes: crumbcast, on npm, PyPI and Packagist, typed for TypeScript, Python and PHP. Any other language works over HTTPS, with a client generated from the OpenAPI spec.

Does the API cost extra?

No. API tokens, webhooks and signed playback are on every plan, Free included. What your code encodes, stores and delivers counts towards your plan like anything else.

What can a token reach?

Its own project, with the role you gave it and never more than its maker's. Your account, organisation, storages and billing stay in the dashboard.

Do my users need a token to upload?

No, and they should never see one. Your server asks for the upload URLs with its token and hands them to the browser, which sends the file straight to storage. Each URL lasts an hour.

Can I use my own player?

Yes. Every video has HLS and DASH playlists for a player of your own, as well as the embed.

What happens when my code hits a limit?

The API answers 402 when your plan lacks something or a limit is reached, and 429 for too many requests, which you try again a little later. The errors guide lists every answer.

Your first video is one call away

Start on the Free plan, and move up when you need more.

Free includes 120 stored minutes and is never billed.