From f224e40a8d21a6fe3ca6a735f68dfb2e5aed42e3 Mon Sep 17 00:00:00 2001 From: jforbes Date: Tue, 16 Oct 2018 22:44:12 -0400 Subject: [PATCH 1/2] fix: immediately setup EME if available --- src/videojs-http-streaming.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/videojs-http-streaming.js b/src/videojs-http-streaming.js index dfa98d48c..1888eae2c 100644 --- a/src/videojs-http-streaming.js +++ b/src/videojs-http-streaming.js @@ -180,6 +180,10 @@ const setupEmeOptions = (hlsHandler) => { if (sourceOptions) { player.currentSource().keySystems = sourceOptions; + + if (player.eme.initializeMediaKeys) { + player.eme.initializeMediaKeys(); + } } } }; From ca48fe4618bd03aca07644045399d3650bdd440a Mon Sep 17 00:00:00 2001 From: jforbes Date: Mon, 22 Oct 2018 16:33:50 -0400 Subject: [PATCH 2/2] added chromium bug note --- src/videojs-http-streaming.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/videojs-http-streaming.js b/src/videojs-http-streaming.js index 1888eae2c..9c07c510f 100644 --- a/src/videojs-http-streaming.js +++ b/src/videojs-http-streaming.js @@ -181,6 +181,7 @@ 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(); }