Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions stream/dashboard.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ The API section is designed to provide you the access to the Bunny Stream API, f

---

[Tutorials](/docs/stream-tutorials)
[Tutorials](/stream)

[Upload video from URL](/docs/stream-upload-video-from-url)
[Upload video from URL](/stream/url-fetch)

- [Table of Contents](#)
6 changes: 3 additions & 3 deletions stream/drm/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Bunny Stream offers two distinct media content protection tiers: **MediaCage Bas
| Screen grab protection | | ✅ |
| Custom player support | | ✅ |

\*_Screen Grab Protection is not available on Widevine clients with L3 level of security. For a deeper understanding, refer to [Widevine DRM Security Levels](/docs/widevine-drm-security-levels)._
\*_Screen Grab Protection is not available on Widevine clients with L3 level of security. For a deeper understanding, refer to [Widevine DRM Security Levels](/stream/widevine-security-levels)._

## MediaCage Basic DRM

Expand Down Expand Up @@ -49,7 +49,7 @@ In comparison to our MediaCage Basic DRM, the MediaCage Enterprise DRM protects
- **Automatic encryption during packaging**: Content is automatically protected during the transcoding process.
- **Advanced encryption technologies**: Utilizes FairPlay (Apple) and Widevine (Google) for superior content encryption.
- **Hardware-based key exchange**: Ensures secure content key is not exposed on client devices.
- **Screen grab protection**: Prevents screenshots and screen recordings, so that content cannot be copied. Bear in mind that Screen Grab Protection is not available on Widevine clients with L3 level of security. For a deeper understanding, refer to [Widevine DRM Security Levels](/docs/widevine-drm-security-levels).
- **Screen grab protection**: Prevents screenshots and screen recordings, so that content cannot be copied. Bear in mind that Screen Grab Protection is not available on Widevine clients with L3 level of security. For a deeper understanding, refer to [Widevine DRM Security Levels](/stream/widevine-security-levels).
- **Premium content licensing**: Ensures that a valid play license is issued only to authenticated clients that meet protection level requirements.
- **Adherence to industry standards**: Meets advanced industry standards for digital content protection. Tailored for Enterprise Security: Specifically designed to address the security needs of enterprise-level users.
- **Multi-key DRM**: Multi-key DRM licensing is implemented on a per-playback-device basis, allowing multiple licenses to be issued for a single piece of video content. For example, a single playback device may receive multiple separate licenses. One for the video stream, 2 for the accompanying translated stereo audio tracks and these licenses may then renew due to total video duration; resulting in 6 DRM licenses being issued and billed for one video playback.
Expand Down Expand Up @@ -134,5 +134,5 @@ To illustrate, if 10,000 users each watch 15 HD videos in a month, this results
<Info>
Customizing or modifying the Bunny Player does not weaken core DRM protection. Encryption, key exchange, and download prevention are enforced by our back-end and the underlying DRM (Widevine/FairPlay) regardless of the player used.

**Screen capture (screenshots/screen recording) cannot be fully prevented on lower-security devices** e.g. Widevine L3. As is standard across the industry, DRM limits these devices to a lower resolution (480p), so any capture is capped at SD quality if set by the User. Available security levels are determined by the client and User, which is outside of Bunny's control. See [Widevine DRM Security Levels](/docs/widevine-drm-security-levels).
**Screen capture (screenshots/screen recording) cannot be fully prevented on lower-security devices** e.g. Widevine L3. As is standard across the industry, DRM limits these devices to a lower resolution (480p), so any capture is capped at SD quality if set by the User. Available security levels are determined by the client and User, which is outside of Bunny's control. See [Widevine DRM Security Levels](/stream/widevine-security-levels).
</Info>
2 changes: 1 addition & 1 deletion stream/embedding.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,4 @@ Bunny Stream player has support for the following keyboard shortcuts.

## Custom integration

If you prefer to use your own player or a fully custom video integration, you can directly access the raw video files from Bunny Stream’s infrastructure. Please refer to our [Video Storage Structure](/docs/stream-video-storage-structure) documentation for details on how to retrieve and utilize video files directly.
If you prefer to use your own player or a fully custom video integration, you can directly access the raw video files from Bunny Stream’s infrastructure. Please refer to our [Video Storage Structure](/stream/storage-structure) documentation for details on how to retrieve and utilize video files directly.
2 changes: 1 addition & 1 deletion stream/expo-video.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: "Play Bunny Stream videos natively in Expo apps using expo-video."
hidden: true
---

For most Expo apps, [Bunny Player](/docs/stream-embedding-videos) is the recommended way to play Bunny Stream videos. Embed it in a WebView and you get adaptive playback, analytics, captions, chapters, and dashboard branding out of the box.
For most Expo apps, [Bunny Player](/stream/embedding) is the recommended way to play Bunny Stream videos. Embed it in a WebView and you get adaptive playback, analytics, captions, chapters, and dashboard branding out of the box.

Bunny Player supports features like Picture-in-Picture and background audio on the web, but when you embed it inside a native app, the WebView becomes the bottleneck. The OS won't float a WebView for PiP, won't let it play audio in the background, and won't show it on the lock screen. Those are platform-level features that require a native player.

Expand Down
4 changes: 2 additions & 2 deletions stream/fairplay-deployment.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ The next step is to create FPS certificate. Follow the steps below:

---

[MediaCage Enterprise DRM](/docs/stream-mediacage-enterprise-drm)
[MediaCage Enterprise DRM](/stream/mediacage-enterprise)

[Google Widevine DRM](/docs/widevine-drm-security-levels)
[Google Widevine DRM](/stream/widevine-security-levels)

- [Table of Contents](#)
2 changes: 1 addition & 1 deletion stream/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ Bunny Stream is designed to offer a seamless video streaming experience. Here ar
- **Encoding and transcoding**: Automatically converts videos into multiple resolutions and formats to ensure compatibility across devices and browsers.
- **Customizable video player**: Provides a customizable video player that can be tailored to match your branding and website design.
- **Security**: Features security measures such as token authentication and domain restrictions to protect your video content from unauthorized access.
- **DRM**: Implements DRM solutions to further secure your video content against piracy and unauthorized distribution, ensuring that your content is viewed only by authorized users in authorized regions. For more information, see our [MediaCageDRM overview](/docs/stream-drm).
- **DRM**: Implements DRM solutions to further secure your video content against piracy and unauthorized distribution, ensuring that your content is viewed only by authorized users in authorized regions. For more information, see our [MediaCageDRM overview](/stream/drm).
- **Statistics**: Track engagement and analyze viewer behavior with detailed analytics and reporting tools.
2 changes: 1 addition & 1 deletion stream/mediacage-enterprise.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Before you dive in, make sure you have the following prerequisites in place:
<Info>
### FairPlay streaming details

Explore our [specialized guide](/docs/fps-deployment-package-guide) for step-by-step instructions on retrieving FairPlay Streaming deployment package.
Explore our [specialized guide](/stream/fairplay-deployment) for step-by-step instructions on retrieving FairPlay Streaming deployment package.
</Info>

## Enabling the MediaCage Enterprise DRM
Expand Down
2 changes: 1 addition & 1 deletion stream/metatags.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ You can add metaTag's to your video via the 'Update video' API endpoint.

---

[Webhooks](/docs/stream-webhook)
[Webhooks](/stream/webhooks)
43 changes: 8 additions & 35 deletions stream/players/bitmovin.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ description: "This documentation expands on our to guide you through the integr
---

<Info>
If your use case doesn’t require DRM, you can follow the same steps provided below, omit the DRM configuration part, and follow our [video storage structure guide](/docs/stream-video-storage-structure), which describes how to access your Bunny Stream videos programmatically.
If your use case doesn’t require DRM, you can follow the same steps provided below, omit the DRM configuration part, and follow our [video storage structure guide](/stream/storage-structure), which describes how to access your Bunny Stream videos programmatically.
</Info>

## What you’ll need

Before you dive in, make sure you have the following prerequisites in place:

- A [bunny.net](https://bunny.net/) account ([Log in](https://dash.bunny.net/auth/login?pk_buttonlocation=menu) or sign up for a [free trial](https://dash.bunny.net/auth/register)) .
- Ensure that the Media Cage DRM Enterprise feature is enabled in your account. If you need guidance on how to enable this feature, please refer to our [Media Cage DRM Enterprise quickstart guide](/docs/mediacage-enterprise-drm-quickstart).
- Ensure that the Media Cage DRM Enterprise feature is enabled in your account. If you need guidance on how to enable this feature, please refer to our [Media Cage DRM Enterprise quickstart guide](/stream/quickstart-mediacage-enterprise).
- A [Bitmovin](https://bitmovin.com/) account.

## Setting up Bitmovin player
Expand Down Expand Up @@ -64,19 +64,8 @@ var conf = {
level: "debug",
},
network: {
preprocessHttpRequest: function (type, request) {
if (type === "drm/license/fairplay") {
request.headers["Content-Type"] = "application/json";
}
return Promise.resolve(request);
},
preprocessHttpResponse: function (type, response) {
switch (type) {
case "drm/certificate/fairplay":
const obj = JSON.parse(new TextDecoder().decode(response.body));
const { certificate } = obj;
response.body = base64ToArrayBuffer(certificate);
break;
case "manifest/hls/variant":
response.body = response.body.replace(
/.*KEYFORMAT="com.apple.streamingkeydelivery"\n/,
Expand All @@ -103,46 +92,30 @@ var source = {
},
fairplay: {
LA_URL:
"https://video.bunnycdn.com/FairPlayLicense/{{videoLibraryId}}/{{videoId}}",
"https://video.bunnycdn.com/FairPlay/{{videoLibraryId}}/license/?videoId={{videoId}}",
certificateURL:
"https://video.bunnycdn.com/FairPlayLicense/{{videoLibraryId}}/{{videoId}}",
"https://video.bunnycdn.com/FairPlay/{{videoLibraryId}}/certificate",
maxCertificateRequestRetries: 0,
maxLicenseRequestRetries: 0,
useUint16InitData: true,
licenseResponseType: "json",
prepareContentId: (url) => {
return url.substring(url.indexOf("skd://"));
},
prepareLicense: (license) => {
return license.ckc;
},
prepareMessage: (event, session) => {
const obj = JSON.stringify({
spc: btoa(String.fromCharCode.apply(null, event.message)),
});
return obj;
},
},
},
};

function base64ToArrayBuffer(base64) {
var binary_string = window.atob(base64);
var len = binary_string.length;
var bytes = new Uint8Array(len);
for (var i = 0; i < len; i++) {
bytes[i] = binary_string.charCodeAt(i);
}
return bytes.buffer;
}

const player = new bitmovin.player.Player(
document.getElementById("player"),
conf,
);
player.load(source);
```

<Warning>
Do not set `licenseResponseType: "json"` or override `prepareMessage`/`prepareLicense` to wrap the SPC/CKC in JSON. That format belongs to the deprecated `/FairPlayLicense/{library_id}/{video_id}` endpoint. The current `/FairPlay/{library_id}/license` and `/FairPlay/{library_id}/certificate` endpoints expect and return raw binary data, which is Bitmovin's default `licenseResponseType`/message handling — no overrides needed.
</Warning>

## Finalizing integration

After embedding the HTML and JavaScript code into your web application, the Bitmovin Player should load and be capable of playing DRM-protected content from Bunny Stream. Test the setup in various environments to ensure compatibility and performance across different devices and browsers.
20 changes: 9 additions & 11 deletions stream/players/fairplay.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This guide walks through configuring an HTML5 video player with Bunny Stream's F
Before you dive in, make sure you have the following prerequisites in place:

- A [bunny.net](https://bunny.net/) account ( [Log in](https://dash.bunny.net/auth/login?pk_buttonlocation=menu) or sign up for a [free trial](https://dash.bunny.net/auth/register)).
- Ensure that the Media Cage DRM Enterprise feature is enabled in your account. If you need guidance on how to enable this feature, please refer to our [Media Cage DRM Enterprise quickstart guide](/docs/mediacage-enterprise-drm-quickstart).
- Ensure that the Media Cage DRM Enterprise feature is enabled in your account. If you need guidance on how to enable this feature, please refer to our [Media Cage DRM Enterprise quickstart guide](/stream/quickstart-mediacage-enterprise).

## Playing DRM content

Expand Down Expand Up @@ -136,27 +136,25 @@ Define the `onFpEncrypted` function to handle the 'encrypted' event. It fetches
````
</CodeGroup>

Implement the `getResponse` function to send the SPC message to the FairPlay server and obtain the CKC for the encrypted session.
Implement the `getResponse` function to send the SPC message to the FairPlay server and obtain the CKC for the encrypted session. The license endpoint expects the raw SPC bytes as the request body (no JSON wrapper, no `Content-Type` override) and returns the raw CKC bytes directly:

<CodeGroup>
```bash bash
async function getResponse(event, license_server_url) {
// need to convert the message to Base64 string
let spc_string = btoa(String.fromCharCode.apply(null, new Uint8Array(event.message)));
let licenseResponse = await fetch(license_server_url, {
method: 'POST',
headers: new Headers({'Content-type': 'application/json'}),
body: JSON.stringify({
"spc" : spc_string
}),
body: event.message,
});
let responseObject = await licenseResponse.json();
return Uint8Array.from(atob(responseObject.ckc), c => c.charCodeAt(0));
return await licenseResponse.arrayBuffer();
}
````

</CodeGroup>

<Warning>
Do not set a `Content-Type: application/json` header or wrap the SPC in a `{"spc": "..."}` JSON payload — that format belongs to the deprecated `/FairPlayLicense/{library_id}/{video_id}` endpoint and will cause the current `/FairPlay/{library_id}/license` endpoint to fail with an internal server error, since it expects and returns raw binary data.
</Warning>

Place the following script block in the 'head' section or in a separate JavaScript file. This code ensures that video playback starts when the page is loaded.

<CodeGroup>
Expand All @@ -181,4 +179,4 @@ For the authentication to work, it has to be enabled in dashboard:

![](/images/docs/e6ff6bd-image.png)

For more detailed guidance on these security mechanisms, please visit our [Embed View Token Authentication page](/docs/stream-embed-token-authentication).
For more detailed guidance on these security mechanisms, please visit our [Embed View Token Authentication page](/stream/token-authentication).
18 changes: 9 additions & 9 deletions stream/players/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ MediaCage Enterprise DRM offers integration with custom build video players.

Please see our guides for more information:

- **[FairPlay integration guide](/docs/fairplay-html5-player-integration)**- Explore seamless integration with Apple's FairPlay DRM platform using our detailed guide. Follow step-by-step instructions and best practices to ensure secure and reliable content protection for iOS and macOS devices.
- **[Widevine integration guide](/docs/widevine-integration)**- Discover the integration possibilities with Google's Widevine DRM platform. Our guide provides detailed instructions and insights into integrating DRM Enterprise with Widevine, ensuring compatibility across a wide range of devices and platforms.
- **[Bitmovin integration guide](/docs/bitmovin-player-integration)**- Learn how to integrate Bitmovin's advanced video player technology with our platform. This guide offers comprehensive steps and tips for leveraging Bitmovin's features to enhance your streaming experience, ensuring optimal performance and user engagement.
- [**Shaka Player integration guide**](/docs/shaka-player-integration)-Learn how to seamlessly integrate Shaka Player with bunny.net for optimized video streaming in this comprehensive guide. This guide covers basic setup instructions, from HTML and JavaScript configurations to handling DRM with Widevine and Fairplay.

- [Bitmovin player integration](/docs/bitmovin-player-integration)
- [Widevine HTML5 integration](/docs/widevine-integration)
- [Fairplay HTML5 player integration](/docs/fairplay-html5-player-integration)
- [Shaka Player integration](/docs/shaka-player-integration)
- **[FairPlay integration guide](/stream/players/fairplay)**- Explore seamless integration with Apple's FairPlay DRM platform using our detailed guide. Follow step-by-step instructions and best practices to ensure secure and reliable content protection for iOS and macOS devices.
- **[Widevine integration guide](/stream/players/widevine)**- Discover the integration possibilities with Google's Widevine DRM platform. Our guide provides detailed instructions and insights into integrating DRM Enterprise with Widevine, ensuring compatibility across a wide range of devices and platforms.
- **[Bitmovin integration guide](/stream/players/bitmovin)**- Learn how to integrate Bitmovin's advanced video player technology with our platform. This guide offers comprehensive steps and tips for leveraging Bitmovin's features to enhance your streaming experience, ensuring optimal performance and user engagement.
- [**Shaka Player integration guide**](/stream/players/shaka)-Learn how to seamlessly integrate Shaka Player with bunny.net for optimized video streaming in this comprehensive guide. This guide covers basic setup instructions, from HTML and JavaScript configurations to handling DRM with Widevine and Fairplay.

- [Bitmovin player integration](/stream/players/bitmovin)
- [Widevine HTML5 integration](/stream/players/widevine)
- [Fairplay HTML5 player integration](/stream/players/fairplay)
- [Shaka Player integration](/stream/players/shaka)

- [Table of Contents](#)

Expand Down
4 changes: 2 additions & 2 deletions stream/players/widevine.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This guide walks through pointing common HTML5 video players at Bunny Stream's W
Before you dive in, make sure you have the following prerequisites in place:

- A [bunny.net](https://bunny.net/) account ( [Log in](https://dash.bunny.net/auth/login?pk_buttonlocation=menu) or sign up for a [free trial](https://dash.bunny.net/auth/register)).
- Ensure that the Media Cage DRM Enterprise feature is enabled in your account. If you need guidance on how to enable this feature, please refer to our [Media Cage DRM Enterprise quickstart guide](/docs/mediacage-enterprise-drm-quickstart).
- Ensure that the Media Cage DRM Enterprise feature is enabled in your account. If you need guidance on how to enable this feature, please refer to our [Media Cage DRM Enterprise quickstart guide](/stream/quickstart-mediacage-enterprise).

## Use license server URL with video players

Expand All @@ -24,4 +24,4 @@ For the authentication to work, it has to be enabled in dashboard:

![](/images/docs/e6ff6bd-image.png)

For more detailed guidance on these security mechanisms, please visit our [Embed View Token Authentication page](/docs/stream-embed-token-authentication).
For more detailed guidance on these security mechanisms, please visit our [Embed View Token Authentication page](/stream/token-authentication).
4 changes: 2 additions & 2 deletions stream/premium-encoding.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ By investing in both codecs, you ensure optimal playback across different device

---

[Encoding](/docs/stream-encoding)
[Encoding](/stream/encoding)

[Transcribing](/docs/stream-transcribing)
[Transcribing](/stream/transcribing)

- [Table of Contents](#)
Loading