@desynova-digital/player 4.0.22 → 4.0.24
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
|
@@ -106,7 +106,8 @@ var propTypes = {
|
|
|
106
106
|
playlistClick: _propTypes.PropTypes.func,
|
|
107
107
|
transcriptArr: _propTypes.PropTypes.instanceOf(Array),
|
|
108
108
|
tagsMarker: _propTypes.PropTypes.instanceOf(Array),
|
|
109
|
-
theme: _propTypes.PropTypes.string
|
|
109
|
+
theme: _propTypes.PropTypes.string,
|
|
110
|
+
activeSDBorder: _propTypes.PropTypes.bool
|
|
110
111
|
};
|
|
111
112
|
var defaultProps = {
|
|
112
113
|
fluid: true,
|
|
@@ -224,8 +225,13 @@ var Player = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
224
225
|
}, {
|
|
225
226
|
key: "componentDidUpdate",
|
|
226
227
|
value: function componentDidUpdate(prevProps, prevState) {
|
|
227
|
-
var
|
|
228
|
+
var _this$props = this.props,
|
|
229
|
+
playerType = _this$props.playerType,
|
|
230
|
+
activeSDBorder = _this$props.activeSDBorder;
|
|
228
231
|
this.handleResize();
|
|
232
|
+
if (activeSDBorder !== prevProps.activeSDBorder) {
|
|
233
|
+
this.actions.handleSDBorderChange(activeSDBorder || false);
|
|
234
|
+
}
|
|
229
235
|
if (playerType !== prevProps.playerType) {
|
|
230
236
|
this.actions.handleZoomChange(0);
|
|
231
237
|
}
|
|
@@ -284,6 +290,7 @@ var Player = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
284
290
|
_this2._controlBar = c;
|
|
285
291
|
},
|
|
286
292
|
key: "control-bar",
|
|
293
|
+
pauseOnOutMarkerSelect: fullProps.pauseOnOutMarkerSelect,
|
|
287
294
|
order: 4
|
|
288
295
|
}, this.props)), /*#__PURE__*/_react["default"].createElement(_Shortcut["default"], _extends({
|
|
289
296
|
key: "shortcut",
|
|
@@ -349,6 +356,7 @@ var Player = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
349
356
|
_this4._controlBar = c;
|
|
350
357
|
},
|
|
351
358
|
key: "control-bar",
|
|
359
|
+
pauseOnOutMarkerSelect: fullProps.pauseOnOutMarkerSelect,
|
|
352
360
|
order: 2
|
|
353
361
|
}, this.props)), /*#__PURE__*/_react["default"].createElement(_Shortcut["default"], _extends({
|
|
354
362
|
key: "shortcut",
|
|
@@ -525,10 +533,10 @@ var Player = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
525
533
|
var controlBar = (0, _reactDom.findDOMNode)(this._controlBar);
|
|
526
534
|
var playlist = (0, _reactDom.findDOMNode)(this._playlist);
|
|
527
535
|
var playerContainer = (0, _reactDom.findDOMNode)(this._playerContainer);
|
|
528
|
-
var _this$
|
|
529
|
-
controlType = _this$
|
|
530
|
-
playerType = _this$
|
|
531
|
-
fileType = _this$
|
|
536
|
+
var _this$props2 = this.props,
|
|
537
|
+
controlType = _this$props2.controlType,
|
|
538
|
+
playerType = _this$props2.playerType,
|
|
539
|
+
fileType = _this$props2.fileType;
|
|
532
540
|
var height = 0;
|
|
533
541
|
_toConsumableArray(leftSectionRef.children).forEach(function (child) {
|
|
534
542
|
return height += child.offsetHeight;
|
|
@@ -641,9 +649,9 @@ var Player = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
641
649
|
video: this.video ? this.video.video : null
|
|
642
650
|
});
|
|
643
651
|
var childrensLeft = this.getChildren(props, 'left');
|
|
644
|
-
var _this$
|
|
645
|
-
rightSection = _this$
|
|
646
|
-
playerType = _this$
|
|
652
|
+
var _this$props3 = this.props,
|
|
653
|
+
rightSection = _this$props3.rightSection,
|
|
654
|
+
playerType = _this$props3.playerType;
|
|
647
655
|
return /*#__PURE__*/_react["default"].createElement(PlayerBlock, {
|
|
648
656
|
ref: function ref(c) {
|
|
649
657
|
_this5.manager.rootElement = c;
|
package/components/Shortcut.js
CHANGED
|
@@ -695,10 +695,10 @@ var Shortcut = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
695
695
|
action: 'pause',
|
|
696
696
|
source: 'shortcut'
|
|
697
697
|
});
|
|
698
|
-
actions.changeRate(1.0, {
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
});
|
|
698
|
+
// actions.changeRate(1.0, {
|
|
699
|
+
// action: 'fast-forward',
|
|
700
|
+
// source: 'shortcut'
|
|
701
|
+
// });
|
|
702
702
|
}
|
|
703
703
|
}
|
|
704
704
|
}, {
|
|
@@ -37,7 +37,8 @@ var propTypes = {
|
|
|
37
37
|
controlType: _propTypes.PropTypes.string,
|
|
38
38
|
onMarkerSelect: _propTypes.PropTypes.func,
|
|
39
39
|
allowMarkerOverlap: _propTypes.PropTypes.bool,
|
|
40
|
-
theme: _propTypes.PropTypes.string
|
|
40
|
+
theme: _propTypes.PropTypes.string,
|
|
41
|
+
pauseOnOutMarkerSelect: _propTypes.PropTypes.bool
|
|
41
42
|
};
|
|
42
43
|
var defaultProps = {
|
|
43
44
|
player: {},
|
|
@@ -96,7 +97,8 @@ var MarkOutControl = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
96
97
|
controlType = _this$props2.controlType,
|
|
97
98
|
onMarkerSelect = _this$props2.onMarkerSelect,
|
|
98
99
|
onAddMarker = _this$props2.onAddMarker,
|
|
99
|
-
frameRate = _this$props2.frameRate
|
|
100
|
+
frameRate = _this$props2.frameRate,
|
|
101
|
+
pauseOnOutMarkerSelect = _this$props2.pauseOnOutMarkerSelect;
|
|
100
102
|
if (leftMarker > -1 && player.currentTime > leftMarker) {
|
|
101
103
|
// actions.handleMarkerPointChange('add', 'right', player.currentTime);
|
|
102
104
|
//Commented for CN-632.
|
|
@@ -104,6 +106,13 @@ var MarkOutControl = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
104
106
|
// onMarkerSelect(leftMarker, player.currentTime);
|
|
105
107
|
// }
|
|
106
108
|
// actions.handleMarkerPointChange('create');
|
|
109
|
+
if (pauseOnOutMarkerSelect && !player.paused) {
|
|
110
|
+
actions.pause({
|
|
111
|
+
action: 'pause',
|
|
112
|
+
source: 'shortcut'
|
|
113
|
+
});
|
|
114
|
+
actions.seek(player.currentTime);
|
|
115
|
+
}
|
|
107
116
|
var currentAdjustedTime = (0, _utils.handleAdjustingVideoAsPerFrame)(player.currentTime, frameRate);
|
|
108
117
|
var data = {
|
|
109
118
|
markerType: player.markerType !== 'update' ? 'add' : 'update',
|
|
@@ -28,7 +28,8 @@ var propTypes = {
|
|
|
28
28
|
onDeleteMarker: _propTypes.PropTypes.func,
|
|
29
29
|
initialTime: _propTypes.PropTypes.number,
|
|
30
30
|
allowMarkerOverlap: _propTypes.PropTypes.bool,
|
|
31
|
-
theme: _propTypes.PropTypes.string
|
|
31
|
+
theme: _propTypes.PropTypes.string,
|
|
32
|
+
pauseOnOutMarkerSelect: _propTypes.PropTypes.bool
|
|
32
33
|
};
|
|
33
34
|
var defaultProps = {
|
|
34
35
|
frameRate: 0,
|
|
@@ -52,7 +53,8 @@ function MarkingControl(_ref) {
|
|
|
52
53
|
_ref$disablePlayerAct = _ref.disablePlayerActions,
|
|
53
54
|
disablePlayerActions = _ref$disablePlayerAct === void 0 ? [] : _ref$disablePlayerAct,
|
|
54
55
|
playerSelectedMarker = _ref.playerSelectedMarker,
|
|
55
|
-
theme = _ref.theme
|
|
56
|
+
theme = _ref.theme,
|
|
57
|
+
pauseOnOutMarkerSelect = _ref.pauseOnOutMarkerSelect;
|
|
56
58
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, playerType !== 'panel' && playerType !== 'default' && playerType !== 'clipping_default' ? /*#__PURE__*/_react["default"].createElement(MarkingBlock, {
|
|
57
59
|
theme: theme
|
|
58
60
|
}, (!((playerSelectedMarker === null || playerSelectedMarker === void 0 ? void 0 : playerSelectedMarker.leftMarker) > -1) || !((playerSelectedMarker === null || playerSelectedMarker === void 0 ? void 0 : playerSelectedMarker.rightMarker) > -1)) && playerType !== 'panel' && playerType !== 'default' && playerType !== 'clipping_default' && !playerReadOnlyMode && !disablePlayerActions.includes("marking_controls") ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_MarkInControl["default"], {
|
|
@@ -73,7 +75,8 @@ function MarkingControl(_ref) {
|
|
|
73
75
|
controlType: controlType,
|
|
74
76
|
onMarkerSelect: onMarkerSelect,
|
|
75
77
|
allowMarkerOverlap: allowMarkerOverlap,
|
|
76
|
-
onAddMarker: onAddMarker
|
|
78
|
+
onAddMarker: onAddMarker,
|
|
79
|
+
pauseOnOutMarkerSelect: pauseOnOutMarkerSelect
|
|
77
80
|
})) : null, (playerSelectedMarker === null || playerSelectedMarker === void 0 ? void 0 : playerSelectedMarker.leftMarker) > -1 || (playerSelectedMarker === null || playerSelectedMarker === void 0 ? void 0 : playerSelectedMarker.rightMarker) > -1 ? /*#__PURE__*/_react["default"].createElement(_MarkingDuration["default"], {
|
|
78
81
|
theme: theme,
|
|
79
82
|
leftMarker: playerSelectedMarker === null || playerSelectedMarker === void 0 ? void 0 : playerSelectedMarker.leftMarker,
|