@desynova-digital/player 3.11.4 → 3.11.6
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/Player.js
CHANGED
|
@@ -223,8 +223,12 @@ var Player = /*#__PURE__*/function (_Component) {
|
|
|
223
223
|
}
|
|
224
224
|
}, {
|
|
225
225
|
key: "componentDidUpdate",
|
|
226
|
-
value: function componentDidUpdate() {
|
|
226
|
+
value: function componentDidUpdate(prevProps, prevState) {
|
|
227
|
+
var playerType = this.props.playerType;
|
|
227
228
|
this.handleResize();
|
|
229
|
+
if (playerType !== prevProps.playerType) {
|
|
230
|
+
this.actions.handleZoomChange(0);
|
|
231
|
+
}
|
|
228
232
|
}
|
|
229
233
|
}, {
|
|
230
234
|
key: "componentWillUnmount",
|
|
@@ -116,12 +116,7 @@ var PointersBar = /*#__PURE__*/function (_Component) {
|
|
|
116
116
|
zoom = _this$props2.zoom;
|
|
117
117
|
var left = leftMarker / player.duration * 100;
|
|
118
118
|
var right = rightMarker / player.duration * 100;
|
|
119
|
-
var width =
|
|
120
|
-
if (zoom > 0) {
|
|
121
|
-
width = right - left * zoom * 20;
|
|
122
|
-
} else {
|
|
123
|
-
width = right - left;
|
|
124
|
-
}
|
|
119
|
+
var width = right - left;
|
|
125
120
|
var style = {
|
|
126
121
|
left: "".concat(left, "%"),
|
|
127
122
|
position: 'absolute',
|
|
@@ -195,7 +190,6 @@ var PointersBar = /*#__PURE__*/function (_Component) {
|
|
|
195
190
|
} else {
|
|
196
191
|
width = document.getElementById('seekbar-control-block').clientWidth.toFixed(0) + 'px';
|
|
197
192
|
}
|
|
198
|
-
console.log('POINTERBARWID', width);
|
|
199
193
|
this.setState({
|
|
200
194
|
zoom: zoom,
|
|
201
195
|
width: width
|
|
@@ -229,7 +223,6 @@ var PointersBar = /*#__PURE__*/function (_Component) {
|
|
|
229
223
|
key: "".concat(marker_obj.name, "-key-tags-block")
|
|
230
224
|
}, marker_obj && marker_obj.values && marker_obj.values.length ? marker_obj.values.map(function (marker, index) {
|
|
231
225
|
var style = self.getPointerStyle(marker.start_time, marker.end_time, index);
|
|
232
|
-
// console.log('styless', style);
|
|
233
226
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
234
227
|
className: "marker-blocks",
|
|
235
228
|
onClick: function onClick(e) {
|
|
@@ -53,17 +53,15 @@ var ZoomMenuButton = /*#__PURE__*/function (_Component) {
|
|
|
53
53
|
_createClass(ZoomMenuButton, [{
|
|
54
54
|
key: "handleClick",
|
|
55
55
|
value: function handleClick() {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
actions = _this$props.actions;
|
|
59
|
-
actions.mute(!player.muted);
|
|
56
|
+
// const { player, actions } = this.props;
|
|
57
|
+
// actions.mute(!player.muted);
|
|
60
58
|
}
|
|
61
59
|
}, {
|
|
62
60
|
key: "render",
|
|
63
61
|
value: function render() {
|
|
64
|
-
var _this$
|
|
65
|
-
style = _this$
|
|
66
|
-
playerType = _this$
|
|
62
|
+
var _this$props = this.props,
|
|
63
|
+
style = _this$props.style,
|
|
64
|
+
playerType = _this$props.playerType;
|
|
67
65
|
var vertical = false;
|
|
68
66
|
return playerType === 'subtitle' && /*#__PURE__*/_react["default"].createElement(ZoomMenu, {
|
|
69
67
|
style: style
|
|
@@ -158,7 +158,6 @@ var SeekBar = /*#__PURE__*/function (_Component) {
|
|
|
158
158
|
var actions = this.props.actions;
|
|
159
159
|
var newTime = this.getNewTime(event);
|
|
160
160
|
// Set new time (tell video to seek to new time)
|
|
161
|
-
console.log('ppp', event, newTime);
|
|
162
161
|
actions.seek(newTime);
|
|
163
162
|
actions.handleEndSeeking(newTime);
|
|
164
163
|
this.setState({
|
|
@@ -203,7 +202,6 @@ var SeekBar = /*#__PURE__*/function (_Component) {
|
|
|
203
202
|
assetType = _this$props3.assetType,
|
|
204
203
|
zoom = _this$props3.zoom;
|
|
205
204
|
var time = seekingTime || currentTime;
|
|
206
|
-
console.log('ages', (this.getPercent() * 100).toFixed(2));
|
|
207
205
|
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
208
206
|
id: "seekbarss"
|
|
209
207
|
}, /*#__PURE__*/_react["default"].createElement(_MarkerBar["default"], _extends({}, this.props, {
|
|
@@ -74,7 +74,6 @@ var Timeline = /*#__PURE__*/function (_Component) {
|
|
|
74
74
|
} else {
|
|
75
75
|
sliderWidth = document.getElementById('seekbar-control-block').clientWidth.toFixed(0);
|
|
76
76
|
}
|
|
77
|
-
console.log('sliderwidth generatetimeline', sliderWidth, zoomFactor); //1200
|
|
78
77
|
var timeBlocks = parseInt(sliderWidth / perTimeWidth, 10);
|
|
79
78
|
var timeDistance = parseInt(player.duration / timeBlocks, 10);
|
|
80
79
|
var timeArray = [0];
|