aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/fullscreen.js
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2022-02-11 11:08:56 -0500
committerJesús <heckyel@hyperbola.info>2022-02-11 11:08:56 -0500
commit69e20fc11381bdc94c416f11527289a34ffb89ed (patch)
tree4b8969904958e4a377a9dd00cabd972c1ce22429 /src/js/fullscreen.js
parent421de00c8bb27fd0cd01d19ed4c2681ef2d63446 (diff)
downloadplyr-69e20fc11381bdc94c416f11527289a34ffb89ed.tar.lz
plyr-69e20fc11381bdc94c416f11527289a34ffb89ed.tar.xz
plyr-69e20fc11381bdc94c416f11527289a34ffb89ed.zip
update from upstreamHEADmaster
Diffstat (limited to 'src/js/fullscreen.js')
-rw-r--r--src/js/fullscreen.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/js/fullscreen.js b/src/js/fullscreen.js
index 20e958fc..c1feadb5 100644
--- a/src/js/fullscreen.js
+++ b/src/js/fullscreen.js
@@ -124,7 +124,9 @@ class Fullscreen {
return hasClass(this.target, this.player.config.classNames.fullscreen.fallback);
}
- const element = !this.prefix ? document.fullscreenElement : document[`${this.prefix}${this.property}Element`];
+ const element = !this.prefix
+ ? this.target.getRootNode().fullscreenElement
+ : this.target.getRootNode()[`${this.prefix}${this.property}Element`];
return element && element.shadowRoot ? element === this.target.getRootNode().host : element === this.target;
}