@appquality/unguess-design-system 3.1.43-player → 3.1.46

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/CHANGELOG.md CHANGED
@@ -1,3 +1,41 @@
1
+ # v3.1.46 (Tue Aug 29 2023)
2
+
3
+ #### 🐛 Bug Fix
4
+
5
+ - Develop [#264](https://github.com/AppQuality/unguess-design-system/pull/264) ([@cannarocks](https://github.com/cannarocks))
6
+
7
+ #### Authors: 1
8
+
9
+ - Luca Cannarozzo ([@cannarocks](https://github.com/cannarocks))
10
+
11
+ ---
12
+
13
+ # v3.1.42 (Thu Aug 24 2023)
14
+
15
+ #### 🐛 Bug Fix
16
+
17
+ - Improve fullscreen experience of player [#263](https://github.com/AppQuality/unguess-design-system/pull/263) ([@cannarocks](https://github.com/cannarocks))
18
+ - New-player-with-old-skin [#262](https://github.com/AppQuality/unguess-design-system/pull/262) ([@cannarocks](https://github.com/cannarocks))
19
+
20
+ #### Authors: 1
21
+
22
+ - Luca Cannarozzo ([@cannarocks](https://github.com/cannarocks))
23
+
24
+ ---
25
+
26
+ # v3.1.4 (Wed Aug 23 2023)
27
+
28
+ #### 🐛 Bug Fix
29
+
30
+ - Add streaming support to player component [#261](https://github.com/AppQuality/unguess-design-system/pull/261) ([@cannarocks](https://github.com/cannarocks))
31
+ - New-player-with-old-skin [#260](https://github.com/AppQuality/unguess-design-system/pull/260) ([@cannarocks](https://github.com/cannarocks))
32
+
33
+ #### Authors: 1
34
+
35
+ - Luca Cannarozzo ([@cannarocks](https://github.com/cannarocks))
36
+
37
+ ---
38
+
1
39
  # v3.1.3 (Wed Aug 16 2023)
2
40
 
3
41
  #### 🐛 Bug Fix
package/build/index.js CHANGED
@@ -4389,10 +4389,24 @@ const FullScreenButton = ({ container, }) => {
4389
4389
  }
4390
4390
  return false;
4391
4391
  }), [ref]);
4392
+ React.useEffect(() => {
4393
+ if (ref) {
4394
+ ref.addEventListener("fullscreenchange", () => {
4395
+ setFullScreen(!!document.fullscreenElement);
4396
+ });
4397
+ }
4398
+ return () => {
4399
+ if (ref) {
4400
+ ref.removeEventListener("fullscreenchange", () => {
4401
+ setFullScreen(!!document.fullscreenElement);
4402
+ });
4403
+ }
4404
+ };
4405
+ }, [ref]);
4392
4406
  return (jsxRuntime.jsx(IconButton, Object.assign({ isBright: true, onClick: (e) => {
4393
4407
  handleFullScreen();
4394
4408
  e.stopPropagation();
4395
- }, disabled: !canGoFullScreen() }, { children: document.fullscreenElement || isFullScreen ? jsxRuntime.jsx(SvgMinimizeStroke, {}) : jsxRuntime.jsx(SvgMaximizeStroke, {}) })));
4409
+ }, disabled: !canGoFullScreen() }, { children: document.fullscreenElement || isFullScreen ? (jsxRuntime.jsx(SvgMinimizeStroke, {})) : (jsxRuntime.jsx(SvgMaximizeStroke, {})) })));
4396
4410
  };
4397
4411
 
4398
4412
  const ControlsWrapper = styled__default["default"].div `
@@ -4433,14 +4447,16 @@ const StyledDiv$2 = styled__default["default"].div `
4433
4447
  align-items: center;
4434
4448
  `;
4435
4449
  const Controls = ({ container, }) => {
4436
- var _a, _b;
4450
+ var _a, _b, _c;
4437
4451
  const [progress, setProgress] = React.useState(0);
4438
4452
  const [tooltipMargin, setTooltipMargin] = React.useState(0);
4439
4453
  const [tooltipLabel, setTooltipLabel] = React.useState("00:00");
4440
4454
  const progressRef = React.useRef(null);
4441
4455
  const { context, setCurrentTime } = Video.useVideoContext();
4442
- const relCurrentTime = (((_a = context.player) === null || _a === void 0 ? void 0 : _a.currentTime) || 0) - context.part.start;
4443
- const duration = context.part.end - context.part.start || ((_b = context.player) === null || _b === void 0 ? void 0 : _b.totalTime) || 0; //relative
4456
+ const relCurrentTime = ((_a = context.player) === null || _a === void 0 ? void 0 : _a.currentTime)
4457
+ ? ((_b = context.player) === null || _b === void 0 ? void 0 : _b.currentTime) - context.part.start
4458
+ : 0;
4459
+ const duration = context.part.end - context.part.start || ((_c = context.player) === null || _c === void 0 ? void 0 : _c.totalTime) || 0; //relative
4444
4460
  const getVideoPositionFromEvent = (clientX) => {
4445
4461
  if (progressRef && progressRef.current && duration) {
4446
4462
  const bounds = progressRef.current.getBoundingClientRect();
@@ -300,16 +300,11 @@ declare const theme: {
300
300
  "&:hover"?: {
301
301
  borderColor: string | undefined;
302
302
  color: string | undefined;
303
- backgroundColor: string;
304
- "& svg"?: undefined;
305
- } | {
306
- backgroundColor: string;
307
- color: string | undefined;
308
- borderColor?: undefined;
303
+ backgroundColor: string | undefined;
309
304
  "& svg"?: undefined;
310
305
  } | {
311
306
  backgroundColor: string | undefined;
312
- color: string;
307
+ color: string | undefined;
313
308
  borderColor?: undefined;
314
309
  "& svg"?: undefined;
315
310
  } | {
@@ -352,13 +347,13 @@ declare const theme: {
352
347
  "&:hover"?: {
353
348
  borderColor: string | undefined;
354
349
  color: string | undefined;
355
- backgroundColor: string;
350
+ backgroundColor: string | undefined;
356
351
  } | {
357
352
  backgroundColor: string | undefined;
358
353
  borderColor?: undefined;
359
354
  color?: undefined;
360
355
  } | {
361
- backgroundColor: string;
356
+ backgroundColor: string | undefined;
362
357
  color: string | undefined;
363
358
  borderColor?: undefined;
364
359
  } | {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appquality/unguess-design-system",
3
- "version": "3.1.43-player",
3
+ "version": "3.1.46",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",