@desynova-digital/player 4.0.18 → 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 +39 -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/Manager.js
CHANGED
|
@@ -8,26 +8,26 @@ var _redux = require("redux");
|
|
|
8
8
|
var _reducers = _interopRequireDefault(require("./reducers"));
|
|
9
9
|
var playerActions = _interopRequireWildcard(require("./actions/player"));
|
|
10
10
|
var videoActions = _interopRequireWildcard(require("./actions/video"));
|
|
11
|
-
function _getRequireWildcardCache(
|
|
12
|
-
function _interopRequireWildcard(
|
|
13
|
-
function _interopRequireDefault(
|
|
14
|
-
function _typeof(
|
|
15
|
-
function ownKeys(
|
|
16
|
-
function _objectSpread(
|
|
17
|
-
function _defineProperty(
|
|
18
|
-
function _classCallCheck(
|
|
19
|
-
function _defineProperties(
|
|
20
|
-
function _createClass(
|
|
21
|
-
function _toPropertyKey(
|
|
22
|
-
function _toPrimitive(
|
|
23
|
-
var Manager =
|
|
11
|
+
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); }
|
|
12
|
+
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; }
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
14
|
+
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); }
|
|
15
|
+
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; }
|
|
16
|
+
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; }
|
|
17
|
+
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; }
|
|
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
|
+
var Manager = /*#__PURE__*/function () {
|
|
24
24
|
function Manager(store) {
|
|
25
25
|
_classCallCheck(this, Manager);
|
|
26
26
|
this.store = store || (0, _redux.createStore)(_reducers["default"]);
|
|
27
27
|
this.video = null;
|
|
28
28
|
this.rootElement = null;
|
|
29
29
|
}
|
|
30
|
-
|
|
30
|
+
_createClass(Manager, [{
|
|
31
31
|
key: "getActions",
|
|
32
32
|
value: function getActions() {
|
|
33
33
|
var manager = this;
|
|
@@ -95,4 +95,6 @@ var Manager = exports["default"] = /*#__PURE__*/function () {
|
|
|
95
95
|
});
|
|
96
96
|
}
|
|
97
97
|
}]);
|
|
98
|
-
|
|
98
|
+
return Manager;
|
|
99
|
+
}();
|
|
100
|
+
exports["default"] = Manager;
|
package/actions/player.js
CHANGED
|
@@ -30,24 +30,41 @@ exports.toggleFullscreen = toggleFullscreen;
|
|
|
30
30
|
exports.togglePlay = togglePlay;
|
|
31
31
|
exports.userActivate = userActivate;
|
|
32
32
|
var _fullscreen = _interopRequireDefault(require("../utils/fullscreen"));
|
|
33
|
-
function _interopRequireDefault(
|
|
34
|
-
var OPERATE =
|
|
35
|
-
|
|
36
|
-
var
|
|
37
|
-
|
|
38
|
-
var
|
|
39
|
-
|
|
40
|
-
var
|
|
41
|
-
|
|
42
|
-
var
|
|
43
|
-
|
|
44
|
-
var
|
|
45
|
-
|
|
46
|
-
var
|
|
47
|
-
|
|
48
|
-
var
|
|
49
|
-
|
|
50
|
-
var
|
|
33
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
34
|
+
var OPERATE = 'video-react/OPERATE';
|
|
35
|
+
exports.OPERATE = OPERATE;
|
|
36
|
+
var FULLSCREEN_CHANGE = 'video-react/FULLSCREEN_CHANGE';
|
|
37
|
+
exports.FULLSCREEN_CHANGE = FULLSCREEN_CHANGE;
|
|
38
|
+
var SD_BORDER_SWITCH = 'video-react/SD_BORDER_SWITCH';
|
|
39
|
+
exports.SD_BORDER_SWITCH = SD_BORDER_SWITCH;
|
|
40
|
+
var PLAYER_ACTIVATE = 'video-react/PLAYER_ACTIVATE';
|
|
41
|
+
exports.PLAYER_ACTIVATE = PLAYER_ACTIVATE;
|
|
42
|
+
var USER_ACTIVATE = 'video-react/USER_ACTIVATE';
|
|
43
|
+
exports.USER_ACTIVATE = USER_ACTIVATE;
|
|
44
|
+
var PLAYER_TYPE = 'video-react/PLAYER_TYPE';
|
|
45
|
+
exports.PLAYER_TYPE = PLAYER_TYPE;
|
|
46
|
+
var CONTROL_TYPE = 'video-react/CONTROL_TYPE';
|
|
47
|
+
exports.CONTROL_TYPE = CONTROL_TYPE;
|
|
48
|
+
var ZOOM_CHANGE = 'video-react/ZOOM_CHANGE';
|
|
49
|
+
exports.ZOOM_CHANGE = ZOOM_CHANGE;
|
|
50
|
+
var MARKER_POINT_CHANGE = 'video-react/MARKER_POINT_CHANGE';
|
|
51
|
+
exports.MARKER_POINT_CHANGE = MARKER_POINT_CHANGE;
|
|
52
|
+
var MARKER_CREATE = 'video-react/MARKER_CREATE';
|
|
53
|
+
exports.MARKER_CREATE = MARKER_CREATE;
|
|
54
|
+
var MARKER_UPDATE = 'video-react/MARKER_UPDATE';
|
|
55
|
+
exports.MARKER_UPDATE = MARKER_UPDATE;
|
|
56
|
+
var PREVIEW_VIDEO = 'video-react/PREVIEW_VIDEO';
|
|
57
|
+
exports.PREVIEW_VIDEO = PREVIEW_VIDEO;
|
|
58
|
+
var REWIND_VIDEO = 'video-react/REWIND_VIDEO';
|
|
59
|
+
exports.REWIND_VIDEO = REWIND_VIDEO;
|
|
60
|
+
var AUDIO_TRACKS = 'video-react/AUDIO_TRACKS';
|
|
61
|
+
exports.AUDIO_TRACKS = AUDIO_TRACKS;
|
|
62
|
+
var ACTIVE_AUDIO_TRACK = 'video-react/ACTIVE_AUDIO_TRACK';
|
|
63
|
+
exports.ACTIVE_AUDIO_TRACK = ACTIVE_AUDIO_TRACK;
|
|
64
|
+
var ACTIVE_CAPTION_TRACK = 'video-react/ACTIVE_CAPTION_TRACK';
|
|
65
|
+
exports.ACTIVE_CAPTION_TRACK = ACTIVE_CAPTION_TRACK;
|
|
66
|
+
var SUBTITLE_STATUS = 'video-react/SUBTITLE_STATUS';
|
|
67
|
+
exports.SUBTITLE_STATUS = SUBTITLE_STATUS;
|
|
51
68
|
function handleFullscreenChange(isFullscreen) {
|
|
52
69
|
return {
|
|
53
70
|
type: FULLSCREEN_CHANGE,
|
package/actions/video.js
CHANGED
|
@@ -29,31 +29,56 @@ exports.handleSuspend = handleSuspend;
|
|
|
29
29
|
exports.handleTimeUpdate = handleTimeUpdate;
|
|
30
30
|
exports.handleVolumeChange = handleVolumeChange;
|
|
31
31
|
exports.handleWaiting = handleWaiting;
|
|
32
|
-
var LOAD_START =
|
|
33
|
-
|
|
34
|
-
var
|
|
35
|
-
|
|
36
|
-
var
|
|
37
|
-
|
|
38
|
-
var
|
|
39
|
-
|
|
40
|
-
var
|
|
41
|
-
|
|
42
|
-
var
|
|
43
|
-
|
|
44
|
-
var
|
|
45
|
-
|
|
46
|
-
var
|
|
47
|
-
|
|
48
|
-
var
|
|
49
|
-
|
|
50
|
-
var
|
|
51
|
-
|
|
52
|
-
var
|
|
53
|
-
|
|
54
|
-
var
|
|
55
|
-
|
|
56
|
-
var
|
|
32
|
+
var LOAD_START = 'video-react/LOAD_START';
|
|
33
|
+
exports.LOAD_START = LOAD_START;
|
|
34
|
+
var CAN_PLAY = 'video-react/CAN_PLAY';
|
|
35
|
+
exports.CAN_PLAY = CAN_PLAY;
|
|
36
|
+
var WAITING = 'video-react/WAITING';
|
|
37
|
+
exports.WAITING = WAITING;
|
|
38
|
+
var CAN_PLAY_THROUGH = 'video-react/CAN_PLAY_THROUGH';
|
|
39
|
+
exports.CAN_PLAY_THROUGH = CAN_PLAY_THROUGH;
|
|
40
|
+
var PLAYING = 'video-react/PLAYING';
|
|
41
|
+
exports.PLAYING = PLAYING;
|
|
42
|
+
var PLAY = 'video-react/PLAY';
|
|
43
|
+
exports.PLAY = PLAY;
|
|
44
|
+
var PAUSE = 'video-react/PAUSE';
|
|
45
|
+
exports.PAUSE = PAUSE;
|
|
46
|
+
var END = 'video-react/END';
|
|
47
|
+
exports.END = END;
|
|
48
|
+
var SEEKING = 'video-react/SEEKING';
|
|
49
|
+
exports.SEEKING = SEEKING;
|
|
50
|
+
var SEEKED = 'video-react/SEEKED';
|
|
51
|
+
exports.SEEKED = SEEKED;
|
|
52
|
+
var SEEKING_TIME = 'video-react/SEEKING_TIME';
|
|
53
|
+
exports.SEEKING_TIME = SEEKING_TIME;
|
|
54
|
+
var END_SEEKING = 'video-react/END_SEEKING';
|
|
55
|
+
exports.END_SEEKING = END_SEEKING;
|
|
56
|
+
var DURATION_CHANGE = 'video-react/DURATION_CHANGE';
|
|
57
|
+
exports.DURATION_CHANGE = DURATION_CHANGE;
|
|
58
|
+
var TIME_UPDATE = 'video-react/TIME_UPDATE';
|
|
59
|
+
exports.TIME_UPDATE = TIME_UPDATE;
|
|
60
|
+
var VOLUME_CHANGE = 'video-react/VOLUME_CHANGE';
|
|
61
|
+
exports.VOLUME_CHANGE = VOLUME_CHANGE;
|
|
62
|
+
var PROGRESS_CHANGE = 'video-react/PROGRESS_CHANGE';
|
|
63
|
+
exports.PROGRESS_CHANGE = PROGRESS_CHANGE;
|
|
64
|
+
var RATE_CHANGE = 'video-react/RATE_CHANGE';
|
|
65
|
+
exports.RATE_CHANGE = RATE_CHANGE;
|
|
66
|
+
var SUSPEND = 'video-react/SUSPEND';
|
|
67
|
+
exports.SUSPEND = SUSPEND;
|
|
68
|
+
var ABORT = 'video-react/ABORT';
|
|
69
|
+
exports.ABORT = ABORT;
|
|
70
|
+
var EMPTIED = 'video-react/EMPTIED';
|
|
71
|
+
exports.EMPTIED = EMPTIED;
|
|
72
|
+
var STALLED = 'video-react/STALLED';
|
|
73
|
+
exports.STALLED = STALLED;
|
|
74
|
+
var LOADED_META_DATA = 'video-react/LOADED_META_DATA';
|
|
75
|
+
exports.LOADED_META_DATA = LOADED_META_DATA;
|
|
76
|
+
var LOADED_DATA = 'video-react/LOADED_DATA';
|
|
77
|
+
exports.LOADED_DATA = LOADED_DATA;
|
|
78
|
+
var RESIZE = 'video-react/RESIZE';
|
|
79
|
+
exports.RESIZE = RESIZE;
|
|
80
|
+
var ERROR = 'video-react/ERROR';
|
|
81
|
+
exports.ERROR = ERROR;
|
|
57
82
|
function handleLoadStart(videoProps) {
|
|
58
83
|
return {
|
|
59
84
|
type: LOAD_START,
|
package/colors.js
CHANGED
package/components/AudioMeter.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,28 +10,28 @@ 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, _templateObject4, _templateObject5;
|
|
13
|
-
function _interopRequireDefault(
|
|
14
|
-
function _getRequireWildcardCache(
|
|
15
|
-
function _interopRequireWildcard(
|
|
16
|
-
function _toConsumableArray(
|
|
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 _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
17
17
|
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."); }
|
|
18
|
-
function _unsupportedIterableToArray(
|
|
19
|
-
function _iterableToArray(
|
|
20
|
-
function _arrayWithoutHoles(
|
|
21
|
-
function _arrayLikeToArray(
|
|
22
|
-
function _classCallCheck(
|
|
23
|
-
function _defineProperties(
|
|
24
|
-
function _createClass(
|
|
25
|
-
function _toPropertyKey(
|
|
26
|
-
function _toPrimitive(
|
|
27
|
-
function
|
|
28
|
-
function
|
|
29
|
-
function
|
|
30
|
-
function
|
|
31
|
-
function
|
|
32
|
-
function
|
|
33
|
-
function
|
|
34
|
-
function _taggedTemplateLiteral(
|
|
18
|
+
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); }
|
|
19
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
20
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
21
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
22
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23
|
+
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); } }
|
|
24
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
25
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
26
|
+
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); }
|
|
27
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
28
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
29
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
30
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
31
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
32
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
33
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
34
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
35
35
|
var propTypes = {
|
|
36
36
|
height: _propTypes.PropTypes.number,
|
|
37
37
|
player: _propTypes.PropTypes.instanceOf(Object)
|
|
@@ -44,11 +44,13 @@ var MeterBlock = (0, _styledComponents["default"])('div')(_templateObject2 || (_
|
|
|
44
44
|
var ColorMeter = (0, _styledComponents["default"])('div')(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n width: 100%;\n height: 100%;\n background: linear-gradient(\n to top,\n #00c8e7,\n #00e6b9 57%,\n #ff8d29 83%,\n #f6462c\n );\n position: absolute;\n left: 0;\n top: 0;\n z-index: 1;\n .stack-block {\n height: 2px;\n margin-bottom: 3px;\n background: #000000;\n }\n"])));
|
|
45
45
|
var BlackMeter = (0, _styledComponents["default"])('div')(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n width: 100%;\n background: #000000;\n position: absolute;\n left: 0;\n top: 0;\n z-index: 1;\n height: 100%;\n transition: all 0.25s ease-in-out;\n -moz-transition: all 0.25s ease-in-out;\n -webkit-transition: all 0.25s ease-in-out;\n -ms-transition: all 0.25s ease-in-out;\n -o-transition: all 0.25s ease-in-out;\n .stack-block {\n height: 2px;\n margin-bottom: 3px;\n background: #304153;\n }\n"])));
|
|
46
46
|
var AudioMute = (0, _styledComponents["default"])('div')(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n position: absolute;\n top: -20px;\n left: 50%;\n transform: translateX(-50%);\n color: #aaaaaa;\n cursor: pointer;\n"])));
|
|
47
|
-
var AudioMeter =
|
|
47
|
+
var AudioMeter = /*#__PURE__*/function (_Component) {
|
|
48
|
+
_inherits(AudioMeter, _Component);
|
|
49
|
+
var _super = _createSuper(AudioMeter);
|
|
48
50
|
function AudioMeter(props, context) {
|
|
49
51
|
var _this;
|
|
50
52
|
_classCallCheck(this, AudioMeter);
|
|
51
|
-
_this =
|
|
53
|
+
_this = _super.call(this, props, context);
|
|
52
54
|
_this.state = {
|
|
53
55
|
stacksArr: [],
|
|
54
56
|
rangeArray: [],
|
|
@@ -61,15 +63,14 @@ var AudioMeter = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
61
63
|
_this.dbRange = -48;
|
|
62
64
|
_this.channelCount = 2;
|
|
63
65
|
_this.maskSizes = ['100%', '100%'];
|
|
64
|
-
_this.handleClick = _this.handleClick.bind(_this);
|
|
65
|
-
_this.getNoOfStacks = _this.getNoOfStacks.bind(_this);
|
|
66
|
-
_this.maskSize = _this.maskSize.bind(_this);
|
|
67
|
-
_this.updateMeter = _this.updateMeter.bind(_this);
|
|
68
|
-
_this.paintMeter = _this.paintMeter.bind(_this);
|
|
66
|
+
_this.handleClick = _this.handleClick.bind(_assertThisInitialized(_this));
|
|
67
|
+
_this.getNoOfStacks = _this.getNoOfStacks.bind(_assertThisInitialized(_this));
|
|
68
|
+
_this.maskSize = _this.maskSize.bind(_assertThisInitialized(_this));
|
|
69
|
+
_this.updateMeter = _this.updateMeter.bind(_assertThisInitialized(_this));
|
|
70
|
+
_this.paintMeter = _this.paintMeter.bind(_assertThisInitialized(_this));
|
|
69
71
|
return _this;
|
|
70
72
|
}
|
|
71
|
-
|
|
72
|
-
return _createClass(AudioMeter, [{
|
|
73
|
+
_createClass(AudioMeter, [{
|
|
73
74
|
key: "componentDidMount",
|
|
74
75
|
value: function componentDidMount() {
|
|
75
76
|
var player = this.props.player;
|
|
@@ -361,7 +362,9 @@ var AudioMeter = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
361
362
|
})))));
|
|
362
363
|
}
|
|
363
364
|
}]);
|
|
365
|
+
return AudioMeter;
|
|
364
366
|
}(_react.Component);
|
|
367
|
+
exports["default"] = AudioMeter;
|
|
365
368
|
AudioMeter.propTypes = propTypes;
|
|
366
369
|
AudioMeter.defaultProps = defaultProps;
|
|
367
370
|
AudioMeter.displayName = 'AudioMeter';
|
|
@@ -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;
|
|
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
|
player: _propTypes.PropTypes.instanceOf(Object)
|
|
@@ -41,16 +41,17 @@ var PlayButton = (0, _styledComponents["default"])(_components.Button)(_template
|
|
|
41
41
|
}, function (props) {
|
|
42
42
|
return _colors["default"].common.video[props.assetType].buttonGradient;
|
|
43
43
|
});
|
|
44
|
-
var BigPlayButton =
|
|
44
|
+
var BigPlayButton = /*#__PURE__*/function (_Component) {
|
|
45
|
+
_inherits(BigPlayButton, _Component);
|
|
46
|
+
var _super = _createSuper(BigPlayButton);
|
|
45
47
|
function BigPlayButton(props, context) {
|
|
46
48
|
var _this;
|
|
47
49
|
_classCallCheck(this, BigPlayButton);
|
|
48
|
-
_this =
|
|
49
|
-
_this.handleClick = _this.handleClick.bind(_this);
|
|
50
|
+
_this = _super.call(this, props, context);
|
|
51
|
+
_this.handleClick = _this.handleClick.bind(_assertThisInitialized(_this));
|
|
50
52
|
return _this;
|
|
51
53
|
}
|
|
52
|
-
|
|
53
|
-
return _createClass(BigPlayButton, [{
|
|
54
|
+
_createClass(BigPlayButton, [{
|
|
54
55
|
key: "componentDidMount",
|
|
55
56
|
value: function componentDidMount() {}
|
|
56
57
|
}, {
|
|
@@ -77,7 +78,9 @@ var BigPlayButton = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
77
78
|
}, this.props)) : null);
|
|
78
79
|
}
|
|
79
80
|
}]);
|
|
81
|
+
return BigPlayButton;
|
|
80
82
|
}(_react.Component);
|
|
83
|
+
exports["default"] = BigPlayButton;
|
|
81
84
|
BigPlayButton.propTypes = propTypes;
|
|
82
85
|
BigPlayButton.defaultProps = defaultProps;
|
|
83
86
|
BigPlayButton.displayName = 'BigPlayButton';
|
|
@@ -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,26 +11,26 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
11
11
|
var _CommentsButton = _interopRequireDefault(require("./control-bar/CommentsButton"));
|
|
12
12
|
var _templateObject, _templateObject2, _templateObject3;
|
|
13
13
|
/* eslint-disable linebreak-style */
|
|
14
|
-
function _interopRequireDefault(
|
|
15
|
-
function _getRequireWildcardCache(
|
|
16
|
-
function _interopRequireWildcard(
|
|
17
|
-
function _extends() {
|
|
18
|
-
function ownKeys(
|
|
19
|
-
function _objectSpread(
|
|
20
|
-
function _defineProperty(
|
|
21
|
-
function _classCallCheck(
|
|
22
|
-
function _defineProperties(
|
|
23
|
-
function _createClass(
|
|
24
|
-
function _toPropertyKey(
|
|
25
|
-
function _toPrimitive(
|
|
26
|
-
function
|
|
27
|
-
function
|
|
28
|
-
function
|
|
29
|
-
function
|
|
30
|
-
function
|
|
31
|
-
function
|
|
32
|
-
function
|
|
33
|
-
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 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; }
|
|
19
|
+
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; }
|
|
20
|
+
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; }
|
|
21
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
22
|
+
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); } }
|
|
23
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
24
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
25
|
+
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); }
|
|
26
|
+
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); }
|
|
27
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
28
|
+
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); }; }
|
|
29
|
+
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
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
31
|
+
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; } }
|
|
32
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
33
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
34
34
|
/*
|
|
35
35
|
* import { colors } from '@desynova-digital/tokens';
|
|
36
36
|
* import colors from '../colors';
|
|
@@ -43,11 +43,13 @@ var propTypes = {
|
|
|
43
43
|
var ImageContainer = (0, _styledComponents["default"])('div')(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n overflow: hidden;\n"])));
|
|
44
44
|
var ImageBlock = (0, _styledComponents["default"])('div')(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n width: 100%;\n height: calc(100% - 50px);\n img {\n position: relative;\n transition: all 350ms ease-in-out;\n &.moving {\n transition: none;\n }\n }\n"])));
|
|
45
45
|
var ImageControls = (0, _styledComponents["default"])('div')(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: relative;\n height: 50px;\n background: #000;\n display: flex;\n justify-content: flex-start;\n align-items: center;\n padding: 0 20px;\n .zoom-in, .zoom-out {\n width: 20px;\n height: 20px;\n position: relative;\n cursor: pointer;\n &:after {\n content: '';\n position: absolute;\n width: 14px;\n height: 2px;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n background: #afb2ba;\n }\n }\n .zoom-in {\n &:before {\n content: '';\n position: absolute;\n width: 2px;\n height: 14px;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n background: #afb2ba;\n }\n }\n .percent {\n font-size: 14px;\n font-family: SFUIText-Regular;\n color: #fff;\n margin: 0 15px;\n }\n"])));
|
|
46
|
-
var ImageViewer =
|
|
46
|
+
var ImageViewer = /*#__PURE__*/function (_Component) {
|
|
47
|
+
_inherits(ImageViewer, _Component);
|
|
48
|
+
var _super = _createSuper(ImageViewer);
|
|
47
49
|
function ImageViewer(props) {
|
|
48
50
|
var _this;
|
|
49
51
|
_classCallCheck(this, ImageViewer);
|
|
50
|
-
_this =
|
|
52
|
+
_this = _super.call(this, props);
|
|
51
53
|
_this.state = {
|
|
52
54
|
minWidth: 0,
|
|
53
55
|
minHeight: 0,
|
|
@@ -65,8 +67,7 @@ var ImageViewer = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
65
67
|
_this.yOffset = 0;
|
|
66
68
|
return _this;
|
|
67
69
|
}
|
|
68
|
-
|
|
69
|
-
return _createClass(ImageViewer, [{
|
|
70
|
+
_createClass(ImageViewer, [{
|
|
70
71
|
key: "componentDidMount",
|
|
71
72
|
value: function componentDidMount() {}
|
|
72
73
|
}, {
|
|
@@ -266,6 +267,8 @@ var ImageViewer = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
266
267
|
}))));
|
|
267
268
|
}
|
|
268
269
|
}]);
|
|
270
|
+
return ImageViewer;
|
|
269
271
|
}(_react.Component);
|
|
272
|
+
exports["default"] = ImageViewer;
|
|
270
273
|
ImageViewer.propTypes = propTypes;
|
|
271
274
|
ImageViewer.displayName = 'ImageViewer';
|