@eluvio/elv-player-js 2.0.11 → 2.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -497,19 +497,28 @@ export class EluvioPlayer {
497
497
  playoutUrl.searchParams.delete("authorization");
498
498
 
499
499
  let drmSettings = {};
500
- if (drm === EluvioPlayerParameters.drms.PLAYREADY) {
500
+ if (drm === EluvioPlayerParameters.drms.PLAYREADY || drm === EluvioPlayerParameters.drms.WIDEVINE) {
501
501
  drmSettings = {
502
- drmSystems: {
503
- "com.microsoft.playready": {
504
- licenseUrl: drms[drm].licenseServers[0]
505
- },
506
- },
502
+ drmSystems: {},
507
503
  emeEnabled: true,
508
504
  licenseXhrSetup: (xhr, url) => {
509
505
  xhr.open("POST", url, true);
510
506
  xhr.setRequestHeader("Authorization", `Bearer ${authorizationToken}`);
511
507
  }
512
508
  };
509
+ if (drm === EluvioPlayerParameters.drms.PLAYREADY) {
510
+ drmSettings.drmSystems = {
511
+ "com.microsoft.playready": {
512
+ licenseUrl: drms[drm].licenseServers[0]
513
+ }
514
+ };
515
+ } else if (drm === EluvioPlayerParameters.drms.WIDEVINE) {
516
+ drmSettings.drmSystems = {
517
+ "com.widevine.alpha": {
518
+ licenseUrl: drms[drm].licenseServers[0]
519
+ }
520
+ };
521
+ }
513
522
  }
514
523
 
515
524
  const profileSettings = (PlayerProfiles[this.playerOptions.playerProfile] || {}).hlsSettings || {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eluvio/elv-player-js",
3
- "version": "2.0.11",
3
+ "version": "2.0.12",
4
4
  "description": "![Eluvio Logo](lib/static/images/Logo.png \"Eluvio Logo\")",
5
5
  "main": "dist/elv-player-js.es.js",
6
6
  "license": "MIT",