From 7577e900946450ab68cdb3fab78dbe06ca1808ff Mon Sep 17 00:00:00 2001 From: Joe Forbes Date: Wed, 24 Oct 2018 07:35:00 -0700 Subject: [PATCH] fix: immediately setup EME if available (#263) --- src/videojs-http-streaming.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/videojs-http-streaming.js b/src/videojs-http-streaming.js index b89cf8a2a..09511875b 100644 --- a/src/videojs-http-streaming.js +++ b/src/videojs-http-streaming.js @@ -180,6 +180,11 @@ const setupEmeOptions = (hlsHandler) => { if (sourceOptions) { player.currentSource().keySystems = sourceOptions; + + // works around https://bugs.chromium.org/p/chromium/issues/detail?id=895449 + if (player.eme.initializeMediaKeys) { + player.eme.initializeMediaKeys(); + } } } };