@micromag/screen-video 0.3.207 → 0.3.209
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 -13
- package/lib/index.js +4 -12
- package/package.json +11 -11
package/es/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import classNames from 'classnames';
|
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import React, { useState, useEffect, useCallback, useMemo } from 'react';
|
|
9
9
|
import { PropTypes as PropTypes$1 } from '@micromag/core';
|
|
10
|
-
import { ScreenElement, PlaceholderVideo, Empty
|
|
10
|
+
import { ScreenElement, PlaceholderVideo, Empty } from '@micromag/core/components';
|
|
11
11
|
import { useScreenSize, useScreenRenderContext, useViewerNavigation, useViewerContext, useViewerWebView, usePlaybackContext, usePlaybackMediaRef, useViewerContainer } from '@micromag/core/contexts';
|
|
12
12
|
import { useTrackScreenMedia, useActivityDetector, useMediaThumbnail } from '@micromag/core/hooks';
|
|
13
13
|
import Background from '@micromag/element-background';
|
|
@@ -57,9 +57,9 @@ var VideoScreen = function VideoScreen(_ref) {
|
|
|
57
57
|
background = _ref.background,
|
|
58
58
|
callToAction = _ref.callToAction,
|
|
59
59
|
current = _ref.current,
|
|
60
|
-
active = _ref.active
|
|
61
|
-
|
|
62
|
-
spacing = _ref.spacing,
|
|
60
|
+
active = _ref.active;
|
|
61
|
+
_ref.transitions;
|
|
62
|
+
var spacing = _ref.spacing,
|
|
63
63
|
customMediaRef = _ref.mediaRef,
|
|
64
64
|
className = _ref.className;
|
|
65
65
|
var trackScreenMedia = useTrackScreenMedia('video');
|
|
@@ -239,10 +239,6 @@ var VideoScreen = function VideoScreen(_ref) {
|
|
|
239
239
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
240
240
|
ready = _useState8[0],
|
|
241
241
|
setReady = _useState8[1]; // useState(!hasVideo);
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
var transitionPlaying = current && ready;
|
|
245
|
-
var transitionDisabled = isStatic || isCapture || isPlaceholder || isPreview || isEdit;
|
|
246
242
|
var finalVideo = useMemo(function () {
|
|
247
243
|
return hasVideo ? _objectSpread(_objectSpread({}, video), {}, {
|
|
248
244
|
autoPlay: !isPreview && !isStatic && !isCapture && autoPlay && current
|
|
@@ -352,10 +348,6 @@ var VideoScreen = function VideoScreen(_ref) {
|
|
|
352
348
|
paddingBottom: spacing / 2,
|
|
353
349
|
paddingTop: 0
|
|
354
350
|
}
|
|
355
|
-
}, /*#__PURE__*/React.createElement(Transitions, {
|
|
356
|
-
playing: transitionPlaying,
|
|
357
|
-
transitions: transitions,
|
|
358
|
-
disabled: transitionDisabled
|
|
359
351
|
}, closedCaptions !== null && !isPreview && !isCapture && !isStatic ? /*#__PURE__*/React.createElement(ClosedCaptions, {
|
|
360
352
|
className: styles.closedCaptions,
|
|
361
353
|
media: closedCaptions,
|
|
@@ -365,7 +357,7 @@ var VideoScreen = function VideoScreen(_ref) {
|
|
|
365
357
|
animationDisabled: isPreview,
|
|
366
358
|
focusable: current && isView,
|
|
367
359
|
openWebView: openWebView
|
|
368
|
-
})) : null)
|
|
360
|
+
})) : null) : null];
|
|
369
361
|
return /*#__PURE__*/React.createElement("div", {
|
|
370
362
|
className: classNames([styles.container, (_ref7 = {}, _defineProperty(_ref7, className, className !== null), _defineProperty(_ref7, styles.fullscreen, fullscreen), _ref7)]),
|
|
371
363
|
"data-screen-ready": isStatic || isCapture || ready
|
package/lib/index.js
CHANGED
|
@@ -77,9 +77,9 @@ var VideoScreen = function VideoScreen(_ref) {
|
|
|
77
77
|
background = _ref.background,
|
|
78
78
|
callToAction = _ref.callToAction,
|
|
79
79
|
current = _ref.current,
|
|
80
|
-
active = _ref.active
|
|
81
|
-
|
|
82
|
-
spacing = _ref.spacing,
|
|
80
|
+
active = _ref.active;
|
|
81
|
+
_ref.transitions;
|
|
82
|
+
var spacing = _ref.spacing,
|
|
83
83
|
customMediaRef = _ref.mediaRef,
|
|
84
84
|
className = _ref.className;
|
|
85
85
|
var trackScreenMedia = hooks.useTrackScreenMedia('video');
|
|
@@ -259,10 +259,6 @@ var VideoScreen = function VideoScreen(_ref) {
|
|
|
259
259
|
_useState8 = _slicedToArray__default["default"](_useState7, 2),
|
|
260
260
|
ready = _useState8[0],
|
|
261
261
|
setReady = _useState8[1]; // useState(!hasVideo);
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
var transitionPlaying = current && ready;
|
|
265
|
-
var transitionDisabled = isStatic || isCapture || isPlaceholder || isPreview || isEdit;
|
|
266
262
|
var finalVideo = React.useMemo(function () {
|
|
267
263
|
return hasVideo ? _objectSpread__default["default"](_objectSpread__default["default"]({}, video), {}, {
|
|
268
264
|
autoPlay: !isPreview && !isStatic && !isCapture && autoPlay && current
|
|
@@ -372,10 +368,6 @@ var VideoScreen = function VideoScreen(_ref) {
|
|
|
372
368
|
paddingBottom: spacing / 2,
|
|
373
369
|
paddingTop: 0
|
|
374
370
|
}
|
|
375
|
-
}, /*#__PURE__*/React__default["default"].createElement(components.Transitions, {
|
|
376
|
-
playing: transitionPlaying,
|
|
377
|
-
transitions: transitions,
|
|
378
|
-
disabled: transitionDisabled
|
|
379
371
|
}, closedCaptions !== null && !isPreview && !isCapture && !isStatic ? /*#__PURE__*/React__default["default"].createElement(ClosedCaptions__default["default"], {
|
|
380
372
|
className: styles.closedCaptions,
|
|
381
373
|
media: closedCaptions,
|
|
@@ -385,7 +377,7 @@ var VideoScreen = function VideoScreen(_ref) {
|
|
|
385
377
|
animationDisabled: isPreview,
|
|
386
378
|
focusable: current && isView,
|
|
387
379
|
openWebView: openWebView
|
|
388
|
-
})) : null)
|
|
380
|
+
})) : null) : null];
|
|
389
381
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
390
382
|
className: classNames__default["default"]([styles.container, (_ref7 = {}, _defineProperty__default["default"](_ref7, className, className !== null), _defineProperty__default["default"](_ref7, styles.fullscreen, fullscreen), _ref7)]),
|
|
391
383
|
"data-screen-ready": isStatic || isCapture || ready
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/screen-video",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.209",
|
|
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.209",
|
|
54
|
+
"@micromag/element-background": "^0.3.209",
|
|
55
|
+
"@micromag/element-call-to-action": "^0.3.209",
|
|
56
|
+
"@micromag/element-closed-captions": "^0.3.209",
|
|
57
|
+
"@micromag/element-container": "^0.3.209",
|
|
58
|
+
"@micromag/element-image": "^0.3.209",
|
|
59
|
+
"@micromag/element-media-controls": "^0.3.209",
|
|
60
|
+
"@micromag/element-video": "^0.3.209",
|
|
61
|
+
"@micromag/transforms": "^0.3.209",
|
|
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": "909d9ff44ec6bf543db9c75186cd223391a5f0cd"
|
|
72
72
|
}
|