Widevine HTML5 Integration

This guide provides step-by-step instructions on integrating VideWine with HTML5 video players. VideWine 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 VideWine 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 :

let cert_response = await fetch('<CERTIFICATE URL GOES HERE>');  
let widevine_cert = await cert_response.arrayBuffer();

shaka_player.configure({  
    drm: {  
        servers: {  
            'com.widevine.alpha': "<LICENSE SERVER URL GOES HERE>"  
        },  
        advanced: {  
            'com.widevine.alpha': {  
              	'serverCertificate': new Uint8Array(widevine_cert),  
                'videoRobustness': 'SW_SECURE_CRYPTO',  
                'audioRobustness': 'SW_SECURE_CRYPTO'  
            }  
        }  
    }  
});