@micromag/core 0.3.307 → 0.3.311

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/contexts.js CHANGED
@@ -868,6 +868,7 @@ var defaultControlsThemeValue = {
868
868
  };
869
869
  var defaultValue$1 = {
870
870
  playing: false,
871
+ paused: false,
871
872
  muted: true,
872
873
  controls: false,
873
874
  controlsVisible: false,
@@ -917,7 +918,8 @@ var propTypes$7 = {
917
918
  progressColor: PropTypes.any
918
919
  }),
919
920
  muted: PropTypes.bool,
920
- playing: PropTypes.bool
921
+ playing: PropTypes.bool,
922
+ paused: PropTypes.bool
921
923
  };
922
924
 
923
925
  var defaultProps$7 = _objectSpread({}, defaultValue$1);
@@ -925,6 +927,7 @@ var defaultProps$7 = _objectSpread({}, defaultValue$1);
925
927
  var PlaybackProvider = function PlaybackProvider(_ref) {
926
928
  var initialMuted = _ref.muted,
927
929
  initialPlaying = _ref.playing,
930
+ paused = _ref.paused,
928
931
  initialControls = _ref.controls,
929
932
  initialControlsVisible = _ref.controlsVisible,
930
933
  initialControlsTheme = _ref.controlsTheme,
@@ -996,7 +999,7 @@ var PlaybackProvider = function PlaybackProvider(_ref) {
996
999
  var value = useMemo(function () {
997
1000
  return {
998
1001
  muted: muted,
999
- playing: playing,
1002
+ playing: playing && !paused,
1000
1003
  controls: controls,
1001
1004
  controlsVisible: controlsVisible,
1002
1005
  media: media,
@@ -1011,7 +1014,7 @@ var PlaybackProvider = function PlaybackProvider(_ref) {
1011
1014
  hideControls: hideControls,
1012
1015
  setMedia: setMedia
1013
1016
  };
1014
- }, [muted, playing, controls, controlsVisible, controlsTheme, media, hasAudio, setMuted, setPlaying, finalSetControls, finalSetControlsTheme, setControlsVisible, setControlsTheme, showControls, hideControls, setMedia]);
1017
+ }, [muted, playing, paused, controls, controlsVisible, controlsTheme, media, hasAudio, setMuted, setPlaying, finalSetControls, finalSetControlsTheme, setControlsVisible, setControlsTheme, showControls, hideControls, setMedia]);
1015
1018
  return /*#__PURE__*/React.createElement(PlaybackContext.Provider, {
1016
1019
  value: value
1017
1020
  }, children);
package/lib/contexts.js CHANGED
@@ -903,6 +903,7 @@ var defaultControlsThemeValue = {
903
903
  };
904
904
  var defaultValue$1 = {
905
905
  playing: false,
906
+ paused: false,
906
907
  muted: true,
907
908
  controls: false,
908
909
  controlsVisible: false,
@@ -952,7 +953,8 @@ var propTypes$7 = {
952
953
  progressColor: PropTypes__default["default"].any
953
954
  }),
954
955
  muted: PropTypes__default["default"].bool,
955
- playing: PropTypes__default["default"].bool
956
+ playing: PropTypes__default["default"].bool,
957
+ paused: PropTypes__default["default"].bool
956
958
  };
957
959
 
958
960
  var defaultProps$7 = _objectSpread__default["default"]({}, defaultValue$1);
@@ -960,6 +962,7 @@ var defaultProps$7 = _objectSpread__default["default"]({}, defaultValue$1);
960
962
  var PlaybackProvider = function PlaybackProvider(_ref) {
961
963
  var initialMuted = _ref.muted,
962
964
  initialPlaying = _ref.playing,
965
+ paused = _ref.paused,
963
966
  initialControls = _ref.controls,
964
967
  initialControlsVisible = _ref.controlsVisible,
965
968
  initialControlsTheme = _ref.controlsTheme,
@@ -1031,7 +1034,7 @@ var PlaybackProvider = function PlaybackProvider(_ref) {
1031
1034
  var value = React.useMemo(function () {
1032
1035
  return {
1033
1036
  muted: muted,
1034
- playing: playing,
1037
+ playing: playing && !paused,
1035
1038
  controls: controls,
1036
1039
  controlsVisible: controlsVisible,
1037
1040
  media: media,
@@ -1046,7 +1049,7 @@ var PlaybackProvider = function PlaybackProvider(_ref) {
1046
1049
  hideControls: hideControls,
1047
1050
  setMedia: setMedia
1048
1051
  };
1049
- }, [muted, playing, controls, controlsVisible, controlsTheme, media, hasAudio, setMuted, setPlaying, finalSetControls, finalSetControlsTheme, setControlsVisible, setControlsTheme, showControls, hideControls, setMedia]);
1052
+ }, [muted, playing, paused, controls, controlsVisible, controlsTheme, media, hasAudio, setMuted, setPlaying, finalSetControls, finalSetControlsTheme, setControlsVisible, setControlsTheme, showControls, hideControls, setMedia]);
1050
1053
  return /*#__PURE__*/React__default["default"].createElement(PlaybackContext.Provider, {
1051
1054
  value: value
1052
1055
  }, children);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/core",
3
- "version": "0.3.307",
3
+ "version": "0.3.311",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "javascript"
@@ -133,5 +133,5 @@
133
133
  "publishConfig": {
134
134
  "access": "public"
135
135
  },
136
- "gitHead": "cdc815b7aebe1b9ae8741e1956e21780def64caf"
136
+ "gitHead": "fab297a7ad204611597c749b969f14d992d35d47"
137
137
  }