@nikelroot/video-player 0.1.8 → 0.1.9

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.
package/dist/index.cjs CHANGED
@@ -1438,6 +1438,13 @@ var VideoPlayerBase = (props, ref) => {
1438
1438
  destroy();
1439
1439
  };
1440
1440
  }, [destroy]);
1441
+ const lastActiveState = (0, import_react3.useRef)(active);
1442
+ (0, import_react3.useEffect)(() => {
1443
+ if (active !== lastActiveState.current) {
1444
+ playAction();
1445
+ lastActiveState.current = active;
1446
+ }
1447
+ }, [active]);
1441
1448
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
1442
1449
  VideoPlayerStyles,
1443
1450
  {
package/dist/index.js CHANGED
@@ -1409,6 +1409,13 @@ var VideoPlayerBase = (props, ref) => {
1409
1409
  destroy();
1410
1410
  };
1411
1411
  }, [destroy]);
1412
+ const lastActiveState = useRef2(active);
1413
+ useEffect(() => {
1414
+ if (active !== lastActiveState.current) {
1415
+ playAction();
1416
+ lastActiveState.current = active;
1417
+ }
1418
+ }, [active]);
1412
1419
  return /* @__PURE__ */ jsxs2(
1413
1420
  VideoPlayerStyles,
1414
1421
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nikelroot/video-player",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "description": "Standalone React video player with HLS support.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",