@desynova-digital/player 4.0.103 → 4.0.105
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 +9 -8
- package/actions/player.js +1 -1
- package/components/AudioMeter.js +30 -29
- package/components/BigPlayButton.js +17 -16
- package/components/ImageViewer.js +17 -16
- package/components/MarkerBar.js +17 -16
- package/components/Menu.js +2 -2
- package/components/Player.js +52 -51
- package/components/PlayerHeader.js +26 -25
- package/components/Playlist.js +16 -15
- package/components/PointersBar.js +20 -19
- package/components/PosterImage.js +1 -1
- package/components/SDOutline.js +7 -7
- package/components/Shortcut.js +70 -69
- package/components/Slider.js +33 -33
- package/components/TagsBar.js +16 -15
- package/components/Video.js +391 -284
- package/components/control-bar/AudioTracksMenuButton.js +15 -14
- package/components/control-bar/CameraButton.js +16 -15
- package/components/control-bar/CaptionControlMenuButton.js +20 -19
- package/components/control-bar/CommentsButton.js +17 -16
- package/components/control-bar/ControlBar.js +19 -18
- package/components/control-bar/EditorControlMenuButton.js +17 -16
- package/components/control-bar/ForwardControl.js +1 -1
- package/components/control-bar/ForwardReplayControl.js +16 -15
- package/components/control-bar/FullscreenToggle.js +16 -15
- package/components/control-bar/PlayToggle.js +16 -15
- package/components/control-bar/ReplayControl.js +1 -1
- package/components/control-bar/SettingsMenuButton.js +4 -4
- package/components/control-bar/SubtitleLanguagesMenuButton.js +15 -14
- package/components/control-bar/SubtitleMovementMenu.js +17 -16
- package/components/control-bar/VolumeMenuButton.js +17 -16
- package/components/control-bar/ZoomMenuButton.js +17 -16
- package/components/marking-controls/MarkInControl.js +16 -15
- package/components/marking-controls/MarkOutControl.js +16 -15
- package/components/marking-controls/MarkingAddButton.js +16 -15
- package/components/marking-controls/MarkingControl.js +2 -2
- package/components/marking-controls/MarkingDeleteButton.js +16 -15
- package/components/marking-controls/MarkingDuration.js +2 -2
- package/components/marking-controls/MarkingPreview.js +16 -15
- package/components/marking-controls/TimecodeFormatSelector.js +7 -7
- package/components/progress-bar/AudioWaveform.js +16 -15
- package/components/progress-bar/LoadProgressBar.js +1 -1
- package/components/progress-bar/MouseTimeDisplay.js +1 -1
- package/components/progress-bar/PlayProgressBar.js +2 -2
- package/components/progress-bar/ProgressControl.js +22 -21
- package/components/progress-bar/RenderCommentMarkers.js +23 -23
- package/components/progress-bar/SeekBar.js +35 -34
- package/components/progress-bar/Timeline.js +15 -14
- package/components/settings-menu-control/CameraControl.js +3 -3
- package/components/settings-menu-control/ChildMenuComponent.js +29 -28
- package/components/settings-menu-control/ParentMenuComponent.js +18 -17
- package/components/settings-menu-control/PlaybackRateControl.js +16 -15
- package/components/settings-menu-control/SafeAreaControl.js +16 -15
- package/components/settings-menu-control/SettingsMenu.js +12 -12
- package/components/time-controls/CurrentTimeDisplay.js +7 -7
- package/components/time-controls/DurationDisplay.js +2 -2
- package/components/time-controls/TimeDivider.js +2 -2
- package/components/volume-control/VolumeBar.js +25 -24
- package/components/volume-control/VolumeControl.js +1 -1
- package/components/volume-control/VolumeLevel.js +2 -2
- package/components/zoom-control/ZoomBar.js +24 -23
- package/components/zoom-control/ZoomLevel.js +2 -2
- package/index.js +2 -2
- package/package.json +1 -1
- package/reducers/operation.js +2 -2
- package/reducers/player.js +2 -2
- package/utils/browser.js +14 -14
- package/utils/dom.js +18 -18
- package/utils/fullscreen.js +6 -5
- package/utils/index.js +54 -54
package/utils/dom.js
CHANGED
|
@@ -8,14 +8,14 @@ exports.findElPosition = findElPosition;
|
|
|
8
8
|
exports.getPointerPosition = getPointerPosition;
|
|
9
9
|
exports.hasClass = hasClass;
|
|
10
10
|
var _reactDom = require("react-dom");
|
|
11
|
-
/**
|
|
12
|
-
* Offset Left
|
|
13
|
-
* getBoundingClientRect technique from
|
|
14
|
-
* John Resig http://ejohn.org/blog/getboundingclientrect-is-awesome/
|
|
15
|
-
*
|
|
16
|
-
* @function findElPosition
|
|
17
|
-
* @param {Element} el Element from which to get offset
|
|
18
|
-
* @return {Object}
|
|
11
|
+
/**
|
|
12
|
+
* Offset Left
|
|
13
|
+
* getBoundingClientRect technique from
|
|
14
|
+
* John Resig http://ejohn.org/blog/getboundingclientrect-is-awesome/
|
|
15
|
+
*
|
|
16
|
+
* @function findElPosition
|
|
17
|
+
* @param {Element} el Element from which to get offset
|
|
18
|
+
* @return {Object}
|
|
19
19
|
*/
|
|
20
20
|
function findElPosition(el) {
|
|
21
21
|
var box;
|
|
@@ -44,16 +44,16 @@ function findElPosition(el) {
|
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
/**
|
|
48
|
-
* Get pointer position in element
|
|
49
|
-
* Returns an object with x and y coordinates.
|
|
50
|
-
* The base on the coordinates are the bottom left of the element.
|
|
51
|
-
*
|
|
52
|
-
* @function getPointerPosition
|
|
53
|
-
* @param {Element} el Element on which to get the pointer position on
|
|
54
|
-
* @param {Event} event Event object
|
|
55
|
-
* @return {Object} This object will have x and y
|
|
56
|
-
* coordinates corresponding to the mouse position
|
|
47
|
+
/**
|
|
48
|
+
* Get pointer position in element
|
|
49
|
+
* Returns an object with x and y coordinates.
|
|
50
|
+
* The base on the coordinates are the bottom left of the element.
|
|
51
|
+
*
|
|
52
|
+
* @function getPointerPosition
|
|
53
|
+
* @param {Element} el Element on which to get the pointer position on
|
|
54
|
+
* @param {Event} event Event object
|
|
55
|
+
* @return {Object} This object will have x and y
|
|
56
|
+
* coordinates corresponding to the mouse position
|
|
57
57
|
*/
|
|
58
58
|
function getPointerPosition(el, event) {
|
|
59
59
|
var position = {};
|
package/utils/fullscreen.js
CHANGED
|
@@ -5,16 +5,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
8
|
-
function _classCallCheck(
|
|
9
|
-
function _defineProperties(
|
|
10
|
-
function _createClass(
|
|
11
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i
|
|
8
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
9
|
+
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); } }
|
|
10
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
11
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
12
12
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
13
13
|
var Fullscreen = /*#__PURE__*/function () {
|
|
14
14
|
function Fullscreen() {
|
|
15
15
|
_classCallCheck(this, Fullscreen);
|
|
16
16
|
}
|
|
17
|
-
|
|
17
|
+
_createClass(Fullscreen, [{
|
|
18
18
|
key: "request",
|
|
19
19
|
value: function request(elm) {
|
|
20
20
|
if (elm.requestFullscreen) {
|
|
@@ -67,5 +67,6 @@ var Fullscreen = /*#__PURE__*/function () {
|
|
|
67
67
|
document.removeEventListener('MSFullscreenChange', handler);
|
|
68
68
|
}
|
|
69
69
|
}]);
|
|
70
|
+
return Fullscreen;
|
|
70
71
|
}();
|
|
71
72
|
var _default = exports["default"] = new Fullscreen();
|
package/utils/index.js
CHANGED
|
@@ -13,32 +13,32 @@ exports.secondsToTime = secondsToTime;
|
|
|
13
13
|
exports.throttle = throttle;
|
|
14
14
|
exports.timeToSeconds = timeToSeconds;
|
|
15
15
|
var _react = _interopRequireDefault(require("react"));
|
|
16
|
-
function _interopRequireDefault(
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
17
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
18
|
-
function _toConsumableArray(
|
|
18
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
19
19
|
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."); }
|
|
20
|
-
function _unsupportedIterableToArray(
|
|
21
|
-
function _iterableToArray(
|
|
22
|
-
function _arrayWithoutHoles(
|
|
23
|
-
function _arrayLikeToArray(
|
|
20
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
21
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
22
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
23
|
+
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; }
|
|
24
24
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
25
25
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
26
|
-
function _defineProperty(
|
|
27
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i
|
|
26
|
+
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; }
|
|
27
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
28
28
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
29
|
-
/**
|
|
30
|
-
* @file seconds-to-time.js
|
|
31
|
-
*
|
|
32
|
-
* Format seconds as a time string, HH:MM:SS:FF
|
|
33
|
-
* Supplying a guide (in seconds) will force a number of leading zeros
|
|
34
|
-
* to cover the length of the guide
|
|
35
|
-
*
|
|
36
|
-
* @param {Number} _seconds Number of seconds to be turned into a string
|
|
37
|
-
* @param {Number} frameRate Number of frames per second
|
|
38
|
-
* @param {Number} initialTime Start time of a video
|
|
39
|
-
* @return {String} Time formatted as H:MM:SS or M:SS
|
|
40
|
-
* @private
|
|
41
|
-
* @function secondsToTime
|
|
29
|
+
/**
|
|
30
|
+
* @file seconds-to-time.js
|
|
31
|
+
*
|
|
32
|
+
* Format seconds as a time string, HH:MM:SS:FF
|
|
33
|
+
* Supplying a guide (in seconds) will force a number of leading zeros
|
|
34
|
+
* to cover the length of the guide
|
|
35
|
+
*
|
|
36
|
+
* @param {Number} _seconds Number of seconds to be turned into a string
|
|
37
|
+
* @param {Number} frameRate Number of frames per second
|
|
38
|
+
* @param {Number} initialTime Start time of a video
|
|
39
|
+
* @return {String} Time formatted as H:MM:SS or M:SS
|
|
40
|
+
* @private
|
|
41
|
+
* @function secondsToTime
|
|
42
42
|
*/
|
|
43
43
|
function secondsToTime() {
|
|
44
44
|
var seconds = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
@@ -99,18 +99,18 @@ function timeToSeconds() {
|
|
|
99
99
|
return seconds;
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
/**
|
|
103
|
-
* @file format-time.js
|
|
104
|
-
*
|
|
105
|
-
* Format seconds as a time string, H:MM:SS or M:SS
|
|
106
|
-
* Supplying a guide (in seconds) will force a number of leading zeros
|
|
107
|
-
* to cover the length of the guide
|
|
108
|
-
*
|
|
109
|
-
* @param {Number} seconds Number of seconds to be turned into a string
|
|
110
|
-
* @param {Number} guide Number (in seconds) to model the string after
|
|
111
|
-
* @return {String} Time formatted as H:MM:SS or M:SS
|
|
112
|
-
* @private
|
|
113
|
-
* @function formatTime
|
|
102
|
+
/**
|
|
103
|
+
* @file format-time.js
|
|
104
|
+
*
|
|
105
|
+
* Format seconds as a time string, H:MM:SS or M:SS
|
|
106
|
+
* Supplying a guide (in seconds) will force a number of leading zeros
|
|
107
|
+
* to cover the length of the guide
|
|
108
|
+
*
|
|
109
|
+
* @param {Number} seconds Number of seconds to be turned into a string
|
|
110
|
+
* @param {Number} guide Number (in seconds) to model the string after
|
|
111
|
+
* @return {String} Time formatted as H:MM:SS or M:SS
|
|
112
|
+
* @private
|
|
113
|
+
* @function formatTime
|
|
114
114
|
*/
|
|
115
115
|
function formatTime() {
|
|
116
116
|
var seconds = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
@@ -123,9 +123,9 @@ function formatTime() {
|
|
|
123
123
|
|
|
124
124
|
// handle invalid times
|
|
125
125
|
if (isNaN(seconds) || seconds === Infinity) {
|
|
126
|
-
/*
|
|
127
|
-
* '-' is false for all relational operators (e.g. <, >=) so this setting
|
|
128
|
-
* will add the minimum number of fields specified by the guide
|
|
126
|
+
/*
|
|
127
|
+
* '-' is false for all relational operators (e.g. <, >=) so this setting
|
|
128
|
+
* will add the minimum number of fields specified by the guide
|
|
129
129
|
*/
|
|
130
130
|
s = '-';
|
|
131
131
|
h = s;
|
|
@@ -135,9 +135,9 @@ function formatTime() {
|
|
|
135
135
|
// Check if we need to show hours
|
|
136
136
|
h = h > 0 || gh > 0 ? "".concat(h, ":") : '';
|
|
137
137
|
|
|
138
|
-
/*
|
|
139
|
-
* If hours are showing, we may need to add a leading zero.
|
|
140
|
-
* Always show at least one digit of minutes.
|
|
138
|
+
/*
|
|
139
|
+
* If hours are showing, we may need to add a leading zero.
|
|
140
|
+
* Always show at least one digit of minutes.
|
|
141
141
|
*/
|
|
142
142
|
m = "".concat((h || gm >= 10) && m < 10 ? "0".concat(m) : m, ":");
|
|
143
143
|
|
|
@@ -146,11 +146,11 @@ function formatTime() {
|
|
|
146
146
|
return h + m + s;
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
-
/*
|
|
150
|
-
* Check if the element belongs to a video element
|
|
151
|
-
* only accept <source />, <track />,
|
|
152
|
-
* <MyComponent isVideoChild />
|
|
153
|
-
* elements
|
|
149
|
+
/*
|
|
150
|
+
* Check if the element belongs to a video element
|
|
151
|
+
* only accept <source />, <track />,
|
|
152
|
+
* <MyComponent isVideoChild />
|
|
153
|
+
* elements
|
|
154
154
|
*/
|
|
155
155
|
function isVideoChild(c) {
|
|
156
156
|
if (c.props && c.props.isVideoChild) {
|
|
@@ -175,10 +175,10 @@ var isTypeEqual = function isTypeEqual(component1, component2) {
|
|
|
175
175
|
return false;
|
|
176
176
|
};
|
|
177
177
|
|
|
178
|
-
/*
|
|
179
|
-
* merge default children
|
|
180
|
-
* sort them by `order` property
|
|
181
|
-
* filter them by `disabled` property
|
|
178
|
+
/*
|
|
179
|
+
* merge default children
|
|
180
|
+
* sort them by `order` property
|
|
181
|
+
* filter them by `disabled` property
|
|
182
182
|
*/
|
|
183
183
|
function mergeAndSortChildren(defaultChildren, _children, _parentProps) {
|
|
184
184
|
var defaultOrder = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
|
|
@@ -205,8 +205,8 @@ function mergeAndSortChildren(defaultChildren, _children, _parentProps) {
|
|
|
205
205
|
});
|
|
206
206
|
}
|
|
207
207
|
|
|
208
|
-
/**
|
|
209
|
-
* Temporary utility for generating the warnings
|
|
208
|
+
/**
|
|
209
|
+
* Temporary utility for generating the warnings
|
|
210
210
|
*/
|
|
211
211
|
function deprecatedWarning(oldMethodCall, newMethodCall) {
|
|
212
212
|
// eslint-disable-next-line no-console
|
|
@@ -227,10 +227,10 @@ function throttle(callback, limit) {
|
|
|
227
227
|
}
|
|
228
228
|
var mediaProperties = exports.mediaProperties = ['error', 'src', 'srcObject', 'currentSrc', 'crossOrigin', 'networkState', 'preload', 'buffered', 'readyState', 'seeking', 'currentTime', 'duration', 'paused', 'defaultPlaybackRate', 'playbackRate', 'played', 'seekable', 'ended', 'autoplay', 'loop', 'mediaGroup', 'controller', 'controls', 'volume', 'muted', 'defaultMuted', 'audioTracks', 'videoTracks', 'textTracks', 'width', 'height', 'videoWidth', 'videoHeight', 'poster'];
|
|
229
229
|
|
|
230
|
-
/**
|
|
231
|
-
*
|
|
232
|
-
* @param {Number} currentTime current time of video
|
|
233
|
-
* @returns adjusting the current time to the nearest frame
|
|
230
|
+
/**
|
|
231
|
+
*
|
|
232
|
+
* @param {Number} currentTime current time of video
|
|
233
|
+
* @returns adjusting the current time to the nearest frame
|
|
234
234
|
*/
|
|
235
235
|
function handleAdjustingVideoAsPerFrame(currentTime) {
|
|
236
236
|
var frameRate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 25;
|