@micromag/screen-video-360 0.3.459 → 0.3.461
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 +9 -0
- package/lib/index.js +9 -0
- package/package.json +11 -11
package/es/index.js
CHANGED
|
@@ -161,6 +161,7 @@ var Video360Screen = function Video360Screen(_ref) {
|
|
|
161
161
|
muted = _usePlaybackContext.muted,
|
|
162
162
|
setControls = _usePlaybackContext.setControls,
|
|
163
163
|
setControlsTheme = _usePlaybackContext.setControlsTheme,
|
|
164
|
+
setControlsSuggestPlay = _usePlaybackContext.setControlsSuggestPlay,
|
|
164
165
|
setMedia = _usePlaybackContext.setMedia,
|
|
165
166
|
setPlaying = _usePlaybackContext.setPlaying,
|
|
166
167
|
showControls = _usePlaybackContext.showControls,
|
|
@@ -495,6 +496,12 @@ var Video360Screen = function Video360Screen(_ref) {
|
|
|
495
496
|
}
|
|
496
497
|
pointerDown.current = false;
|
|
497
498
|
}, [gotoPreviousScreen, gotoNextScreen, landscape]);
|
|
499
|
+
var onPlayError = useCallback(function () {
|
|
500
|
+
if (isView && playing && current && hasVideoUrl && autoPlay) {
|
|
501
|
+
setPlaying(false);
|
|
502
|
+
setControlsSuggestPlay(true);
|
|
503
|
+
}
|
|
504
|
+
}, [isView, current, playing, hasVideoUrl, autoPlay, setPlaying, setControlsSuggestPlay]);
|
|
498
505
|
return /*#__PURE__*/React.createElement("div", {
|
|
499
506
|
className: classNames([styles.container, _defineProperty(_defineProperty({}, className, className !== null), styles.showVideo, isPreview || isStatic || isCapture)]),
|
|
500
507
|
"data-screen-ready": (isStatic || isCapture) && posterReady || ready
|
|
@@ -526,6 +533,8 @@ var Video360Screen = function Video360Screen(_ref) {
|
|
|
526
533
|
onSeeked: onSeeked,
|
|
527
534
|
onEnded: onEnded,
|
|
528
535
|
onPosterLoaded: onPosterLoaded,
|
|
536
|
+
onPlayError: onPlayError,
|
|
537
|
+
setPlaying: setPlaying,
|
|
529
538
|
focusable: current && isView,
|
|
530
539
|
shouldLoad: mediaShouldLoad
|
|
531
540
|
}))) : null, /*#__PURE__*/React.createElement("div", {
|
package/lib/index.js
CHANGED
|
@@ -165,6 +165,7 @@ var Video360Screen = function Video360Screen(_ref) {
|
|
|
165
165
|
muted = _usePlaybackContext.muted,
|
|
166
166
|
setControls = _usePlaybackContext.setControls,
|
|
167
167
|
setControlsTheme = _usePlaybackContext.setControlsTheme,
|
|
168
|
+
setControlsSuggestPlay = _usePlaybackContext.setControlsSuggestPlay,
|
|
168
169
|
setMedia = _usePlaybackContext.setMedia,
|
|
169
170
|
setPlaying = _usePlaybackContext.setPlaying,
|
|
170
171
|
showControls = _usePlaybackContext.showControls,
|
|
@@ -499,6 +500,12 @@ var Video360Screen = function Video360Screen(_ref) {
|
|
|
499
500
|
}
|
|
500
501
|
pointerDown.current = false;
|
|
501
502
|
}, [gotoPreviousScreen, gotoNextScreen, landscape]);
|
|
503
|
+
var onPlayError = React.useCallback(function () {
|
|
504
|
+
if (isView && playing && current && hasVideoUrl && autoPlay) {
|
|
505
|
+
setPlaying(false);
|
|
506
|
+
setControlsSuggestPlay(true);
|
|
507
|
+
}
|
|
508
|
+
}, [isView, current, playing, hasVideoUrl, autoPlay, setPlaying, setControlsSuggestPlay]);
|
|
502
509
|
return /*#__PURE__*/React.createElement("div", {
|
|
503
510
|
className: classNames([styles.container, _defineProperty(_defineProperty({}, className, className !== null), styles.showVideo, isPreview || isStatic || isCapture)]),
|
|
504
511
|
"data-screen-ready": (isStatic || isCapture) && posterReady || ready
|
|
@@ -530,6 +537,8 @@ var Video360Screen = function Video360Screen(_ref) {
|
|
|
530
537
|
onSeeked: onSeeked,
|
|
531
538
|
onEnded: onEnded,
|
|
532
539
|
onPosterLoaded: onPosterLoaded,
|
|
540
|
+
onPlayError: onPlayError,
|
|
541
|
+
setPlaying: setPlaying,
|
|
533
542
|
focusable: current && isView,
|
|
534
543
|
shouldLoad: mediaShouldLoad
|
|
535
544
|
}))) : null, /*#__PURE__*/React.createElement("div", {
|
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.461",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -60,15 +60,15 @@
|
|
|
60
60
|
"dependencies": {
|
|
61
61
|
"@babel/runtime": "^7.13.10",
|
|
62
62
|
"@folklore/size": "^0.1.20",
|
|
63
|
-
"@micromag/core": "^0.3.
|
|
64
|
-
"@micromag/element-background": "^0.3.
|
|
65
|
-
"@micromag/element-closed-captions": "^0.3.
|
|
66
|
-
"@micromag/element-container": "^0.3.
|
|
67
|
-
"@micromag/element-footer": "^0.3.
|
|
68
|
-
"@micromag/element-header": "^0.3.
|
|
69
|
-
"@micromag/element-image": "^0.3.
|
|
70
|
-
"@micromag/element-video": "^0.3.
|
|
71
|
-
"@micromag/transforms": "^0.3.
|
|
63
|
+
"@micromag/core": "^0.3.460",
|
|
64
|
+
"@micromag/element-background": "^0.3.460",
|
|
65
|
+
"@micromag/element-closed-captions": "^0.3.460",
|
|
66
|
+
"@micromag/element-container": "^0.3.460",
|
|
67
|
+
"@micromag/element-footer": "^0.3.460",
|
|
68
|
+
"@micromag/element-header": "^0.3.460",
|
|
69
|
+
"@micromag/element-image": "^0.3.460",
|
|
70
|
+
"@micromag/element-video": "^0.3.460",
|
|
71
|
+
"@micromag/transforms": "^0.3.460",
|
|
72
72
|
"classnames": "^2.2.6",
|
|
73
73
|
"lodash": "^4.17.21",
|
|
74
74
|
"prop-types": "^15.7.2",
|
|
@@ -81,5 +81,5 @@
|
|
|
81
81
|
"access": "public",
|
|
82
82
|
"registry": "https://registry.npmjs.org/"
|
|
83
83
|
},
|
|
84
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "4272b6ced198a1a689fcfcb9682a584d55d6780c"
|
|
85
85
|
}
|