@micromag/screen-video 0.4.69 → 0.4.71
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/es/index.d.ts +2 -1
- package/es/index.js +2 -7
- package/package.json +11 -11
package/es/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ForwardedRef } from 'react';
|
|
2
3
|
import { VideoElement, Header, Footer, BackgroundElement } from '@micromag/core';
|
|
3
4
|
|
|
4
5
|
interface VideoScreenProps {
|
|
@@ -12,7 +13,7 @@ interface VideoScreenProps {
|
|
|
12
13
|
active?: boolean;
|
|
13
14
|
preload?: boolean;
|
|
14
15
|
spacing?: number;
|
|
15
|
-
mediaRef?:
|
|
16
|
+
mediaRef?: ForwardedRef<HTMLMediaElement> | null;
|
|
16
17
|
className?: string | null;
|
|
17
18
|
}
|
|
18
19
|
declare function VideoScreen({ layout, video, gotoNextScreenOnEnd, header, footer, background, current, active: _active, preload, spacing, mediaRef: customMediaRef, className, }: VideoScreenProps): react_jsx_runtime.JSX.Element;
|
package/es/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import { useState, useEffect, useCallback, useMemo } from 'react';
|
|
|
8
8
|
import { ScreenElement, Empty, PlaceholderVideo } from '@micromag/core/components';
|
|
9
9
|
import { useScreenSize, useScreenRenderContext, useViewerNavigation, useViewerContext, useViewerWebView, usePlaybackContext, usePlaybackMediaRef, useViewerContainer } from '@micromag/core/contexts';
|
|
10
10
|
import { useTrackScreenMedia, useActivityDetector, useDebounce, useMediaThumbnail } from '@micromag/core/hooks';
|
|
11
|
-
import { isHeaderFilled, isFooterFilled, getFooterProps } from '@micromag/core/utils';
|
|
11
|
+
import { isHeaderFilled, isFooterFilled, getFooterProps, mergeRefs } from '@micromag/core/utils';
|
|
12
12
|
import Background from '@micromag/element-background';
|
|
13
13
|
import ClosedCaptions from '@micromag/element-closed-captions';
|
|
14
14
|
import Container from '@micromag/element-container';
|
|
@@ -130,11 +130,6 @@ function VideoScreen(_ref) {
|
|
|
130
130
|
}
|
|
131
131
|
};
|
|
132
132
|
}, [current, withControls, setControls, withSeekBar, color, progressColor]);
|
|
133
|
-
useEffect(function () {
|
|
134
|
-
if (customMediaRef !== null) {
|
|
135
|
-
customMediaRef(mediaRef.current);
|
|
136
|
-
}
|
|
137
|
-
}, [mediaRef.current]);
|
|
138
133
|
useEffect(function () {
|
|
139
134
|
if (current && autoPlay) {
|
|
140
135
|
setPlaying(true);
|
|
@@ -330,7 +325,7 @@ function VideoScreen(_ref) {
|
|
|
330
325
|
height: resizedVideoHeight,
|
|
331
326
|
paused: !videoPlaying,
|
|
332
327
|
muted: muted,
|
|
333
|
-
mediaRef: mediaRef,
|
|
328
|
+
mediaRef: mergeRefs(mediaRef, customMediaRef),
|
|
334
329
|
className: styles.video,
|
|
335
330
|
onReady: onVideoReady,
|
|
336
331
|
onPlay: onPlay,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/screen-video",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.71",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -62,15 +62,15 @@
|
|
|
62
62
|
"dependencies": {
|
|
63
63
|
"@babel/runtime": "^7.28.6",
|
|
64
64
|
"@folklore/size": "^0.1.20",
|
|
65
|
-
"@micromag/core": "^0.4.
|
|
66
|
-
"@micromag/element-background": "^0.4.
|
|
67
|
-
"@micromag/element-closed-captions": "^0.4.
|
|
68
|
-
"@micromag/element-container": "^0.4.
|
|
69
|
-
"@micromag/element-footer": "^0.4.
|
|
70
|
-
"@micromag/element-header": "^0.4.
|
|
71
|
-
"@micromag/element-image": "^0.4.
|
|
72
|
-
"@micromag/element-video": "^0.4.
|
|
73
|
-
"@micromag/transforms": "^0.4.
|
|
65
|
+
"@micromag/core": "^0.4.71",
|
|
66
|
+
"@micromag/element-background": "^0.4.71",
|
|
67
|
+
"@micromag/element-closed-captions": "^0.4.71",
|
|
68
|
+
"@micromag/element-container": "^0.4.71",
|
|
69
|
+
"@micromag/element-footer": "^0.4.71",
|
|
70
|
+
"@micromag/element-header": "^0.4.71",
|
|
71
|
+
"@micromag/element-image": "^0.4.71",
|
|
72
|
+
"@micromag/element-video": "^0.4.71",
|
|
73
|
+
"@micromag/transforms": "^0.4.71",
|
|
74
74
|
"classnames": "^2.2.6",
|
|
75
75
|
"lodash": "^4.17.23",
|
|
76
76
|
"react-intl": "^8.1.3 || ^10.0.0",
|
|
@@ -80,6 +80,6 @@
|
|
|
80
80
|
"access": "public",
|
|
81
81
|
"registry": "https://registry.npmjs.org/"
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "9101554bc5761e32b4a002a10d26800608c69773",
|
|
84
84
|
"types": "es/index.d.ts"
|
|
85
85
|
}
|