From 48d44167706697d4cf0b474794c69c553bb9d776 Mon Sep 17 00:00:00 2001 From: "mintlify[bot]" <109931778+mintlify[bot]@users.noreply.github.com> Date: Mon, 24 Aug 2026 15:24:54 +0000 Subject: [PATCH 01/20] Updated mintlify pages - Created untitled-page.mdx - Created untitled-page-2.mdx - Updated docs.json Mintlify-Source: dashboard-editor --- docs.json | 4 +- untitled-page-2.mdx | 188 ++++++++++++++++++++++++++++++++++++++++++++ untitled-page.mdx | 179 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 370 insertions(+), 1 deletion(-) create mode 100644 untitled-page-2.mdx create mode 100644 untitled-page.mdx diff --git a/docs.json b/docs.json index 42d9e59f..33056134 100644 --- a/docs.json +++ b/docs.json @@ -643,7 +643,9 @@ "group": "Mobile SDK", "pages": [ "stream/mobile-sdk", - "stream/mobile-sdk-token-authentication" + "stream/mobile-sdk-token-authentication", + "untitled-page", + "untitled-page-2" ] }, "stream/expo-video", diff --git a/untitled-page-2.mdx b/untitled-page-2.mdx new file mode 100644 index 00000000..aa0b98d3 --- /dev/null +++ b/untitled-page-2.mdx @@ -0,0 +1,188 @@ +--- +title: "iOS SDK" +description: "Integrate Bunny Stream into your iOS apps with the Swift SDK — playback, uploads, camera capture, and embed view token authentication." +--- + +The Bunny Stream iOS SDK lets you quickly integrate the Bunny Stream player, uploads, and video management into your iOS applications. + +## Key Features + +- **Complete API Integration:** Full support for the Bunny REST Stream API +- **Efficient Video Upload:** TUS protocol implementation for reliable, resumable uploads +- **Advanced Video Player:** Custom-built player with full Bunny CDN integration +- **Camera Upload Support:** Built-in capabilities for recording and uploading videos directly from the device camera +- **Type-Safe API:** Fully typed Swift API for compile-time safety +- **Background Processing:** Support for background uploads and downloads +- **Comprehensive Error Handling:** Detailed error information and recovery options + +## What is the Bunny Stream iOS SDK? + +Bunny Stream is a comprehensive Swift Package Manager (SPM) package designed to seamlessly integrate Bunny's powerful video streaming capabilities into your iOS applications. The package provides a robust set of tools for video management, playback, uploading, and camera-based video uploads, all through an intuitive **Swift API**. + + + + +## Token authentication + +When using the iOS SDK, **two authentication layers exist**: + +- **Embed View Token Authentication** — controls access to the video. +- **CDN Token Authentication** — protects delivery from Bunny CDN and is handled automatically by the SDK. + +This section focuses on **Embed View Token Authentication**, which must be handled by a **customer-managed backend or Edge Script** containing custom business logic that decides whether a client is allowed to play back a video by returning an embed view token. + +### Embed View Token Authentication + +Embed View Token Authentication: + +- Authorizes a viewer to play a specific video +- Is enforced at the **Stream API level** +- Is required for private or restricted videos + +**iOS SDK responsibility** + +- The **customer backend generates the token**. +- The app requests the token and passes it to the `BunnyStreamPlayer`. +- The SDK uses the token for playback; **CDN token signing happens automatically**. + +### Supported authentication methods + +| Method | iOS SDK | +| --- | --- | +| Embed View Token Authentication | Supported via customer backend | +| CDN Token Authentication | Automatic | +| Client-side token signing | Not supported | + + + The **Video Library API Key** must **never** be included in your iOS app. It is a secret that only your backend or Edge Script should hold. + + +### Backend requirements + +Your backend (or Edge Script) must: + +- Securely store the **Video Library API Key**, as it serves as a secret that must not be stored in the mobile app. +- Authenticate the app user with your custom business logic. +- Generate the embed view token by following the [token authentication signing procedure](/docs/stream/token-authentication#signing-procedure) (the token security key is your Video Library API Key). +- Return `token` and `expires` values in the response: + +```json +{ + "token": "SIGNED_EMBED_VIEW_TOKEN", + "expires": 1710000000 +} +``` + + + Tokens should be **short-lived** (1–5 minutes recommended), unless you have a specific use case that requires a longer expiration. + + +### Edge Script example + +Below is an example Edge Script that generates embed view tokens. Store `VIDEO_LIBRARY_API_KEY` as an **Edge Script Secret**. + +```typescript +BunnySDK.net.http.serve(async (request: Request): Promise => { + const url = new URL(request.url); + + const apiKey = BunnySDK.env.VIDEO_LIBRARY_API_KEY; + const videoId = url.searchParams.get("videoId"); + const expires = Math.floor(Date.now() / 1000) + 300; // 5 minutes or adjust if needed + + if (!videoId) { + return new Response(JSON.stringify({ error: "Missing videoId" }), { + status: 400, + headers: { "Content-Type": "application/json" }, + }); + } + + /* + * ============================================================ + * Custom authentication / authorization logic + * ------------------------------------------------------------ + * Perform your business checks here: + * - Validate user identity (e.g. by using JWT, API key, or some other auth headers) + * - Verify entitlement to this video + * - Apply subscription / access rules + * + * Only generate a token if access is allowed. + * ============================================================ + */ + + // Example: + // if (!isUserAuthorized(request, videoId)) { + // return new Response( + // JSON.stringify({ error: "Unauthorized" }), + // { status: 403, headers: { "Content-Type": "application/json" } } + // ); + // } + + const token = generateEmbedViewToken(apiKey, videoId, expires); + + return new Response(JSON.stringify({ token, expires }), { + headers: { "Content-Type": "application/json" }, + }); +}); + +/** + * Embed View Token generation (per Bunny Stream docs): + * + * Token data sequence: + * Video Library API Key + videoId + expires + * + * Steps: + * 1. Concatenate the values in the order above (no separators) + * 2. Generate HMAC-SHA256 using the Video Library API Key + * 3. Base64 encode: : + */ +function generateEmbedViewToken( + apiKey: string, + videoId: string, + expires: number, +): string { + // @ts-ignore - crypto is available in the Edge runtime + const crypto = require("crypto"); + + const data = apiKey + videoId + expires; + const signature = crypto + .createHmac("sha256", apiKey) + .update(data) + .digest("hex"); + + return Buffer.from(`${signature}:${expires}`).toString("base64"); +} +``` + +### iOS SDK usage + +The `BunnyStreamPlayer` initializer supports token parameters: + +```swift +BunnyStreamPlayer( + ... + videoId: "abc123", + token: token, + expires: expires + ... +) +``` + +**Flow** + + + + Call your backend or Edge Script from the app to request a token for the target `videoId`. + + + Your backend returns `{ token, expires }`. + + + Initialize `BunnyStreamPlayer` with the `token` and `expires` values. + + + +## Important notes + +- The **Video Library API Key** must **never** be included in mobile apps. +- Embed View Token Authentication is **required** if you don't want to publicly expose your videos. +- CDN Token Authentication is applied to CDN URLs automatically if it is turned on in the video library. \ No newline at end of file diff --git a/untitled-page.mdx b/untitled-page.mdx new file mode 100644 index 00000000..f4d24792 --- /dev/null +++ b/untitled-page.mdx @@ -0,0 +1,179 @@ +--- +title: "Android" +--- + +> ## Documentation Index +> +> Fetch the complete documentation index at: [https://bunny.net/docs/llms.txt](https://bunny.net/docs/llms.txt) Use this file to discover all available pages before exploring further. + +# Token authentication with Mobile SDKs + +When using the Stream Mobile SDKs, **two authentication layers exist**: + +- **Embed View Token Authentication**: controls access to the video +- **CDN Token Authentication**: protects delivery from Bunny CDN and is handled automatically by the SDK + +This document focuses on **Embed View Token Authentication**, which must be handled by a **customer-managed backend or Edge Script** containing custom business logic that decides whether a certain client is allowed to play back a video by returning an embedded view token. + +## Embed View Token Authentication + +### Purpose + +- Authorizes a viewer to play a specific video +- Enforced at the **Stream API level** +- Required for private or restricted videos + +### Mobile SDK Responsibility + +- **The customer backend generates the token** +- The mobile app requests the token and passes it to the SDK player element +- The SDK uses the token for playback; **CDN token signing happens automatically** + +## Supported Authentication Methods + +| Method | Mobile SDK | +| --- | --- | +| Embed View Token Authentication | Supported via customer backend | +| CDN Token Authentication | Automatic | +| Client-side token signing | Not supported | + +## Backend Requirements + +The backend (or Edge Script) must: + +- Securely store the **Video Library API Key** as it serves as a secret that must not be stored in the mobile app +- Authenticate the mobile app user with custom business logic +- Generate embed view token by following the [token authentication signing procedure](/docs/stream/token-authentication#signing-procedure) (token security key is your Video Library API Key) +- Return a `token` and `expires` values in response: + +```json +{ + "token": "SIGNED_EMBED_VIEW_TOKEN", + "expires": 1710000000 +} +``` + +Tokens should be **short-lived** (1–5 minutes recommended), unless you have a specific use-case for which longer expiration could be used. + +### Edge Script Example + +Below is an example Edge Script that generates embed view tokens. Store `VIDEO_LIBRARY_API_KEY` as an **Edge Script Secret**. + +```typescript +BunnySDK.net.http.serve(async (request: Request): Promise => { + const url = new URL(request.url); + + const apiKey = BunnySDK.env.VIDEO_LIBRARY_API_KEY; + const videoId = url.searchParams.get("videoId"); + const expires = Math.floor(Date.now() / 1000) + 300; // 5 minutes or adjust if needed + + if (!videoId) { + return new Response(JSON.stringify({ error: "Missing videoId" }), { + status: 400, + headers: { "Content-Type": "application/json" }, + }); + } + + /* + * ============================================================ + * Custom authentication / authorization logic + * ------------------------------------------------------------ + * Perform your business checks here: + * - Validate user identity (e.g. by using JWT, API key, or some other auth headers) + * - Verify entitlement to this video + * - Apply subscription / access rules + * + * Only generate a token if access is allowed. + * ============================================================ + */ + + // Example: + // if (!isUserAuthorized(request, videoId)) { + // return new Response( + // JSON.stringify({ error: "Unauthorized" }), + // { status: 403, headers: { "Content-Type": "application/json" } } + // ); + // } + + const token = generateEmbedViewToken(apiKey, videoId, expires); + + return new Response(JSON.stringify({ token, expires }), { + headers: { "Content-Type": "application/json" }, + }); +}); + +/** + * Embed View Token generation (per Bunny Stream docs): + * + * Token data sequence: + * Video Library API Key + videoId + expires + * + * Steps: + * 1. Concatenate the values in the order above (no separators) + * 2. Generate HMAC-SHA256 using the Video Library API Key + * 3. Base64 encode: : + */ +function generateEmbedViewToken( + apiKey: string, + videoId: string, + expires: number, +): string { + // @ts-ignore - crypto is available in the Edge runtime + const crypto = require("crypto"); + + const data = apiKey + videoId + expires; + const signature = crypto + .createHmac("sha256", apiKey) + .update(data) + .digest("hex"); + + return Buffer.from(`${signature}:${expires}`).toString("base64"); +} +``` + +## Android SDK Usage + +The `PlayVideo` call supports token parameters: + +```kotlin +PlayVideo( + ... + videoId = "abc123", + token = token, + expires = expires + ... +) +``` + +**Flow:** + +1. Request embed token from backend +2. Receive `{ token, expires }` +3. Pass values to `PlayVideo` + +## iOS SDK Usage + +The `BunnyStreamPlayer` initializer supports token parameters: + +```swift +BunnyStreamPlayer( + ... + videoId: "abc123", + token: token, + expires: expires + ... + +) +``` + +**Flow:** + +1. Request embed token from backend +2. Receive `{ token, expires }` +3. Initialize player with token data + +## Important Notes + +- The **Video Library API Key** must **never** be included in mobile apps +- Embed View Token Authentication is **required** if you don't want to publicly expose your videos +- CDN Token Authentication is applied to CDN URLs automatically if turned on in the video library \ No newline at end of file From 3a2b6c52551821036b766939e15d4194ab7f6ca7 Mon Sep 17 00:00:00 2001 From: "mintlify[bot]" <109931778+mintlify[bot]@users.noreply.github.com> Date: Mon, 24 Aug 2026 15:25:28 +0000 Subject: [PATCH 02/20] Updated mintlify pages - Updated untitled-page.mdx Mintlify-Source: dashboard-editor --- untitled-page.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/untitled-page.mdx b/untitled-page.mdx index f4d24792..a9deecdf 100644 --- a/untitled-page.mdx +++ b/untitled-page.mdx @@ -1,5 +1,5 @@ --- -title: "Android" +title: "Android SDK" --- > ## Documentation Index From 618c71c09cdfea9f11b765f3ed4d8f7befce15be Mon Sep 17 00:00:00 2001 From: "mintlify[bot]" <109931778+mintlify[bot]@users.noreply.github.com> Date: Mon, 24 Aug 2026 15:26:01 +0000 Subject: [PATCH 03/20] Updated mintlify pages - Updated untitled-page.mdx Mintlify-Source: dashboard-editor --- untitled-page.mdx | 127 +++++++++++++++++++++++++--------------------- 1 file changed, 68 insertions(+), 59 deletions(-) diff --git a/untitled-page.mdx b/untitled-page.mdx index a9deecdf..1fcc3117 100644 --- a/untitled-page.mdx +++ b/untitled-page.mdx @@ -1,50 +1,70 @@ --- title: "Android SDK" +description: "Integrate Bunny Stream into your Android apps with the Kotlin SDK — playback, uploads, camera capture, and embed view token authentication." --- -> ## Documentation Index -> -> Fetch the complete documentation index at: [https://bunny.net/docs/llms.txt](https://bunny.net/docs/llms.txt) Use this file to discover all available pages before exploring further. +The Bunny Stream Android SDK lets you quickly integrate the Bunny Stream player, uploads, and video management into your Android applications. -# Token authentication with Mobile SDKs +## Key Features -When using the Stream Mobile SDKs, **two authentication layers exist**: +- **Complete API Integration:** Full support for the Bunny REST Stream API +- **Efficient Video Upload:** TUS protocol implementation for reliable, resumable uploads +- **Advanced Video Player:** Custom-built player with full Bunny CDN integration +- **Camera Upload Support:** Built-in capabilities for recording and uploading videos directly from the device camera +- **Type-Safe API:** Fully typed Kotlin API for compile-time safety +- **Background Processing:** Support for background uploads and downloads +- **Comprehensive Error Handling:** Detailed error information and recovery options -- **Embed View Token Authentication**: controls access to the video -- **CDN Token Authentication**: protects delivery from Bunny CDN and is handled automatically by the SDK +## What is the Bunny Stream Android SDK? -This document focuses on **Embed View Token Authentication**, which must be handled by a **customer-managed backend or Edge Script** containing custom business logic that decides whether a certain client is allowed to play back a video by returning an embedded view token. +Bunny Stream is an Android library designed to seamlessly integrate Bunny's powerful video streaming capabilities into your Android applications. The library provides a robust set of tools for video management, playback, uploading, and camera-based video uploads, all through an intuitive **Kotlin API**. -## Embed View Token Authentication + + -### Purpose +## Token authentication + +When using the Android SDK, **two authentication layers exist**: + +- **Embed View Token Authentication** — controls access to the video. +- **CDN Token Authentication** — protects delivery from Bunny CDN and is handled automatically by the SDK. + +This section focuses on **Embed View Token Authentication**, which must be handled by a **customer-managed backend or Edge Script** containing custom business logic that decides whether a client is allowed to play back a video by returning an embed view token. + +### Embed View Token Authentication + +Embed View Token Authentication: - Authorizes a viewer to play a specific video -- Enforced at the **Stream API level** -- Required for private or restricted videos +- Is enforced at the **Stream API level** +- Is required for private or restricted videos -### Mobile SDK Responsibility +**Android SDK responsibility** -- **The customer backend generates the token** -- The mobile app requests the token and passes it to the SDK player element -- The SDK uses the token for playback; **CDN token signing happens automatically** +- The **customer backend generates the token**. +- The app requests the token and passes it to the `PlayVideo` call. +- The SDK uses the token for playback; **CDN token signing happens automatically**. -## Supported Authentication Methods +### Supported authentication methods -| Method | Mobile SDK | +| Method | Android SDK | | --- | --- | | Embed View Token Authentication | Supported via customer backend | | CDN Token Authentication | Automatic | | Client-side token signing | Not supported | -## Backend Requirements + + The **Video Library API Key** must **never** be included in your Android app. It is a secret that only your backend or Edge Script should hold. + -The backend (or Edge Script) must: +### Backend requirements -- Securely store the **Video Library API Key** as it serves as a secret that must not be stored in the mobile app -- Authenticate the mobile app user with custom business logic -- Generate embed view token by following the [token authentication signing procedure](/docs/stream/token-authentication#signing-procedure) (token security key is your Video Library API Key) -- Return a `token` and `expires` values in response: +Your backend (or Edge Script) must: + +- Securely store the **Video Library API Key**, as it serves as a secret that must not be stored in the mobile app. +- Authenticate the app user with your custom business logic. +- Generate the embed view token by following the [token authentication signing procedure](/docs/stream/token-authentication#signing-procedure) (the token security key is your Video Library API Key). +- Return `token` and `expires` values in the response: ```json { @@ -53,9 +73,11 @@ The backend (or Edge Script) must: } ``` -Tokens should be **short-lived** (1–5 minutes recommended), unless you have a specific use-case for which longer expiration could be used. + + Tokens should be **short-lived** (1–5 minutes recommended), unless you have a specific use case that requires a longer expiration. + -### Edge Script Example +### Edge Script example Below is an example Edge Script that generates embed view tokens. Store `VIDEO_LIBRARY_API_KEY` as an **Edge Script Secret**. @@ -131,7 +153,7 @@ function generateEmbedViewToken( } ``` -## Android SDK Usage +### Android SDK usage The `PlayVideo` call supports token parameters: @@ -145,35 +167,22 @@ PlayVideo( ) ``` -**Flow:** - -1. Request embed token from backend -2. Receive `{ token, expires }` -3. Pass values to `PlayVideo` - -## iOS SDK Usage - -The `BunnyStreamPlayer` initializer supports token parameters: - -```swift -BunnyStreamPlayer( - ... - videoId: "abc123", - token: token, - expires: expires - ... - -) -``` - -**Flow:** - -1. Request embed token from backend -2. Receive `{ token, expires }` -3. Initialize player with token data - -## Important Notes - -- The **Video Library API Key** must **never** be included in mobile apps -- Embed View Token Authentication is **required** if you don't want to publicly expose your videos -- CDN Token Authentication is applied to CDN URLs automatically if turned on in the video library \ No newline at end of file +**Flow** + + + + Call your backend or Edge Script from the app to request a token for the target `videoId`. + + + Your backend returns `{ token, expires }`. + + + Pass the `token` and `expires` values to the `PlayVideo` call. + + + +## Important notes + +- The **Video Library API Key** must **never** be included in mobile apps. +- Embed View Token Authentication is **required** if you don't want to publicly expose your videos. +- CDN Token Authentication is applied to CDN URLs automatically if it is turned on in the video library. \ No newline at end of file From 97310bd7587dc090ef2a48fe6897c8c1bc6d01bf Mon Sep 17 00:00:00 2001 From: "mintlify[bot]" <109931778+mintlify[bot]@users.noreply.github.com> Date: Mon, 24 Aug 2026 15:26:42 +0000 Subject: [PATCH 04/20] Updated mintlify pages - Updated untitled-page.mdx - Updated untitled-page-2.mdx Mintlify-Source: dashboard-editor --- untitled-page-2.mdx | 2 +- untitled-page.mdx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/untitled-page-2.mdx b/untitled-page-2.mdx index aa0b98d3..63617cb4 100644 --- a/untitled-page-2.mdx +++ b/untitled-page-2.mdx @@ -1,5 +1,5 @@ --- -title: "iOS SDK" +title: "iOS Swift SDK" description: "Integrate Bunny Stream into your iOS apps with the Swift SDK — playback, uploads, camera capture, and embed view token authentication." --- diff --git a/untitled-page.mdx b/untitled-page.mdx index 1fcc3117..f79246e2 100644 --- a/untitled-page.mdx +++ b/untitled-page.mdx @@ -1,5 +1,5 @@ --- -title: "Android SDK" +title: "Android Kotlin SDK" description: "Integrate Bunny Stream into your Android apps with the Kotlin SDK — playback, uploads, camera capture, and embed view token authentication." --- From ddbb31a471ba33135d1727d089e7742fc2f8eee9 Mon Sep 17 00:00:00 2001 From: "mintlify[bot]" <109931778+mintlify[bot]@users.noreply.github.com> Date: Mon, 24 Aug 2026 15:28:26 +0000 Subject: [PATCH 05/20] Updated mintlify pages - Updated untitled-page.mdx - Updated untitled-page-2.mdx Mintlify-Source: dashboard-editor --- untitled-page-2.mdx | 2 +- untitled-page.mdx | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/untitled-page-2.mdx b/untitled-page-2.mdx index 63617cb4..aa0b98d3 100644 --- a/untitled-page-2.mdx +++ b/untitled-page-2.mdx @@ -1,5 +1,5 @@ --- -title: "iOS Swift SDK" +title: "iOS SDK" description: "Integrate Bunny Stream into your iOS apps with the Swift SDK — playback, uploads, camera capture, and embed view token authentication." --- diff --git a/untitled-page.mdx b/untitled-page.mdx index f79246e2..ebcd3c77 100644 --- a/untitled-page.mdx +++ b/untitled-page.mdx @@ -1,6 +1,7 @@ --- -title: "Android Kotlin SDK" +title: "Android SDK" description: "Integrate Bunny Stream into your Android apps with the Kotlin SDK — playback, uploads, camera capture, and embed view token authentication." +tag: "Kotlin" --- The Bunny Stream Android SDK lets you quickly integrate the Bunny Stream player, uploads, and video management into your Android applications. From 6a1de0d4dfe932a85f2beb2f1a22ea7f3ff55ce4 Mon Sep 17 00:00:00 2001 From: "mintlify[bot]" <109931778+mintlify[bot]@users.noreply.github.com> Date: Mon, 24 Aug 2026 15:29:04 +0000 Subject: [PATCH 06/20] Updated mintlify pages - Updated untitled-page-2.mdx - Updated untitled-page.mdx Mintlify-Source: dashboard-editor --- untitled-page-2.mdx | 1 + untitled-page.mdx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/untitled-page-2.mdx b/untitled-page-2.mdx index aa0b98d3..10f8a47b 100644 --- a/untitled-page-2.mdx +++ b/untitled-page-2.mdx @@ -1,6 +1,7 @@ --- title: "iOS SDK" description: "Integrate Bunny Stream into your iOS apps with the Swift SDK — playback, uploads, camera capture, and embed view token authentication." +tag: "Swift" --- The Bunny Stream iOS SDK lets you quickly integrate the Bunny Stream player, uploads, and video management into your iOS applications. diff --git a/untitled-page.mdx b/untitled-page.mdx index ebcd3c77..4d7fe19f 100644 --- a/untitled-page.mdx +++ b/untitled-page.mdx @@ -1,6 +1,6 @@ --- title: "Android SDK" -description: "Integrate Bunny Stream into your Android apps with the Kotlin SDK — playback, uploads, camera capture, and embed view token authentication." +description: "Integrate Bunny Stream into your Android apps with the Kotlin SDK - playback, uploads, camera capture, and embed view token authentication." tag: "Kotlin" --- From f82773345c2dc5dc5a1f4111f2fedf547d84c429 Mon Sep 17 00:00:00 2001 From: "mintlify[bot]" <109931778+mintlify[bot]@users.noreply.github.com> Date: Mon, 24 Aug 2026 15:29:31 +0000 Subject: [PATCH 07/20] Updated mintlify pages - Updated untitled-page-2.mdx Mintlify-Source: dashboard-editor --- untitled-page-2.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/untitled-page-2.mdx b/untitled-page-2.mdx index 10f8a47b..c0a723d7 100644 --- a/untitled-page-2.mdx +++ b/untitled-page-2.mdx @@ -1,6 +1,6 @@ --- title: "iOS SDK" -description: "Integrate Bunny Stream into your iOS apps with the Swift SDK — playback, uploads, camera capture, and embed view token authentication." +description: "Integrate Bunny Stream into your iOS apps with the Swift SDK - playback, uploads, camera capture, and embed view token authentication." tag: "Swift" --- From f0f7f3cbe5703be127086131acc18198e94d31dd Mon Sep 17 00:00:00 2001 From: "mintlify[bot]" <109931778+mintlify[bot]@users.noreply.github.com> Date: Mon, 24 Aug 2026 15:30:40 +0000 Subject: [PATCH 08/20] Updated mintlify pages - Updated stream/mobile-sdk.mdx Mintlify-Source: dashboard-editor --- stream/mobile-sdk.mdx | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/stream/mobile-sdk.mdx b/stream/mobile-sdk.mdx index 95039578..ccdfc759 100644 --- a/stream/mobile-sdk.mdx +++ b/stream/mobile-sdk.mdx @@ -20,18 +20,13 @@ The following SDK libraries allow for quick integration of Bunny Stream player o Bunny Stream is a comprehensive Swift Package Manager (SPM) package designed to seamlessly integrate Bunny's powerful video streaming capabilities into your iOS applications. The package provides a robust set of tools for video management, playback, uploading, and camera-based video uploads, all through an intuitive **Swift API**. - + + ## What is Bunny Stream Mobile SDK Android? Bunny Stream is an Android library designed to seamlessly integrate Bunny's powerful video streaming capabilities into your Android applications. The package provides a robust set of tools for video management, playback, uploading, and camera-based video uploads, all through an intuitive **Kotlin API**. - + + Click to download via Github + \ No newline at end of file From f45a62480c5f6e6d111c74267d629bead0a0dce3 Mon Sep 17 00:00:00 2001 From: "mintlify[bot]" <109931778+mintlify[bot]@users.noreply.github.com> Date: Mon, 24 Aug 2026 15:31:05 +0000 Subject: [PATCH 09/20] Updated mintlify pages - Updated stream/mobile-sdk.mdx Mintlify-Source: dashboard-editor --- stream/mobile-sdk.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stream/mobile-sdk.mdx b/stream/mobile-sdk.mdx index ccdfc759..1deb1545 100644 --- a/stream/mobile-sdk.mdx +++ b/stream/mobile-sdk.mdx @@ -20,7 +20,7 @@ The following SDK libraries allow for quick integration of Bunny Stream player o Bunny Stream is a comprehensive Swift Package Manager (SPM) package designed to seamlessly integrate Bunny's powerful video streaming capabilities into your iOS applications. The package provides a robust set of tools for video management, playback, uploading, and camera-based video uploads, all through an intuitive **Swift API**. - + ## What is Bunny Stream Mobile SDK Android? From 9f2c01b94d4907d27388a8d30e49e179233bedbc Mon Sep 17 00:00:00 2001 From: "mintlify[bot]" <109931778+mintlify[bot]@users.noreply.github.com> Date: Mon, 24 Aug 2026 15:31:36 +0000 Subject: [PATCH 10/20] Updated mintlify pages - Updated stream/mobile-sdk.mdx Mintlify-Source: dashboard-editor --- stream/mobile-sdk.mdx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/stream/mobile-sdk.mdx b/stream/mobile-sdk.mdx index 1deb1545..5df6ac4a 100644 --- a/stream/mobile-sdk.mdx +++ b/stream/mobile-sdk.mdx @@ -27,6 +27,5 @@ Bunny Stream is a comprehensive Swift Package Manager (SPM) package designed to Bunny Stream is an Android library designed to seamlessly integrate Bunny's powerful video streaming capabilities into your Android applications. The package provides a robust set of tools for video management, playback, uploading, and camera-based video uploads, all through an intuitive **Kotlin API**. - - Click to download via Github + \ No newline at end of file From a0caa12a37d98d8acc583b3757026a402516cf59 Mon Sep 17 00:00:00 2001 From: "mintlify[bot]" <109931778+mintlify[bot]@users.noreply.github.com> Date: Mon, 24 Aug 2026 15:32:13 +0000 Subject: [PATCH 11/20] Updated mintlify pages - Updated stream/mobile-sdk.mdx Mintlify-Source: dashboard-editor --- stream/mobile-sdk.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/stream/mobile-sdk.mdx b/stream/mobile-sdk.mdx index 5df6ac4a..8d0f577d 100644 --- a/stream/mobile-sdk.mdx +++ b/stream/mobile-sdk.mdx @@ -21,6 +21,7 @@ The following SDK libraries allow for quick integration of Bunny Stream player o Bunny Stream is a comprehensive Swift Package Manager (SPM) package designed to seamlessly integrate Bunny's powerful video streaming capabilities into your iOS applications. The package provides a robust set of tools for video management, playback, uploading, and camera-based video uploads, all through an intuitive **Swift API**. + [https://github.com/BunnyWay/bunny-stream-ios](https://github.com/BunnyWay/bunny-stream-ios) ## What is Bunny Stream Mobile SDK Android? From 35b79f3ce452fc58b85031b2dde1d9f8a6c48ee8 Mon Sep 17 00:00:00 2001 From: "mintlify[bot]" <109931778+mintlify[bot]@users.noreply.github.com> Date: Mon, 24 Aug 2026 15:32:51 +0000 Subject: [PATCH 12/20] Updated mintlify pages - Updated stream/mobile-sdk.mdx Mintlify-Source: dashboard-editor --- stream/mobile-sdk.mdx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/stream/mobile-sdk.mdx b/stream/mobile-sdk.mdx index 8d0f577d..2282e894 100644 --- a/stream/mobile-sdk.mdx +++ b/stream/mobile-sdk.mdx @@ -20,7 +20,7 @@ The following SDK libraries allow for quick integration of Bunny Stream player o Bunny Stream is a comprehensive Swift Package Manager (SPM) package designed to seamlessly integrate Bunny's powerful video streaming capabilities into your iOS applications. The package provides a robust set of tools for video management, playback, uploading, and camera-based video uploads, all through an intuitive **Swift API**. - + [https://github.com/BunnyWay/bunny-stream-ios](https://github.com/BunnyWay/bunny-stream-ios) @@ -28,5 +28,6 @@ Bunny Stream is a comprehensive Swift Package Manager (SPM) package designed to Bunny Stream is an Android library designed to seamlessly integrate Bunny's powerful video streaming capabilities into your Android applications. The package provides a robust set of tools for video management, playback, uploading, and camera-based video uploads, all through an intuitive **Kotlin API**. - + + [https://github.com/BunnyWay/bunny-stream-android](https://github.com/BunnyWay/bunny-stream-android) \ No newline at end of file From d3cf74fbeba9f8ed9be58eb3f2dc0b235fad75c9 Mon Sep 17 00:00:00 2001 From: "mintlify[bot]" <109931778+mintlify[bot]@users.noreply.github.com> Date: Mon, 24 Aug 2026 15:33:33 +0000 Subject: [PATCH 13/20] Updated mintlify pages - Updated untitled-page.mdx - Updated untitled-page-2.mdx Mintlify-Source: dashboard-editor --- untitled-page-2.mdx | 3 ++- untitled-page.mdx | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/untitled-page-2.mdx b/untitled-page-2.mdx index c0a723d7..6fbfcaaa 100644 --- a/untitled-page-2.mdx +++ b/untitled-page-2.mdx @@ -20,7 +20,8 @@ The Bunny Stream iOS SDK lets you quickly integrate the Bunny Stream player, upl Bunny Stream is a comprehensive Swift Package Manager (SPM) package designed to seamlessly integrate Bunny's powerful video streaming capabilities into your iOS applications. The package provides a robust set of tools for video management, playback, uploading, and camera-based video uploads, all through an intuitive **Swift API**. - + + [https://github.com/BunnyWay/bunny-stream-ios](https://github.com/BunnyWay/bunny-stream-ios) ## Token authentication diff --git a/untitled-page.mdx b/untitled-page.mdx index 4d7fe19f..371a946a 100644 --- a/untitled-page.mdx +++ b/untitled-page.mdx @@ -20,7 +20,8 @@ The Bunny Stream Android SDK lets you quickly integrate the Bunny Stream player, Bunny Stream is an Android library designed to seamlessly integrate Bunny's powerful video streaming capabilities into your Android applications. The library provides a robust set of tools for video management, playback, uploading, and camera-based video uploads, all through an intuitive **Kotlin API**. - + + [https://github.com/BunnyWay/bunny-stream-android](https://github.com/BunnyWay/bunny-stream-android) ## Token authentication From 628ac482526ff53d331ec2d74634d6aea7e87608 Mon Sep 17 00:00:00 2001 From: "mintlify[bot]" <109931778+mintlify[bot]@users.noreply.github.com> Date: Mon, 24 Aug 2026 15:34:23 +0000 Subject: [PATCH 14/20] Updated mintlify pages - Updated docs.json Mintlify-Source: dashboard-editor --- docs.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs.json b/docs.json index 33056134..9c2322e6 100644 --- a/docs.json +++ b/docs.json @@ -646,7 +646,8 @@ "stream/mobile-sdk-token-authentication", "untitled-page", "untitled-page-2" - ] + ], + "expanded": true }, "stream/expo-video", "stream/embedding", From fac5eab5419af8f0d3523e08dfa3317d5a4f4d6e Mon Sep 17 00:00:00 2001 From: "mintlify[bot]" <109931778+mintlify[bot]@users.noreply.github.com> Date: Mon, 24 Aug 2026 15:35:06 +0000 Subject: [PATCH 15/20] Updated mintlify pages - Updated stream/mobile-sdk.mdx Mintlify-Source: dashboard-editor --- stream/mobile-sdk.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/stream/mobile-sdk.mdx b/stream/mobile-sdk.mdx index 2282e894..c321700e 100644 --- a/stream/mobile-sdk.mdx +++ b/stream/mobile-sdk.mdx @@ -2,6 +2,7 @@ title: "Mobile SDK" sidebarTitle: "Overview" description: "Stream Mobile SDK Libraries" +hidden: true --- The following SDK libraries allow for quick integration of Bunny Stream player on both iOS and Android mobile platforms. From 75c1d613466124b9d32132dd8db93491aef94dd4 Mon Sep 17 00:00:00 2001 From: "mintlify[bot]" <109931778+mintlify[bot]@users.noreply.github.com> Date: Mon, 24 Aug 2026 15:35:31 +0000 Subject: [PATCH 16/20] Updated mintlify pages - Updated docs.json Mintlify-Source: dashboard-editor --- docs.json | 1 - 1 file changed, 1 deletion(-) diff --git a/docs.json b/docs.json index 9c2322e6..043f986c 100644 --- a/docs.json +++ b/docs.json @@ -643,7 +643,6 @@ "group": "Mobile SDK", "pages": [ "stream/mobile-sdk", - "stream/mobile-sdk-token-authentication", "untitled-page", "untitled-page-2" ], From 96d37a79f0498b29a83af58ccf534b709c4c8152 Mon Sep 17 00:00:00 2001 From: "mintlify[bot]" <109931778+mintlify[bot]@users.noreply.github.com> Date: Mon, 24 Aug 2026 15:36:07 +0000 Subject: [PATCH 17/20] Updated mintlify pages - Updated stream/expo-video.mdx Mintlify-Source: dashboard-editor --- stream/expo-video.mdx | 43 +++++++++++++++++-------------------------- 1 file changed, 17 insertions(+), 26 deletions(-) diff --git a/stream/expo-video.mdx b/stream/expo-video.mdx index a5e5a964..4a84c2ed 100644 --- a/stream/expo-video.mdx +++ b/stream/expo-video.mdx @@ -41,36 +41,35 @@ Bunny Player supports features like Picture-in-Picture and background audio on t } } ``` - Every processed Bunny Stream video has an HLS playlist at a predictable URL: - ``` + ```text https://{pullZone}/{videoId}/playlist.m3u8 ``` - Find your Pull Zone hostname under **Stream > API** in the bunny.net dashboard. + Find your Pull Zone hostname under **Stream \> API** in the bunny.net dashboard. Pass the HLS URL to `useVideoPlayer` and render a `VideoView`: ```tsx import { useVideoPlayer, VideoView } from "expo-video"; import { useWindowDimensions } from "react-native"; - + const PULL_ZONE = "vz-abc123-456.b-cdn.net"; const VIDEO_ID = "your-video-guid"; - + export default function VideoScreen() { const { width } = useWindowDimensions(); - + const player = useVideoPlayer( `https://${PULL_ZONE}/${VIDEO_ID}/playlist.m3u8`, (p) => { p.loop = false; } ); - + return ( - A complete working example with a video list screen, detail screen, chapter - navigation, and caption picker is available at - [bunny-stream-expo](https://github.com/jamie-at-bunny/bunny-stream-expo). + A complete working example with a video list screen, detail screen, chapter navigation, and caption picker is available at [bunny-stream-expo](https://github.com/jamie-at-bunny/bunny-stream-expo). ## URL structure Every processed video is accessible via predictable URLs built from your Pull Zone hostname and the video's GUID: -| Resource | URL pattern | -| ---------------- | -------------------------------------------------- | -| HLS playlist | `https://{pullZone}/{videoId}/playlist.m3u8` | -| Thumbnail | `https://{pullZone}/{videoId}/{thumbnailFileName}` | -| Animated preview | `https://{pullZone}/{videoId}/preview.webp` | -| MP4 fallback | `https://{pullZone}/{videoId}/play_{height}p.mp4` | -| Captions | `https://{pullZone}/{videoId}/captions/{lang}.vtt` | +| Resource | URL pattern | +| --- | --- | +| HLS playlist | `https://{pullZone}/{videoId}/playlist.m3u8` | +| Thumbnail | `https://{pullZone}/{videoId}/{thumbnailFileName}` | +| Animated preview | `https://{pullZone}/{videoId}/preview.webp` | +| MP4 fallback | `https://{pullZone}/{videoId}/play_{height}p.mp4` | +| Captions | `https://{pullZone}/{videoId}/captions/{lang}.vtt` | ## Fetching video metadata @@ -125,8 +121,7 @@ async function getVideo(videoId: string) { ``` - The `AccessKey` is a secret. In a production app, proxy API calls through your - backend so the key never reaches the client. + The `AccessKey` is a secret. In a production app, proxy API calls through your backend so the key never reaches the client. The response includes fields you can pass directly to the player: @@ -228,11 +223,7 @@ const selectTrack = (track: SubtitleTrack | null) => { If your library has [MediaCage Enterprise DRM](/stream/quickstart-mediacage-enterprise) enabled, `expo-video` can request play licenses directly from Bunny's license servers using the `drm` source option. - The license endpoints apply the same referrer protection and token - authentication as the player embed view. If either is enabled in your library - settings, include the corresponding headers or query parameters in your - requests. See [Embedded view token auth](/stream/token-authentication) for - details. + The license endpoints apply the same referrer protection and token authentication as the player embed view. If either is enabled in your library settings, include the corresponding headers or query parameters in your requests. See [Embedded view token auth](/stream/token-authentication) for details. On iOS, use FairPlay with Bunny's certificate and license endpoints: @@ -262,4 +253,4 @@ const source = { licenseServer: `https://video.bunnycdn.com/WidevineLicense/${LIBRARY_ID}/${videoId}`, }, }; -``` +``` \ No newline at end of file From ff513272efd220cf798bd8b610880980e0f1940d Mon Sep 17 00:00:00 2001 From: "mintlify[bot]" <109931778+mintlify[bot]@users.noreply.github.com> Date: Mon, 24 Aug 2026 15:37:28 +0000 Subject: [PATCH 18/20] Updated mintlify pages - Updated stream/expo-video.mdx - Updated untitled-page-2.mdx - Updated untitled-page.mdx Mintlify-Source: dashboard-editor --- untitled-page-2.mdx | 1 + untitled-page.mdx | 1 + 2 files changed, 2 insertions(+) diff --git a/untitled-page-2.mdx b/untitled-page-2.mdx index 6fbfcaaa..efb72870 100644 --- a/untitled-page-2.mdx +++ b/untitled-page-2.mdx @@ -2,6 +2,7 @@ title: "iOS SDK" description: "Integrate Bunny Stream into your iOS apps with the Swift SDK - playback, uploads, camera capture, and embed view token authentication." tag: "Swift" +keywords: ["iOS", "Swift", "Mobile", "Mobile SDK"] --- The Bunny Stream iOS SDK lets you quickly integrate the Bunny Stream player, uploads, and video management into your iOS applications. diff --git a/untitled-page.mdx b/untitled-page.mdx index 371a946a..8e2620ce 100644 --- a/untitled-page.mdx +++ b/untitled-page.mdx @@ -2,6 +2,7 @@ title: "Android SDK" description: "Integrate Bunny Stream into your Android apps with the Kotlin SDK - playback, uploads, camera capture, and embed view token authentication." tag: "Kotlin" +keywords: ["Android", "Kotlin", "Mobile", "SDK"] --- The Bunny Stream Android SDK lets you quickly integrate the Bunny Stream player, uploads, and video management into your Android applications. From 6f1d8b8c3d8c96a380450446ac316b38c5768c46 Mon Sep 17 00:00:00 2001 From: "mintlify[bot]" <109931778+mintlify[bot]@users.noreply.github.com> Date: Mon, 24 Aug 2026 15:43:01 +0000 Subject: [PATCH 19/20] Updated mintlify pages - Moved Android-SDK.mdx - Moved iOS-SDK.mdx - Updated docs.json Mintlify-Source: dashboard-editor --- untitled-page.mdx => Android-SDK.mdx | 0 docs.json | 4 ++-- untitled-page-2.mdx => iOS-SDK.mdx | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename untitled-page.mdx => Android-SDK.mdx (100%) rename untitled-page-2.mdx => iOS-SDK.mdx (100%) diff --git a/untitled-page.mdx b/Android-SDK.mdx similarity index 100% rename from untitled-page.mdx rename to Android-SDK.mdx diff --git a/docs.json b/docs.json index 043f986c..7186ff0a 100644 --- a/docs.json +++ b/docs.json @@ -643,8 +643,8 @@ "group": "Mobile SDK", "pages": [ "stream/mobile-sdk", - "untitled-page", - "untitled-page-2" + "Android-SDK", + "iOS-SDK" ], "expanded": true }, diff --git a/untitled-page-2.mdx b/iOS-SDK.mdx similarity index 100% rename from untitled-page-2.mdx rename to iOS-SDK.mdx From 45fd411f0ab114ef544f468dc672ec65135863cb Mon Sep 17 00:00:00 2001 From: "mintlify[bot]" <109931778+mintlify[bot]@users.noreply.github.com> Date: Mon, 24 Aug 2026 15:51:40 +0000 Subject: [PATCH 20/20] Updated mintlify pages - Moved stream/android-sdk.mdx - Moved stream/ios-sdk.mdx - Updated docs.json Mintlify-Source: dashboard-editor --- docs.json | 4 ++-- Android-SDK.mdx => stream/android-sdk.mdx | 0 iOS-SDK.mdx => stream/ios-sdk.mdx | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename Android-SDK.mdx => stream/android-sdk.mdx (100%) rename iOS-SDK.mdx => stream/ios-sdk.mdx (100%) diff --git a/docs.json b/docs.json index 7186ff0a..ade3ff94 100644 --- a/docs.json +++ b/docs.json @@ -643,8 +643,8 @@ "group": "Mobile SDK", "pages": [ "stream/mobile-sdk", - "Android-SDK", - "iOS-SDK" + "stream/android-sdk", + "stream/ios-sdk" ], "expanded": true }, diff --git a/Android-SDK.mdx b/stream/android-sdk.mdx similarity index 100% rename from Android-SDK.mdx rename to stream/android-sdk.mdx diff --git a/iOS-SDK.mdx b/stream/ios-sdk.mdx similarity index 100% rename from iOS-SDK.mdx rename to stream/ios-sdk.mdx