Skip to main content
This guide provides a basic setup for integrating Shaka Player with bunny.net. For advanced configurations and customizations, refer to the Shaka Player documentation.

What you’ll need

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

HTML setup

First, create an HTML file and add a <video> element where the Shaka Player will attach. Include the Shaka Player library in your HTML file.

JavaScript setup

To integrate Widevine with Shaka Player, add the following code snippet after initializing the Shaka Player. This configuration includes fetching the certificate and configuring the license server URL: First, we setup the variables to set streamApi endpoint, library, and video information:
From the variables above, the actual URL to media file is constructed:
If theLightslibrary has Enterprise DRM configured, prepare a Fairplay certificate, license URLs, and the Widevine license URL:
Next, perform the application initialization based on official Shaka Player documentation:
Initialization of the player is implemented in the initPlayer function. The segments that are related to DRM are only needed if Enterprise DRM is enabled on the video library:

Need help or encountering issues?

If you encounter any difficulties or have questions while following this Quickstart Guide, our support team is here to assist you. Please don’t hesitate to contact us via support request form for prompt assistance. Our dedicated support team is ready to help you resolve any issues you might face during the deployment process, provide additional guidance, or answer your questions.
Last modified on June 26, 2026