# Google Widevine

Note

This feature is available only to ByteArk Video Cloud for Business customers. Please contact sales@byteark.com if you would like to use it.

ByteArk Player supports content protected with Google Widevine (opens new window) on Chromium-based browsers (Desktop and Android).

# DRM Source Object for Widevine

Name Type Required Description
url String Yes URL of the Widevine license server
serverCertificateUrl String No URL of the Widevine service certificate
videoRobustness String No Video robustness: SW_SECURE_CRYPTO, SW_SECURE_DECODE, HW_SECURE_CRYPTO, HW_SECURE_DECODE, HW_SECURE_ALL
audioRobustness String No Audio robustness: SW_SECURE_CRYPTO, SW_SECURE_DECODE, HW_SECURE_CRYPTO, HW_SECURE_DECODE, HW_SECURE_ALL
licenseRequestHeaders Array<{name: String; value: String}> No Custom headers sent with the license request

Note: Setting videoRobustness or audioRobustness to hardware-backed values (prefix HW_) requires hardware decryption, which may be unavailable on some devices, depending on the content owner's policy.

# Example

{
  src: 'https://byteark-playertzxedwv.stream-playlist.byteark.com/streams/TZyZheqEJUwC/playlist.m3u8',
  type: 'application/x-mpegURL',
  drm: {
    widevine: {
      url: '<URL_TO_WIDEVINE_LICENSE_SERVER>'
    }
  }
}
1
2
3
4
5
6
7
8
9

# Sending an Authorization Header

{
  src: 'https://byteark-playertzxedwv.stream-playlist.byteark.com/streams/TZyZheqEJUwC/playlist.m3u8',
  type: 'application/x-mpegURL',
  drm: {
    widevine: {
      url: '<URL_TO_WIDEVINE_LICENSE_SERVER>',
      licenseRequestHeaders: [
        {
          name: 'Authorization',
          value: '<YOUR_AUTHORIZATION_HEADER>'
        }
      ]
    }
  }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

# Full source code example

<!doctype html>
<html>
  <head>
    <meta charset="utf-8">
  </head>
  <body>
    <div id="video-player"></div>
    <script src="https://byteark-sdk.cdn.byteark.com/player/v2/byteark-player.min.js"></script>
    <script>
      var player = bytearkPlayer('video-player', {
        fluid: true,
        poster: '/assets/samples/player/images/poster-big-buck-bunny.jpg',
        sources: [
          {
            title: 'Widevine Source',
            src: 'https://byteark-playertzxedwv.stream-playlist.byteark.com/streams/TZyZheqEJUwC/playlist.m3u8',
            type: 'application/x-mpegURL',
            drm: {
              widevine: {
                url: '<URL_TO_WIDEVINE_LICENSE_SERVER>',
                licenseRequestHeaders: [
                  {
                    name: 'Authorization',
                    value: '<YOUR_AUTHORIZATION_HEADER>'
                  }
                ]
              }
            }
          }
        ],
        plugins: {
          bytearkShaka: {}
        }
      });
      window.player = player;
    </script>
  </body>
</html>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39