Skip to content

Latest commit

 

History

History

README.md

FastPix Java SDK — Examples

Each example is an end-to-end flow that chains related methods into one realistic sequence (create → use → clean up), rather than a single call. For single-method usage and parameter reference, see docs/sdks/.

Setup

Set your credentials from the FastPix Dashboard (Access Token = username, Secret Key = password) — every example that calls the API reads them from the environment, so export both before running (an example started without them stops immediately with a reminder):

export FASTPIX_USERNAME="your-access-token"
export FASTPIX_PASSWORD="your-secret-key"

You can also copy .env.example to .env and load it in your shell (set -a; . ./.env; set +a).

The SDK (io.fastpix:sdk) is pulled from Maven Central automatically — there's nothing else to install or build first.

Running

Each example is its own run<Name> Gradle task:

./gradlew runDirectUpload
./gradlew runMediaLifecycle
./gradlew runVerifyWebhook

A few examples work on existing resources — a ready media, a view — and have a placeholder constant at the top of the file (e.g. REPLACE_WITH_A_READY_MEDIA_ID). Swap in a real id before running. MediaLifecycleExample prints media ids you can reuse.

Examples

Example What it chains
DirectUploadExample create signed upload URL → list uploads → cancel upload
MediaLifecycleExample create media → get → list → update → source-access → delete
MediaTracksExample add an audio track → add a subtitle track (on a ready media)
PlaybackIdsExample create playback id → domain & user-agent restrictions → delete
PlaylistsExample create → add/reorder/remove media → get/list → update → delete
LiveStreamingExample create stream → playback id → update → disable/enable/complete → delete
SimulcastingExample create stream → add simulcast target → update → delete
SigningKeysExample create → list → get → delete a signing key
AiFeaturesExample enable summary → chapters → moderation → named entities → read summary
VideoViewDetailsExample fetch analytics for a single view
VerifyWebhookExample verify a FastPix-Signature webhook (offline, no API call)

Spring Boot project

A runnable Spring Boot integration lives in spring-boot/ — it exposes POST /uploads (mint a signed upload URL) and POST /webhooks (verify the signature and react to events). See its own README for run steps.