@micromag/element-audio 0.3.610 → 0.3.612

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.
Files changed (2) hide show
  1. package/es/index.js +2 -1
  2. package/package.json +4 -4
package/es/index.js CHANGED
@@ -413,6 +413,7 @@ var Audio$1 = /*#__PURE__*/React.forwardRef(function (props, ref) {
413
413
 
414
414
  var styles = {"container":"micromag-element-audio-audio-wave-container","button":"micromag-element-audio-audio-wave-button","canvasBackground":"micromag-element-audio-audio-wave-canvasBackground","canvasProgress":"micromag-element-audio-audio-wave-canvasProgress"};
415
415
 
416
+ var devicePixelRatio = typeof window !== 'undefined' ? window.devicePixelRatio || 1 : 1;
416
417
  var propTypes = {
417
418
  currentTime: PropTypes.number,
418
419
  duration: PropTypes.number,
@@ -561,7 +562,7 @@ function AudioWave(_ref) {
561
562
  // draw samples
562
563
  var canvasBg = canvasBackgroundRef.current;
563
564
  var canvasProgress = canvasProgressRef.current;
564
- var scale = typeof window !== 'undefined' ? window.devicePixelRatio : 1;
565
+ var scale = devicePixelRatio;
565
566
  canvasBg.width = canvasProgress.width = Math.floor(elWidth * scale);
566
567
  canvasBg.height = canvasProgress.height = Math.floor(elHeight * scale);
567
568
  var ctxBG = canvasBg.getContext('2d');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/element-audio",
3
- "version": "0.3.610",
3
+ "version": "0.3.612",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [
@@ -59,8 +59,8 @@
59
59
  },
60
60
  "dependencies": {
61
61
  "@babel/runtime": "^7.13.10",
62
- "@micromag/core": "^0.3.610",
63
- "@micromag/element-closed-captions": "^0.3.610",
62
+ "@micromag/core": "^0.3.612",
63
+ "@micromag/element-closed-captions": "^0.3.612",
64
64
  "@react-spring/core": "^9.6.1",
65
65
  "@react-spring/web": "^9.6.1",
66
66
  "@use-gesture/react": "^10.3.0",
@@ -74,5 +74,5 @@
74
74
  "access": "public",
75
75
  "registry": "https://registry.npmjs.org/"
76
76
  },
77
- "gitHead": "7a002b920dc02d8daa6dfd6aedc1a97951a8e939"
77
+ "gitHead": "55b1d024f723af656930754d33977c31f6832cf2"
78
78
  }