Compare fullscreenElement with shadowroot host if player is in shadow DOM

This commit is contained in:
Jesper
2020-03-10 09:30:42 +01:00
parent c7bf0c5c03
commit 99ae4eb3c5

View File

@ -118,7 +118,7 @@ class Fullscreen {
const element = !this.prefix ? document.fullscreenElement : document[`${this.prefix}${this.property}Element`]; const element = !this.prefix ? document.fullscreenElement : document[`${this.prefix}${this.property}Element`];
return element === this.target; return (element && element.shadowRoot) ? element === this.target.getRootNode().host : element === this.target;
} }
// Get target element // Get target element