@desynova-digital/player 3.11.0 → 3.11.2
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.
|
@@ -239,12 +239,12 @@ var PointersBar = /*#__PURE__*/function (_Component) {
|
|
|
239
239
|
self.setTooltipData(e, _this3.getTitle(marker));
|
|
240
240
|
},
|
|
241
241
|
onMouseOut: function onMouseOut() {
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
//
|
|
247
|
-
|
|
242
|
+
var tooltip = _this3.state.tooltip;
|
|
243
|
+
tooltip.isVisible = false;
|
|
244
|
+
tooltip.text = null;
|
|
245
|
+
_this3.renderComp = 1;
|
|
246
|
+
// tooltip.left = null;
|
|
247
|
+
_this3.setState(_objectSpread({}, tooltip));
|
|
248
248
|
},
|
|
249
249
|
role: "button",
|
|
250
250
|
tabIndex: "-1",
|
|
@@ -181,7 +181,7 @@ var ControlBar = /*#__PURE__*/function (_Component) {
|
|
|
181
181
|
// {/* <CommentsButton {...this.props} key="comments-button" order={6.01} />, */}
|
|
182
182
|
_react["default"].createElement(_ZoomMenuButton["default"], _extends({
|
|
183
183
|
style: {
|
|
184
|
-
|
|
184
|
+
margin: 'auto 10px auto auto'
|
|
185
185
|
}
|
|
186
186
|
}, this.props, {
|
|
187
187
|
key: "zoom-menu-button",
|
|
@@ -38,8 +38,8 @@ var propTypes = {
|
|
|
38
38
|
playerType: _propTypes.PropTypes.oneOf(['dubbing_review', 'clipping_default', 'default', 'tagging', 'qc', 'subtitle', 'snp_edit', 'archive', 'restore', 'clipping', 'storyboard', 'panel'])
|
|
39
39
|
};
|
|
40
40
|
var defaultProps = {};
|
|
41
|
-
var ProgressControlBlock = _styledComponents["default"].div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n height: ", ";\n position: relative;\n overflow: ", ";\n padding-top: 0px;\n background: #000000;\n background: ", ";\n display: flex;\n justify-content: center;\n align-items: center;\n transition: all 250ms ease-in-out;\n bottom: ", ";\n\n .tags-block {\n position: relative;\n height: 20px;\n width: 100px;\n font-family: SFUIText-Medium;\n font-size: 10px;\n color: #ffffff;\n text-transform: uppercase;\n border-top: 1px solid #333333;\n border-bottom: 1px solid #333333;\n p {\n line-height: 18px;\n padding: 0 10px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n }\n
|
|
42
|
-
return props.controlType === 'advanced' && !props.isFullscreen ? '
|
|
41
|
+
var ProgressControlBlock = _styledComponents["default"].div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n height: ", ";\n position: relative;\n overflow: ", ";\n padding-top: 0px;\n background: #000000;\n background: ", ";\n display: flex;\n justify-content: center;\n align-items: center;\n transition: all 250ms ease-in-out;\n bottom: ", ";\n\n .tags-block {\n position: relative;\n height: 20px;\n width: 100px;\n font-family: SFUIText-Medium;\n font-size: 10px;\n color: #ffffff;\n text-transform: uppercase;\n border-top: 1px solid #333333;\n border-bottom: 1px solid #333333;\n top: 40px;\n p {\n line-height: 18px;\n padding: 0 10px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n }\n"])), function (props) {
|
|
42
|
+
return props.controlType === 'advanced' && !props.isFullscreen ? '' : '4px';
|
|
43
43
|
}, function (props) {
|
|
44
44
|
return props.controlType === 'advanced' && !props.isFullscreen ? 'none' : 'visible';
|
|
45
45
|
}, _colors["default"].common.base.black, function (props) {
|
|
@@ -69,7 +69,12 @@ var SeekBar = /*#__PURE__*/function (_Component) {
|
|
|
69
69
|
value: function componentDidMount() {}
|
|
70
70
|
}, {
|
|
71
71
|
key: "componentDidUpdate",
|
|
72
|
-
value: function componentDidUpdate() {
|
|
72
|
+
value: function componentDidUpdate(prevProps) {
|
|
73
|
+
var _prevProps$player, _this$props$player;
|
|
74
|
+
if (((_prevProps$player = prevProps.player) === null || _prevProps$player === void 0 ? void 0 : _prevProps$player.currentTime) !== ((_this$props$player = this.props.player) === null || _this$props$player === void 0 ? void 0 : _this$props$player.currentTime)) {
|
|
75
|
+
this.scrollToSeekbarMiddle();
|
|
76
|
+
}
|
|
77
|
+
}
|
|
73
78
|
|
|
74
79
|
/**
|
|
75
80
|
* Get percentage of video played
|
|
@@ -81,10 +86,10 @@ var SeekBar = /*#__PURE__*/function (_Component) {
|
|
|
81
86
|
key: "getPercent",
|
|
82
87
|
value: function getPercent() {
|
|
83
88
|
var _this$props = this.props,
|
|
84
|
-
_this$props$
|
|
85
|
-
currentTime = _this$props$
|
|
86
|
-
seekingTime = _this$props$
|
|
87
|
-
duration = _this$props$
|
|
89
|
+
_this$props$player2 = _this$props.player,
|
|
90
|
+
currentTime = _this$props$player2.currentTime,
|
|
91
|
+
seekingTime = _this$props$player2.seekingTime,
|
|
92
|
+
duration = _this$props$player2.duration,
|
|
88
93
|
zoom = _this$props.zoom;
|
|
89
94
|
var time = seekingTime || currentTime;
|
|
90
95
|
var percent = time / duration;
|
|
@@ -105,15 +110,20 @@ var SeekBar = /*#__PURE__*/function (_Component) {
|
|
|
105
110
|
}, {
|
|
106
111
|
key: "getNewTime",
|
|
107
112
|
value: function getNewTime(event) {
|
|
108
|
-
var
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
113
|
+
var _this$props2 = this.props,
|
|
114
|
+
duration = _this$props2.player.duration,
|
|
115
|
+
playerType = _this$props2.playerType;
|
|
116
|
+
var newTime;
|
|
117
|
+
if (playerType === 'default') {
|
|
118
|
+
var distance = this.slider.calculateDistance(event);
|
|
119
|
+
newTime = distance * duration;
|
|
120
|
+
} else {
|
|
121
|
+
var seekBar = document.getElementById('timeline-block');
|
|
122
|
+
var clickPosition = event.clientX - seekBar.getBoundingClientRect().left;
|
|
123
|
+
var data = this.getScrollableWidth(seekBar);
|
|
124
|
+
var seekPercentage = clickPosition / data;
|
|
125
|
+
newTime = duration * seekPercentage;
|
|
126
|
+
}
|
|
117
127
|
|
|
118
128
|
// Don't let video end while scrubbing.
|
|
119
129
|
return newTime === duration ? newTime - 0.1 : newTime;
|
|
@@ -129,7 +139,7 @@ var SeekBar = /*#__PURE__*/function (_Component) {
|
|
|
129
139
|
scrollWidth = scrollWidth - viewportWidth;
|
|
130
140
|
document.getElementsByClassName('timeline-content')[0].scrollTo({
|
|
131
141
|
left: scrollWidth,
|
|
132
|
-
behavior: '
|
|
142
|
+
behavior: 'instant'
|
|
133
143
|
});
|
|
134
144
|
}
|
|
135
145
|
}
|
|
@@ -181,17 +191,17 @@ var SeekBar = /*#__PURE__*/function (_Component) {
|
|
|
181
191
|
key: "render",
|
|
182
192
|
value: function render() {
|
|
183
193
|
var _this2 = this;
|
|
184
|
-
var _this$
|
|
185
|
-
_this$
|
|
186
|
-
currentTime = _this$
|
|
187
|
-
seekingTime = _this$
|
|
188
|
-
duration = _this$
|
|
189
|
-
isFullscreen = _this$
|
|
190
|
-
controlType = _this$
|
|
191
|
-
playerType = _this$
|
|
192
|
-
tagsMarker = _this$
|
|
193
|
-
assetType = _this$
|
|
194
|
-
zoom = _this$
|
|
194
|
+
var _this$props3 = this.props,
|
|
195
|
+
_this$props3$player = _this$props3.player,
|
|
196
|
+
currentTime = _this$props3$player.currentTime,
|
|
197
|
+
seekingTime = _this$props3$player.seekingTime,
|
|
198
|
+
duration = _this$props3$player.duration,
|
|
199
|
+
isFullscreen = _this$props3$player.isFullscreen,
|
|
200
|
+
controlType = _this$props3.controlType,
|
|
201
|
+
playerType = _this$props3.playerType,
|
|
202
|
+
tagsMarker = _this$props3.tagsMarker,
|
|
203
|
+
assetType = _this$props3.assetType,
|
|
204
|
+
zoom = _this$props3.zoom;
|
|
195
205
|
var time = seekingTime || currentTime;
|
|
196
206
|
console.log('ages', (this.getPercent() * 100).toFixed(2));
|
|
197
207
|
return /*#__PURE__*/_react["default"].createElement("span", {
|