@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.
- package/components/Video.js +14 -7
- package/package.json +1 -1
package/components/Video.js
CHANGED
|
@@ -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
|
|
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
|
|
138
|
-
var
|
|
139
|
-
|
|
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
|
|
142
|
-
|
|
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) {
|