@micromag/screen-video 0.3.456 → 0.3.460

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 CHANGED
@@ -104,6 +104,7 @@ var VideoScreen = function VideoScreen(_ref) {
104
104
  playing = _usePlaybackContext.playing,
105
105
  muted = _usePlaybackContext.muted,
106
106
  setControls = _usePlaybackContext.setControls,
107
+ setControlsSuggestPlay = _usePlaybackContext.setControlsSuggestPlay,
107
108
  setControlsTheme = _usePlaybackContext.setControlsTheme,
108
109
  setPlaying = _usePlaybackContext.setPlaying,
109
110
  controlsVisible = _usePlaybackContext.controlsVisible,
@@ -258,6 +259,12 @@ var VideoScreen = function VideoScreen(_ref) {
258
259
  setPlaying(false);
259
260
  }
260
261
  }, [current, playing, setPlaying]);
262
+ var onPlayError = useCallback(function () {
263
+ if (isView && playing && current && hasVideoUrl) {
264
+ setPlaying(false);
265
+ setControlsSuggestPlay(true);
266
+ }
267
+ }, [isView, current, playing, hasVideoUrl, setPlaying, setControlsSuggestPlay]);
261
268
  return /*#__PURE__*/React.createElement("div", {
262
269
  className: classNames([styles.container, _defineProperty(_defineProperty({}, className, className !== null), styles.fullscreen, fullscreen)]),
263
270
  "data-screen-ready": isStatic || isCapture || ready
@@ -329,6 +336,7 @@ var VideoScreen = function VideoScreen(_ref) {
329
336
  onSeeked: onSeeked,
330
337
  onEnded: onEnded,
331
338
  onSuspended: onSuspended,
339
+ onPlayError: onPlayError,
332
340
  focusable: current && isView,
333
341
  shouldLoad: mediaShouldLoad
334
342
  }))) : null), !isPlaceholder ? /*#__PURE__*/React.createElement("div", {
package/lib/index.js CHANGED
@@ -108,6 +108,7 @@ var VideoScreen = function VideoScreen(_ref) {
108
108
  playing = _usePlaybackContext.playing,
109
109
  muted = _usePlaybackContext.muted,
110
110
  setControls = _usePlaybackContext.setControls,
111
+ setControlsSuggestPlay = _usePlaybackContext.setControlsSuggestPlay,
111
112
  setControlsTheme = _usePlaybackContext.setControlsTheme,
112
113
  setPlaying = _usePlaybackContext.setPlaying,
113
114
  controlsVisible = _usePlaybackContext.controlsVisible,
@@ -262,6 +263,12 @@ var VideoScreen = function VideoScreen(_ref) {
262
263
  setPlaying(false);
263
264
  }
264
265
  }, [current, playing, setPlaying]);
266
+ var onPlayError = React.useCallback(function () {
267
+ if (isView && playing && current && hasVideoUrl) {
268
+ setPlaying(false);
269
+ setControlsSuggestPlay(true);
270
+ }
271
+ }, [isView, current, playing, hasVideoUrl, setPlaying, setControlsSuggestPlay]);
265
272
  return /*#__PURE__*/React.createElement("div", {
266
273
  className: classNames([styles.container, _defineProperty(_defineProperty({}, className, className !== null), styles.fullscreen, fullscreen)]),
267
274
  "data-screen-ready": isStatic || isCapture || ready
@@ -333,6 +340,7 @@ var VideoScreen = function VideoScreen(_ref) {
333
340
  onSeeked: onSeeked,
334
341
  onEnded: onEnded,
335
342
  onSuspended: onSuspended,
343
+ onPlayError: onPlayError,
336
344
  focusable: current && isView,
337
345
  shouldLoad: mediaShouldLoad
338
346
  }))) : null), !isPlaceholder ? /*#__PURE__*/React.createElement("div", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/screen-video",
3
- "version": "0.3.456",
3
+ "version": "0.3.460",
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.456",
64
- "@micromag/element-background": "^0.3.456",
65
- "@micromag/element-closed-captions": "^0.3.456",
66
- "@micromag/element-container": "^0.3.456",
67
- "@micromag/element-footer": "^0.3.456",
68
- "@micromag/element-header": "^0.3.456",
69
- "@micromag/element-image": "^0.3.456",
70
- "@micromag/element-video": "^0.3.456",
71
- "@micromag/transforms": "^0.3.456",
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",
@@ -79,5 +79,5 @@
79
79
  "access": "public",
80
80
  "registry": "https://registry.npmjs.org/"
81
81
  },
82
- "gitHead": "d834231cf9fc7feb8ba37476c4a44f9a79beaca2"
82
+ "gitHead": "7e5a6ed3d80be59cdd74716781b467be88a4ccc6"
83
83
  }