@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
package/components/MarkerBar.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
|
});
|
|
@@ -11,22 +11,22 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
11
11
|
var _components = require("@desynova-digital/components");
|
|
12
12
|
var _tokens = require("@desynova-digital/tokens");
|
|
13
13
|
var _templateObject;
|
|
14
|
-
function _interopRequireDefault(
|
|
15
|
-
function _getRequireWildcardCache(
|
|
16
|
-
function _interopRequireWildcard(
|
|
17
|
-
function _classCallCheck(
|
|
18
|
-
function _defineProperties(
|
|
19
|
-
function _createClass(
|
|
20
|
-
function _toPropertyKey(
|
|
21
|
-
function _toPrimitive(
|
|
22
|
-
function
|
|
23
|
-
function
|
|
24
|
-
function
|
|
25
|
-
function
|
|
26
|
-
function
|
|
27
|
-
function
|
|
28
|
-
function
|
|
29
|
-
function _taggedTemplateLiteral(
|
|
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 _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
18
|
+
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); } }
|
|
19
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
20
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
21
|
+
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); }
|
|
22
|
+
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); }
|
|
23
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
24
|
+
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); }; }
|
|
25
|
+
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); }
|
|
26
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
27
|
+
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; } }
|
|
28
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
29
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
30
30
|
/*
|
|
31
31
|
* import { colors } from '@desynova-digital/tokens';
|
|
32
32
|
* import colors from '../colors';
|
|
@@ -45,17 +45,18 @@ var MarkerBlock = _styledComponents["default"].div(_templateObject || (_template
|
|
|
45
45
|
}, function (props) {
|
|
46
46
|
return props.controlType === 'advanced' && !props.isFullscreen ? '0px' : '5px';
|
|
47
47
|
}, _components.Icon.Element);
|
|
48
|
-
var MarkerBar =
|
|
48
|
+
var MarkerBar = /*#__PURE__*/function (_Component) {
|
|
49
|
+
_inherits(MarkerBar, _Component);
|
|
50
|
+
var _super = _createSuper(MarkerBar);
|
|
49
51
|
function MarkerBar(props) {
|
|
50
52
|
var _this;
|
|
51
53
|
_classCallCheck(this, MarkerBar);
|
|
52
|
-
_this =
|
|
53
|
-
_this.getMarkerPosition = _this.getMarkerPosition.bind(_this);
|
|
54
|
-
_this.getTimePos = _this.getTimePos.bind(_this);
|
|
54
|
+
_this = _super.call(this, props);
|
|
55
|
+
_this.getMarkerPosition = _this.getMarkerPosition.bind(_assertThisInitialized(_this));
|
|
56
|
+
_this.getTimePos = _this.getTimePos.bind(_assertThisInitialized(_this));
|
|
55
57
|
return _this;
|
|
56
58
|
}
|
|
57
|
-
|
|
58
|
-
return _createClass(MarkerBar, [{
|
|
59
|
+
_createClass(MarkerBar, [{
|
|
59
60
|
key: "getMarkerPosition",
|
|
60
61
|
value: function getMarkerPosition(timePos) {
|
|
61
62
|
var player = this.props.player;
|
|
@@ -129,7 +130,9 @@ var MarkerBar = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
129
130
|
})) : null);
|
|
130
131
|
}
|
|
131
132
|
}]);
|
|
133
|
+
return MarkerBar;
|
|
132
134
|
}(_react.Component);
|
|
135
|
+
exports["default"] = MarkerBar;
|
|
133
136
|
MarkerBar.propTypes = propTypes;
|
|
134
137
|
MarkerBar.defaultProps = defaultProps;
|
|
135
138
|
MarkerBar.displayName = 'MarkerBar';
|
package/components/Menu.js
CHANGED
|
@@ -10,8 +10,8 @@ var _propTypes = require("prop-types");
|
|
|
10
10
|
var _components = require("@desynova-digital/components");
|
|
11
11
|
var _tokens = require("@desynova-digital/tokens");
|
|
12
12
|
var _templateObject, _templateObject2;
|
|
13
|
-
function _interopRequireDefault(
|
|
14
|
-
function _taggedTemplateLiteral(
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
14
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
15
15
|
var propTypes = {
|
|
16
16
|
children: _propTypes.PropTypes.arrayOf(_propTypes.PropTypes.element),
|
|
17
17
|
icon: _propTypes.PropTypes.string,
|
package/components/Player.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
|
});
|
|
@@ -21,32 +21,32 @@ var _AudioMeter = _interopRequireDefault(require("./AudioMeter"));
|
|
|
21
21
|
var _utils = require("../utils");
|
|
22
22
|
var _fullscreen = _interopRequireDefault(require("../utils/fullscreen"));
|
|
23
23
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
24
|
-
function _interopRequireDefault(
|
|
25
|
-
function _getRequireWildcardCache(
|
|
26
|
-
function _interopRequireWildcard(
|
|
27
|
-
function _toConsumableArray(
|
|
24
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
|
+
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); }
|
|
26
|
+
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; }
|
|
27
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
28
28
|
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."); }
|
|
29
|
-
function _unsupportedIterableToArray(
|
|
30
|
-
function _iterableToArray(
|
|
31
|
-
function _arrayWithoutHoles(
|
|
32
|
-
function _arrayLikeToArray(
|
|
33
|
-
function ownKeys(
|
|
34
|
-
function _objectSpread(
|
|
35
|
-
function _defineProperty(
|
|
36
|
-
function _extends() {
|
|
37
|
-
function _classCallCheck(
|
|
38
|
-
function _defineProperties(
|
|
39
|
-
function _createClass(
|
|
40
|
-
function _toPropertyKey(
|
|
41
|
-
function _toPrimitive(
|
|
42
|
-
function
|
|
43
|
-
function
|
|
44
|
-
function
|
|
45
|
-
function
|
|
46
|
-
function
|
|
47
|
-
function
|
|
48
|
-
function
|
|
49
|
-
function _taggedTemplateLiteral(
|
|
29
|
+
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); }
|
|
30
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
31
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
32
|
+
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; }
|
|
33
|
+
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; }
|
|
34
|
+
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; }
|
|
35
|
+
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; }
|
|
36
|
+
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); }
|
|
37
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
38
|
+
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); } }
|
|
39
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
40
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
41
|
+
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); }
|
|
42
|
+
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); }
|
|
43
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
44
|
+
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); }; }
|
|
45
|
+
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); }
|
|
46
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
47
|
+
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; } }
|
|
48
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
49
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
50
50
|
var propTypes = {
|
|
51
51
|
store: _propTypes.PropTypes.instanceOf(Object),
|
|
52
52
|
width: _propTypes.PropTypes.oneOfType([_propTypes.PropTypes.string, _propTypes.PropTypes.number]),
|
|
@@ -189,28 +189,29 @@ var AudioMeterBlock = (0, _styledComponents["default"])('div')(_templateObject3
|
|
|
189
189
|
return !props.active ? '0' : '20px 0';
|
|
190
190
|
});
|
|
191
191
|
var ControlContainer = _styledComponents["default"].div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral([""])));
|
|
192
|
-
var Player =
|
|
192
|
+
var Player = /*#__PURE__*/function (_Component) {
|
|
193
|
+
_inherits(Player, _Component);
|
|
194
|
+
var _super = _createSuper(Player);
|
|
193
195
|
function Player(props) {
|
|
194
196
|
var _this;
|
|
195
197
|
_classCallCheck(this, Player);
|
|
196
|
-
_this =
|
|
198
|
+
_this = _super.call(this, props);
|
|
197
199
|
_this.controlsHideTimer = null;
|
|
198
200
|
_this.meterHeight = 40;
|
|
199
201
|
_this.video = null; // the Video component
|
|
200
202
|
_this.manager = new _Manager["default"](props.store);
|
|
201
203
|
_this.actions = _this.manager.getActions();
|
|
202
|
-
_this.manager.subscribeToPlayerStateChange(_this.handleStateChange.bind(_this));
|
|
203
|
-
_this.handleResize = _this.handleResize.bind(_this);
|
|
204
|
-
_this.getChildren = _this.getChildren.bind(_this);
|
|
205
|
-
_this.handleFullScreenChange = _this.handleFullScreenChange.bind(_this);
|
|
206
|
-
_this.handleFocus = _this.handleFocus.bind(_this);
|
|
207
|
-
_this.handleBlur = _this.handleBlur.bind(_this);
|
|
204
|
+
_this.manager.subscribeToPlayerStateChange(_this.handleStateChange.bind(_assertThisInitialized(_this)));
|
|
205
|
+
_this.handleResize = _this.handleResize.bind(_assertThisInitialized(_this));
|
|
206
|
+
_this.getChildren = _this.getChildren.bind(_assertThisInitialized(_this));
|
|
207
|
+
_this.handleFullScreenChange = _this.handleFullScreenChange.bind(_assertThisInitialized(_this));
|
|
208
|
+
_this.handleFocus = _this.handleFocus.bind(_assertThisInitialized(_this));
|
|
209
|
+
_this.handleBlur = _this.handleBlur.bind(_assertThisInitialized(_this));
|
|
208
210
|
_this.actions.handlePlayerType(props.playerType);
|
|
209
211
|
_this.actions.handleControlType(props.controlType);
|
|
210
212
|
return _this;
|
|
211
213
|
}
|
|
212
|
-
|
|
213
|
-
return _createClass(Player, [{
|
|
214
|
+
_createClass(Player, [{
|
|
214
215
|
key: "componentDidMount",
|
|
215
216
|
value: function componentDidMount() {
|
|
216
217
|
this.handleResize();
|
|
@@ -696,7 +697,9 @@ var Player = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
696
697
|
}, this.props)));
|
|
697
698
|
}
|
|
698
699
|
}]);
|
|
700
|
+
return Player;
|
|
699
701
|
}(_react.Component);
|
|
702
|
+
exports["default"] = Player;
|
|
700
703
|
Player.contextTypes = {
|
|
701
704
|
store: _propTypes.PropTypes.instanceOf(Object)
|
|
702
705
|
};
|
|
@@ -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
|
});
|
|
@@ -11,23 +11,23 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
11
11
|
var _components = require("@desynova-digital/components");
|
|
12
12
|
var _colors = _interopRequireDefault(require("../colors"));
|
|
13
13
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
|
|
14
|
-
function _interopRequireDefault(
|
|
15
|
-
function _getRequireWildcardCache(
|
|
16
|
-
function _interopRequireWildcard(
|
|
17
|
-
function _extends() {
|
|
18
|
-
function _classCallCheck(
|
|
19
|
-
function _defineProperties(
|
|
20
|
-
function _createClass(
|
|
21
|
-
function _toPropertyKey(
|
|
22
|
-
function _toPrimitive(
|
|
23
|
-
function
|
|
24
|
-
function
|
|
25
|
-
function
|
|
26
|
-
function
|
|
27
|
-
function
|
|
28
|
-
function
|
|
29
|
-
function
|
|
30
|
-
function _taggedTemplateLiteral(
|
|
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); }
|
|
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) } })); }
|
|
31
31
|
var propTypes = {
|
|
32
32
|
actions: _propTypes.PropTypes.instanceOf(Object),
|
|
33
33
|
onPlayerClose: _propTypes.PropTypes.func,
|
|
@@ -75,20 +75,21 @@ var BackButton = (0, _styledComponents["default"])(_components.Button)(_template
|
|
|
75
75
|
}, function (props) {
|
|
76
76
|
return _colors["default"].common.video[props.assetType].base;
|
|
77
77
|
}, _components.Icon.Element);
|
|
78
|
-
var PlayerHeader =
|
|
78
|
+
var PlayerHeader = /*#__PURE__*/function (_Component) {
|
|
79
|
+
_inherits(PlayerHeader, _Component);
|
|
80
|
+
var _super = _createSuper(PlayerHeader);
|
|
79
81
|
function PlayerHeader(props, context) {
|
|
80
82
|
var _this;
|
|
81
83
|
_classCallCheck(this, PlayerHeader);
|
|
82
|
-
_this =
|
|
84
|
+
_this = _super.call(this, props, context);
|
|
83
85
|
_this.state = {
|
|
84
86
|
versionIndex: -1,
|
|
85
87
|
updatedVersionsList: []
|
|
86
88
|
};
|
|
87
|
-
_this.handleClick = _this.handleClick.bind(_this);
|
|
89
|
+
_this.handleClick = _this.handleClick.bind(_assertThisInitialized(_this));
|
|
88
90
|
return _this;
|
|
89
91
|
}
|
|
90
|
-
|
|
91
|
-
return _createClass(PlayerHeader, [{
|
|
92
|
+
_createClass(PlayerHeader, [{
|
|
92
93
|
key: "componentDidMount",
|
|
93
94
|
value: function componentDidMount() {
|
|
94
95
|
var _this$props = this.props,
|
|
@@ -329,6 +330,8 @@ var PlayerHeader = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
329
330
|
}, this.props)) : null));
|
|
330
331
|
}
|
|
331
332
|
}]);
|
|
333
|
+
return PlayerHeader;
|
|
332
334
|
}(_react.Component);
|
|
335
|
+
exports["default"] = PlayerHeader;
|
|
333
336
|
PlayerHeader.propTypes = propTypes;
|
|
334
337
|
PlayerHeader.displayName = 'PlayerHeader';
|
package/components/Playlist.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
|
});
|
|
@@ -10,29 +10,26 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
10
10
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
11
11
|
var _components = require("@desynova-digital/components");
|
|
12
12
|
var _templateObject, _templateObject2, _templateObject3;
|
|
13
|
-
function _interopRequireDefault(
|
|
14
|
-
function _getRequireWildcardCache(
|
|
15
|
-
function _interopRequireWildcard(
|
|
16
|
-
function _classCallCheck(
|
|
17
|
-
function _defineProperties(
|
|
18
|
-
function _createClass(
|
|
19
|
-
function _toPropertyKey(
|
|
20
|
-
function _toPrimitive(
|
|
21
|
-
function
|
|
22
|
-
function
|
|
23
|
-
function
|
|
24
|
-
function
|
|
25
|
-
function
|
|
26
|
-
function
|
|
27
|
-
function
|
|
28
|
-
function _taggedTemplateLiteral(
|
|
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; }
|
|
16
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
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
|
/*
|
|
30
30
|
* import { play } from '../actions/player';
|
|
31
31
|
* import { colors } from '@desynova-digital/tokens';
|
|
32
|
-
*/
|
|
33
|
-
|
|
34
|
-
// import colors from '../colors';
|
|
35
|
-
|
|
32
|
+
*/ // import colors from '../colors';
|
|
36
33
|
var propTypes = {
|
|
37
34
|
playlist: _propTypes.PropTypes.instanceOf(Array),
|
|
38
35
|
videoId: _propTypes.PropTypes.string,
|
|
@@ -51,13 +48,14 @@ var PlaylistCard = (0, _styledComponents["default"])('div')(_templateObject3 ||
|
|
|
51
48
|
}, function (props) {
|
|
52
49
|
return props.active ? 'none' : 'all';
|
|
53
50
|
});
|
|
54
|
-
var Playlist =
|
|
51
|
+
var Playlist = /*#__PURE__*/function (_Component) {
|
|
52
|
+
_inherits(Playlist, _Component);
|
|
53
|
+
var _super = _createSuper(Playlist);
|
|
55
54
|
function Playlist(props, context) {
|
|
56
55
|
_classCallCheck(this, Playlist);
|
|
57
|
-
return
|
|
56
|
+
return _super.call(this, props, context);
|
|
58
57
|
}
|
|
59
|
-
|
|
60
|
-
return _createClass(Playlist, [{
|
|
58
|
+
_createClass(Playlist, [{
|
|
61
59
|
key: "componentDidMount",
|
|
62
60
|
value: function componentDidMount() {}
|
|
63
61
|
}, {
|
|
@@ -89,6 +87,8 @@ var Playlist = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
89
87
|
})) : null);
|
|
90
88
|
}
|
|
91
89
|
}]);
|
|
90
|
+
return Playlist;
|
|
92
91
|
}(_react.Component);
|
|
92
|
+
exports["default"] = Playlist;
|
|
93
93
|
Playlist.propTypes = propTypes;
|
|
94
94
|
Playlist.displayName = 'Playlist';
|