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

Safari fires handleEncryptedEvent with error #79

Closed
linasvalikonis opened this issue Apr 7, 2019 · 1 comment · Fixed by #86
Closed

Safari fires handleEncryptedEvent with error #79

linasvalikonis opened this issue Apr 7, 2019 · 1 comment · Fixed by #86

Comments

@linasvalikonis
Copy link

Hi,

I've tried to play HLS encoded video with FairPlay DRM, but it is failing on some safari versions.

Playing: macOS High Sierra 10.13.6 with Safari 12.1 (13607.1.40.1.5). - handleEncryptedEvent not fired
Not playing: macOS Mojave 10.14.4 with Safari 12.1 (14607.1.40.1.4). - handleEncryptedEvent fired

What I have found, player throws error in handleEncryptedEvent function, which is fired with 'encrypted' event.

Fast solution:

if (navigator.userAgent.match(/Safari/i) && !navigator.userAgent.match(/Chrome/i)) {
// SKIP
} else {
player.tech_.el_.addEventListener('encrypted', function (event) {
// TODO convert to videojs.log.debug and add back in
// videojs/video.js#4780
// videojs.log('eme', 'Received an 'encrypted' event');
setupSessions(player);
console.log('encrypted');
handleEncryptedEvent(event, getOptions(player), player.eme.sessions, player.tech_).catch(emeError);
}); // Support Safari EME with FairPlay
// (also used in early Chrome or Chrome with EME disabled flag)
}

videojs-contrib-eme @Version 3.5.0

Need to fix this

@ILanor
Copy link

ILanor commented Apr 10, 2019

Hello! Is there any updates about this issue?

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

Successfully merging a pull request may close this issue.

2 participants