@micromag/screen-video-360 0.3.161 → 0.3.166
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 +3 -3
- package/lib/index.js +2 -2
- package/package.json +11 -11
package/es/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import React, { useState, useEffect, useRef, useCallback } from 'react';
|
|
|
9
9
|
import 'whatwg-fetch';
|
|
10
10
|
import { PropTypes as PropTypes$1 } from '@micromag/core';
|
|
11
11
|
import { ScreenElement, PlaceholderVideo360, Transitions } from '@micromag/core/components';
|
|
12
|
-
import { useViewerInteraction, useViewerNavigation, useViewerContext, useScreenSize, useScreenRenderContext, useViewerWebView, usePlaybackContext } from '@micromag/core/contexts';
|
|
12
|
+
import { useViewerInteraction, useViewerNavigation, useViewerContext, useScreenSize, useScreenRenderContext, useViewerWebView, usePlaybackContext, useViewerContainer } from '@micromag/core/contexts';
|
|
13
13
|
import { useTrackScreenEvent, useTrackScreenMedia, useActivityDetector, useAnimationFrame } from '@micromag/core/hooks';
|
|
14
14
|
import Background from '@micromag/element-background';
|
|
15
15
|
import CallToAction from '@micromag/element-call-to-action';
|
|
@@ -227,12 +227,13 @@ var Video360Screen = function Video360Screen(_ref) {
|
|
|
227
227
|
setPlaying(true);
|
|
228
228
|
}
|
|
229
229
|
}, [current, autoPlay]);
|
|
230
|
+
var viewerContainer = useViewerContainer();
|
|
230
231
|
|
|
231
232
|
var _useActivityDetector = useActivityDetector({
|
|
233
|
+
element: viewerContainer,
|
|
232
234
|
disabled: !current || !isView,
|
|
233
235
|
timeout: 2000
|
|
234
236
|
}),
|
|
235
|
-
activityDetectorRef = _useActivityDetector.ref,
|
|
236
237
|
activityDetected = _useActivityDetector.detected;
|
|
237
238
|
|
|
238
239
|
useEffect(function () {
|
|
@@ -606,7 +607,6 @@ var Video360Screen = function Video360Screen(_ref) {
|
|
|
606
607
|
})) : null)) : null];
|
|
607
608
|
return /*#__PURE__*/React.createElement("div", {
|
|
608
609
|
className: classNames([styles.container, (_ref11 = {}, _defineProperty(_ref11, className, className !== null), _defineProperty(_ref11, styles.showVideo, isPreview || isStatic || isCapture), _ref11)]),
|
|
609
|
-
ref: activityDetectorRef,
|
|
610
610
|
"data-screen-ready": (isStatic || isCapture) && posterReady || ready
|
|
611
611
|
}, !isPlaceholder ? /*#__PURE__*/React.createElement(Background, {
|
|
612
612
|
background: background,
|
package/lib/index.js
CHANGED
|
@@ -265,12 +265,13 @@ var Video360Screen = function Video360Screen(_ref) {
|
|
|
265
265
|
setPlaying(true);
|
|
266
266
|
}
|
|
267
267
|
}, [current, autoPlay]);
|
|
268
|
+
var viewerContainer = contexts.useViewerContainer();
|
|
268
269
|
|
|
269
270
|
var _useActivityDetector = hooks.useActivityDetector({
|
|
271
|
+
element: viewerContainer,
|
|
270
272
|
disabled: !current || !isView,
|
|
271
273
|
timeout: 2000
|
|
272
274
|
}),
|
|
273
|
-
activityDetectorRef = _useActivityDetector.ref,
|
|
274
275
|
activityDetected = _useActivityDetector.detected;
|
|
275
276
|
|
|
276
277
|
React.useEffect(function () {
|
|
@@ -644,7 +645,6 @@ var Video360Screen = function Video360Screen(_ref) {
|
|
|
644
645
|
})) : null)) : null];
|
|
645
646
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
646
647
|
className: classNames__default["default"]([styles.container, (_ref11 = {}, _defineProperty__default["default"](_ref11, className, className !== null), _defineProperty__default["default"](_ref11, styles.showVideo, isPreview || isStatic || isCapture), _ref11)]),
|
|
647
|
-
ref: activityDetectorRef,
|
|
648
648
|
"data-screen-ready": (isStatic || isCapture) && posterReady || ready
|
|
649
649
|
}, !isPlaceholder ? /*#__PURE__*/React__default["default"].createElement(Background__default["default"], {
|
|
650
650
|
background: background,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/screen-video-360",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.166",
|
|
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.166",
|
|
54
|
+
"@micromag/element-background": "^0.3.166",
|
|
55
|
+
"@micromag/element-call-to-action": "^0.3.166",
|
|
56
|
+
"@micromag/element-closed-captions": "^0.3.166",
|
|
57
|
+
"@micromag/element-container": "^0.3.166",
|
|
58
|
+
"@micromag/element-image": "^0.3.166",
|
|
59
|
+
"@micromag/element-media-controls": "^0.3.166",
|
|
60
|
+
"@micromag/element-video": "^0.3.166",
|
|
61
|
+
"@micromag/transforms": "^0.3.166",
|
|
62
62
|
"classnames": "^2.2.6",
|
|
63
63
|
"lodash": "^4.17.21",
|
|
64
64
|
"prop-types": "^15.7.2",
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"publishConfig": {
|
|
71
71
|
"access": "public"
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "8e9777e36990e941b73a3cdb989e31872981de74"
|
|
74
74
|
}
|