Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsupported keysystem or supportedconfigurations #211

Open
iamharshitpandeyy opened this issue Mar 27, 2024 · 0 comments
Open

Unsupported keysystem or supportedconfigurations #211

iamharshitpandeyy opened this issue Mar 27, 2024 · 0 comments

Comments

@iamharshitpandeyy
Copy link

iamharshitpandeyy commented Mar 27, 2024

I creating Electron Application in which if I pass keyStreams because of DRM protection it's show this error "Unsupported keysystem or supportedconfigurations " Same configuration working on my React application

import videojs from "video.js";
import "video.js/dist/video-js.css";
import "videojs-contrib-quality-levels";
import "videojs-contrib-eme";
import "videojs-http-quality-selector";
import "dashjs";
import "videojs-hotkeys";
import "videojs-seek-buttons";
import "videojs-seek-buttons/dist/videojs-seek-buttons.css";

 const sources = [];
  if (browser === "Safari") {
    sources.push({
      src: hlsUrl,
      keySystems: {
        "com.apple.fps.1_0": {
          certificateUri: < certificateuri >,
          getContentId: function (emeOptions, initData) {
            return new TextDecoder().decode(
              initData.filter((item) => item !== 0 && item !== 150)
            );
          },
          licenseUri: < Licence Uri >
          licenseHeaders: {
            "X-AxDrm-Message": HlsDrmToken,
          },
        },
      },
    });
  } else {
    sources.push({
      src: url,
      type: "application/dash+xml",
      keySystems: {
        "com.widevine.alpha": {
          url: <url>,
          licenseHeaders: {
            "X-AxDRM-Message": drmToken,
          },
        },
      },
    });
  }

  const videoOptions = {
    autoplay: false,
    preload: "metadata",
    controls: true,
    playbackRates: [0.5, 1, 1.5, 2],
    poster: "",
    sources: sources,
    plugins: {
      hotkeys: {
        enableModifiersForNumbers: false,
        seekStep: 10,
        volumeStep: 0.1,
        enableVolumeScroll: false,
      },
    },
    html5: {
      nativeAudioTracks: true,
      nativeVideoTracks: true,
      nativeTextTracks: true,
    },
  };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant