@desynova-digital/player 4.0.72 → 4.0.73

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.
@@ -130,16 +130,23 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
130
130
  _defineProperty(_this, "onVideoTimeUpdate", function () {
131
131
  _this.updateAnnotateVisibility();
132
132
  });
133
- _defineProperty(_this, "buildSmoothPath", function (points) {
133
+ _defineProperty(_this, "buildSmoothPath", function (points, width, height) {
134
134
  if (!points || points.length < 2) return '';
135
- var path = "M ".concat(points[0].x, " ").concat(points[0].y);
135
+ var startX = points[0].x * width;
136
+ var startY = points[0].y * height;
137
+ var path = "M ".concat(startX, " ").concat(startY);
136
138
  for (var i = 1; i < points.length - 1; i++) {
137
- var midX = (points[i].x + points[i + 1].x) / 2;
138
- var midY = (points[i].y + points[i + 1].y) / 2;
139
- path += " Q ".concat(points[i].x, " ").concat(points[i].y, " ").concat(midX, " ").concat(midY);
139
+ var currX = points[i].x * width;
140
+ var currY = points[i].y * height;
141
+ var nextX = points[i + 1].x * width;
142
+ var nextY = points[i + 1].y * height;
143
+ var midX = (currX + nextX) / 2;
144
+ var midY = (currY + nextY) / 2;
145
+ path += " Q ".concat(currX, " ").concat(currY, " ").concat(midX, " ").concat(midY);
140
146
  }
141
- var last = points[points.length - 1];
142
- path += " L ".concat(last.x, " ").concat(last.y);
147
+ var lastX = points[points.length - 1].x * width;
148
+ var lastY = points[points.length - 1].y * height;
149
+ path += " L ".concat(lastX, " ").concat(lastY);
143
150
  return path;
144
151
  });
145
152
  _defineProperty(_this, "getTimeData", function (time) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@desynova-digital/player",
3
- "version": "4.0.72",
3
+ "version": "4.0.73",
4
4
  "description": "Video Player Package for Contido Application",
5
5
  "main": "index.js",
6
6
  "scripts": {