@desynova-digital/player 3.9.7 → 3.9.9

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 (68) hide show
  1. package/Manager.js +26 -50
  2. package/actions/player.js +58 -89
  3. package/actions/video.js +70 -69
  4. package/colors.js +13 -13
  5. package/components/AudioMeter.js +138 -182
  6. package/components/BigPlayButton.js +48 -72
  7. package/components/ImageViewer.js +120 -165
  8. package/components/MarkerBar.js +64 -75
  9. package/components/Menu.js +30 -57
  10. package/components/Player.js +239 -357
  11. package/components/PlayerHeader.js +213 -348
  12. package/components/Playlist.js +50 -89
  13. package/components/PointersBar.js +131 -203
  14. package/components/PosterImage.js +12 -22
  15. package/components/SDOutline.js +32 -54
  16. package/components/Shortcut.js +135 -140
  17. package/components/Slider.js +85 -128
  18. package/components/TagsBar.js +45 -62
  19. package/components/Video.js +479 -655
  20. package/components/control-bar/AudioTracksMenuButton.js +63 -86
  21. package/components/control-bar/CameraButton.js +65 -76
  22. package/components/control-bar/CommentsButton.js +97 -136
  23. package/components/control-bar/ControlBar.js +171 -164
  24. package/components/control-bar/EditorControlMenuButton.js +180 -280
  25. package/components/control-bar/ForwardControl.js +7 -11
  26. package/components/control-bar/ForwardReplayControl.js +41 -55
  27. package/components/control-bar/FullscreenToggle.js +48 -67
  28. package/components/control-bar/PlayToggle.js +39 -54
  29. package/components/control-bar/ReplayControl.js +7 -11
  30. package/components/control-bar/SettingsMenuButton.js +19 -29
  31. package/components/control-bar/SubtitleLanguagesMenuButton.js +90 -119
  32. package/components/control-bar/SubtitleMovementMenu.js +128 -0
  33. package/components/control-bar/VolumeMenuButton.js +71 -96
  34. package/components/control-bar/ZoomMenuButton.js +57 -81
  35. package/components/marking-controls/MarkInControl.js +49 -65
  36. package/components/marking-controls/MarkOutControl.js +53 -69
  37. package/components/marking-controls/MarkingAddButton.js +41 -54
  38. package/components/marking-controls/MarkingControl.js +58 -107
  39. package/components/marking-controls/MarkingDeleteButton.js +39 -51
  40. package/components/marking-controls/MarkingDuration.js +23 -56
  41. package/components/marking-controls/MarkingPreview.js +39 -51
  42. package/components/progress-bar/AudioWaveform.js +48 -64
  43. package/components/progress-bar/LoadProgressBar.js +14 -37
  44. package/components/progress-bar/MouseTimeDisplay.js +14 -30
  45. package/components/progress-bar/PlayProgressBar.js +23 -41
  46. package/components/progress-bar/ProgressControl.js +82 -141
  47. package/components/progress-bar/SeekBar.js +101 -169
  48. package/components/progress-bar/Timeline.js +57 -81
  49. package/components/settings-menu-control/PlaybackRateControl.js +70 -115
  50. package/components/settings-menu-control/SafeAreaControl.js +49 -65
  51. package/components/settings-menu-control/SettingsMenu.js +26 -50
  52. package/components/time-controls/CurrentTimeDisplay.js +15 -34
  53. package/components/time-controls/DurationDisplay.js +14 -33
  54. package/components/time-controls/TimeDivider.js +12 -28
  55. package/components/volume-control/VolumeBar.js +84 -118
  56. package/components/volume-control/VolumeControl.js +7 -23
  57. package/components/volume-control/VolumeLevel.js +19 -36
  58. package/components/zoom-control/ZoomBar.js +79 -111
  59. package/components/zoom-control/ZoomLevel.js +24 -36
  60. package/index.js +204 -149
  61. package/package.json +5 -1
  62. package/reducers/index.js +12 -14
  63. package/reducers/operation.js +14 -14
  64. package/reducers/player.js +40 -42
  65. package/utils/browser.js +10 -5
  66. package/utils/dom.js +4 -15
  67. package/utils/fullscreen.js +24 -24
  68. package/utils/index.js +35 -46
@@ -1,116 +1,92 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
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); }
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
-
7
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
8
-
9
- var _createClass = function () { 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, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
10
-
11
- var _propTypes = require('prop-types');
12
-
13
- var _react = require('react');
14
-
15
- var _react2 = _interopRequireDefault(_react);
16
-
17
- var _styledComponents = require('styled-components');
18
-
19
- var _styledComponents2 = _interopRequireDefault(_styledComponents);
20
-
21
- var _components = require('@desynova-digital/components');
22
-
23
- var _ZoomBar = require('../zoom-control/ZoomBar');
24
-
25
- var _ZoomBar2 = _interopRequireDefault(_ZoomBar);
26
-
27
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
28
-
7
+ exports["default"] = void 0;
8
+ var _propTypes = require("prop-types");
9
+ var _react = _interopRequireWildcard(require("react"));
10
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
11
+ var _components = require("@desynova-digital/components");
12
+ var _ZoomBar = _interopRequireDefault(require("../zoom-control/ZoomBar"));
13
+ var _templateObject, _templateObject2;
14
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
15
+ 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); }
16
+ 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; }
17
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
29
18
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
30
-
31
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
32
-
33
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
34
-
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) } })); }
35
31
  var propTypes = {
36
32
  player: _propTypes.PropTypes.instanceOf(Object),
37
33
  actions: _propTypes.PropTypes.instanceOf(Object),
38
34
  style: _propTypes.PropTypes.instanceOf(Object)
39
35
  };
40
-
41
36
  var defaultProps = {
42
37
  player: {},
43
38
  actions: {},
44
39
  style: {}
45
40
  };
46
-
47
- var ZoomMenu = _styledComponents2.default.div.withConfig({
48
- displayName: 'ZoomMenuButton__ZoomMenu',
49
- componentId: 'sc-1jlws9l-0'
50
- })(['width:120px;position:relative;display:flex;justify-content:center;align-items:center;.zoom-control-bar{width:100px;height:2px;background:#304153;position:relative;}']);
51
-
52
- var ZoomButton = (0, _styledComponents2.default)(_components.Button).withConfig({
53
- displayName: 'ZoomMenuButton__ZoomButton',
54
- componentId: 'sc-1jlws9l-1'
55
- })(['background:transparent;border:none;margin:0px 15px 0px 10px;&:hover,&:focus{background:transparent;}']);
56
-
57
- var ZoomMenuButton = function (_Component) {
41
+ var ZoomMenu = _styledComponents["default"].div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 120px;\n position: relative;\n display: flex;\n justify-content: center;\n align-items: center;\n .zoom-control-bar {\n width: 100px;\n height: 2px;\n background: #304153;\n position: relative;\n }\n"])));
42
+ var ZoomButton = (0, _styledComponents["default"])(_components.Button)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n background: transparent;\n border: none;\n margin: 0px 15px 0px 10px;\n &:hover,\n &:focus {\n background: transparent;\n }\n"])));
43
+ var ZoomMenuButton = /*#__PURE__*/function (_Component) {
58
44
  _inherits(ZoomMenuButton, _Component);
59
-
45
+ var _super = _createSuper(ZoomMenuButton);
60
46
  function ZoomMenuButton(props, context) {
47
+ var _this;
61
48
  _classCallCheck(this, ZoomMenuButton);
62
-
63
- var _this = _possibleConstructorReturn(this, (ZoomMenuButton.__proto__ || Object.getPrototypeOf(ZoomMenuButton)).call(this, props, context));
64
-
65
- _this.handleClick = _this.handleClick.bind(_this);
49
+ _this = _super.call(this, props, context);
50
+ _this.handleClick = _this.handleClick.bind(_assertThisInitialized(_this));
66
51
  return _this;
67
52
  }
68
-
69
53
  _createClass(ZoomMenuButton, [{
70
- key: 'handleClick',
54
+ key: "handleClick",
71
55
  value: function handleClick() {
72
- var _props = this.props,
73
- player = _props.player,
74
- actions = _props.actions;
75
-
56
+ var _this$props = this.props,
57
+ player = _this$props.player,
58
+ actions = _this$props.actions;
76
59
  actions.mute(!player.muted);
77
60
  }
78
61
  }, {
79
- key: 'render',
62
+ key: "render",
80
63
  value: function render() {
81
64
  var style = this.props.style;
82
-
83
65
  var vertical = false;
84
- return _react2.default.createElement(
85
- ZoomMenu,
86
- { style: style },
87
- _react2.default.createElement(ZoomButton, {
88
- display: 'rounded',
89
- appearance: 'cta',
90
- icon: 'magnifier',
91
- iconWidth: 18,
92
- iconHeight: 18,
93
- width: 20,
94
- height: 20,
95
- onClick: this.handleClick
96
- }),
97
- _react2.default.createElement(
98
- 'div',
99
- { className: 'zoom-control-bar' },
100
- _react2.default.createElement(_ZoomBar2.default, _extends({
101
- onFocus: this.handleFocus,
102
- onBlur: this.handleBlur,
103
- vertical: vertical
104
- }, this.props))
105
- )
106
- );
66
+ return /*#__PURE__*/_react["default"].createElement(ZoomMenu, {
67
+ style: style
68
+ }, /*#__PURE__*/_react["default"].createElement(ZoomButton, {
69
+ display: "rounded",
70
+ appearance: "cta",
71
+ icon: "magnifier",
72
+ iconWidth: 18,
73
+ iconHeight: 18,
74
+ width: 20,
75
+ height: 20,
76
+ onClick: this.handleClick
77
+ }), /*#__PURE__*/_react["default"].createElement("div", {
78
+ className: "zoom-control-bar"
79
+ }, /*#__PURE__*/_react["default"].createElement(_ZoomBar["default"], _extends({
80
+ onFocus: this.handleFocus,
81
+ onBlur: this.handleBlur,
82
+ vertical: vertical
83
+ }, this.props))));
107
84
  }
108
85
  }]);
109
-
110
86
  return ZoomMenuButton;
111
87
  }(_react.Component);
112
-
113
88
  ZoomMenuButton.propTypes = propTypes;
114
89
  ZoomMenuButton.defaultProps = defaultProps;
115
90
  ZoomMenuButton.displayName = 'ZoomMenuButton';
116
- exports.default = ZoomMenuButton;
91
+ var _default = ZoomMenuButton;
92
+ exports["default"] = _default;
@@ -1,31 +1,31 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
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); }
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
-
7
- var _createClass = function () { 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, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
8
-
9
- var _react = require('react');
10
-
11
- var _react2 = _interopRequireDefault(_react);
12
-
13
- var _propTypes = require('prop-types');
14
-
15
- var _styledComponents = require('styled-components');
16
-
17
- var _styledComponents2 = _interopRequireDefault(_styledComponents);
18
-
19
- var _components = require('@desynova-digital/components');
20
-
21
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
22
-
7
+ exports["default"] = void 0;
8
+ var _react = _interopRequireWildcard(require("react"));
9
+ var _propTypes = require("prop-types");
10
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
11
+ var _components = require("@desynova-digital/components");
12
+ var _templateObject;
13
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
14
+ 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); }
15
+ 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; }
23
16
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
24
-
25
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
26
-
27
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
28
-
17
+ 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); } }
18
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
19
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
20
+ 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); }
21
+ 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); }
22
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
23
+ 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); }; }
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); }
25
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
26
+ 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; } }
27
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
28
+ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
29
29
  var propTypes = {
30
30
  actions: _propTypes.PropTypes.instanceOf(Object),
31
31
  player: _propTypes.PropTypes.instanceOf(Object),
@@ -33,44 +33,35 @@ var propTypes = {
33
33
  leftMarker: _propTypes.PropTypes.number,
34
34
  allowMarkerOverlap: _propTypes.PropTypes.bool
35
35
  };
36
-
37
36
  var defaultProps = {
38
37
  actions: {},
39
38
  player: {},
40
39
  leftMarker: -1,
41
40
  allowMarkerOverlap: false
42
41
  };
43
-
44
- var MarkInButton = (0, _styledComponents2.default)(_components.Button).withConfig({
45
- displayName: 'MarkInControl__MarkInButton',
46
- componentId: 'sc-15q0p12-0'
47
- })(['background:transparent;border:none;margin:0px 10px;pointer-events:', ';', '{svg path{fill:', ';}}&:hover{background:transparent;', '{svg path{fill:#00cec6;}}}&:focus{background:transparent;}'], function (props) {
42
+ var MarkInButton = (0, _styledComponents["default"])(_components.Button)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background: transparent;\n border: none;\n margin: 0px 10px;\n pointer-events: ", ";\n ", " {\n svg path {\n fill: ", ";\n }\n }\n &:hover {\n background: transparent;\n ", " {\n svg path {\n fill: #00cec6;\n }\n }\n }\n &:focus {\n background: transparent;\n }\n"])), function (props) {
48
43
  return props.leftMarker > -1 ? 'none' : 'all';
49
44
  }, _components.Icon.Element, function (props) {
50
45
  return props.leftMarker > -1 ? '#00cec6' : '#ffffff';
51
46
  }, _components.Icon.Element);
52
-
53
- var MarkInControl = function (_Component) {
47
+ var MarkInControl = /*#__PURE__*/function (_Component) {
54
48
  _inherits(MarkInControl, _Component);
55
-
49
+ var _super = _createSuper(MarkInControl);
56
50
  function MarkInControl(props) {
51
+ var _this;
57
52
  _classCallCheck(this, MarkInControl);
58
-
59
- var _this = _possibleConstructorReturn(this, (MarkInControl.__proto__ || Object.getPrototypeOf(MarkInControl)).call(this, props));
60
-
61
- _this.handleClick = _this.handleClick.bind(_this);
53
+ _this = _super.call(this, props);
54
+ _this.handleClick = _this.handleClick.bind(_assertThisInitialized(_this));
62
55
  return _this;
63
56
  }
64
-
65
57
  _createClass(MarkInControl, [{
66
- key: 'getStyle',
58
+ key: "getStyle",
67
59
  value: function getStyle() {
68
- var _props = this.props,
69
- currentTime = _props.player.currentTime,
70
- markers = _props.markers,
71
- leftMarker = _props.leftMarker,
72
- allowMarkerOverlap = _props.allowMarkerOverlap;
73
-
60
+ var _this$props = this.props,
61
+ currentTime = _this$props.player.currentTime,
62
+ markers = _this$props.markers,
63
+ leftMarker = _this$props.leftMarker,
64
+ allowMarkerOverlap = _this$props.allowMarkerOverlap;
74
65
  var style = {
75
66
  pointerEvents: 'all',
76
67
  opacity: 1
@@ -85,18 +76,16 @@ var MarkInControl = function (_Component) {
85
76
  }
86
77
  });
87
78
  }
88
-
89
79
  return style;
90
80
  }
91
81
  }, {
92
- key: 'handleClick',
82
+ key: "handleClick",
93
83
  value: function handleClick() {
94
- var _props2 = this.props,
95
- player = _props2.player,
96
- actions = _props2.actions,
97
- onAddMarker = _props2.onAddMarker;
84
+ var _this$props2 = this.props,
85
+ player = _this$props2.player,
86
+ actions = _this$props2.actions,
87
+ onAddMarker = _this$props2.onAddMarker;
98
88
  // actions.handleMarkerPointChange('add', 'left', player.currentTime);
99
-
100
89
  if (onAddMarker) {
101
90
  var data = {
102
91
  markerType: player.markerType !== 'update' ? 'add' : 'update',
@@ -107,18 +96,17 @@ var MarkInControl = function (_Component) {
107
96
  }
108
97
  }
109
98
  }, {
110
- key: 'render',
99
+ key: "render",
111
100
  value: function render() {
112
- var _props3 = this.props,
113
- leftMarker = _props3.leftMarker,
114
- markers = _props3.markers;
115
-
116
- return _react2.default.createElement(MarkInButton, {
101
+ var _this$props3 = this.props,
102
+ leftMarker = _this$props3.leftMarker,
103
+ markers = _this$props3.markers;
104
+ return /*#__PURE__*/_react["default"].createElement(MarkInButton, {
117
105
  leftMarker: leftMarker,
118
106
  markers: markers,
119
- display: 'rounded',
120
- appearance: 'cta',
121
- icon: 'in-marker',
107
+ display: "rounded",
108
+ appearance: "cta",
109
+ icon: "in-marker",
122
110
  iconWidth: 10,
123
111
  iconHeight: 18,
124
112
  width: 10,
@@ -128,13 +116,9 @@ var MarkInControl = function (_Component) {
128
116
  });
129
117
  }
130
118
  }]);
131
-
132
119
  return MarkInControl;
133
120
  }(_react.Component);
134
-
135
- exports.default = MarkInControl;
136
-
137
-
121
+ exports["default"] = MarkInControl;
138
122
  MarkInControl.propTypes = propTypes;
139
123
  MarkInControl.defaultProps = defaultProps;
140
124
  MarkInControl.displayName = 'MarkInControl';
@@ -1,31 +1,31 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
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); }
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
-
7
- var _createClass = function () { 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, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
8
-
9
- var _react = require('react');
10
-
11
- var _react2 = _interopRequireDefault(_react);
12
-
13
- var _styledComponents = require('styled-components');
14
-
15
- var _styledComponents2 = _interopRequireDefault(_styledComponents);
16
-
17
- var _propTypes = require('prop-types');
18
-
19
- var _components = require('@desynova-digital/components');
20
-
21
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
22
-
7
+ exports["default"] = void 0;
8
+ var _react = _interopRequireWildcard(require("react"));
9
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
10
+ var _propTypes = require("prop-types");
11
+ var _components = require("@desynova-digital/components");
12
+ var _templateObject;
13
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
14
+ 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); }
15
+ 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; }
23
16
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
24
-
25
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
26
-
27
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
28
-
17
+ 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); } }
18
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
19
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
20
+ 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); }
21
+ 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); }
22
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
23
+ 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); }; }
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); }
25
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
26
+ 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; } }
27
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
28
+ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
29
29
  var propTypes = {
30
30
  player: _propTypes.PropTypes.instanceOf(Object),
31
31
  actions: _propTypes.PropTypes.instanceOf(Object),
@@ -36,7 +36,6 @@ var propTypes = {
36
36
  onMarkerSelect: _propTypes.PropTypes.func,
37
37
  allowMarkerOverlap: _propTypes.PropTypes.bool
38
38
  };
39
-
40
39
  var defaultProps = {
41
40
  player: {},
42
41
  actions: {},
@@ -44,37 +43,29 @@ var defaultProps = {
44
43
  rightMarker: -1,
45
44
  allowMarkerOverlap: false
46
45
  };
47
-
48
- var MarkOutButton = (0, _styledComponents2.default)(_components.Button).withConfig({
49
- displayName: 'MarkOutControl__MarkOutButton',
50
- componentId: 'sc-1lgtop1-0'
51
- })(['background:transparent;border:none;margin:0px 10px;pointer-events:', ';', '{svg path{fill:', ';}}&:hover{background:transparent;', '{svg path{fill:#00cec6;}}}&:focus{background:transparent;}'], function (props) {
46
+ var MarkOutButton = (0, _styledComponents["default"])(_components.Button)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background: transparent;\n border: none;\n margin: 0px 10px;\n pointer-events: ", ";\n ", " {\n svg path {\n fill: ", ";\n }\n }\n &:hover {\n background: transparent;\n ", " {\n svg path {\n fill: #00cec6;\n }\n }\n }\n &:focus {\n background: transparent;\n }\n"])), function (props) {
52
47
  return props.leftMarker > -1 && props.currentTime < props.leftMarker || props.leftMarker < 0 ? 'none' : 'all';
53
48
  }, _components.Icon.Element, function (props) {
54
49
  return props.rightMarker > -1 ? '#00cec6' : props.leftMarker > -1 && props.currentTime < props.leftMarker || props.leftMarker < 0 ? '#ffffff88' : '#ffffff';
55
50
  }, _components.Icon.Element);
56
-
57
- var MarkOutControl = function (_Component) {
51
+ var MarkOutControl = /*#__PURE__*/function (_Component) {
58
52
  _inherits(MarkOutControl, _Component);
59
-
53
+ var _super = _createSuper(MarkOutControl);
60
54
  function MarkOutControl(props) {
55
+ var _this;
61
56
  _classCallCheck(this, MarkOutControl);
62
-
63
- var _this = _possibleConstructorReturn(this, (MarkOutControl.__proto__ || Object.getPrototypeOf(MarkOutControl)).call(this, props));
64
-
65
- _this.handleClick = _this.handleClick.bind(_this);
57
+ _this = _super.call(this, props);
58
+ _this.handleClick = _this.handleClick.bind(_assertThisInitialized(_this));
66
59
  return _this;
67
60
  }
68
-
69
61
  _createClass(MarkOutControl, [{
70
- key: 'getStyle',
62
+ key: "getStyle",
71
63
  value: function getStyle() {
72
- var _props = this.props,
73
- currentTime = _props.player.currentTime,
74
- markers = _props.markers,
75
- leftMarker = _props.leftMarker,
76
- allowMarkerOverlap = _props.allowMarkerOverlap;
77
-
64
+ var _this$props = this.props,
65
+ currentTime = _this$props.player.currentTime,
66
+ markers = _this$props.markers,
67
+ leftMarker = _this$props.leftMarker,
68
+ allowMarkerOverlap = _this$props.allowMarkerOverlap;
78
69
  var style = {
79
70
  pointerEvents: 'all',
80
71
  opacity: 1
@@ -89,20 +80,18 @@ var MarkOutControl = function (_Component) {
89
80
  }
90
81
  });
91
82
  }
92
-
93
83
  return style;
94
84
  }
95
85
  }, {
96
- key: 'handleClick',
86
+ key: "handleClick",
97
87
  value: function handleClick() {
98
- var _props2 = this.props,
99
- player = _props2.player,
100
- actions = _props2.actions,
101
- leftMarker = _props2.leftMarker,
102
- controlType = _props2.controlType,
103
- onMarkerSelect = _props2.onMarkerSelect,
104
- onAddMarker = _props2.onAddMarker;
105
-
88
+ var _this$props2 = this.props,
89
+ player = _this$props2.player,
90
+ actions = _this$props2.actions,
91
+ leftMarker = _this$props2.leftMarker,
92
+ controlType = _this$props2.controlType,
93
+ onMarkerSelect = _this$props2.onMarkerSelect,
94
+ onAddMarker = _this$props2.onAddMarker;
106
95
  if (leftMarker > -1 && player.currentTime > leftMarker) {
107
96
  // actions.handleMarkerPointChange('add', 'right', player.currentTime);
108
97
  //Commented for CN-632.
@@ -120,20 +109,19 @@ var MarkOutControl = function (_Component) {
120
109
  }
121
110
  }
122
111
  }, {
123
- key: 'render',
112
+ key: "render",
124
113
  value: function render() {
125
- var _props3 = this.props,
126
- rightMarker = _props3.rightMarker,
127
- leftMarker = _props3.leftMarker,
128
- currentTime = _props3.player.currentTime;
129
-
130
- return _react2.default.createElement(MarkOutButton, {
114
+ var _this$props3 = this.props,
115
+ rightMarker = _this$props3.rightMarker,
116
+ leftMarker = _this$props3.leftMarker,
117
+ currentTime = _this$props3.player.currentTime;
118
+ return /*#__PURE__*/_react["default"].createElement(MarkOutButton, {
131
119
  rightMarker: rightMarker,
132
120
  leftMarker: leftMarker,
133
121
  currentTime: currentTime,
134
- display: 'rounded',
135
- appearance: 'cta',
136
- icon: 'out-marker',
122
+ display: "rounded",
123
+ appearance: "cta",
124
+ icon: "out-marker",
137
125
  iconWidth: 10,
138
126
  iconHeight: 18,
139
127
  width: 10,
@@ -143,13 +131,9 @@ var MarkOutControl = function (_Component) {
143
131
  });
144
132
  }
145
133
  }]);
146
-
147
134
  return MarkOutControl;
148
135
  }(_react.Component);
149
-
150
- exports.default = MarkOutControl;
151
-
152
-
136
+ exports["default"] = MarkOutControl;
153
137
  MarkOutControl.propTypes = propTypes;
154
138
  MarkOutControl.defaultProps = defaultProps;
155
139
  MarkOutControl.displayName = 'MarkOutControl';