Widevine HTML5 Integration

This guide provides step-by-step instructions on integrating Widevine with HTML5 video players. Widevine ensures secure playback and decryption of encrypted videos through the configuration of license server URLs.

What You'll Need

Use Licence Server URL with Video Players

To ensure the seamless playback of encrypted videos, it is crucial to configure the license server URL with your video players. The following section provides a code snippet for configuring license proxies with various widely used video players.

Shaka Player

Shaka Player is a JavaScript library for adaptive video streaming. To integrate Widevine with Shaka Player, add a following code snippet after initializing the shaka player. This configuration includes fetching the certificate and configuring the license server URL :

// MODIFY: You need to replace {library_id} and {video_id} with actual values 
let wvLicenseUrl="https://video.bunnycdn.com/WidevineLicense/{library_id}/{video_id}";

    drm: {  
        servers: {  
            'com.widevine.alpha': wvLicenseUrl  
        advanced: {  
            'com.widevine.alpha': {    
                'videoRobustness': 'SW_SECURE_CRYPTO',  
                'audioRobustness': 'SW_SECURE_CRYPTO'