@micromag/viewer 0.3.582 → 0.3.583
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 +6 -3
- package/package.json +10 -10
package/es/index.js
CHANGED
|
@@ -17,7 +17,7 @@ import { Helmet } from 'react-helmet';
|
|
|
17
17
|
import { useIntl, FormattedMessage } from 'react-intl';
|
|
18
18
|
import EventEmitter from 'wolfy87-eventemitter';
|
|
19
19
|
import { Label, CloseIcon, ScreenPreview, Screen, ArrowIcon, Button as Button$1, PlayIcon, Spinner, UnmuteIcon, MuteIcon, PauseIcon, Meta, FontFaces } from '@micromag/core/components';
|
|
20
|
-
import { useDimensionObserver, useTrackEvent, useDragProgress, useMediaProgress, useMediaReady, useMediaState, useParsedStory, useLoadedFonts, useTrackScreenView, useScreenSizeFromElement, useFullscreen } from '@micromag/core/hooks';
|
|
20
|
+
import { useDimensionObserver, useTrackEvent, useDragProgress, useMediaProgress, useMediaTimestampOffset, useMediaReady, useMediaState, useParsedStory, useLoadedFonts, useTrackScreenView, useScreenSizeFromElement, useFullscreen } from '@micromag/core/hooks';
|
|
21
21
|
import { getStyleFromColor, easings, getStyleFromText, getColorAsString, getDeviceScreens } from '@micromag/core/utils';
|
|
22
22
|
import { ShareIncentive } from '@micromag/elements/all';
|
|
23
23
|
import FocusLock from 'react-focus-lock';
|
|
@@ -2029,13 +2029,16 @@ var SeekBar = function SeekBar(_ref3) {
|
|
|
2029
2029
|
});
|
|
2030
2030
|
var _ref4 = media || {},
|
|
2031
2031
|
_ref4$currentTime = _ref4.currentTime,
|
|
2032
|
-
|
|
2032
|
+
originalCurrentTime = _ref4$currentTime === void 0 ? null : _ref4$currentTime,
|
|
2033
2033
|
_ref4$duration = _ref4.duration,
|
|
2034
|
-
|
|
2034
|
+
originalDuration = _ref4$duration === void 0 ? null : _ref4$duration;
|
|
2035
2035
|
var _useState = useState(false),
|
|
2036
2036
|
_useState2 = _slicedToArray(_useState, 2),
|
|
2037
2037
|
showTimestamp = _useState2[0],
|
|
2038
2038
|
setShowTimestamp = _useState2[1];
|
|
2039
|
+
var mediaTimestampOffset = useMediaTimestampOffset(media);
|
|
2040
|
+
var currentTime = originalCurrentTime + mediaTimestampOffset;
|
|
2041
|
+
var duration = originalDuration + mediaTimestampOffset;
|
|
2039
2042
|
var startProgressRef = useRef(progress);
|
|
2040
2043
|
var onDrag = useCallback(
|
|
2041
2044
|
// eslint-disable-next-line no-unused-vars
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/viewer",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.583",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -64,14 +64,14 @@
|
|
|
64
64
|
"dependencies": {
|
|
65
65
|
"@babel/runtime": "^7.13.10",
|
|
66
66
|
"@folklore/routes": "^0.2.27",
|
|
67
|
-
"@micromag/core": "^0.3.
|
|
68
|
-
"@micromag/element-badge": "^0.3.
|
|
69
|
-
"@micromag/element-scroll": "^0.3.
|
|
70
|
-
"@micromag/element-share-options": "^0.3.
|
|
71
|
-
"@micromag/element-webview": "^0.3.
|
|
72
|
-
"@micromag/elements": "^0.3.
|
|
73
|
-
"@micromag/intl": "^0.3.
|
|
74
|
-
"@micromag/screens": "^0.3.
|
|
67
|
+
"@micromag/core": "^0.3.583",
|
|
68
|
+
"@micromag/element-badge": "^0.3.583",
|
|
69
|
+
"@micromag/element-scroll": "^0.3.583",
|
|
70
|
+
"@micromag/element-share-options": "^0.3.583",
|
|
71
|
+
"@micromag/element-webview": "^0.3.583",
|
|
72
|
+
"@micromag/elements": "^0.3.583",
|
|
73
|
+
"@micromag/intl": "^0.3.583",
|
|
74
|
+
"@micromag/screens": "^0.3.583",
|
|
75
75
|
"@react-spring/core": "^9.6.1",
|
|
76
76
|
"@react-spring/web": "^9.6.1",
|
|
77
77
|
"@use-gesture/react": "^10.3.0",
|
|
@@ -91,5 +91,5 @@
|
|
|
91
91
|
"access": "public",
|
|
92
92
|
"registry": "https://registry.npmjs.org/"
|
|
93
93
|
},
|
|
94
|
-
"gitHead": "
|
|
94
|
+
"gitHead": "d899cc28ac1f5b552114d8bfcd668a9bb8ab651c"
|
|
95
95
|
}
|