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, which describes how to access your Bunny Stream videos programmatically.
What you’ll need
Before you dive in, make sure you have the following prerequisites in place:- A bunny.net account (Log in or sign up for a free trial) .
- 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.
- A Bitmovin account.
Setting up Bitmovin player
Bitmovin offers an HTML web player that can be embedded into your site using JavaScript. You can read official Bitmovin documentation on how to get started with the player or copy the code sample below.You are required to use your own license key for the player to ensure domain whitelisting for production environments.
HTML configuration
Incorporate the following HTML code into your web page:JavaScript configuration
Replace[ENTER_YOUR_BITMOVIN_KEY] with your actual Bitmovin license key. The JavaScript configuration below includes necessary modifications to ensure compatibility with the license endpoints, as well as DRM configurations for both Widevine and FairPlay: