videojs / videojs-contrib-eme

Supports Encrypted Media Extensions for playback of encrypted content in Video.js
Other
200 stars 71 forks source link

EmeHeaders not working #223

Open lazarkocic1990 opened 2 months ago

lazarkocic1990 commented 2 months ago

I am using

"video.js": "^8.12.0" "videojs-contrib-eme": "^4.0.0"

I initialize video.js player, initialize eme and try to add headers, but they are not being sent.

`const videoElement = document.createElement("video-js");

  videoElement.classList.add("vjs-big-play-centered");
  (videoRef.current as any).appendChild(videoElement);

  const player = (playerRef.current = videojs(videoElement, options, () => {
    videojs.log("player is ready");
    onReady && onReady(player);
  }));

  (player as any).eme();

  player.src({
    src: "https://...playlist.m3u8",
    type: "application/x-mpegURL",
    emeHeaders: {
      Authorization: `Bearer=test`,
    },
  });`

Am I missing any step here, I also tried with different (older) versions of the libraries.