@desynova-digital/player 4.0.19 → 4.0.20
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/Manager.js +15 -17
- package/actions/player.js +18 -35
- package/actions/video.js +25 -50
- package/colors.js +1 -2
- package/components/AudioMeter.js +31 -34
- package/components/BigPlayButton.js +23 -26
- package/components/ImageViewer.js +25 -28
- package/components/MarkerBar.js +23 -26
- package/components/Menu.js +2 -2
- package/components/Player.js +36 -39
- package/components/PlayerHeader.js +23 -26
- package/components/Playlist.js +25 -25
- package/components/PointersBar.js +31 -30
- package/components/PosterImage.js +2 -3
- package/components/SDOutline.js +2 -2
- package/components/Shortcut.js +45 -49
- package/components/Slider.js +34 -36
- package/components/TagsBar.js +22 -25
- package/components/Video.js +61 -65
- package/components/control-bar/AudioTracksMenuButton.js +21 -24
- package/components/control-bar/CameraButton.js +22 -25
- package/components/control-bar/CaptionControlMenuButton.js +22 -25
- package/components/control-bar/CommentsButton.js +23 -26
- package/components/control-bar/ControlBar.js +24 -27
- package/components/control-bar/EditorControlMenuButton.js +23 -26
- package/components/control-bar/ForwardControl.js +2 -3
- package/components/control-bar/ForwardReplayControl.js +23 -26
- package/components/control-bar/FullscreenToggle.js +22 -25
- package/components/control-bar/PlayToggle.js +22 -25
- package/components/control-bar/ReplayControl.js +2 -3
- package/components/control-bar/SettingsMenuButton.js +4 -4
- package/components/control-bar/SubtitleLanguagesMenuButton.js +21 -24
- package/components/control-bar/SubtitleMovementMenu.js +23 -26
- package/components/control-bar/VolumeMenuButton.js +23 -26
- package/components/control-bar/ZoomMenuButton.js +23 -26
- package/components/marking-controls/MarkInControl.js +22 -25
- package/components/marking-controls/MarkOutControl.js +22 -25
- package/components/marking-controls/MarkingAddButton.js +22 -25
- package/components/marking-controls/MarkingControl.js +2 -2
- package/components/marking-controls/MarkingDeleteButton.js +22 -25
- package/components/marking-controls/MarkingDuration.js +2 -2
- package/components/marking-controls/MarkingPreview.js +22 -25
- package/components/progress-bar/AudioWaveform.js +22 -25
- package/components/progress-bar/LoadProgressBar.js +1 -1
- package/components/progress-bar/MouseTimeDisplay.js +2 -3
- package/components/progress-bar/PlayProgressBar.js +2 -2
- package/components/progress-bar/ProgressControl.js +45 -40
- package/components/progress-bar/SeekBar.js +29 -32
- package/components/progress-bar/Timeline.js +22 -25
- package/components/settings-menu-control/CameraControl.js +6 -7
- package/components/settings-menu-control/ChildMenuComponent.js +25 -29
- package/components/settings-menu-control/ParentMenuComponent.js +22 -25
- package/components/settings-menu-control/PlaybackRateControl.js +22 -25
- package/components/settings-menu-control/SafeAreaControl.js +22 -25
- package/components/settings-menu-control/SettingsMenu.js +13 -13
- package/components/time-controls/CurrentTimeDisplay.js +11 -12
- package/components/time-controls/DurationDisplay.js +3 -4
- package/components/time-controls/TimeDivider.js +2 -2
- package/components/volume-control/VolumeBar.js +31 -34
- package/components/volume-control/VolumeControl.js +1 -1
- package/components/volume-control/VolumeLevel.js +3 -4
- package/components/zoom-control/ZoomBar.js +30 -33
- package/components/zoom-control/ZoomLevel.js +3 -4
- package/index.js +4 -4
- package/package.json +1 -1
- package/reducers/index.js +2 -4
- package/reducers/operation.js +7 -8
- package/reducers/player.js +7 -9
- package/utils/browser.js +4 -8
- package/utils/fullscreen.js +8 -10
- package/utils/index.js +13 -14
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
@@ -15,25 +15,25 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _temp
|
|
|
15
15
|
/* eslint-disable jsx-a11y/mouse-events-have-key-events */
|
|
16
16
|
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
|
17
17
|
/* eslint-disable react/no-array-index-key */
|
|
18
|
-
function _interopRequireDefault(
|
|
19
|
-
function _getRequireWildcardCache(
|
|
20
|
-
function _interopRequireWildcard(
|
|
21
|
-
function ownKeys(
|
|
22
|
-
function _objectSpread(
|
|
23
|
-
function _defineProperty(
|
|
24
|
-
function _classCallCheck(
|
|
25
|
-
function _defineProperties(
|
|
26
|
-
function _createClass(
|
|
27
|
-
function _toPropertyKey(
|
|
28
|
-
function _toPrimitive(
|
|
29
|
-
function
|
|
30
|
-
function
|
|
31
|
-
function
|
|
32
|
-
function
|
|
33
|
-
function
|
|
34
|
-
function
|
|
35
|
-
function
|
|
36
|
-
function _taggedTemplateLiteral(
|
|
18
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
19
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
20
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
21
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
22
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
23
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
24
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
25
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
26
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
27
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
28
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
29
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
30
|
+
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
31
|
+
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
32
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
33
|
+
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
34
|
+
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
35
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
36
|
+
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
37
37
|
/*
|
|
38
38
|
* import { colors } from '@desynova-digital/tokens';
|
|
39
39
|
* import colors from '../colors';
|
|
@@ -48,25 +48,26 @@ var propTypes = {
|
|
|
48
48
|
var defaultProps = {
|
|
49
49
|
player: {}
|
|
50
50
|
};
|
|
51
|
-
var ScrollableDiv = _styledComponents["default"].div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n max-height: 65px; /* Set the maximum height */\n overflow-y:
|
|
51
|
+
var ScrollableDiv = _styledComponents["default"].div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n max-height: 65px; /* Set the maximum height */\n overflow-y: ", ";\n\n /* Optional: Hide the scrollbar */\n &::-webkit-scrollbar {\n width: 0; /* For Webkit browsers */\n }\n scrollbar-width: none; /* For Firefox */\n -ms-overflow-style: none; /* For IE 10+ */\n"])), function (_ref) {
|
|
52
|
+
var markers = _ref.markers;
|
|
53
|
+
return markers.length > 3 ? 'scroll' : 'visible';
|
|
54
|
+
});
|
|
52
55
|
var PointersContainer = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n width: ", ";\n"])), function (props) {
|
|
53
56
|
return props.width || '100%';
|
|
54
57
|
});
|
|
55
|
-
var PointerBlock = _styledComponents["default"].div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n width: 100%;\n height: 20px;\n position: relative;\n border-top:
|
|
58
|
+
var PointerBlock = _styledComponents["default"].div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n width: 100%;\n height: 20px;\n position: relative;\n border-top: 1px solid #333333;\n border-bottom: 1px solid #333333;\n div:last-child {\n border-bottom: none; // Remove border-bottom for the last div inside PointerBlock\n }\n .empty-pointers-msg {\n display: flex;\n justify-content: center;\n align-items: center;\n height: 100%;\n p {\n font-family: SFUIText-Medium;\n font-size: 11px;\n color: #aaaaaa;\n }\n ", " {\n margin: 0 5px;\n }\n }\n"])), _components.Icon.Element);
|
|
56
59
|
var MarkerTagsBlock = _styledComponents["default"].div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n min-width: 100px;\n max-width: 100px;\n position: relative;\n height: 100%;\n .tags-block {\n height: 20px;\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"])));
|
|
57
60
|
var ToolTipStyles = _styledComponents["default"].div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n position: absolute;\n z-index: 2;\n height: 18px;\n transition: left 0.1s ease-in-out;\n\n .tooltip-container {\n border-radius: 0.25rem;\n padding: 5px;\n width: fit-content;\n background: #ffffff;\n color: #666666;\n\n i,em{\n font-style: italic; \n }\n\n strong{\n font-weight: bold; \n }\n\n h4 {\n white-space: nowrap;\n font-size: 12px;\n }\n\n &:after {\n content: '';\n position: absolute;\n border-left: 5px solid transparent;\n border-right: 5px solid transparent;\n border-top: 5px solid white;\n ", "\n left: ", ";\n transform: translateX(-50%);\n }\n }\n"])), function (props) {
|
|
58
61
|
return props.multiline ? 'bottom: -21px;' : 'bottom: -9px;';
|
|
59
62
|
}, function (props) {
|
|
60
63
|
return props.tooltipPointer ? props.tooltipPointer + 'px' : '50%';
|
|
61
64
|
});
|
|
62
|
-
var PointersBar = /*#__PURE__*/function (_Component) {
|
|
63
|
-
_inherits(PointersBar, _Component);
|
|
64
|
-
var _super = _createSuper(PointersBar);
|
|
65
|
+
var PointersBar = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
65
66
|
function PointersBar(props) {
|
|
66
67
|
var _this;
|
|
67
68
|
_classCallCheck(this, PointersBar);
|
|
68
|
-
_this =
|
|
69
|
-
_this.getPointerStyle = _this.getPointerStyle.bind(
|
|
69
|
+
_this = _callSuper(this, PointersBar, [props]);
|
|
70
|
+
_this.getPointerStyle = _this.getPointerStyle.bind(_this);
|
|
70
71
|
_this.state = {
|
|
71
72
|
tooltip: {
|
|
72
73
|
isVisible: false
|
|
@@ -78,7 +79,8 @@ var PointersBar = /*#__PURE__*/function (_Component) {
|
|
|
78
79
|
_this.zoom = 0;
|
|
79
80
|
return _this;
|
|
80
81
|
}
|
|
81
|
-
|
|
82
|
+
_inherits(PointersBar, _Component);
|
|
83
|
+
return _createClass(PointersBar, [{
|
|
82
84
|
key: "shouldComponentUpdate",
|
|
83
85
|
value: function shouldComponentUpdate(nextProps, nextState) {
|
|
84
86
|
if (nextProps.zoom !== this.props.zoom) {
|
|
@@ -213,6 +215,7 @@ var PointersBar = /*#__PURE__*/function (_Component) {
|
|
|
213
215
|
width = _this$state.width;
|
|
214
216
|
var self = this;
|
|
215
217
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(ScrollableDiv, {
|
|
218
|
+
markers: markers,
|
|
216
219
|
onScroll: function onScroll(e) {
|
|
217
220
|
var scrollTop = e.target.scrollTop;
|
|
218
221
|
_this3.props.onScroll(scrollTop);
|
|
@@ -292,9 +295,7 @@ var PointersBar = /*#__PURE__*/function (_Component) {
|
|
|
292
295
|
}))));
|
|
293
296
|
}
|
|
294
297
|
}]);
|
|
295
|
-
return PointersBar;
|
|
296
298
|
}(_react.Component);
|
|
297
|
-
exports["default"] = PointersBar;
|
|
298
299
|
PointersBar.propTypes = propTypes;
|
|
299
300
|
PointersBar.defaultProps = defaultProps;
|
|
300
301
|
PointersBar.displayName = 'PointersBar';
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _propTypes = require("prop-types");
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
function _interopRequireDefault(
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
10
|
var propTypes = {
|
|
11
11
|
poster: _propTypes.PropTypes.string,
|
|
12
12
|
player: _propTypes.PropTypes.instanceOf(Object),
|
|
@@ -47,5 +47,4 @@ function PosterImage(_ref) {
|
|
|
47
47
|
PosterImage.propTypes = propTypes;
|
|
48
48
|
PosterImage.defaultProps = defaultProps;
|
|
49
49
|
PosterImage.displayName = 'PosterImage';
|
|
50
|
-
var _default = PosterImage;
|
|
51
|
-
exports["default"] = _default;
|
|
50
|
+
var _default = exports["default"] = PosterImage;
|
package/components/SDOutline.js
CHANGED
|
@@ -9,8 +9,8 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
9
9
|
var _propTypes = require("prop-types");
|
|
10
10
|
var _colors = _interopRequireDefault(require("../colors"));
|
|
11
11
|
var _templateObject, _templateObject2;
|
|
12
|
-
function _interopRequireDefault(
|
|
13
|
-
function _taggedTemplateLiteral(
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
13
|
+
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
14
14
|
var propTypes = {
|
|
15
15
|
player: _propTypes.PropTypes.instanceOf(Object),
|
|
16
16
|
actions: _propTypes.PropTypes.instanceOf(Object)
|
package/components/Shortcut.js
CHANGED
|
@@ -9,31 +9,31 @@ var _propTypes = require("prop-types");
|
|
|
9
9
|
var _lodash = require("lodash");
|
|
10
10
|
var _hotkeysJs = _interopRequireDefault(require("hotkeys-js"));
|
|
11
11
|
var _utils = require("../utils");
|
|
12
|
-
function _interopRequireDefault(
|
|
13
|
-
function _typeof(
|
|
14
|
-
function _toConsumableArray(
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
13
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
14
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
15
15
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
16
|
-
function _iterableToArray(
|
|
17
|
-
function _arrayWithoutHoles(
|
|
18
|
-
function _slicedToArray(
|
|
16
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
17
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
18
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
19
19
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
20
|
-
function _unsupportedIterableToArray(
|
|
21
|
-
function _arrayLikeToArray(
|
|
22
|
-
function _iterableToArrayLimit(
|
|
23
|
-
function _arrayWithHoles(
|
|
24
|
-
function _classCallCheck(
|
|
25
|
-
function _defineProperties(
|
|
26
|
-
function _createClass(
|
|
27
|
-
function
|
|
28
|
-
function
|
|
29
|
-
function
|
|
30
|
-
function
|
|
31
|
-
function
|
|
32
|
-
function
|
|
33
|
-
function
|
|
34
|
-
function _defineProperty(
|
|
35
|
-
function _toPropertyKey(
|
|
36
|
-
function _toPrimitive(
|
|
20
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
21
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
22
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
23
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
24
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
25
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
26
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
27
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
28
|
+
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
29
|
+
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
30
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
31
|
+
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
32
|
+
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
33
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
34
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
35
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
36
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
37
37
|
var propTypes = {
|
|
38
38
|
clickable: _propTypes.PropTypes.bool,
|
|
39
39
|
dblclickable: _propTypes.PropTypes.bool,
|
|
@@ -54,14 +54,12 @@ var defaultProps = {
|
|
|
54
54
|
player: {},
|
|
55
55
|
shortcuts: []
|
|
56
56
|
};
|
|
57
|
-
var Shortcut = /*#__PURE__*/function (_Component) {
|
|
58
|
-
_inherits(Shortcut, _Component);
|
|
59
|
-
var _super = _createSuper(Shortcut);
|
|
57
|
+
var Shortcut = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
60
58
|
function Shortcut(props, context) {
|
|
61
59
|
var _this;
|
|
62
60
|
_classCallCheck(this, Shortcut);
|
|
63
|
-
_this =
|
|
64
|
-
_defineProperty(
|
|
61
|
+
_this = _callSuper(this, Shortcut, [props, context]);
|
|
62
|
+
_defineProperty(_this, "segmentShift", function (direction) {
|
|
65
63
|
var _this$props = _this.props,
|
|
66
64
|
leftMarker = _this$props.playerSelectedMarker.leftMarker,
|
|
67
65
|
onTagClick = _this$props.onTagClick;
|
|
@@ -86,13 +84,13 @@ var Shortcut = /*#__PURE__*/function (_Component) {
|
|
|
86
84
|
onTagClick((_values$newIndex2 = values[newIndex]) === null || _values$newIndex2 === void 0 ? void 0 : _values$newIndex2.start_time, (_values$newIndex3 = values[newIndex]) === null || _values$newIndex3 === void 0 ? void 0 : _values$newIndex3.end_time, values[newIndex]);
|
|
87
85
|
}
|
|
88
86
|
});
|
|
89
|
-
_defineProperty(
|
|
87
|
+
_defineProperty(_this, "debounceSegmentShiftForward", (0, _lodash.debounce)(function () {
|
|
90
88
|
_this.segmentShift('forward');
|
|
91
89
|
}, 0));
|
|
92
|
-
_defineProperty(
|
|
90
|
+
_defineProperty(_this, "debounceSegmentShiftBackward", (0, _lodash.debounce)(function () {
|
|
93
91
|
_this.segmentShift('backward');
|
|
94
92
|
}, 0));
|
|
95
|
-
_defineProperty(
|
|
93
|
+
_defineProperty(_this, "debounceKeyFunc", (0, _lodash.debounce)(function (keyCode) {
|
|
96
94
|
_this.handleKeyMovement(keyCode);
|
|
97
95
|
}));
|
|
98
96
|
/**
|
|
@@ -101,7 +99,7 @@ var Shortcut = /*#__PURE__*/function (_Component) {
|
|
|
101
99
|
* @param {boolean} currentTimeRequired currentTime value required or not to perform key functionality
|
|
102
100
|
*common function to handle the key functionalies. eg-> W Key and Q key functionalities
|
|
103
101
|
*/
|
|
104
|
-
_defineProperty(
|
|
102
|
+
_defineProperty(_this, "handleKeyMovement", function (keyCode) {
|
|
105
103
|
var _this$props$markers$, _this$props$playerSel, _this$props$player, _this$props$player2;
|
|
106
104
|
if (keyCode === 81 || keyCode === 87) {
|
|
107
105
|
_this.isCalled = true;
|
|
@@ -133,7 +131,7 @@ var Shortcut = /*#__PURE__*/function (_Component) {
|
|
|
133
131
|
* this function executed the Q and W key functionality first and then performs I and O key functionality provided 3 key combo is still pressed
|
|
134
132
|
* Once we leave the keyCombo isCalled variable is set to false. This ensures that on the next combo press we will again execute Q/W key combo first.
|
|
135
133
|
*/
|
|
136
|
-
_defineProperty(
|
|
134
|
+
_defineProperty(_this, "createThreeKeyCombo", function (event, handleKeyMovement, debounceKeyFunc, keyParameter) {
|
|
137
135
|
var _this$props3 = _this.props,
|
|
138
136
|
playerReadOnlyMode = _this$props3.playerReadOnlyMode,
|
|
139
137
|
disablePlayerActions = _this$props3.disablePlayerActions;
|
|
@@ -151,26 +149,26 @@ var Shortcut = /*#__PURE__*/function (_Component) {
|
|
|
151
149
|
_this.isCalled = false;
|
|
152
150
|
}
|
|
153
151
|
});
|
|
154
|
-
_defineProperty(
|
|
155
|
-
return _this.createThreeKeyCombo(event, _this.handleKeyMovement.bind(
|
|
152
|
+
_defineProperty(_this, "threeKeyCombo1", (0, _lodash.debounce)(function (event) {
|
|
153
|
+
return _this.createThreeKeyCombo(event, _this.handleKeyMovement.bind(_this, 87), _this.debounceKeyFunc.bind(_this, 79), 'Ctrl + O + Right');
|
|
156
154
|
}, 0, {
|
|
157
155
|
leading: true,
|
|
158
156
|
trailing: true
|
|
159
157
|
}));
|
|
160
|
-
_defineProperty(
|
|
161
|
-
return _this.createThreeKeyCombo(event, _this.handleKeyMovement.bind(
|
|
158
|
+
_defineProperty(_this, "threeKeyCombo2", (0, _lodash.debounce)(function (event) {
|
|
159
|
+
return _this.createThreeKeyCombo(event, _this.handleKeyMovement.bind(_this, 87), _this.debounceKeyFunc.bind(_this, 79), 'Ctrl + O + Left');
|
|
162
160
|
}, 0, {
|
|
163
161
|
leading: true,
|
|
164
162
|
trailing: true
|
|
165
163
|
}));
|
|
166
|
-
_defineProperty(
|
|
167
|
-
return _this.createThreeKeyCombo(event, _this.handleKeyMovement.bind(
|
|
164
|
+
_defineProperty(_this, "threeKeyCombo3", (0, _lodash.debounce)(function (event) {
|
|
165
|
+
return _this.createThreeKeyCombo(event, _this.handleKeyMovement.bind(_this, 81), _this.debounceKeyFunc.bind(_this, 73), 'Ctrl + I + Right');
|
|
168
166
|
}, 0, {
|
|
169
167
|
leading: true,
|
|
170
168
|
trailing: true
|
|
171
169
|
}));
|
|
172
|
-
_defineProperty(
|
|
173
|
-
return _this.createThreeKeyCombo(event, _this.handleKeyMovement.bind(
|
|
170
|
+
_defineProperty(_this, "threeKeyCombo4", (0, _lodash.debounce)(function (event) {
|
|
171
|
+
return _this.createThreeKeyCombo(event, _this.handleKeyMovement.bind(_this, 81), _this.debounceKeyFunc.bind(_this, 73), 'Ctrl + I + Left');
|
|
174
172
|
}, 0, {
|
|
175
173
|
leading: true,
|
|
176
174
|
trailing: true
|
|
@@ -416,7 +414,6 @@ var Shortcut = /*#__PURE__*/function (_Component) {
|
|
|
416
414
|
// }
|
|
417
415
|
}
|
|
418
416
|
}
|
|
419
|
-
|
|
420
417
|
if (playerSelectedMarker.leftMarker > -1 && currentAdjustedTime > -1 && playerSelectedMarker.markerCreate && createPoint && currentAdjustedTime > playerSelectedMarker.leftMarker) {
|
|
421
418
|
// actions.handleMarkerPointChange('create');
|
|
422
419
|
onAddMarker(playerSelectedMarker.leftMarker, currentAdjustedTime, '', false, {
|
|
@@ -527,13 +524,14 @@ var Shortcut = /*#__PURE__*/function (_Component) {
|
|
|
527
524
|
}];
|
|
528
525
|
_this.shortcuts = _toConsumableArray(_this.defaultShortcuts);
|
|
529
526
|
_this.isCalled = false;
|
|
530
|
-
_this.mergeShortcuts = _this.mergeShortcuts.bind(
|
|
531
|
-
_this.handleKeyPress = _this.handleKeyPress.bind(
|
|
532
|
-
_this.handleClick = _this.handleClick.bind(
|
|
533
|
-
_this.handleDoubleClick = _this.handleDoubleClick.bind(
|
|
527
|
+
_this.mergeShortcuts = _this.mergeShortcuts.bind(_this);
|
|
528
|
+
_this.handleKeyPress = _this.handleKeyPress.bind(_this);
|
|
529
|
+
_this.handleClick = _this.handleClick.bind(_this);
|
|
530
|
+
_this.handleDoubleClick = _this.handleDoubleClick.bind(_this);
|
|
534
531
|
return _this;
|
|
535
532
|
}
|
|
536
|
-
|
|
533
|
+
_inherits(Shortcut, _Component);
|
|
534
|
+
return _createClass(Shortcut, [{
|
|
537
535
|
key: "componentDidMount",
|
|
538
536
|
value: function componentDidMount() {
|
|
539
537
|
this.mergeShortcuts();
|
|
@@ -816,9 +814,7 @@ var Shortcut = /*#__PURE__*/function (_Component) {
|
|
|
816
814
|
return null;
|
|
817
815
|
}
|
|
818
816
|
}]);
|
|
819
|
-
return Shortcut;
|
|
820
817
|
}(_react.Component);
|
|
821
|
-
exports["default"] = Shortcut;
|
|
822
818
|
Shortcut.propTypes = propTypes;
|
|
823
819
|
Shortcut.defaultProps = defaultProps;
|
|
824
820
|
Shortcut.displayName = 'Shortcut';
|
package/components/Slider.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
@@ -12,22 +12,23 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
12
12
|
var Dom = _interopRequireWildcard(require("../utils/dom"));
|
|
13
13
|
var _tokens = require("@desynova-digital/tokens");
|
|
14
14
|
var _templateObject;
|
|
15
|
-
function _interopRequireDefault(
|
|
16
|
-
function _getRequireWildcardCache(
|
|
17
|
-
function _interopRequireWildcard(
|
|
18
|
-
function
|
|
19
|
-
function
|
|
20
|
-
function
|
|
21
|
-
function
|
|
22
|
-
function
|
|
23
|
-
function
|
|
24
|
-
function
|
|
25
|
-
function
|
|
26
|
-
function
|
|
27
|
-
function
|
|
28
|
-
function
|
|
29
|
-
function
|
|
30
|
-
function
|
|
15
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
16
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
17
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
18
|
+
function _readOnlyError(r) { throw new TypeError('"' + r + '" is read-only'); }
|
|
19
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
20
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
21
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
22
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
23
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
24
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
25
|
+
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
26
|
+
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
27
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
28
|
+
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
29
|
+
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
30
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
31
|
+
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
31
32
|
var propTypes = {
|
|
32
33
|
theme: _propTypes.PropTypes.string,
|
|
33
34
|
onMouseDown: _propTypes.PropTypes.func,
|
|
@@ -68,31 +69,30 @@ var defaultProps = {
|
|
|
68
69
|
var SliderBlock = _styledComponents["default"].div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n z-index: 2;\n width: 100%;\n height: 100%;\n background: ", ";\n"])), function (props) {
|
|
69
70
|
return props.theme ? " ".concat(_tokens.colors[props.theme].base) : '#121d29';
|
|
70
71
|
});
|
|
71
|
-
var Slider = /*#__PURE__*/function (_Component) {
|
|
72
|
-
_inherits(Slider, _Component);
|
|
73
|
-
var _super = _createSuper(Slider);
|
|
72
|
+
var Slider = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
74
73
|
function Slider(props, context) {
|
|
75
74
|
var _this;
|
|
76
75
|
_classCallCheck(this, Slider);
|
|
77
|
-
_this =
|
|
78
|
-
_this.handleMouseDown = _this.handleMouseDown.bind(
|
|
79
|
-
_this.handleMouseMove = _this.handleMouseMove.bind(
|
|
80
|
-
_this.handleMouseUp = _this.handleMouseUp.bind(
|
|
81
|
-
_this.handleFocus = _this.handleFocus.bind(
|
|
82
|
-
_this.handleBlur = _this.handleBlur.bind(
|
|
83
|
-
_this.handleClick = _this.handleClick.bind(
|
|
84
|
-
_this.handleKeyPress = _this.handleKeyPress.bind(
|
|
85
|
-
_this.stepForward = _this.stepForward.bind(
|
|
86
|
-
_this.stepBack = _this.stepBack.bind(
|
|
87
|
-
_this.calculateDistance = _this.calculateDistance.bind(
|
|
88
|
-
_this.getProgress = _this.getProgress.bind(
|
|
89
|
-
_this.renderChildren = _this.renderChildren.bind(
|
|
76
|
+
_this = _callSuper(this, Slider, [props, context]);
|
|
77
|
+
_this.handleMouseDown = _this.handleMouseDown.bind(_this);
|
|
78
|
+
_this.handleMouseMove = _this.handleMouseMove.bind(_this);
|
|
79
|
+
_this.handleMouseUp = _this.handleMouseUp.bind(_this);
|
|
80
|
+
_this.handleFocus = _this.handleFocus.bind(_this);
|
|
81
|
+
_this.handleBlur = _this.handleBlur.bind(_this);
|
|
82
|
+
_this.handleClick = _this.handleClick.bind(_this);
|
|
83
|
+
_this.handleKeyPress = _this.handleKeyPress.bind(_this);
|
|
84
|
+
_this.stepForward = _this.stepForward.bind(_this);
|
|
85
|
+
_this.stepBack = _this.stepBack.bind(_this);
|
|
86
|
+
_this.calculateDistance = _this.calculateDistance.bind(_this);
|
|
87
|
+
_this.getProgress = _this.getProgress.bind(_this);
|
|
88
|
+
_this.renderChildren = _this.renderChildren.bind(_this);
|
|
90
89
|
_this.state = {
|
|
91
90
|
// active: false,
|
|
92
91
|
};
|
|
93
92
|
return _this;
|
|
94
93
|
}
|
|
95
|
-
|
|
94
|
+
_inherits(Slider, _Component);
|
|
95
|
+
return _createClass(Slider, [{
|
|
96
96
|
key: "getProgress",
|
|
97
97
|
value: function getProgress() {
|
|
98
98
|
var getPercent = this.props.getPercent;
|
|
@@ -272,9 +272,7 @@ var Slider = /*#__PURE__*/function (_Component) {
|
|
|
272
272
|
}, this.renderChildren());
|
|
273
273
|
}
|
|
274
274
|
}]);
|
|
275
|
-
return Slider;
|
|
276
275
|
}(_react.Component);
|
|
277
|
-
exports["default"] = Slider;
|
|
278
276
|
Slider.propTypes = propTypes;
|
|
279
277
|
Slider.defaultProps = defaultProps;
|
|
280
278
|
Slider.displayName = 'Slider';
|