@micromag/screen-video 0.3.112 → 0.3.117
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.js +5 -4
- package/lib/index.js +4 -3
- package/package.json +11 -11
package/es/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import React, { useRef, useEffect, useState, useCallback, useMemo } from 'react'
|
|
|
9
9
|
import { PropTypes as PropTypes$1 } from '@micromag/core';
|
|
10
10
|
import { ScreenElement, PlaceholderVideo, Empty, Transitions } from '@micromag/core/components';
|
|
11
11
|
import { useScreenSize, useScreenRenderContext, useViewerNavigation } from '@micromag/core/contexts';
|
|
12
|
-
import { useTrackScreenMedia, useResizeObserver, useLongPress } from '@micromag/core/hooks';
|
|
12
|
+
import { useTrackScreenMedia, useResizeObserver, useLongPress, useMediaThumbnail } from '@micromag/core/hooks';
|
|
13
13
|
import Background from '@micromag/element-background';
|
|
14
14
|
import CallToAction from '@micromag/element-call-to-action';
|
|
15
15
|
import ClosedCaptions from '@micromag/element-closed-captions';
|
|
@@ -96,6 +96,8 @@ var VideoScreen = function VideoScreen(_ref) {
|
|
|
96
96
|
autoPlay = _ref2$autoPlay === void 0 ? true : _ref2$autoPlay,
|
|
97
97
|
_ref2$media = _ref2.media,
|
|
98
98
|
videoMedia = _ref2$media === void 0 ? null : _ref2$media,
|
|
99
|
+
_ref2$thumbnailFile = _ref2.thumbnailFile,
|
|
100
|
+
thumbnailFile = _ref2$thumbnailFile === void 0 ? null : _ref2$thumbnailFile,
|
|
99
101
|
_ref2$closedCaptions = _ref2.closedCaptions,
|
|
100
102
|
closedCaptions = _ref2$closedCaptions === void 0 ? null : _ref2$closedCaptions,
|
|
101
103
|
_ref2$withSeekBar = _ref2.withSeekBar,
|
|
@@ -257,10 +259,9 @@ var VideoScreen = function VideoScreen(_ref) {
|
|
|
257
259
|
_ref7$metadata = _ref7.metadata,
|
|
258
260
|
videoMetadata = _ref7$metadata === void 0 ? null : _ref7$metadata,
|
|
259
261
|
_ref7$url = _ref7.url,
|
|
260
|
-
videoUrl = _ref7$url === void 0 ? null : _ref7$url
|
|
261
|
-
_ref7$thumbnail_url = _ref7.thumbnail_url,
|
|
262
|
-
thumbnailUrl = _ref7$thumbnail_url === void 0 ? null : _ref7$thumbnail_url;
|
|
262
|
+
videoUrl = _ref7$url === void 0 ? null : _ref7$url;
|
|
263
263
|
|
|
264
|
+
var thumbnailUrl = useMediaThumbnail(videoMedia, thumbnailFile);
|
|
264
265
|
var hasVideoUrl = videoUrl !== null; // const hasThumbnail = thumbnailUrl !== null;
|
|
265
266
|
// const [posterReady, setPosterReady] = useState(!hasThumbnail);
|
|
266
267
|
|
package/lib/index.js
CHANGED
|
@@ -117,6 +117,8 @@ var VideoScreen = function VideoScreen(_ref) {
|
|
|
117
117
|
autoPlay = _ref2$autoPlay === void 0 ? true : _ref2$autoPlay,
|
|
118
118
|
_ref2$media = _ref2.media,
|
|
119
119
|
videoMedia = _ref2$media === void 0 ? null : _ref2$media,
|
|
120
|
+
_ref2$thumbnailFile = _ref2.thumbnailFile,
|
|
121
|
+
thumbnailFile = _ref2$thumbnailFile === void 0 ? null : _ref2$thumbnailFile,
|
|
120
122
|
_ref2$closedCaptions = _ref2.closedCaptions,
|
|
121
123
|
closedCaptions = _ref2$closedCaptions === void 0 ? null : _ref2$closedCaptions,
|
|
122
124
|
_ref2$withSeekBar = _ref2.withSeekBar,
|
|
@@ -278,10 +280,9 @@ var VideoScreen = function VideoScreen(_ref) {
|
|
|
278
280
|
_ref7$metadata = _ref7.metadata,
|
|
279
281
|
videoMetadata = _ref7$metadata === void 0 ? null : _ref7$metadata,
|
|
280
282
|
_ref7$url = _ref7.url,
|
|
281
|
-
videoUrl = _ref7$url === void 0 ? null : _ref7$url
|
|
282
|
-
_ref7$thumbnail_url = _ref7.thumbnail_url,
|
|
283
|
-
thumbnailUrl = _ref7$thumbnail_url === void 0 ? null : _ref7$thumbnail_url;
|
|
283
|
+
videoUrl = _ref7$url === void 0 ? null : _ref7$url;
|
|
284
284
|
|
|
285
|
+
var thumbnailUrl = hooks.useMediaThumbnail(videoMedia, thumbnailFile);
|
|
285
286
|
var hasVideoUrl = videoUrl !== null; // const hasThumbnail = thumbnailUrl !== null;
|
|
286
287
|
// const [posterReady, setPosterReady] = useState(!hasThumbnail);
|
|
287
288
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/screen-video",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.117",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -50,15 +50,15 @@
|
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@babel/runtime": "^7.13.10",
|
|
52
52
|
"@folklore/size": "^0.1.20",
|
|
53
|
-
"@micromag/core": "^0.3.
|
|
54
|
-
"@micromag/element-background": "^0.3.
|
|
55
|
-
"@micromag/element-call-to-action": "^0.3.
|
|
56
|
-
"@micromag/element-closed-captions": "^0.3.
|
|
57
|
-
"@micromag/element-container": "^0.3.
|
|
58
|
-
"@micromag/element-image": "^0.3.
|
|
59
|
-
"@micromag/element-media-controls": "^0.3.
|
|
60
|
-
"@micromag/element-video": "^0.3.
|
|
61
|
-
"@micromag/transforms": "^0.3.
|
|
53
|
+
"@micromag/core": "^0.3.117",
|
|
54
|
+
"@micromag/element-background": "^0.3.117",
|
|
55
|
+
"@micromag/element-call-to-action": "^0.3.117",
|
|
56
|
+
"@micromag/element-closed-captions": "^0.3.117",
|
|
57
|
+
"@micromag/element-container": "^0.3.117",
|
|
58
|
+
"@micromag/element-image": "^0.3.117",
|
|
59
|
+
"@micromag/element-media-controls": "^0.3.117",
|
|
60
|
+
"@micromag/element-video": "^0.3.117",
|
|
61
|
+
"@micromag/transforms": "^0.3.117",
|
|
62
62
|
"classnames": "^2.2.6",
|
|
63
63
|
"lodash": "^4.17.21",
|
|
64
64
|
"prop-types": "^15.7.2",
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"publishConfig": {
|
|
69
69
|
"access": "public"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "eab1c9a0b8c19d747fee6472158779f33b1f18d3"
|
|
72
72
|
}
|