- playout: run-scoped R2 manifest URIs (candidate a rewrite via rewriteManifestToRun) - tests: playlist_rewrite_test.go (rewrite + publish integration + slate guard) - docs: STREAMING, cloudflare-workers-setup, architecture (incl. Level-2 diagram) - release housekeeping: TODO->DONE, CHANGELOG 1.1.0, version bump
32 lines
1.2 KiB
TOML
32 lines
1.2 KiB
TOML
# Cloudflare Worker: linearvoid-media (edge HLS delivery)
|
|
# Serves HLS objects from the `linearvoid-media` R2 bucket on media.linearvoid.tv.
|
|
# Applies immutable caching to media segments and a short TTL to live manifests.
|
|
# This worker replaces direct R2 custom-domain serving on the media host so cache
|
|
# headers/CORS are controlled in code (cache rules remain as the origin baseline).
|
|
|
|
name = "linearvoid-media"
|
|
main = "src/worker.js"
|
|
compatibility_date = "2025-08-01"
|
|
|
|
# R2 bucket holding the HLS objects. The request path is mirrored onto the bucket,
|
|
# e.g. GET /hls/playlist.m3u8 -> object key `hls/playlist.m3u8`.
|
|
[[r2_buckets]]
|
|
binding = "MEDIA_BUCKET"
|
|
bucket_name = "linearvoid-media"
|
|
|
|
# Default environment: deploy to the preview *.workers.dev URL (test target).
|
|
# npx wrangler deploy
|
|
#
|
|
# Production environment: attach the media host as a custom domain on this worker.
|
|
# Note: bindings are NOT inherited by environments, so r2_buckets is redeclared here.
|
|
# npx wrangler deploy --env production
|
|
[env.production]
|
|
routes = [
|
|
{ pattern = "media.linearvoid.tv", custom_domain = true }
|
|
]
|
|
|
|
[[env.production.r2_buckets]]
|
|
binding = "MEDIA_BUCKET"
|
|
bucket_name = "linearvoid-media"
|
|
|