@desynova-digital/player 4.0.17 → 4.0.19
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 +17 -15
- package/actions/player.js +35 -18
- package/actions/video.js +50 -25
- package/colors.js +2 -1
- package/components/AudioMeter.js +34 -31
- package/components/BigPlayButton.js +26 -23
- package/components/ImageViewer.js +28 -25
- package/components/MarkerBar.js +26 -23
- package/components/Menu.js +2 -2
- package/components/Player.js +39 -36
- package/components/PlayerHeader.js +26 -23
- package/components/Playlist.js +25 -25
- package/components/PointersBar.js +28 -25
- package/components/PosterImage.js +3 -2
- package/components/SDOutline.js +2 -2
- package/components/Shortcut.js +49 -45
- package/components/Slider.js +36 -34
- package/components/TagsBar.js +25 -22
- package/components/Video.js +65 -61
- package/components/control-bar/AudioTracksMenuButton.js +24 -21
- package/components/control-bar/CameraButton.js +25 -22
- package/components/control-bar/CaptionControlMenuButton.js +25 -22
- package/components/control-bar/CommentsButton.js +26 -23
- package/components/control-bar/ControlBar.js +27 -24
- package/components/control-bar/EditorControlMenuButton.js +26 -23
- package/components/control-bar/ForwardControl.js +3 -2
- package/components/control-bar/ForwardReplayControl.js +26 -23
- package/components/control-bar/FullscreenToggle.js +25 -22
- package/components/control-bar/PlayToggle.js +25 -22
- package/components/control-bar/ReplayControl.js +3 -2
- package/components/control-bar/SettingsMenuButton.js +4 -4
- package/components/control-bar/SubtitleLanguagesMenuButton.js +24 -21
- package/components/control-bar/SubtitleMovementMenu.js +26 -23
- package/components/control-bar/VolumeMenuButton.js +26 -23
- package/components/control-bar/ZoomMenuButton.js +26 -23
- package/components/marking-controls/MarkInControl.js +25 -22
- package/components/marking-controls/MarkOutControl.js +25 -22
- package/components/marking-controls/MarkingAddButton.js +25 -22
- package/components/marking-controls/MarkingControl.js +2 -2
- package/components/marking-controls/MarkingDeleteButton.js +25 -22
- package/components/marking-controls/MarkingDuration.js +2 -2
- package/components/marking-controls/MarkingPreview.js +25 -22
- package/components/progress-bar/AudioWaveform.js +25 -22
- package/components/progress-bar/LoadProgressBar.js +1 -1
- package/components/progress-bar/MouseTimeDisplay.js +3 -2
- package/components/progress-bar/PlayProgressBar.js +2 -2
- package/components/progress-bar/ProgressControl.js +42 -32
- package/components/progress-bar/SeekBar.js +32 -29
- package/components/progress-bar/Timeline.js +25 -22
- package/components/settings-menu-control/CameraControl.js +7 -6
- package/components/settings-menu-control/ChildMenuComponent.js +29 -25
- package/components/settings-menu-control/ParentMenuComponent.js +25 -22
- package/components/settings-menu-control/PlaybackRateControl.js +25 -22
- package/components/settings-menu-control/SafeAreaControl.js +25 -22
- package/components/settings-menu-control/SettingsMenu.js +13 -13
- package/components/time-controls/CurrentTimeDisplay.js +12 -11
- package/components/time-controls/DurationDisplay.js +4 -3
- package/components/time-controls/TimeDivider.js +2 -2
- package/components/volume-control/VolumeBar.js +34 -31
- package/components/volume-control/VolumeControl.js +1 -1
- package/components/volume-control/VolumeLevel.js +4 -3
- package/components/zoom-control/ZoomBar.js +33 -30
- package/components/zoom-control/ZoomLevel.js +4 -3
- package/index.js +4 -4
- package/package.json +3 -3
- package/reducers/index.js +4 -2
- package/reducers/operation.js +8 -7
- package/reducers/player.js +9 -7
- package/utils/browser.js +8 -4
- package/utils/fullscreen.js +10 -8
- package/utils/index.js +14 -13
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
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(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
20
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
22
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
23
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
24
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
25
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
26
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
27
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
28
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
29
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
30
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
31
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
32
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
33
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
34
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
35
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
36
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
37
37
|
/*
|
|
38
38
|
* import { colors } from '@desynova-digital/tokens';
|
|
39
39
|
* import colors from '../colors';
|
|
@@ -59,12 +59,14 @@ var ToolTipStyles = _styledComponents["default"].div(_templateObject5 || (_templ
|
|
|
59
59
|
}, function (props) {
|
|
60
60
|
return props.tooltipPointer ? props.tooltipPointer + 'px' : '50%';
|
|
61
61
|
});
|
|
62
|
-
var PointersBar =
|
|
62
|
+
var PointersBar = /*#__PURE__*/function (_Component) {
|
|
63
|
+
_inherits(PointersBar, _Component);
|
|
64
|
+
var _super = _createSuper(PointersBar);
|
|
63
65
|
function PointersBar(props) {
|
|
64
66
|
var _this;
|
|
65
67
|
_classCallCheck(this, PointersBar);
|
|
66
|
-
_this =
|
|
67
|
-
_this.getPointerStyle = _this.getPointerStyle.bind(_this);
|
|
68
|
+
_this = _super.call(this, props);
|
|
69
|
+
_this.getPointerStyle = _this.getPointerStyle.bind(_assertThisInitialized(_this));
|
|
68
70
|
_this.state = {
|
|
69
71
|
tooltip: {
|
|
70
72
|
isVisible: false
|
|
@@ -76,8 +78,7 @@ var PointersBar = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
76
78
|
_this.zoom = 0;
|
|
77
79
|
return _this;
|
|
78
80
|
}
|
|
79
|
-
|
|
80
|
-
return _createClass(PointersBar, [{
|
|
81
|
+
_createClass(PointersBar, [{
|
|
81
82
|
key: "shouldComponentUpdate",
|
|
82
83
|
value: function shouldComponentUpdate(nextProps, nextState) {
|
|
83
84
|
if (nextProps.zoom !== this.props.zoom) {
|
|
@@ -291,7 +292,9 @@ var PointersBar = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
291
292
|
}))));
|
|
292
293
|
}
|
|
293
294
|
}]);
|
|
295
|
+
return PointersBar;
|
|
294
296
|
}(_react.Component);
|
|
297
|
+
exports["default"] = PointersBar;
|
|
295
298
|
PointersBar.propTypes = propTypes;
|
|
296
299
|
PointersBar.defaultProps = defaultProps;
|
|
297
300
|
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(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
10
10
|
var propTypes = {
|
|
11
11
|
poster: _propTypes.PropTypes.string,
|
|
12
12
|
player: _propTypes.PropTypes.instanceOf(Object),
|
|
@@ -47,4 +47,5 @@ function PosterImage(_ref) {
|
|
|
47
47
|
PosterImage.propTypes = propTypes;
|
|
48
48
|
PosterImage.defaultProps = defaultProps;
|
|
49
49
|
PosterImage.displayName = 'PosterImage';
|
|
50
|
-
var _default =
|
|
50
|
+
var _default = PosterImage;
|
|
51
|
+
exports["default"] = _default;
|
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(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
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(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
14
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _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(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
17
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
18
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _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(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
21
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
22
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
23
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
24
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
25
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
26
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
27
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
28
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
29
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
30
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
31
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
32
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
33
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
34
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
35
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
36
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
37
37
|
var propTypes = {
|
|
38
38
|
clickable: _propTypes.PropTypes.bool,
|
|
39
39
|
dblclickable: _propTypes.PropTypes.bool,
|
|
@@ -54,12 +54,14 @@ var defaultProps = {
|
|
|
54
54
|
player: {},
|
|
55
55
|
shortcuts: []
|
|
56
56
|
};
|
|
57
|
-
var Shortcut =
|
|
57
|
+
var Shortcut = /*#__PURE__*/function (_Component) {
|
|
58
|
+
_inherits(Shortcut, _Component);
|
|
59
|
+
var _super = _createSuper(Shortcut);
|
|
58
60
|
function Shortcut(props, context) {
|
|
59
61
|
var _this;
|
|
60
62
|
_classCallCheck(this, Shortcut);
|
|
61
|
-
_this =
|
|
62
|
-
_defineProperty(_this, "segmentShift", function (direction) {
|
|
63
|
+
_this = _super.call(this, props, context);
|
|
64
|
+
_defineProperty(_assertThisInitialized(_this), "segmentShift", function (direction) {
|
|
63
65
|
var _this$props = _this.props,
|
|
64
66
|
leftMarker = _this$props.playerSelectedMarker.leftMarker,
|
|
65
67
|
onTagClick = _this$props.onTagClick;
|
|
@@ -84,13 +86,13 @@ var Shortcut = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
84
86
|
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]);
|
|
85
87
|
}
|
|
86
88
|
});
|
|
87
|
-
_defineProperty(_this, "debounceSegmentShiftForward", (0, _lodash.debounce)(function () {
|
|
89
|
+
_defineProperty(_assertThisInitialized(_this), "debounceSegmentShiftForward", (0, _lodash.debounce)(function () {
|
|
88
90
|
_this.segmentShift('forward');
|
|
89
91
|
}, 0));
|
|
90
|
-
_defineProperty(_this, "debounceSegmentShiftBackward", (0, _lodash.debounce)(function () {
|
|
92
|
+
_defineProperty(_assertThisInitialized(_this), "debounceSegmentShiftBackward", (0, _lodash.debounce)(function () {
|
|
91
93
|
_this.segmentShift('backward');
|
|
92
94
|
}, 0));
|
|
93
|
-
_defineProperty(_this, "debounceKeyFunc", (0, _lodash.debounce)(function (keyCode) {
|
|
95
|
+
_defineProperty(_assertThisInitialized(_this), "debounceKeyFunc", (0, _lodash.debounce)(function (keyCode) {
|
|
94
96
|
_this.handleKeyMovement(keyCode);
|
|
95
97
|
}));
|
|
96
98
|
/**
|
|
@@ -99,7 +101,7 @@ var Shortcut = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
99
101
|
* @param {boolean} currentTimeRequired currentTime value required or not to perform key functionality
|
|
100
102
|
*common function to handle the key functionalies. eg-> W Key and Q key functionalities
|
|
101
103
|
*/
|
|
102
|
-
_defineProperty(_this, "handleKeyMovement", function (keyCode) {
|
|
104
|
+
_defineProperty(_assertThisInitialized(_this), "handleKeyMovement", function (keyCode) {
|
|
103
105
|
var _this$props$markers$, _this$props$playerSel, _this$props$player, _this$props$player2;
|
|
104
106
|
if (keyCode === 81 || keyCode === 87) {
|
|
105
107
|
_this.isCalled = true;
|
|
@@ -131,7 +133,7 @@ var Shortcut = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
131
133
|
* 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
|
|
132
134
|
* 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.
|
|
133
135
|
*/
|
|
134
|
-
_defineProperty(_this, "createThreeKeyCombo", function (event, handleKeyMovement, debounceKeyFunc, keyParameter) {
|
|
136
|
+
_defineProperty(_assertThisInitialized(_this), "createThreeKeyCombo", function (event, handleKeyMovement, debounceKeyFunc, keyParameter) {
|
|
135
137
|
var _this$props3 = _this.props,
|
|
136
138
|
playerReadOnlyMode = _this$props3.playerReadOnlyMode,
|
|
137
139
|
disablePlayerActions = _this$props3.disablePlayerActions;
|
|
@@ -149,26 +151,26 @@ var Shortcut = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
149
151
|
_this.isCalled = false;
|
|
150
152
|
}
|
|
151
153
|
});
|
|
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');
|
|
154
|
+
_defineProperty(_assertThisInitialized(_this), "threeKeyCombo1", (0, _lodash.debounce)(function (event) {
|
|
155
|
+
return _this.createThreeKeyCombo(event, _this.handleKeyMovement.bind(_assertThisInitialized(_this), 87), _this.debounceKeyFunc.bind(_assertThisInitialized(_this), 79), 'Ctrl + O + Right');
|
|
154
156
|
}, 0, {
|
|
155
157
|
leading: true,
|
|
156
158
|
trailing: true
|
|
157
159
|
}));
|
|
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');
|
|
160
|
+
_defineProperty(_assertThisInitialized(_this), "threeKeyCombo2", (0, _lodash.debounce)(function (event) {
|
|
161
|
+
return _this.createThreeKeyCombo(event, _this.handleKeyMovement.bind(_assertThisInitialized(_this), 87), _this.debounceKeyFunc.bind(_assertThisInitialized(_this), 79), 'Ctrl + O + Left');
|
|
160
162
|
}, 0, {
|
|
161
163
|
leading: true,
|
|
162
164
|
trailing: true
|
|
163
165
|
}));
|
|
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');
|
|
166
|
+
_defineProperty(_assertThisInitialized(_this), "threeKeyCombo3", (0, _lodash.debounce)(function (event) {
|
|
167
|
+
return _this.createThreeKeyCombo(event, _this.handleKeyMovement.bind(_assertThisInitialized(_this), 81), _this.debounceKeyFunc.bind(_assertThisInitialized(_this), 73), 'Ctrl + I + Right');
|
|
166
168
|
}, 0, {
|
|
167
169
|
leading: true,
|
|
168
170
|
trailing: true
|
|
169
171
|
}));
|
|
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');
|
|
172
|
+
_defineProperty(_assertThisInitialized(_this), "threeKeyCombo4", (0, _lodash.debounce)(function (event) {
|
|
173
|
+
return _this.createThreeKeyCombo(event, _this.handleKeyMovement.bind(_assertThisInitialized(_this), 81), _this.debounceKeyFunc.bind(_assertThisInitialized(_this), 73), 'Ctrl + I + Left');
|
|
172
174
|
}, 0, {
|
|
173
175
|
leading: true,
|
|
174
176
|
trailing: true
|
|
@@ -414,6 +416,7 @@ var Shortcut = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
414
416
|
// }
|
|
415
417
|
}
|
|
416
418
|
}
|
|
419
|
+
|
|
417
420
|
if (playerSelectedMarker.leftMarker > -1 && currentAdjustedTime > -1 && playerSelectedMarker.markerCreate && createPoint && currentAdjustedTime > playerSelectedMarker.leftMarker) {
|
|
418
421
|
// actions.handleMarkerPointChange('create');
|
|
419
422
|
onAddMarker(playerSelectedMarker.leftMarker, currentAdjustedTime, '', false, {
|
|
@@ -524,14 +527,13 @@ var Shortcut = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
524
527
|
}];
|
|
525
528
|
_this.shortcuts = _toConsumableArray(_this.defaultShortcuts);
|
|
526
529
|
_this.isCalled = false;
|
|
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);
|
|
530
|
+
_this.mergeShortcuts = _this.mergeShortcuts.bind(_assertThisInitialized(_this));
|
|
531
|
+
_this.handleKeyPress = _this.handleKeyPress.bind(_assertThisInitialized(_this));
|
|
532
|
+
_this.handleClick = _this.handleClick.bind(_assertThisInitialized(_this));
|
|
533
|
+
_this.handleDoubleClick = _this.handleDoubleClick.bind(_assertThisInitialized(_this));
|
|
531
534
|
return _this;
|
|
532
535
|
}
|
|
533
|
-
|
|
534
|
-
return _createClass(Shortcut, [{
|
|
536
|
+
_createClass(Shortcut, [{
|
|
535
537
|
key: "componentDidMount",
|
|
536
538
|
value: function componentDidMount() {
|
|
537
539
|
this.mergeShortcuts();
|
|
@@ -814,7 +816,9 @@ var Shortcut = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
814
816
|
return null;
|
|
815
817
|
}
|
|
816
818
|
}]);
|
|
819
|
+
return Shortcut;
|
|
817
820
|
}(_react.Component);
|
|
821
|
+
exports["default"] = Shortcut;
|
|
818
822
|
Shortcut.propTypes = propTypes;
|
|
819
823
|
Shortcut.defaultProps = defaultProps;
|
|
820
824
|
Shortcut.displayName = 'Shortcut';
|
package/components/Slider.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
@@ -12,23 +12,22 @@ 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
|
|
31
|
-
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
15
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
16
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
17
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
18
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
19
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
20
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
21
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
22
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
23
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
24
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
25
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
26
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
27
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
28
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
29
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
30
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
32
31
|
var propTypes = {
|
|
33
32
|
theme: _propTypes.PropTypes.string,
|
|
34
33
|
onMouseDown: _propTypes.PropTypes.func,
|
|
@@ -69,30 +68,31 @@ var defaultProps = {
|
|
|
69
68
|
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) {
|
|
70
69
|
return props.theme ? " ".concat(_tokens.colors[props.theme].base) : '#121d29';
|
|
71
70
|
});
|
|
72
|
-
var Slider =
|
|
71
|
+
var Slider = /*#__PURE__*/function (_Component) {
|
|
72
|
+
_inherits(Slider, _Component);
|
|
73
|
+
var _super = _createSuper(Slider);
|
|
73
74
|
function Slider(props, context) {
|
|
74
75
|
var _this;
|
|
75
76
|
_classCallCheck(this, Slider);
|
|
76
|
-
_this =
|
|
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);
|
|
77
|
+
_this = _super.call(this, props, context);
|
|
78
|
+
_this.handleMouseDown = _this.handleMouseDown.bind(_assertThisInitialized(_this));
|
|
79
|
+
_this.handleMouseMove = _this.handleMouseMove.bind(_assertThisInitialized(_this));
|
|
80
|
+
_this.handleMouseUp = _this.handleMouseUp.bind(_assertThisInitialized(_this));
|
|
81
|
+
_this.handleFocus = _this.handleFocus.bind(_assertThisInitialized(_this));
|
|
82
|
+
_this.handleBlur = _this.handleBlur.bind(_assertThisInitialized(_this));
|
|
83
|
+
_this.handleClick = _this.handleClick.bind(_assertThisInitialized(_this));
|
|
84
|
+
_this.handleKeyPress = _this.handleKeyPress.bind(_assertThisInitialized(_this));
|
|
85
|
+
_this.stepForward = _this.stepForward.bind(_assertThisInitialized(_this));
|
|
86
|
+
_this.stepBack = _this.stepBack.bind(_assertThisInitialized(_this));
|
|
87
|
+
_this.calculateDistance = _this.calculateDistance.bind(_assertThisInitialized(_this));
|
|
88
|
+
_this.getProgress = _this.getProgress.bind(_assertThisInitialized(_this));
|
|
89
|
+
_this.renderChildren = _this.renderChildren.bind(_assertThisInitialized(_this));
|
|
89
90
|
_this.state = {
|
|
90
91
|
// active: false,
|
|
91
92
|
};
|
|
92
93
|
return _this;
|
|
93
94
|
}
|
|
94
|
-
|
|
95
|
-
return _createClass(Slider, [{
|
|
95
|
+
_createClass(Slider, [{
|
|
96
96
|
key: "getProgress",
|
|
97
97
|
value: function getProgress() {
|
|
98
98
|
var getPercent = this.props.getPercent;
|
|
@@ -272,7 +272,9 @@ var Slider = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
272
272
|
}, this.renderChildren());
|
|
273
273
|
}
|
|
274
274
|
}]);
|
|
275
|
+
return Slider;
|
|
275
276
|
}(_react.Component);
|
|
277
|
+
exports["default"] = Slider;
|
|
276
278
|
Slider.propTypes = propTypes;
|
|
277
279
|
Slider.defaultProps = defaultProps;
|
|
278
280
|
Slider.displayName = 'Slider';
|