mirror of
https://github.com/videojs/video.js.git
synced 2025-01-08 07:00:10 +02:00
fix: DRM content goes black in IE/Edge when focus is placed on video element (#6508)
This is a followup from #6318 but for the poster image.
This commit is contained in:
parent
47349c8e29
commit
cc2b82b8d7
@ -6,6 +6,7 @@ import Component from './component.js';
|
||||
import * as Fn from './utils/fn.js';
|
||||
import * as Dom from './utils/dom.js';
|
||||
import {silencePromise} from './utils/promise';
|
||||
import * as browser from './utils/browser.js';
|
||||
|
||||
/**
|
||||
* A `ClickableComponent` that handles showing the poster image for the player.
|
||||
@ -112,7 +113,15 @@ class PosterImage extends ClickableComponent {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.player_.tech(true)) {
|
||||
const sourceIsEncrypted = this.player_.usingPlugin('eme') &&
|
||||
this.player_.eme.sessions &&
|
||||
this.player_.eme.sessions.length > 0;
|
||||
|
||||
if (this.player_.tech(true) &&
|
||||
// We've observed a bug in IE and Edge when playing back DRM content where
|
||||
// calling .focus() on the video element causes the video to go black,
|
||||
// so we avoid it in that specific case
|
||||
!((browser.IE_VERSION || browser.IS_EDGE) && sourceIsEncrypted)) {
|
||||
this.player_.tech(true).focus();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user