@desynova-digital/player 4.0.74 → 4.0.75

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.
Files changed (70) hide show
  1. package/Manager.js +9 -8
  2. package/actions/player.js +1 -1
  3. package/components/AudioMeter.js +28 -27
  4. package/components/BigPlayButton.js +17 -16
  5. package/components/ImageViewer.js +17 -16
  6. package/components/MarkerBar.js +17 -16
  7. package/components/Menu.js +2 -2
  8. package/components/Player.js +46 -45
  9. package/components/PlayerHeader.js +24 -23
  10. package/components/Playlist.js +15 -14
  11. package/components/PointersBar.js +20 -19
  12. package/components/PosterImage.js +1 -1
  13. package/components/SDOutline.js +2 -2
  14. package/components/Shortcut.js +70 -69
  15. package/components/Slider.js +33 -33
  16. package/components/TagsBar.js +16 -15
  17. package/components/Video.js +163 -148
  18. package/components/control-bar/AudioTracksMenuButton.js +15 -14
  19. package/components/control-bar/CameraButton.js +16 -15
  20. package/components/control-bar/CaptionControlMenuButton.js +20 -19
  21. package/components/control-bar/CommentsButton.js +17 -16
  22. package/components/control-bar/ControlBar.js +18 -17
  23. package/components/control-bar/EditorControlMenuButton.js +17 -16
  24. package/components/control-bar/ForwardControl.js +1 -1
  25. package/components/control-bar/ForwardReplayControl.js +16 -15
  26. package/components/control-bar/FullscreenToggle.js +16 -15
  27. package/components/control-bar/PlayToggle.js +16 -15
  28. package/components/control-bar/ReplayControl.js +1 -1
  29. package/components/control-bar/SettingsMenuButton.js +4 -4
  30. package/components/control-bar/SubtitleLanguagesMenuButton.js +15 -14
  31. package/components/control-bar/SubtitleMovementMenu.js +17 -16
  32. package/components/control-bar/VolumeMenuButton.js +17 -16
  33. package/components/control-bar/ZoomMenuButton.js +17 -16
  34. package/components/marking-controls/MarkInControl.js +16 -15
  35. package/components/marking-controls/MarkOutControl.js +16 -15
  36. package/components/marking-controls/MarkingAddButton.js +16 -15
  37. package/components/marking-controls/MarkingControl.js +2 -2
  38. package/components/marking-controls/MarkingDeleteButton.js +16 -15
  39. package/components/marking-controls/MarkingDuration.js +2 -2
  40. package/components/marking-controls/MarkingPreview.js +16 -15
  41. package/components/marking-controls/TimecodeFormatSelector.js +7 -7
  42. package/components/progress-bar/AudioWaveform.js +16 -15
  43. package/components/progress-bar/LoadProgressBar.js +1 -1
  44. package/components/progress-bar/MouseTimeDisplay.js +1 -1
  45. package/components/progress-bar/PlayProgressBar.js +2 -2
  46. package/components/progress-bar/ProgressControl.js +20 -19
  47. package/components/progress-bar/SeekBar.js +28 -27
  48. package/components/progress-bar/Timeline.js +15 -14
  49. package/components/settings-menu-control/CameraControl.js +3 -3
  50. package/components/settings-menu-control/ChildMenuComponent.js +29 -28
  51. package/components/settings-menu-control/ParentMenuComponent.js +18 -17
  52. package/components/settings-menu-control/PlaybackRateControl.js +16 -15
  53. package/components/settings-menu-control/SafeAreaControl.js +16 -15
  54. package/components/settings-menu-control/SettingsMenu.js +12 -12
  55. package/components/time-controls/CurrentTimeDisplay.js +7 -7
  56. package/components/time-controls/DurationDisplay.js +2 -2
  57. package/components/time-controls/TimeDivider.js +2 -2
  58. package/components/volume-control/VolumeBar.js +25 -24
  59. package/components/volume-control/VolumeControl.js +1 -1
  60. package/components/volume-control/VolumeLevel.js +2 -2
  61. package/components/zoom-control/ZoomBar.js +24 -23
  62. package/components/zoom-control/ZoomLevel.js +2 -2
  63. package/index.js +2 -2
  64. package/package.json +1 -1
  65. package/reducers/operation.js +2 -2
  66. package/reducers/player.js +2 -2
  67. package/utils/browser.js +14 -14
  68. package/utils/dom.js +18 -18
  69. package/utils/fullscreen.js +6 -5
  70. package/utils/index.js +54 -54
@@ -9,30 +9,30 @@ 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(e) { return e && e.__esModule ? e : { "default": e }; }
12
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
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(); }
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(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(); }
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(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; }
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
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; }
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
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; }
28
+ 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); }
30
29
  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 + ""; }
30
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
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 _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); }
33
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
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(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
36
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,
@@ -56,11 +56,12 @@ var defaultProps = {
56
56
  allowMarkerOverlap: false
57
57
  };
58
58
  var Shortcut = exports["default"] = /*#__PURE__*/function (_Component) {
59
+ _inherits(Shortcut, _Component);
59
60
  function Shortcut(props, context) {
60
61
  var _this;
61
62
  _classCallCheck(this, Shortcut);
62
63
  _this = _callSuper(this, Shortcut, [props, context]);
63
- _defineProperty(_this, "segmentShift", function (direction) {
64
+ _defineProperty(_assertThisInitialized(_this), "segmentShift", function (direction) {
64
65
  var _this$props = _this.props,
65
66
  leftMarker = _this$props.playerSelectedMarker.leftMarker,
66
67
  onTagClick = _this$props.onTagClick;
@@ -85,7 +86,7 @@ var Shortcut = exports["default"] = /*#__PURE__*/function (_Component) {
85
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]);
86
87
  }
87
88
  });
88
- _defineProperty(_this, "executeShortcut67", function (player, actions) {
89
+ _defineProperty(_assertThisInitialized(_this), "executeShortcut67", function (player, actions) {
89
90
  var shortcut = _this.defaultShortcuts.find(function (s) {
90
91
  return s.keyCode === 67;
91
92
  });
@@ -96,22 +97,22 @@ var Shortcut = exports["default"] = /*#__PURE__*/function (_Component) {
96
97
  shortcut.handle.apply(shortcut, [player, actions].concat(args));
97
98
  }
98
99
  });
99
- _defineProperty(_this, "debounceSegmentShiftForward", (0, _lodash.debounce)(function () {
100
+ _defineProperty(_assertThisInitialized(_this), "debounceSegmentShiftForward", (0, _lodash.debounce)(function () {
100
101
  _this.segmentShift('forward');
101
102
  }, 0));
102
- _defineProperty(_this, "debounceSegmentShiftBackward", (0, _lodash.debounce)(function () {
103
+ _defineProperty(_assertThisInitialized(_this), "debounceSegmentShiftBackward", (0, _lodash.debounce)(function () {
103
104
  _this.segmentShift('backward');
104
105
  }, 0));
105
- _defineProperty(_this, "debounceKeyFunc", (0, _lodash.debounce)(function (keyCode) {
106
+ _defineProperty(_assertThisInitialized(_this), "debounceKeyFunc", (0, _lodash.debounce)(function (keyCode) {
106
107
  _this.handleKeyMovement(keyCode);
107
108
  }));
108
- /**
109
- *
110
- * @param {number} keyCode the keycode for the specific key's functionality
111
- * @param {boolean} currentTimeRequired currentTime value required or not to perform key functionality
112
- *common function to handle the key functionalies. eg-> W Key and Q key functionalities
109
+ /**
110
+ *
111
+ * @param {number} keyCode the keycode for the specific key's functionality
112
+ * @param {boolean} currentTimeRequired currentTime value required or not to perform key functionality
113
+ *common function to handle the key functionalies. eg-> W Key and Q key functionalities
113
114
  */
114
- _defineProperty(_this, "handleKeyMovement", function (keyCode) {
115
+ _defineProperty(_assertThisInitialized(_this), "handleKeyMovement", function (keyCode) {
115
116
  var _this$props$markers$, _this$props$playerSel, _this$props$player, _this$props$player2;
116
117
  if (keyCode === 81 || keyCode === 87) {
117
118
  _this.isCalled = true;
@@ -134,16 +135,16 @@ var Shortcut = exports["default"] = /*#__PURE__*/function (_Component) {
134
135
  });
135
136
  }
136
137
  });
137
- /**
138
- *
139
- * @param {event} event
140
- * @param {function} handleKeyMovement function to call Q and W key functionality
141
- * @param {function} debounceKeyFunc to handle the debounced I and O key functionality
142
- * @param {string} keyParameter to identify the key combo pressed
143
- * 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
144
- * 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.
138
+ /**
139
+ *
140
+ * @param {event} event
141
+ * @param {function} handleKeyMovement function to call Q and W key functionality
142
+ * @param {function} debounceKeyFunc to handle the debounced I and O key functionality
143
+ * @param {string} keyParameter to identify the key combo pressed
144
+ * 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
145
+ * 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.
145
146
  */
146
- _defineProperty(_this, "createThreeKeyCombo", function (event, handleKeyMovement, debounceKeyFunc, keyParameter) {
147
+ _defineProperty(_assertThisInitialized(_this), "createThreeKeyCombo", function (event, handleKeyMovement, debounceKeyFunc, keyParameter) {
147
148
  var _this$props3 = _this.props,
148
149
  playerReadOnlyMode = _this$props3.playerReadOnlyMode,
149
150
  disablePlayerActions = _this$props3.disablePlayerActions;
@@ -161,26 +162,26 @@ var Shortcut = exports["default"] = /*#__PURE__*/function (_Component) {
161
162
  _this.isCalled = false;
162
163
  }
163
164
  });
164
- _defineProperty(_this, "threeKeyCombo1", (0, _lodash.debounce)(function (event) {
165
- return _this.createThreeKeyCombo(event, _this.handleKeyMovement.bind(_this, 87), _this.debounceKeyFunc.bind(_this, 79), 'Ctrl + O + Right');
165
+ _defineProperty(_assertThisInitialized(_this), "threeKeyCombo1", (0, _lodash.debounce)(function (event) {
166
+ return _this.createThreeKeyCombo(event, _this.handleKeyMovement.bind(_assertThisInitialized(_this), 87), _this.debounceKeyFunc.bind(_assertThisInitialized(_this), 79), 'Ctrl + O + Right');
166
167
  }, 0, {
167
168
  leading: true,
168
169
  trailing: true
169
170
  }));
170
- _defineProperty(_this, "threeKeyCombo2", (0, _lodash.debounce)(function (event) {
171
- return _this.createThreeKeyCombo(event, _this.handleKeyMovement.bind(_this, 87), _this.debounceKeyFunc.bind(_this, 79), 'Ctrl + O + Left');
171
+ _defineProperty(_assertThisInitialized(_this), "threeKeyCombo2", (0, _lodash.debounce)(function (event) {
172
+ return _this.createThreeKeyCombo(event, _this.handleKeyMovement.bind(_assertThisInitialized(_this), 87), _this.debounceKeyFunc.bind(_assertThisInitialized(_this), 79), 'Ctrl + O + Left');
172
173
  }, 0, {
173
174
  leading: true,
174
175
  trailing: true
175
176
  }));
176
- _defineProperty(_this, "threeKeyCombo3", (0, _lodash.debounce)(function (event) {
177
- return _this.createThreeKeyCombo(event, _this.handleKeyMovement.bind(_this, 81), _this.debounceKeyFunc.bind(_this, 73), 'Ctrl + I + Right');
177
+ _defineProperty(_assertThisInitialized(_this), "threeKeyCombo3", (0, _lodash.debounce)(function (event) {
178
+ return _this.createThreeKeyCombo(event, _this.handleKeyMovement.bind(_assertThisInitialized(_this), 81), _this.debounceKeyFunc.bind(_assertThisInitialized(_this), 73), 'Ctrl + I + Right');
178
179
  }, 0, {
179
180
  leading: true,
180
181
  trailing: true
181
182
  }));
182
- _defineProperty(_this, "threeKeyCombo4", (0, _lodash.debounce)(function (event) {
183
- return _this.createThreeKeyCombo(event, _this.handleKeyMovement.bind(_this, 81), _this.debounceKeyFunc.bind(_this, 73), 'Ctrl + I + Left');
183
+ _defineProperty(_assertThisInitialized(_this), "threeKeyCombo4", (0, _lodash.debounce)(function (event) {
184
+ return _this.createThreeKeyCombo(event, _this.handleKeyMovement.bind(_assertThisInitialized(_this), 81), _this.debounceKeyFunc.bind(_assertThisInitialized(_this), 73), 'Ctrl + I + Left');
184
185
  }, 0, {
185
186
  leading: true,
186
187
  trailing: true
@@ -646,14 +647,13 @@ var Shortcut = exports["default"] = /*#__PURE__*/function (_Component) {
646
647
  }];
647
648
  _this.shortcuts = _toConsumableArray(_this.defaultShortcuts);
648
649
  _this.isCalled = false;
649
- _this.mergeShortcuts = _this.mergeShortcuts.bind(_this);
650
- _this.handleKeyPress = _this.handleKeyPress.bind(_this);
651
- _this.handleClick = _this.handleClick.bind(_this);
652
- _this.handleDoubleClick = _this.handleDoubleClick.bind(_this);
650
+ _this.mergeShortcuts = _this.mergeShortcuts.bind(_assertThisInitialized(_this));
651
+ _this.handleKeyPress = _this.handleKeyPress.bind(_assertThisInitialized(_this));
652
+ _this.handleClick = _this.handleClick.bind(_assertThisInitialized(_this));
653
+ _this.handleDoubleClick = _this.handleDoubleClick.bind(_assertThisInitialized(_this));
653
654
  return _this;
654
655
  }
655
- _inherits(Shortcut, _Component);
656
- return _createClass(Shortcut, [{
656
+ _createClass(Shortcut, [{
657
657
  key: "componentDidMount",
658
658
  value: function componentDidMount() {
659
659
  this.mergeShortcuts();
@@ -828,20 +828,20 @@ var Shortcut = exports["default"] = /*#__PURE__*/function (_Component) {
828
828
  } else if (playbackRate >= 0.5) {
829
829
  playbackRate = 1.0;
830
830
  }
831
- /*
832
- * else if (playbackRate >= 1.25) {
833
- * playbackRate = 1.5;
834
- * } else if (playbackRate >= 1.0) {
835
- * playbackRate = 1.25;
836
- * }
837
- * else if (playbackRate >= 0.5) {
838
- * playbackRate = 1.0;
839
- * }
840
- * else if (playbackRate >= 0.25) {
841
- * playbackRate = 0.5;
842
- * } else if (playbackRate >= 0) {
843
- * playbackRate = 0.25;
844
- * }
831
+ /*
832
+ * else if (playbackRate >= 1.25) {
833
+ * playbackRate = 1.5;
834
+ * } else if (playbackRate >= 1.0) {
835
+ * playbackRate = 1.25;
836
+ * }
837
+ * else if (playbackRate >= 0.5) {
838
+ * playbackRate = 1.0;
839
+ * }
840
+ * else if (playbackRate >= 0.25) {
841
+ * playbackRate = 0.5;
842
+ * } else if (playbackRate >= 0) {
843
+ * playbackRate = 0.25;
844
+ * }
845
845
  */
846
846
  actions.changeRate(playbackRate, {
847
847
  action: 'fast-forward',
@@ -930,9 +930,9 @@ var Shortcut = exports["default"] = /*#__PURE__*/function (_Component) {
930
930
  // e.preventDefault();
931
931
  }
932
932
 
933
- /*
934
- * this component dose not render anything
935
- * it's just for the key down event
933
+ /*
934
+ * this component dose not render anything
935
+ * it's just for the key down event
936
936
  */
937
937
  }, {
938
938
  key: "render",
@@ -940,6 +940,7 @@ var Shortcut = exports["default"] = /*#__PURE__*/function (_Component) {
940
940
  return null;
941
941
  }
942
942
  }]);
943
+ return Shortcut;
943
944
  }(_react.Component);
944
945
  Shortcut.propTypes = propTypes;
945
946
  Shortcut.defaultProps = defaultProps;
@@ -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(e) { return e && e.__esModule ? e : { "default": e }; }
15
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
16
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 + ""; }
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 && Object.prototype.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 _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(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
23
22
  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
23
  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; }
24
+ 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
25
  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) } })); }
26
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
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 _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); }
29
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
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,
@@ -70,29 +69,29 @@ var SliderBlock = _styledComponents["default"].div(_templateObject || (_template
70
69
  return props.theme ? " ".concat(_tokens.colors[props.theme].base) : '#121d29';
71
70
  });
72
71
  var Slider = exports["default"] = /*#__PURE__*/function (_Component) {
72
+ _inherits(Slider, _Component);
73
73
  function Slider(props, context) {
74
74
  var _this;
75
75
  _classCallCheck(this, Slider);
76
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);
77
+ _this.handleMouseDown = _this.handleMouseDown.bind(_assertThisInitialized(_this));
78
+ _this.handleMouseMove = _this.handleMouseMove.bind(_assertThisInitialized(_this));
79
+ _this.handleMouseUp = _this.handleMouseUp.bind(_assertThisInitialized(_this));
80
+ _this.handleFocus = _this.handleFocus.bind(_assertThisInitialized(_this));
81
+ _this.handleBlur = _this.handleBlur.bind(_assertThisInitialized(_this));
82
+ _this.handleClick = _this.handleClick.bind(_assertThisInitialized(_this));
83
+ _this.handleKeyPress = _this.handleKeyPress.bind(_assertThisInitialized(_this));
84
+ _this.stepForward = _this.stepForward.bind(_assertThisInitialized(_this));
85
+ _this.stepBack = _this.stepBack.bind(_assertThisInitialized(_this));
86
+ _this.calculateDistance = _this.calculateDistance.bind(_assertThisInitialized(_this));
87
+ _this.getProgress = _this.getProgress.bind(_assertThisInitialized(_this));
88
+ _this.renderChildren = _this.renderChildren.bind(_assertThisInitialized(_this));
89
89
  _this.state = {
90
90
  // active: false,
91
91
  };
92
92
  return _this;
93
93
  }
94
- _inherits(Slider, _Component);
95
- return _createClass(Slider, [{
94
+ _createClass(Slider, [{
96
95
  key: "getProgress",
97
96
  value: function getProgress() {
98
97
  var getPercent = this.props.getPercent;
@@ -113,9 +112,9 @@ var Slider = exports["default"] = /*#__PURE__*/function (_Component) {
113
112
  var _this$props = this.props,
114
113
  onMouseDown = _this$props.onMouseDown,
115
114
  sliderActive = _this$props.sliderActive;
116
- /*
117
- * event.preventDefault();
118
- * event.stopPropagation();
115
+ /*
116
+ * event.preventDefault();
117
+ * event.stopPropagation();
119
118
  */
120
119
 
121
120
  document.addEventListener('mousemove', this.handleMouseMove, true);
@@ -123,9 +122,9 @@ var Slider = exports["default"] = /*#__PURE__*/function (_Component) {
123
122
  document.addEventListener('touchmove', this.handleMouseMove, true);
124
123
  document.addEventListener('touchend', this.handleMouseUp, true);
125
124
  this.setState({
126
- /*
127
- * active: true,
128
- * distance: 0
125
+ /*
126
+ * active: true,
127
+ * distance: 0
129
128
  */
130
129
  });
131
130
  if (sliderActive) {
@@ -272,6 +271,7 @@ var Slider = exports["default"] = /*#__PURE__*/function (_Component) {
272
271
  }, this.renderChildren());
273
272
  }
274
273
  }]);
274
+ return Slider;
275
275
  }(_react.Component);
276
276
  Slider.propTypes = propTypes;
277
277
  Slider.defaultProps = defaultProps;
@@ -9,22 +9,22 @@ var _react = _interopRequireWildcard(require("react"));
9
9
  var _propTypes = require("prop-types");
10
10
  var _styledComponents = _interopRequireDefault(require("styled-components"));
11
11
  var _templateObject;
12
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
12
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
13
  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); }
14
- 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; }
15
- function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
16
- 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); } }
17
- function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
18
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
14
+ 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 && Object.prototype.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; }
15
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
16
+ 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); } }
17
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
18
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
19
19
  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); }
20
20
  function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
21
- 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); }
22
- function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
21
+ 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); }
23
22
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
24
- function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
25
- 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); }
26
- function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
27
- function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
23
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
24
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
25
+ 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); }
26
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
27
+ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
28
28
  var propTypes = {
29
29
  tagsMarker: _propTypes.PropTypes.instanceOf(Array),
30
30
  player: _propTypes.PropTypes.instanceOf(Object),
@@ -32,15 +32,15 @@ var propTypes = {
32
32
  };
33
33
  var TagsBlock = _styledComponents["default"].div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n height: 10px;\n position: absolute;\n bottom: 40px;\n cursor: default;\n .marker {\n position: absolute;\n width: 2px;\n height: 100%;\n background: #00cec6;\n cursor: pointer;\n transition: transform 250ms ease-in-out;\n &:hover {\n transform: scale(2);\n }\n }\n"])));
34
34
  var TagsBar = exports["default"] = /*#__PURE__*/function (_Component) {
35
+ _inherits(TagsBar, _Component);
35
36
  function TagsBar(props) {
36
37
  var _this;
37
38
  _classCallCheck(this, TagsBar);
38
39
  _this = _callSuper(this, TagsBar, [props]);
39
- _this.getMarkerPosition = _this.getMarkerPosition.bind(_this);
40
+ _this.getMarkerPosition = _this.getMarkerPosition.bind(_assertThisInitialized(_this));
40
41
  return _this;
41
42
  }
42
- _inherits(TagsBar, _Component);
43
- return _createClass(TagsBar, [{
43
+ _createClass(TagsBar, [{
44
44
  key: "getMarkerPosition",
45
45
  value: function getMarkerPosition(timePos) {
46
46
  var player = this.props.player;
@@ -75,6 +75,7 @@ var TagsBar = exports["default"] = /*#__PURE__*/function (_Component) {
75
75
  }));
76
76
  }
77
77
  }]);
78
+ return TagsBar;
78
79
  }(_react.Component);
79
80
  TagsBar.propTypes = propTypes;
80
81
  TagsBar.displayName = 'TagsBar';