stormcloud-video-player 0.7.36 → 0.7.38

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.
@@ -1813,7 +1813,8 @@ var OverlayRenderer = function OverlayRenderer(param) {
1813
1813
  var activeOverlays = (0, import_react.useMemo)(function() {
1814
1814
  if (showcaseMode) {
1815
1815
  return overlays.filter(function(o) {
1816
- return o.visible && showcasePhase < SHOWCASE_POP_OUT_END_MS;
1816
+ if (!o.visible) return false;
1817
+ return showcasePhase < SHOWCASE_POP_OUT_END_MS;
1817
1818
  });
1818
1819
  }
1819
1820
  return overlays.filter(function(o) {
@@ -1832,7 +1833,7 @@ var OverlayRenderer = function OverlayRenderer(param) {
1832
1833
  }, [
1833
1834
  activeOverlays
1834
1835
  ]);
1835
- (0, import_react.useEffect)(function() {
1836
+ (0, import_react.useLayoutEffect)(function() {
1836
1837
  var activeIds = new Set(activeOverlays.map(function(o) {
1837
1838
  return o.id;
1838
1839
  }));
@@ -2021,8 +2022,9 @@ var OverlayRenderer = function OverlayRenderer(param) {
2021
2022
  var height = overlay.height * scaleY;
2022
2023
  var baseOpacity = Math.max(0, Math.min(100, overlay.opacity)) / 100;
2023
2024
  var inShowcaseBeat = showcaseMode && activeBeatIds.has(overlay.id);
2024
- var opacity = inShowcaseBeat ? baseOpacity * showcaseOpacity(showcasePhase) : visible ? baseOpacity : 0;
2025
- var popScale = inShowcaseBeat ? showcaseScale(showcasePhase) : 1;
2025
+ var useShowcasePop = inShowcaseBeat;
2026
+ var opacity = useShowcasePop ? baseOpacity * showcaseOpacity(showcasePhase) : visible ? baseOpacity : 0;
2027
+ var popScale = useShowcasePop ? showcaseScale(showcasePhase) : 1;
2026
2028
  var sz = {
2027
2029
  w: width,
2028
2030
  h: height
@@ -2035,9 +2037,9 @@ var OverlayRenderer = function OverlayRenderer(param) {
2035
2037
  width: "".concat(width, "px"),
2036
2038
  height: "".concat(height, "px"),
2037
2039
  opacity: opacity,
2038
- transition: inShowcaseBeat ? "none" : "opacity ".concat(FADE_DURATION_MS, "ms ease"),
2039
- transform: showcaseMode ? "scale(".concat(popScale, ")") : void 0,
2040
- transformOrigin: showcaseMode ? "center center" : void 0,
2040
+ transition: useShowcasePop ? "none" : "opacity ".concat(FADE_DURATION_MS, "ms ease"),
2041
+ transform: showcaseMode && useShowcasePop ? "scale(".concat(popScale, ")") : void 0,
2042
+ transformOrigin: showcaseMode && useShowcasePop ? "center center" : void 0,
2041
2043
  zIndex: overlay.z_index,
2042
2044
  overflow: "hidden"
2043
2045
  },