---
title: "Stream - Clip videos, get caption files, and customize signed tokens with the Stream binding — Cloud Changelog"
description: "The Stream binding for Workers now supports clipping videos, customizing signed URL tokens, and fetching caption files. Clip a video into a new video from…"
url: "https://cloudchangelog.com/cloudflare/2026-12-02-stream-binding-clips-captions-tokens"
updated: "2026-12-03"
---

[Back to feed](https://cloudchangelog.com/feed/2026-W49)

December 2, 2026 · Cloudflare

# Stream - Clip videos, get caption files, and customize signed tokens with the Stream binding

- [Stream](https://cloudchangelog.com/products/cloudflare/stream)
- [Media, games and IoT](https://cloudchangelog.com/search?q=media-games-iot)

## What changed

**Stream binding for Workers:** Adds video clipping, custom signed URL tokens, and caption file fetching as WebVTT.

The [Stream binding for Workers](https://developers.cloudflare.com/stream/manage-video-library/bindings/) now supports clipping videos, customizing signed URL tokens, and fetching caption files.

**Clip a video** into a new video from a time range of an existing one:

```
const clip = await env.STREAM.clip("VIDEO_ID", {
	startTimeSeconds: 10,
	endTimeSeconds: 40,
});
```

```
const clip = await env.STREAM.clip("VIDEO_ID", {
	startTimeSeconds: 10,
	endTimeSeconds: 40,
});
```

**Customize signed URL tokens** with an expiry, download access, IP and country access rules, or your own signing key, without making an API call:

```
const token = await env.STREAM.video("VIDEO_ID").generateToken({
	expiresAt: new Date(Date.now() + 30 * 60 * 1000),
	downloadable: true,
	accessRules: [
		{ type: "ip.geoip.country", action: "allow", country: ["US"] },
		{ type: "any", action: "block" },
	],
});
```

```
const token = await env.STREAM.video("VIDEO_ID").generateToken({
	expiresAt: new Date(Date.now() + 30 * 60 * 1000),
	downloadable: true,
	accessRules: [
		{ type: "ip.geoip.country", action: "allow", country: ["US"] },
		{ type: "any", action: "block" },
	],
});
```

**Fetch a caption file** as a WebVTT stream:

```
const vtt = await env.STREAM.video("VIDEO_ID").captions.get("en");
const response = new Response(vtt, {
	headers: { "Content-Type": "text/vtt" },
});
```

```
const vtt = await env.STREAM.video("VIDEO_ID").captions.get("en");
const response = new Response(vtt, {
	headers: { "Content-Type": "text/vtt" },
});
```

These methods also work in the binding's local simulation during local development. Refer to [Local development](https://developers.cloudflare.com/stream/manage-video-library/bindings/#local-development) for what the local simulation does not support.

Get the week’s Cloudflare changes in one email

Your email address

Free, every Monday: only what changed in Cloudflare that week. We email you a link to confirm.

[See last week’s digest](https://cloudchangelog.com/digests/weekly-2026-W48#provider-cloudflare)

Free. Unsubscribe any time.

[Read on developers.cloudflare.com](https://developers.cloudflare.com/changelog/post/2026-12-02-stream-binding-clips-captions-tokens/)

## Related updates

- May 7, 2026

  [Stream - Introducing Stream Bindings for Workers](https://cloudchangelog.com/cloudflare/2026-05-07-stream-workers-binding)
- Mar 18, 2026

  [Stream - Media Transformations binding for Workers](https://cloudchangelog.com/cloudflare/2026-03-18-media-transformations-workers-binding)
- Apr 11, 2025

  [Stream - Signed URLs and Infrastructure Improvements on Stream Live WebRTC Beta](https://cloudchangelog.com/cloudflare/2025-04-14-webrtc-beta-signed-urls)

[All Stream changes](https://cloudchangelog.com/products/cloudflare/stream)

## Contact

- [YouTube](https://www.youtube.com/@cloudchangelog)
