@micromag/viewer 0.4.65 → 0.4.66
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 +10 -7
- package/package.json +10 -10
package/es/index.js
CHANGED
|
@@ -2233,12 +2233,15 @@ function PlaybackControls(_ref) {
|
|
|
2233
2233
|
});
|
|
2234
2234
|
}, [controlsTheme, setCustomControlsTheme, defaultColor, defaultProgressColor]);
|
|
2235
2235
|
var onPlay = useCallback(function () {
|
|
2236
|
-
|
|
2237
|
-
|
|
2236
|
+
if (wantedPlaying && !playing && mediaElement !== null) {
|
|
2237
|
+
mediaElement.play();
|
|
2238
|
+
} else {
|
|
2239
|
+
setPlaying(true);
|
|
2240
|
+
}
|
|
2238
2241
|
if (!controlsVisible && controls) {
|
|
2239
2242
|
showControls();
|
|
2240
2243
|
}
|
|
2241
|
-
}, [setPlaying, controlsVisible, showControls]);
|
|
2244
|
+
}, [setPlaying, controlsVisible, showControls, playing, wantedPlaying]);
|
|
2242
2245
|
var onPause = useCallback(function () {
|
|
2243
2246
|
// console.log('onPause');
|
|
2244
2247
|
setPlaying(false);
|
|
@@ -2292,7 +2295,7 @@ function PlaybackControls(_ref) {
|
|
|
2292
2295
|
seekBarOnly = _ref3.seekBarOnly;
|
|
2293
2296
|
var isCollapsed = controls && !controlsVisible && playing || !controls && mediaHasAudio;
|
|
2294
2297
|
var withSuggestPlay = controlsSuggestPlay && !finalShowLoading && !playing;
|
|
2295
|
-
var playIcon =
|
|
2298
|
+
var playIcon = playing ? /*#__PURE__*/jsx(PauseIcon, {
|
|
2296
2299
|
className: styles$1.icon,
|
|
2297
2300
|
color: "currentColor"
|
|
2298
2301
|
}) : /*#__PURE__*/jsx(PlayIcon, {
|
|
@@ -2326,13 +2329,13 @@ function PlaybackControls(_ref) {
|
|
|
2326
2329
|
style: {
|
|
2327
2330
|
color: color
|
|
2328
2331
|
},
|
|
2329
|
-
onClick:
|
|
2330
|
-
focusable: controls && controlsVisible && (!seekBarOnly || !
|
|
2332
|
+
onClick: playing ? onPause : onPlay,
|
|
2333
|
+
focusable: controls && controlsVisible && (!seekBarOnly || !playing),
|
|
2331
2334
|
disabled: finalShowLoading,
|
|
2332
2335
|
icon: finalShowLoading ? /*#__PURE__*/jsx(Spinner, {
|
|
2333
2336
|
className: classNames([styles$1.spinner, styles$1.offset])
|
|
2334
2337
|
}) : playIcon,
|
|
2335
|
-
"aria-pressed": !
|
|
2338
|
+
"aria-pressed": !playing,
|
|
2336
2339
|
"aria-label": finalShowLoading ? intl.formatMessage({
|
|
2337
2340
|
id: "YyYrXp",
|
|
2338
2341
|
defaultMessage: [{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/viewer",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.66",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -63,14 +63,14 @@
|
|
|
63
63
|
"dependencies": {
|
|
64
64
|
"@babel/runtime": "^7.28.6",
|
|
65
65
|
"@folklore/routes": "^0.2.36",
|
|
66
|
-
"@micromag/core": "^0.4.
|
|
67
|
-
"@micromag/element-badge": "^0.4.
|
|
68
|
-
"@micromag/element-scroll": "^0.4.
|
|
69
|
-
"@micromag/element-share-options": "^0.4.
|
|
70
|
-
"@micromag/element-webview": "^0.4.
|
|
71
|
-
"@micromag/elements": "^0.4.
|
|
72
|
-
"@micromag/intl": "^0.4.
|
|
73
|
-
"@micromag/screens": "^0.4.
|
|
66
|
+
"@micromag/core": "^0.4.66",
|
|
67
|
+
"@micromag/element-badge": "^0.4.66",
|
|
68
|
+
"@micromag/element-scroll": "^0.4.66",
|
|
69
|
+
"@micromag/element-share-options": "^0.4.66",
|
|
70
|
+
"@micromag/element-webview": "^0.4.66",
|
|
71
|
+
"@micromag/elements": "^0.4.66",
|
|
72
|
+
"@micromag/intl": "^0.4.66",
|
|
73
|
+
"@micromag/screens": "^0.4.66",
|
|
74
74
|
"@react-spring/core": "^10.0.3",
|
|
75
75
|
"@react-spring/web": "^10.0.3",
|
|
76
76
|
"@use-gesture/react": "^10.3.0",
|
|
@@ -89,6 +89,6 @@
|
|
|
89
89
|
"access": "public",
|
|
90
90
|
"registry": "https://registry.npmjs.org/"
|
|
91
91
|
},
|
|
92
|
-
"gitHead": "
|
|
92
|
+
"gitHead": "61e9d9511073041dc7900185d49a559126119450",
|
|
93
93
|
"types": "es/index.d.ts"
|
|
94
94
|
}
|