Problem with webkitneedkey

Hello!


Well, I am trying to get the apple fairplay demo working for safari.


My manifest

#EXT-X-SESSION-KEY:METHOD=AES-128,URI="XXXXXXXXX"

#EXT-X-STREAM-INF:BANDWIDTH=53000,CODECS="mp4a.40.5"

hls-audio=49152.m3u8

And I have a method waiting for the event

webkitneedkey
but it is not being called.

video.addEventListener('webkitneedkey', onneedkey, false);

Why? What is the problem?

Hi, I am experiencing the same problem. Have you found any solution?

I had the same issue.

Even more, I had two tabs with the same code as simple as this:

<!doctype html>
<html lang="en">
<head>
  <title></title>
</head>

<body>
<video id="video" height="250" width="600" autoplay controls></video>
<script>
  const el = document.getElementById('video');
  el.src = 'https://domain.com/path/to/playlist.m3u8';
  el.addEventListener('webkitneedkey', () => {
    console.log('>>> webkitneedkey');
  }, false);
</script>
</body>

</html>

And on the one tab webkitneedkey has been fired, and on the other one - it didn't work.

Restarting Safari resolved the issue.

Problem with webkitneedkey
 
 
Q