@micromag/screen-video 0.3.207 → 0.3.211

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.
Files changed (3) hide show
  1. package/es/index.js +7 -14
  2. package/lib/index.js +6 -13
  3. 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, Transitions } from '@micromag/core/components';
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
- transitions = _ref.transitions,
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)) : 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
@@ -375,7 +367,8 @@ var VideoScreen = function VideoScreen(_ref) {
375
367
  height: height,
376
368
  resolution: resolution,
377
369
  playing: backgroundPlaying,
378
- shouldLoad: mediaShouldLoad
370
+ shouldLoad: mediaShouldLoad,
371
+ withoutVideo: isPreview
379
372
  }) : null, /*#__PURE__*/React.createElement(Container, {
380
373
  width: width,
381
374
  height: height
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
- transitions = _ref.transitions,
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)) : 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
@@ -395,7 +387,8 @@ var VideoScreen = function VideoScreen(_ref) {
395
387
  height: height,
396
388
  resolution: resolution,
397
389
  playing: backgroundPlaying,
398
- shouldLoad: mediaShouldLoad
390
+ shouldLoad: mediaShouldLoad,
391
+ withoutVideo: isPreview
399
392
  }) : null, /*#__PURE__*/React__default["default"].createElement(Container__default["default"], {
400
393
  width: width,
401
394
  height: height
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/screen-video",
3
- "version": "0.3.207",
3
+ "version": "0.3.211",
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.207",
54
- "@micromag/element-background": "^0.3.207",
55
- "@micromag/element-call-to-action": "^0.3.207",
56
- "@micromag/element-closed-captions": "^0.3.207",
57
- "@micromag/element-container": "^0.3.207",
58
- "@micromag/element-image": "^0.3.207",
59
- "@micromag/element-media-controls": "^0.3.207",
60
- "@micromag/element-video": "^0.3.207",
61
- "@micromag/transforms": "^0.3.207",
53
+ "@micromag/core": "^0.3.211",
54
+ "@micromag/element-background": "^0.3.211",
55
+ "@micromag/element-call-to-action": "^0.3.211",
56
+ "@micromag/element-closed-captions": "^0.3.211",
57
+ "@micromag/element-container": "^0.3.211",
58
+ "@micromag/element-image": "^0.3.211",
59
+ "@micromag/element-media-controls": "^0.3.211",
60
+ "@micromag/element-video": "^0.3.211",
61
+ "@micromag/transforms": "^0.3.211",
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": "e7e2958bb7e9e222cc8621b44a90f1e974dd93b6"
71
+ "gitHead": "2eebe38f4253de953042e9ccf1afe593c824e8e0"
72
72
  }