vidply 1.0.34 → 1.0.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/dist/dev/{vidply.SoundCloudRenderer-RIA3QKP3.js → vidply.SoundCloudRenderer-HCMKXHSX.js} +1 -3
  2. package/dist/dev/vidply.SoundCloudRenderer-HCMKXHSX.js.map +7 -0
  3. package/dist/dev/{vidply.TranscriptManager-T3BVTZHZ.js → vidply.TranscriptManager-EIIN5YOF.js} +2 -2
  4. package/dist/dev/{vidply.VimeoRenderer-DY2FG7LZ.js → vidply.VimeoRenderer-SLEBCZTT.js} +1 -2
  5. package/dist/dev/vidply.VimeoRenderer-SLEBCZTT.js.map +7 -0
  6. package/dist/dev/{vidply.YouTubeRenderer-EVXXE34A.js → vidply.YouTubeRenderer-E6F4UGVF.js} +1 -2
  7. package/dist/dev/vidply.YouTubeRenderer-E6F4UGVF.js.map +7 -0
  8. package/dist/dev/{vidply.chunk-74NJTDQI.js → vidply.chunk-AXXU22HR.js} +87 -10
  9. package/dist/dev/{vidply.chunk-74NJTDQI.js.map → vidply.chunk-AXXU22HR.js.map} +2 -2
  10. package/dist/dev/vidply.esm.js +83 -50
  11. package/dist/dev/vidply.esm.js.map +2 -2
  12. package/dist/legacy/vidply.js +170 -58
  13. package/dist/legacy/vidply.js.map +3 -3
  14. package/dist/legacy/vidply.min.js +1 -1
  15. package/dist/legacy/vidply.min.meta.json +18 -18
  16. package/dist/prod/vidply.SoundCloudRenderer-D2FNOEG6.min.js +6 -0
  17. package/dist/prod/{vidply.TranscriptManager-GPAOXEK4.min.js → vidply.TranscriptManager-VXCTCJ7X.min.js} +1 -1
  18. package/dist/prod/vidply.VimeoRenderer-QELFZVDU.min.js +6 -0
  19. package/dist/prod/vidply.YouTubeRenderer-ZL6YUHTF.min.js +6 -0
  20. package/dist/prod/{vidply.chunk-OM7DNW5P.min.js → vidply.chunk-Z6BHMOGK.min.js} +1 -1
  21. package/dist/prod/vidply.esm.min.js +3 -3
  22. package/dist/vidply.css +293 -108
  23. package/dist/vidply.esm.min.meta.json +33 -33
  24. package/dist/vidply.min.css +1 -1
  25. package/package.json +3 -3
  26. package/src/controls/ControlBar.js +3 -0
  27. package/src/controls/KeyboardManager.js +19 -0
  28. package/src/core/Player.js +75 -64
  29. package/src/core/SignLanguageManager.js +18 -4
  30. package/src/index.js +3 -1
  31. package/src/renderers/SoundCloudRenderer.js +0 -2
  32. package/src/renderers/VimeoRenderer.js +0 -1
  33. package/src/renderers/YouTubeRenderer.js +0 -1
  34. package/src/styles/vidply.css +293 -108
  35. package/src/utils/DraggableResizable.js +123 -12
  36. package/dist/dev/vidply.SoundCloudRenderer-RIA3QKP3.js.map +0 -7
  37. package/dist/dev/vidply.VimeoRenderer-DY2FG7LZ.js.map +0 -7
  38. package/dist/dev/vidply.YouTubeRenderer-EVXXE34A.js.map +0 -7
  39. package/dist/prod/vidply.SoundCloudRenderer-BFV5SSIU.min.js +0 -6
  40. package/dist/prod/vidply.VimeoRenderer-UQWHQ4LC.min.js +0 -6
  41. package/dist/prod/vidply.YouTubeRenderer-K7A57ICA.min.js +0 -6
  42. /package/dist/dev/{vidply.TranscriptManager-T3BVTZHZ.js.map → vidply.TranscriptManager-EIIN5YOF.js.map} +0 -0
@@ -2065,9 +2065,16 @@
2065
2065
  touchstart: this.onTouchStart.bind(this),
2066
2066
  touchmove: this.onTouchMove.bind(this),
2067
2067
  touchend: this.onTouchEnd.bind(this),
2068
+ pointerdown: this.onPointerDown.bind(this),
2069
+ pointermove: this.onPointerMove.bind(this),
2070
+ pointerup: this.onPointerUp.bind(this),
2071
+ pointercancel: this.onPointerUp.bind(this),
2068
2072
  keydown: this.onKeyDown.bind(this),
2069
- resizeHandleMousedown: this.onResizeHandleMouseDown.bind(this)
2073
+ resizeHandleMousedown: this.onResizeHandleMouseDown.bind(this),
2074
+ resizeHandlePointerDown: this.onResizeHandlePointerDown.bind(this)
2070
2075
  };
2076
+ this.activePointerId = null;
2077
+ this.activePointerType = null;
2071
2078
  this.init();
2072
2079
  }
2073
2080
  hasManagedResizeHandles() {
@@ -2104,17 +2111,28 @@
2104
2111
  }
2105
2112
  init() {
2106
2113
  const dragHandle = this.options.dragHandle || this.element;
2107
- dragHandle.addEventListener("mousedown", this.handlers.mousedown);
2108
- dragHandle.addEventListener("touchstart", this.handlers.touchstart);
2109
- document.addEventListener("mousemove", this.handlers.mousemove);
2110
- document.addEventListener("mouseup", this.handlers.mouseup);
2111
- document.addEventListener("touchmove", this.handlers.touchmove, { passive: false });
2112
- document.addEventListener("touchend", this.handlers.touchend);
2114
+ if (typeof window !== "undefined" && "PointerEvent" in window) {
2115
+ dragHandle.addEventListener("pointerdown", this.handlers.pointerdown);
2116
+ document.addEventListener("pointermove", this.handlers.pointermove, { passive: false });
2117
+ document.addEventListener("pointerup", this.handlers.pointerup);
2118
+ document.addEventListener("pointercancel", this.handlers.pointercancel);
2119
+ } else {
2120
+ dragHandle.addEventListener("mousedown", this.handlers.mousedown);
2121
+ dragHandle.addEventListener("touchstart", this.handlers.touchstart, { passive: false });
2122
+ document.addEventListener("mousemove", this.handlers.mousemove);
2123
+ document.addEventListener("mouseup", this.handlers.mouseup);
2124
+ document.addEventListener("touchmove", this.handlers.touchmove, { passive: false });
2125
+ document.addEventListener("touchend", this.handlers.touchend);
2126
+ }
2113
2127
  this.element.addEventListener("keydown", this.handlers.keydown);
2114
2128
  if (this.options.resizeHandles && this.options.resizeHandles.length > 0) {
2115
2129
  this.options.resizeHandles.forEach((handle) => {
2116
- handle.addEventListener("mousedown", this.handlers.resizeHandleMousedown);
2117
- handle.addEventListener("touchstart", this.handlers.resizeHandleMousedown);
2130
+ if (typeof window !== "undefined" && "PointerEvent" in window) {
2131
+ handle.addEventListener("pointerdown", this.handlers.resizeHandlePointerDown);
2132
+ } else {
2133
+ handle.addEventListener("mousedown", this.handlers.resizeHandleMousedown);
2134
+ handle.addEventListener("touchstart", this.handlers.resizeHandleMousedown, { passive: false });
2135
+ }
2118
2136
  const managed = handle.dataset.vidplyManagedResize === "true";
2119
2137
  this.resizeHandlesManaged.set(handle, managed);
2120
2138
  if (managed) {
@@ -2124,6 +2142,45 @@
2124
2142
  });
2125
2143
  }
2126
2144
  }
2145
+ onPointerDown(e) {
2146
+ var _a, _b;
2147
+ if (e.isPrimary === false) return;
2148
+ if (e.pointerType === "mouse" && e.button !== 0) return;
2149
+ if (e.target.classList.contains("".concat(this.options.classPrefix, "-resize-handle"))) {
2150
+ return;
2151
+ }
2152
+ if (this.options.onDragStart && !this.options.onDragStart(e)) {
2153
+ return;
2154
+ }
2155
+ this.activePointerId = e.pointerId;
2156
+ this.activePointerType = e.pointerType;
2157
+ try {
2158
+ (_b = (_a = e.currentTarget) == null ? void 0 : _a.setPointerCapture) == null ? void 0 : _b.call(_a, e.pointerId);
2159
+ } catch (e2) {
2160
+ }
2161
+ this.startDragging(e.clientX, e.clientY);
2162
+ e.preventDefault();
2163
+ }
2164
+ onPointerMove(e) {
2165
+ if (this.activePointerId !== null && e.pointerId !== this.activePointerId) return;
2166
+ if (this.isDragging) {
2167
+ this.drag(e.clientX, e.clientY);
2168
+ e.preventDefault();
2169
+ } else if (this.isResizing) {
2170
+ this.resize(e.clientX, e.clientY);
2171
+ e.preventDefault();
2172
+ }
2173
+ }
2174
+ onPointerUp(e) {
2175
+ if (this.activePointerId !== null && e.pointerId !== this.activePointerId) return;
2176
+ if (this.isDragging) {
2177
+ this.stopDragging();
2178
+ } else if (this.isResizing) {
2179
+ this.stopResizing();
2180
+ }
2181
+ this.activePointerId = null;
2182
+ this.activePointerType = null;
2183
+ }
2127
2184
  onMouseDown(e) {
2128
2185
  if (e.target.classList.contains("".concat(this.options.classPrefix, "-resize-handle"))) {
2129
2186
  return;
@@ -2143,6 +2200,23 @@
2143
2200
  }
2144
2201
  const touch = e.touches[0];
2145
2202
  this.startDragging(touch.clientX, touch.clientY);
2203
+ e.preventDefault();
2204
+ }
2205
+ onResizeHandlePointerDown(e) {
2206
+ var _a, _b;
2207
+ if (e.isPrimary === false) return;
2208
+ if (e.pointerType === "mouse" && e.button !== 0) return;
2209
+ e.preventDefault();
2210
+ e.stopPropagation();
2211
+ const handle = e.target;
2212
+ this.resizeDirection = handle.getAttribute("data-direction");
2213
+ this.activePointerId = e.pointerId;
2214
+ this.activePointerType = e.pointerType;
2215
+ try {
2216
+ (_b = (_a = e.currentTarget) == null ? void 0 : _a.setPointerCapture) == null ? void 0 : _b.call(_a, e.pointerId);
2217
+ } catch (e2) {
2218
+ }
2219
+ this.startResizing(e.clientX, e.clientY);
2146
2220
  }
2147
2221
  onResizeHandleMouseDown(e) {
2148
2222
  var _a, _b, _c, _d;
@@ -2583,15 +2657,20 @@
2583
2657
  this.disablePointerResizeMode();
2584
2658
  dragHandle.removeEventListener("mousedown", this.handlers.mousedown);
2585
2659
  dragHandle.removeEventListener("touchstart", this.handlers.touchstart);
2660
+ dragHandle.removeEventListener("pointerdown", this.handlers.pointerdown);
2586
2661
  document.removeEventListener("mousemove", this.handlers.mousemove);
2587
2662
  document.removeEventListener("mouseup", this.handlers.mouseup);
2588
2663
  document.removeEventListener("touchmove", this.handlers.touchmove);
2589
2664
  document.removeEventListener("touchend", this.handlers.touchend);
2665
+ document.removeEventListener("pointermove", this.handlers.pointermove);
2666
+ document.removeEventListener("pointerup", this.handlers.pointerup);
2667
+ document.removeEventListener("pointercancel", this.handlers.pointercancel);
2590
2668
  this.element.removeEventListener("keydown", this.handlers.keydown);
2591
2669
  if (this.options.resizeHandles && this.options.resizeHandles.length > 0) {
2592
2670
  this.options.resizeHandles.forEach((handle) => {
2593
2671
  handle.removeEventListener("mousedown", this.handlers.resizeHandleMousedown);
2594
2672
  handle.removeEventListener("touchstart", this.handlers.resizeHandleMousedown);
2673
+ handle.removeEventListener("pointerdown", this.handlers.resizeHandlePointerDown);
2595
2674
  });
2596
2675
  }
2597
2676
  this.element.classList.remove(
@@ -4596,7 +4675,6 @@
4596
4675
  this.iframe = document.createElement("div");
4597
4676
  this.iframe.id = "youtube-player-".concat(Math.random().toString(36).substr(2, 9));
4598
4677
  this.iframe.style.width = "100%";
4599
- this.iframe.style.aspectRatio = "16 / 9";
4600
4678
  this.iframe.style.maxHeight = "100%";
4601
4679
  this.player.element.parentNode.insertBefore(this.iframe, this.player.element);
4602
4680
  }
@@ -4821,7 +4899,6 @@
4821
4899
  this.iframe = document.createElement("div");
4822
4900
  this.iframe.id = "vimeo-player-".concat(Math.random().toString(36).substr(2, 9));
4823
4901
  this.iframe.style.width = "100%";
4824
- this.iframe.style.aspectRatio = "16 / 9";
4825
4902
  this.iframe.style.maxHeight = "100%";
4826
4903
  this.player.element.parentNode.insertBefore(this.iframe, this.player.element);
4827
4904
  }
@@ -5409,10 +5486,8 @@
5409
5486
  this.iframe.style.width = "100%";
5410
5487
  this.iframe.style.display = "block";
5411
5488
  if (this.isPlaylist()) {
5412
- this.iframe.style.aspectRatio = "16 / 9";
5413
5489
  this.iframe.classList.add("vidply-soundcloud-iframe", "vidply-soundcloud-playlist");
5414
5490
  } else {
5415
- this.iframe.style.aspectRatio = "16 / 3";
5416
5491
  this.iframe.classList.add("vidply-soundcloud-iframe");
5417
5492
  }
5418
5493
  this.iframe.style.maxHeight = "100%";
@@ -5846,6 +5921,7 @@
5846
5921
  }
5847
5922
  if (menuRect.top < 10) {
5848
5923
  menu.style.top = "10px";
5924
+ menu.style.bottom = "auto";
5849
5925
  }
5850
5926
  if (menuRect.bottom > viewportHeight - 10) {
5851
5927
  menu.style.bottom = "10px";
@@ -8808,6 +8884,7 @@
8808
8884
  }
8809
8885
  }
8810
8886
  handleKeydown(e) {
8887
+ var _a, _b;
8811
8888
  if (e.target.tagName === "INPUT" || e.target.tagName === "TEXTAREA" || e.target.tagName === "SELECT") {
8812
8889
  return;
8813
8890
  }
@@ -8821,6 +8898,20 @@
8821
8898
  if (playlistButton) {
8822
8899
  return;
8823
8900
  }
8901
+ const signWrapper = activeElement.closest(".vidply-sign-language-wrapper");
8902
+ if (signWrapper) {
8903
+ const draggable = (_a = this.player.signLanguageManager) == null ? void 0 : _a.draggable;
8904
+ if ((draggable == null ? void 0 : draggable.keyboardDragMode) || (draggable == null ? void 0 : draggable.keyboardResizeMode)) {
8905
+ return;
8906
+ }
8907
+ }
8908
+ const transcriptWindow = activeElement.closest(".vidply-transcript-window");
8909
+ if (transcriptWindow) {
8910
+ const draggable = (_b = this.player.transcriptManager) == null ? void 0 : _b.draggableResizable;
8911
+ if ((draggable == null ? void 0 : draggable.keyboardDragMode) || (draggable == null ? void 0 : draggable.keyboardResizeMode)) {
8912
+ return;
8913
+ }
8914
+ }
8824
8915
  }
8825
8916
  const key = e.key;
8826
8917
  let handled = false;
@@ -9894,9 +9985,10 @@
9894
9985
  * Setup interaction (drag and resize)
9895
9986
  */
9896
9987
  _setupInteraction() {
9988
+ var _a, _b;
9897
9989
  const isMobile2 = window.innerWidth < 768;
9898
9990
  const isFullscreen = this.player.state.fullscreen;
9899
- if (isMobile2 && !isFullscreen) {
9991
+ if (isMobile2 && !isFullscreen && ((_b = (_a = this.player) == null ? void 0 : _a.options) == null ? void 0 : _b.signLanguageDragOnMobile) === false) {
9900
9992
  if (this.draggable) {
9901
9993
  this.draggable.destroy();
9902
9994
  this.draggable = null;
@@ -9906,7 +9998,9 @@
9906
9998
  if (this.draggable) return;
9907
9999
  const classPrefix = this.player.options.classPrefix;
9908
10000
  this.draggable = new DraggableResizable(this.wrapper, {
9909
- dragHandle: this.header,
10001
+ // Allow dragging from anywhere on the sign-language window (better for touch).
10002
+ // We still block dragging when interacting with controls via `onDragStart` below.
10003
+ dragHandle: this.wrapper,
9910
10004
  resizeHandles: this.resizeHandles,
9911
10005
  constrainToViewport: true,
9912
10006
  maintainAspectRatio: true,
@@ -10159,10 +10253,18 @@
10159
10253
  label: "player.enableSignDragMode",
10160
10254
  hasTextClass: true,
10161
10255
  onClick: () => {
10256
+ var _a2;
10162
10257
  this.toggleKeyboardDragMode();
10163
- this.hideSettingsMenu();
10258
+ this.hideSettingsMenu({ focusButton: false });
10259
+ if ((_a2 = this.draggable) == null ? void 0 : _a2.keyboardDragMode) {
10260
+ setTimeout(() => {
10261
+ var _a3, _b2;
10262
+ (_b2 = (_a3 = this.wrapper) == null ? void 0 : _a3.focus) == null ? void 0 : _b2.call(_a3, { preventScroll: true });
10263
+ }, 20);
10264
+ }
10164
10265
  }
10165
10266
  });
10267
+ dragOption.setAttribute("data-setting", "keyboard-drag");
10166
10268
  dragOption.setAttribute("role", "switch");
10167
10269
  dragOption.setAttribute("aria-checked", "false");
10168
10270
  this._removeTooltipFromMenuItem(dragOption);
@@ -10942,23 +11044,9 @@
10942
11044
  if (this.options.height) {
10943
11045
  this.container.style.height = typeof this.options.height === "number" ? "".concat(this.options.height, "px") : this.options.height;
10944
11046
  }
10945
- if (this.element.tagName === "VIDEO" && !this.options.height) {
10946
- const wAttr = parseInt(this.element.getAttribute("width") || "", 10);
10947
- const hAttr = parseInt(this.element.getAttribute("height") || "", 10);
10948
- if (Number.isFinite(wAttr) && Number.isFinite(hAttr) && wAttr > 0 && hAttr > 0) {
10949
- if (!this.container.style.aspectRatio) {
10950
- this.container.style.aspectRatio = "".concat(wAttr, " / ").concat(hAttr);
10951
- }
10952
- if (this.videoWrapper && !this.videoWrapper.style.aspectRatio) {
10953
- this.videoWrapper.style.aspectRatio = "".concat(wAttr, " / ").concat(hAttr);
10954
- this.videoWrapper.style.height = "auto";
10955
- }
10956
- }
10957
- }
10958
11047
  if (this.options.poster && this.element.tagName === "VIDEO") {
10959
11048
  const resolvedPoster = this.resolvePosterPath(this.options.poster);
10960
11049
  this.element.poster = resolvedPoster;
10961
- this.applyPosterAspectRatio(resolvedPoster);
10962
11050
  }
10963
11051
  if (this.element.tagName === "VIDEO") {
10964
11052
  this.createPlayButtonOverlay();
@@ -10986,34 +11074,6 @@
10986
11074
  }
10987
11075
  }, { once: true });
10988
11076
  }
10989
- /**
10990
- * Apply aspect ratio to the video wrapper based on the poster's intrinsic size.
10991
- * This helps render correct poster sizing before media metadata is available.
10992
- */
10993
- applyPosterAspectRatio(posterUrl) {
10994
- try {
10995
- if (!posterUrl) return;
10996
- if (this.element.tagName !== "VIDEO") return;
10997
- if (!this.videoWrapper) return;
10998
- if (this.options.width || this.options.height) return;
10999
- if (this._posterAspectAppliedFor === posterUrl) return;
11000
- this._posterAspectAppliedFor = posterUrl;
11001
- const img = new Image();
11002
- img.decoding = "async";
11003
- img.onload = () => {
11004
- const w = img.naturalWidth;
11005
- const h = img.naturalHeight;
11006
- if (!w || !h) return;
11007
- this.videoWrapper.style.aspectRatio = "".concat(w, " / ").concat(h);
11008
- this.videoWrapper.style.height = "auto";
11009
- if (this.container && !this.container.style.aspectRatio) {
11010
- this.container.style.aspectRatio = "".concat(w, " / ").concat(h);
11011
- }
11012
- };
11013
- img.src = posterUrl;
11014
- } catch (e) {
11015
- }
11016
- }
11017
11077
  createPlayButtonOverlay() {
11018
11078
  this.playButtonOverlay = createPlayOverlay();
11019
11079
  this.playButtonOverlay.addEventListener("click", () => {
@@ -11684,6 +11744,7 @@
11684
11744
  var _a;
11685
11745
  this.state.fullscreen = true;
11686
11746
  this.container.classList.add("".concat(this.options.classPrefix, "-fullscreen"));
11747
+ document.body.classList.add("vidply-fullscreen-active");
11687
11748
  this._originalScrollX = window.scrollX || window.pageXOffset;
11688
11749
  this._originalScrollY = window.scrollY || window.pageYOffset;
11689
11750
  this._originalBodyOverflow = document.body.style.overflow;
@@ -11691,20 +11752,58 @@
11691
11752
  this._originalBodyWidth = document.body.style.width;
11692
11753
  this._originalBodyHeight = document.body.style.height;
11693
11754
  this._originalHtmlOverflow = document.documentElement.style.overflow;
11755
+ this._originalBodyBackground = document.body.style.background;
11756
+ this._originalHtmlBackground = document.documentElement.style.background;
11694
11757
  document.body.style.overflow = "hidden";
11695
11758
  document.body.style.width = "100%";
11696
11759
  document.body.style.height = "100%";
11760
+ document.body.style.background = "#000";
11697
11761
  document.documentElement.style.overflow = "hidden";
11762
+ document.documentElement.style.background = "#000";
11698
11763
  this._originalViewport = (_a = document.querySelector('meta[name="viewport"]')) == null ? void 0 : _a.getAttribute("content");
11699
11764
  const viewport = document.querySelector('meta[name="viewport"]');
11700
11765
  if (viewport) {
11701
11766
  viewport.setAttribute("content", "width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no");
11702
11767
  }
11703
11768
  window.scrollTo(0, 0);
11769
+ this._makeBackgroundInert();
11704
11770
  this.emit("fullscreenchange", true);
11705
11771
  this.emit("enterfullscreen");
11706
11772
  }
11773
+ /**
11774
+ * Makes all page content except the fullscreen player inert (non-focusable)
11775
+ * This prevents keyboard navigation from focusing on hidden background elements
11776
+ */
11777
+ _makeBackgroundInert() {
11778
+ this._inertElements = [];
11779
+ let current = this.container;
11780
+ while (current && current !== document.body && current !== document.documentElement) {
11781
+ const parent = current.parentElement;
11782
+ if (parent) {
11783
+ Array.from(parent.children).forEach((sibling) => {
11784
+ if (sibling !== current && sibling.nodeType === Node.ELEMENT_NODE && !sibling.hasAttribute("inert") && sibling.tagName !== "SCRIPT" && sibling.tagName !== "STYLE" && sibling.tagName !== "LINK" && sibling.tagName !== "META") {
11785
+ sibling.setAttribute("inert", "");
11786
+ this._inertElements.push(sibling);
11787
+ }
11788
+ });
11789
+ }
11790
+ current = parent;
11791
+ }
11792
+ }
11793
+ /**
11794
+ * Restores interactivity to elements that were made inert during fullscreen
11795
+ */
11796
+ _restoreBackgroundInteractivity() {
11797
+ if (this._inertElements) {
11798
+ this._inertElements.forEach((el) => {
11799
+ el.removeAttribute("inert");
11800
+ });
11801
+ this._inertElements = [];
11802
+ }
11803
+ }
11707
11804
  _disablePseudoFullscreen() {
11805
+ document.body.classList.remove("vidply-fullscreen-active");
11806
+ this._restoreBackgroundInteractivity();
11708
11807
  if (this._originalBodyOverflow !== void 0) {
11709
11808
  document.body.style.overflow = this._originalBodyOverflow;
11710
11809
  delete this._originalBodyOverflow;
@@ -11725,6 +11824,14 @@
11725
11824
  document.documentElement.style.overflow = this._originalHtmlOverflow;
11726
11825
  delete this._originalHtmlOverflow;
11727
11826
  }
11827
+ if (this._originalBodyBackground !== void 0) {
11828
+ document.body.style.background = this._originalBodyBackground;
11829
+ delete this._originalBodyBackground;
11830
+ }
11831
+ if (this._originalHtmlBackground !== void 0) {
11832
+ document.documentElement.style.background = this._originalHtmlBackground;
11833
+ delete this._originalHtmlBackground;
11834
+ }
11728
11835
  if (this._originalViewport !== void 0) {
11729
11836
  const viewport = document.querySelector('meta[name="viewport"]');
11730
11837
  if (viewport) {
@@ -13744,8 +13851,12 @@
13744
13851
  this.state.fullscreen = isFullscreen;
13745
13852
  if (isFullscreen) {
13746
13853
  this.container.classList.add("".concat(this.options.classPrefix, "-fullscreen"));
13854
+ document.body.classList.add("vidply-fullscreen-active");
13855
+ this._makeBackgroundInert();
13747
13856
  } else {
13748
13857
  this.container.classList.remove("".concat(this.options.classPrefix, "-fullscreen"));
13858
+ document.body.classList.remove("vidply-fullscreen-active");
13859
+ this._restoreBackgroundInteractivity();
13749
13860
  this._disablePseudoFullscreen();
13750
13861
  }
13751
13862
  this.emit("fullscreenchange", isFullscreen);
@@ -15427,6 +15538,7 @@
15427
15538
  "responsive": "responsive",
15428
15539
  "pipButton": "pipButton",
15429
15540
  "fullscreenButton": "fullscreenButton"
15541
+ // Layout
15430
15542
  };
15431
15543
  Object.keys(attributeMap).forEach((dataKey) => {
15432
15544
  const optionKey = attributeMap[dataKey];