@desynova-digital/player 4.0.45 → 4.0.46
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 +28 -27
- 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 +46 -45
- package/components/PlayerHeader.js +24 -23
- package/components/Playlist.js +15 -14
- package/components/PointersBar.js +20 -19
- package/components/PosterImage.js +1 -1
- package/components/SDOutline.js +2 -2
- package/components/Shortcut.js +70 -69
- package/components/Slider.js +33 -33
- package/components/TagsBar.js +16 -15
- package/components/Video.js +112 -111
- 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 +18 -17
- 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/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 +20 -19
- package/components/progress-bar/SeekBar.js +28 -27
- package/components/progress-bar/Timeline.js +38 -34
- 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/components/Video.js
CHANGED
|
@@ -16,26 +16,26 @@ var _PosterImage = _interopRequireDefault(require("./PosterImage"));
|
|
|
16
16
|
var _SDOutline = _interopRequireDefault(require("./SDOutline"));
|
|
17
17
|
var _components = require("@desynova-digital/components/components");
|
|
18
18
|
var _templateObject, _templateObject2;
|
|
19
|
-
function _interopRequireDefault(
|
|
19
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
20
20
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
21
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u &&
|
|
21
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
22
22
|
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; }
|
|
23
23
|
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; }
|
|
24
|
-
function _defineProperty(
|
|
25
|
-
function _extends() {
|
|
26
|
-
function _classCallCheck(
|
|
27
|
-
function _defineProperties(
|
|
28
|
-
function _createClass(
|
|
29
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i
|
|
24
|
+
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; }
|
|
25
|
+
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); }
|
|
26
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
27
|
+
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); } }
|
|
28
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
29
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
30
30
|
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); }
|
|
31
31
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
32
|
-
function _possibleConstructorReturn(
|
|
33
|
-
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
32
|
+
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); }
|
|
34
33
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
35
|
-
function _getPrototypeOf(
|
|
36
|
-
function
|
|
37
|
-
function
|
|
38
|
-
function
|
|
34
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
35
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
36
|
+
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); }
|
|
37
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
38
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
39
39
|
var propTypes = {
|
|
40
40
|
actions: _propTypes.PropTypes.instanceOf(Object),
|
|
41
41
|
player: _propTypes.PropTypes.instanceOf(Object),
|
|
@@ -104,6 +104,7 @@ var VideoBlock = _styledComponents["default"].div(_templateObject2 || (_template
|
|
|
104
104
|
return props.HDBorder ? '"16:9 Safe Area"' : '';
|
|
105
105
|
});
|
|
106
106
|
var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
107
|
+
_inherits(Video, _Component);
|
|
107
108
|
function Video(props) {
|
|
108
109
|
var _this;
|
|
109
110
|
_classCallCheck(this, Video);
|
|
@@ -128,46 +129,45 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
128
129
|
};
|
|
129
130
|
_this.video = null; // the html5 video
|
|
130
131
|
_this.manager = new _Manager["default"](props.store);
|
|
131
|
-
_this.getStyle = _this.getStyle.bind(_this);
|
|
132
|
-
_this.getChildren = _this.getChildren.bind(_this);
|
|
133
|
-
_this.play = _this.play.bind(_this);
|
|
134
|
-
_this.pause = _this.pause.bind(_this);
|
|
135
|
-
_this.seek = _this.seek.bind(_this);
|
|
136
|
-
_this.forward = _this.forward.bind(_this);
|
|
137
|
-
_this.replay = _this.replay.bind(_this);
|
|
138
|
-
_this.toggleFullscreen = _this.toggleFullscreen.bind(_this);
|
|
139
|
-
_this.getProperties = _this.getProperties.bind(_this);
|
|
140
|
-
_this.renderChildren = _this.renderChildren.bind(_this);
|
|
141
|
-
_this.handleLoadStart = _this.handleLoadStart.bind(_this);
|
|
142
|
-
_this.handleCanPlay = _this.handleCanPlay.bind(_this);
|
|
143
|
-
_this.handleCanPlayThrough = _this.handleCanPlayThrough.bind(_this);
|
|
144
|
-
_this.handlePlay = _this.handlePlay.bind(_this);
|
|
145
|
-
_this.handlePlaying = _this.handlePlaying.bind(_this);
|
|
146
|
-
_this.handlePause = _this.handlePause.bind(_this);
|
|
147
|
-
_this.handleEnded = _this.handleEnded.bind(_this);
|
|
148
|
-
_this.handleWaiting = _this.handleWaiting.bind(_this);
|
|
149
|
-
_this.handleSeeking = _this.handleSeeking.bind(_this);
|
|
150
|
-
_this.handleSeeked = _this.handleSeeked.bind(_this);
|
|
151
|
-
_this.handleFullscreenChange = _this.handleFullscreenChange.bind(_this);
|
|
152
|
-
_this.handleError = _this.handleError.bind(_this);
|
|
153
|
-
_this.handleSuspend = _this.handleSuspend.bind(_this);
|
|
154
|
-
_this.handleAbort = _this.handleAbort.bind(_this);
|
|
155
|
-
_this.handleEmptied = _this.handleEmptied.bind(_this);
|
|
156
|
-
_this.handleStalled = _this.handleStalled.bind(_this);
|
|
157
|
-
_this.handleLoadedMetaData = _this.handleLoadedMetaData.bind(_this);
|
|
158
|
-
_this.handleLoadedData = _this.handleLoadedData.bind(_this);
|
|
159
|
-
_this.handleTimeUpdate = _this.handleTimeUpdate.bind(_this);
|
|
160
|
-
_this.handleRateChange = _this.handleRateChange.bind(_this);
|
|
161
|
-
_this.handleVolumeChange = _this.handleVolumeChange.bind(_this);
|
|
162
|
-
_this.handleDurationChange = _this.handleDurationChange.bind(_this);
|
|
163
|
-
_this.handleProgress = (0, _utils.throttle)(_this.handleProgress.bind(_this), 250);
|
|
164
|
-
_this.handleKeypress = _this.handleKeypress.bind(_this);
|
|
165
|
-
_this.audioVisualizer = _this.audioVisualizer.bind(_this);
|
|
166
|
-
_this.checkWatermark = _this.checkWatermark.bind(_this);
|
|
132
|
+
_this.getStyle = _this.getStyle.bind(_assertThisInitialized(_this));
|
|
133
|
+
_this.getChildren = _this.getChildren.bind(_assertThisInitialized(_this));
|
|
134
|
+
_this.play = _this.play.bind(_assertThisInitialized(_this));
|
|
135
|
+
_this.pause = _this.pause.bind(_assertThisInitialized(_this));
|
|
136
|
+
_this.seek = _this.seek.bind(_assertThisInitialized(_this));
|
|
137
|
+
_this.forward = _this.forward.bind(_assertThisInitialized(_this));
|
|
138
|
+
_this.replay = _this.replay.bind(_assertThisInitialized(_this));
|
|
139
|
+
_this.toggleFullscreen = _this.toggleFullscreen.bind(_assertThisInitialized(_this));
|
|
140
|
+
_this.getProperties = _this.getProperties.bind(_assertThisInitialized(_this));
|
|
141
|
+
_this.renderChildren = _this.renderChildren.bind(_assertThisInitialized(_this));
|
|
142
|
+
_this.handleLoadStart = _this.handleLoadStart.bind(_assertThisInitialized(_this));
|
|
143
|
+
_this.handleCanPlay = _this.handleCanPlay.bind(_assertThisInitialized(_this));
|
|
144
|
+
_this.handleCanPlayThrough = _this.handleCanPlayThrough.bind(_assertThisInitialized(_this));
|
|
145
|
+
_this.handlePlay = _this.handlePlay.bind(_assertThisInitialized(_this));
|
|
146
|
+
_this.handlePlaying = _this.handlePlaying.bind(_assertThisInitialized(_this));
|
|
147
|
+
_this.handlePause = _this.handlePause.bind(_assertThisInitialized(_this));
|
|
148
|
+
_this.handleEnded = _this.handleEnded.bind(_assertThisInitialized(_this));
|
|
149
|
+
_this.handleWaiting = _this.handleWaiting.bind(_assertThisInitialized(_this));
|
|
150
|
+
_this.handleSeeking = _this.handleSeeking.bind(_assertThisInitialized(_this));
|
|
151
|
+
_this.handleSeeked = _this.handleSeeked.bind(_assertThisInitialized(_this));
|
|
152
|
+
_this.handleFullscreenChange = _this.handleFullscreenChange.bind(_assertThisInitialized(_this));
|
|
153
|
+
_this.handleError = _this.handleError.bind(_assertThisInitialized(_this));
|
|
154
|
+
_this.handleSuspend = _this.handleSuspend.bind(_assertThisInitialized(_this));
|
|
155
|
+
_this.handleAbort = _this.handleAbort.bind(_assertThisInitialized(_this));
|
|
156
|
+
_this.handleEmptied = _this.handleEmptied.bind(_assertThisInitialized(_this));
|
|
157
|
+
_this.handleStalled = _this.handleStalled.bind(_assertThisInitialized(_this));
|
|
158
|
+
_this.handleLoadedMetaData = _this.handleLoadedMetaData.bind(_assertThisInitialized(_this));
|
|
159
|
+
_this.handleLoadedData = _this.handleLoadedData.bind(_assertThisInitialized(_this));
|
|
160
|
+
_this.handleTimeUpdate = _this.handleTimeUpdate.bind(_assertThisInitialized(_this));
|
|
161
|
+
_this.handleRateChange = _this.handleRateChange.bind(_assertThisInitialized(_this));
|
|
162
|
+
_this.handleVolumeChange = _this.handleVolumeChange.bind(_assertThisInitialized(_this));
|
|
163
|
+
_this.handleDurationChange = _this.handleDurationChange.bind(_assertThisInitialized(_this));
|
|
164
|
+
_this.handleProgress = (0, _utils.throttle)(_this.handleProgress.bind(_assertThisInitialized(_this)), 250);
|
|
165
|
+
_this.handleKeypress = _this.handleKeypress.bind(_assertThisInitialized(_this));
|
|
166
|
+
_this.audioVisualizer = _this.audioVisualizer.bind(_assertThisInitialized(_this));
|
|
167
|
+
_this.checkWatermark = _this.checkWatermark.bind(_assertThisInitialized(_this));
|
|
167
168
|
return _this;
|
|
168
169
|
}
|
|
169
|
-
|
|
170
|
-
return _createClass(Video, [{
|
|
170
|
+
_createClass(Video, [{
|
|
171
171
|
key: "componentDidMount",
|
|
172
172
|
value: function componentDidMount() {
|
|
173
173
|
var src = this.props.src;
|
|
@@ -203,8 +203,8 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
203
203
|
clearInterval(watermarkInterval);
|
|
204
204
|
}
|
|
205
205
|
|
|
206
|
-
/**
|
|
207
|
-
* This function is triggered on interval to shuffle the position of watermark on Player area
|
|
206
|
+
/**
|
|
207
|
+
* This function is triggered on interval to shuffle the position of watermark on Player area
|
|
208
208
|
*/
|
|
209
209
|
}, {
|
|
210
210
|
key: "checkWatermark",
|
|
@@ -377,9 +377,9 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
377
377
|
aspectRatio = _this$props3.aspectRatio,
|
|
378
378
|
width = _this$props3.width,
|
|
379
379
|
height = _this$props3.height;
|
|
380
|
-
/*
|
|
381
|
-
* The aspect ratio is either used directly
|
|
382
|
-
* or to calculate width and height.
|
|
380
|
+
/*
|
|
381
|
+
* The aspect ratio is either used directly
|
|
382
|
+
* or to calculate width and height.
|
|
383
383
|
*/
|
|
384
384
|
if (player.videoWidth) {
|
|
385
385
|
// Otherwise try to get the aspect ratio from the video metadata
|
|
@@ -433,9 +433,9 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
433
433
|
return this.video.playbackRate;
|
|
434
434
|
}
|
|
435
435
|
|
|
436
|
-
/*
|
|
437
|
-
* set playback rate
|
|
438
|
-
* speed of video
|
|
436
|
+
/*
|
|
437
|
+
* set playback rate
|
|
438
|
+
* speed of video
|
|
439
439
|
*/,
|
|
440
440
|
set: function set(rate) {
|
|
441
441
|
this.video.playbackRate = rate;
|
|
@@ -634,9 +634,9 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
634
634
|
actions.toggleFullscreen(player);
|
|
635
635
|
}
|
|
636
636
|
|
|
637
|
-
/*
|
|
638
|
-
* Fired when the user agent
|
|
639
|
-
* begins looking for media data
|
|
637
|
+
/*
|
|
638
|
+
* Fired when the user agent
|
|
639
|
+
* begins looking for media data
|
|
640
640
|
*/
|
|
641
641
|
}, {
|
|
642
642
|
key: "handleLoadStart",
|
|
@@ -654,9 +654,9 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
654
654
|
}
|
|
655
655
|
}
|
|
656
656
|
|
|
657
|
-
/*
|
|
658
|
-
* A handler for events that
|
|
659
|
-
* signal that waiting has ended
|
|
657
|
+
/*
|
|
658
|
+
* A handler for events that
|
|
659
|
+
* signal that waiting has ended
|
|
660
660
|
*/
|
|
661
661
|
}, {
|
|
662
662
|
key: "handleCanPlay",
|
|
@@ -670,9 +670,9 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
670
670
|
}
|
|
671
671
|
}
|
|
672
672
|
|
|
673
|
-
/*
|
|
674
|
-
* A handler for events that
|
|
675
|
-
* signal that waiting has ended
|
|
673
|
+
/*
|
|
674
|
+
* A handler for events that
|
|
675
|
+
* signal that waiting has ended
|
|
676
676
|
*/
|
|
677
677
|
}, {
|
|
678
678
|
key: "handleCanPlayThrough",
|
|
@@ -686,9 +686,9 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
686
686
|
}
|
|
687
687
|
}
|
|
688
688
|
|
|
689
|
-
/*
|
|
690
|
-
* A handler for events that
|
|
691
|
-
* signal that waiting has ended
|
|
689
|
+
/*
|
|
690
|
+
* A handler for events that
|
|
691
|
+
* signal that waiting has ended
|
|
692
692
|
*/
|
|
693
693
|
}, {
|
|
694
694
|
key: "handlePlaying",
|
|
@@ -728,9 +728,9 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
728
728
|
}
|
|
729
729
|
}
|
|
730
730
|
|
|
731
|
-
/*
|
|
732
|
-
* Fired when the duration of
|
|
733
|
-
* the media resource is first known or changed
|
|
731
|
+
/*
|
|
732
|
+
* Fired when the duration of
|
|
733
|
+
* the media resource is first known or changed
|
|
734
734
|
*/
|
|
735
735
|
}, {
|
|
736
736
|
key: "handleDurationChange",
|
|
@@ -744,9 +744,9 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
744
744
|
}
|
|
745
745
|
}
|
|
746
746
|
|
|
747
|
-
/*
|
|
748
|
-
* Fired while the user agent
|
|
749
|
-
* is downloading media data
|
|
747
|
+
/*
|
|
748
|
+
* Fired while the user agent
|
|
749
|
+
* is downloading media data
|
|
750
750
|
*/
|
|
751
751
|
}, {
|
|
752
752
|
key: "handleProgress",
|
|
@@ -813,9 +813,9 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
813
813
|
}
|
|
814
814
|
}
|
|
815
815
|
|
|
816
|
-
/*
|
|
817
|
-
* Fired when the end of the media resource
|
|
818
|
-
* is reached (currentTime == duration)
|
|
816
|
+
/*
|
|
817
|
+
* Fired when the end of the media resource
|
|
818
|
+
* is reached (currentTime == duration)
|
|
819
819
|
*/
|
|
820
820
|
}, {
|
|
821
821
|
key: "handleEnded",
|
|
@@ -850,9 +850,9 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
850
850
|
}
|
|
851
851
|
}
|
|
852
852
|
|
|
853
|
-
/*
|
|
854
|
-
* Fired whenever the player
|
|
855
|
-
* is jumping to a new time
|
|
853
|
+
/*
|
|
854
|
+
* Fired whenever the player
|
|
855
|
+
* is jumping to a new time
|
|
856
856
|
*/
|
|
857
857
|
}, {
|
|
858
858
|
key: "handleSeeking",
|
|
@@ -866,9 +866,9 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
866
866
|
}
|
|
867
867
|
}
|
|
868
868
|
|
|
869
|
-
/*
|
|
870
|
-
* Fired when the player has
|
|
871
|
-
* finished jumping to a new time
|
|
869
|
+
/*
|
|
870
|
+
* Fired when the player has
|
|
871
|
+
* finished jumping to a new time
|
|
872
872
|
*/
|
|
873
873
|
}, {
|
|
874
874
|
key: "handleSeeked",
|
|
@@ -887,9 +887,9 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
887
887
|
key: "handleFullscreenChange",
|
|
888
888
|
value: function handleFullscreenChange() {}
|
|
889
889
|
|
|
890
|
-
/*
|
|
891
|
-
* Fires when the browser is
|
|
892
|
-
* intentionally not getting media data
|
|
890
|
+
/*
|
|
891
|
+
* Fires when the browser is
|
|
892
|
+
* intentionally not getting media data
|
|
893
893
|
*/
|
|
894
894
|
}, {
|
|
895
895
|
key: "handleSuspend",
|
|
@@ -929,9 +929,9 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
929
929
|
}
|
|
930
930
|
}
|
|
931
931
|
|
|
932
|
-
/*
|
|
933
|
-
* Fires when the browser is trying to
|
|
934
|
-
* get media data, but data is not available
|
|
932
|
+
/*
|
|
933
|
+
* Fires when the browser is trying to
|
|
934
|
+
* get media data, but data is not available
|
|
935
935
|
*/
|
|
936
936
|
}, {
|
|
937
937
|
key: "handleStalled",
|
|
@@ -945,9 +945,9 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
945
945
|
}
|
|
946
946
|
}
|
|
947
947
|
|
|
948
|
-
/*
|
|
949
|
-
* Fires when the browser has loaded
|
|
950
|
-
* meta data for the audio/video
|
|
948
|
+
/*
|
|
949
|
+
* Fires when the browser has loaded
|
|
950
|
+
* meta data for the audio/video
|
|
951
951
|
*/
|
|
952
952
|
}, {
|
|
953
953
|
key: "handleLoadedMetaData",
|
|
@@ -965,9 +965,9 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
965
965
|
}
|
|
966
966
|
}
|
|
967
967
|
|
|
968
|
-
/*
|
|
969
|
-
* Fires when the browser has loaded
|
|
970
|
-
* the current frame of the audio/video
|
|
968
|
+
/*
|
|
969
|
+
* Fires when the browser has loaded
|
|
970
|
+
* the current frame of the audio/video
|
|
971
971
|
*/
|
|
972
972
|
}, {
|
|
973
973
|
key: "handleLoadedData",
|
|
@@ -981,9 +981,9 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
981
981
|
}
|
|
982
982
|
}
|
|
983
983
|
|
|
984
|
-
/*
|
|
985
|
-
* Fires when the current
|
|
986
|
-
* playback position has changed
|
|
984
|
+
/*
|
|
985
|
+
* Fires when the current
|
|
986
|
+
* playback position has changed
|
|
987
987
|
*/
|
|
988
988
|
}, {
|
|
989
989
|
key: "handleTimeUpdate",
|
|
@@ -1005,8 +1005,8 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
1005
1005
|
this.displaySubtitle();
|
|
1006
1006
|
}
|
|
1007
1007
|
|
|
1008
|
-
/**
|
|
1009
|
-
* Fires when the playing speed of the audio/video is changed
|
|
1008
|
+
/**
|
|
1009
|
+
* Fires when the playing speed of the audio/video is changed
|
|
1010
1010
|
*/
|
|
1011
1011
|
}, {
|
|
1012
1012
|
key: "handleRateChange",
|
|
@@ -1033,9 +1033,9 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
1033
1033
|
}
|
|
1034
1034
|
}
|
|
1035
1035
|
|
|
1036
|
-
/*
|
|
1037
|
-
* Fires when an error occurred
|
|
1038
|
-
* during the loading of an audio/video
|
|
1036
|
+
/*
|
|
1037
|
+
* Fires when an error occurred
|
|
1038
|
+
* during the loading of an audio/video
|
|
1039
1039
|
*/
|
|
1040
1040
|
}, {
|
|
1041
1041
|
key: "handleError",
|
|
@@ -1086,10 +1086,10 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
1086
1086
|
for (var i = 0; i < bufferLength; i++) {
|
|
1087
1087
|
barHeight = dataArray[i] * 2;
|
|
1088
1088
|
|
|
1089
|
-
/*
|
|
1090
|
-
* var r = barHeight + (25 * (i / bufferLength));
|
|
1091
|
-
* var g = 250 * (i / bufferLength);
|
|
1092
|
-
* var b = s50;
|
|
1089
|
+
/*
|
|
1090
|
+
* var r = barHeight + (25 * (i / bufferLength));
|
|
1091
|
+
* var g = 250 * (i / bufferLength);
|
|
1092
|
+
* var b = s50;
|
|
1093
1093
|
*/
|
|
1094
1094
|
|
|
1095
1095
|
ctx.fillStyle = '#0c141d'; // 'rgb(' + r + ',' + g + ',' + b + ')';
|
|
@@ -1325,6 +1325,7 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
1325
1325
|
}) || null)));
|
|
1326
1326
|
}
|
|
1327
1327
|
}]);
|
|
1328
|
+
return Video;
|
|
1328
1329
|
}(_react.Component);
|
|
1329
1330
|
Video.propTypes = propTypes;
|
|
1330
1331
|
Video.defaultProps = defaultProps;
|
|
@@ -11,22 +11,22 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
11
11
|
var _Menu = _interopRequireDefault(require("../Menu"));
|
|
12
12
|
var _tokens = require("@desynova-digital/tokens");
|
|
13
13
|
var _templateObject;
|
|
14
|
-
function _interopRequireDefault(
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
15
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
16
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u &&
|
|
17
|
-
function _classCallCheck(
|
|
18
|
-
function _defineProperties(
|
|
19
|
-
function _createClass(
|
|
20
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i
|
|
16
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
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(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
21
21
|
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); }
|
|
22
22
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
23
|
-
function _possibleConstructorReturn(
|
|
24
|
-
function _assertThisInitialized(
|
|
23
|
+
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); }
|
|
24
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
25
25
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
26
|
-
function _getPrototypeOf(
|
|
27
|
-
function _inherits(
|
|
28
|
-
function _setPrototypeOf(
|
|
29
|
-
function _taggedTemplateLiteral(
|
|
26
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
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 _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
30
30
|
var propTypes = {
|
|
31
31
|
actions: _propTypes.PropTypes.instanceOf(Object),
|
|
32
32
|
player: _propTypes.PropTypes.instanceOf(Object),
|
|
@@ -36,12 +36,12 @@ var AudioTrackBlock = (0, _styledComponents["default"])('div')(_templateObject |
|
|
|
36
36
|
return props.theme ? " ".concat(_tokens.colors[props.theme].videoPlayer.rgbaThemeColor) : 'rgba(0, 206, 198, 0.1)';
|
|
37
37
|
});
|
|
38
38
|
var AudioTracksMenuButton = /*#__PURE__*/function (_Component) {
|
|
39
|
+
_inherits(AudioTracksMenuButton, _Component);
|
|
39
40
|
function AudioTracksMenuButton(props, context) {
|
|
40
41
|
_classCallCheck(this, AudioTracksMenuButton);
|
|
41
42
|
return _callSuper(this, AudioTracksMenuButton, [props, context]);
|
|
42
43
|
}
|
|
43
|
-
|
|
44
|
-
return _createClass(AudioTracksMenuButton, [{
|
|
44
|
+
_createClass(AudioTracksMenuButton, [{
|
|
45
45
|
key: "changeTrack",
|
|
46
46
|
value: function changeTrack(track) {
|
|
47
47
|
var actions = this.props.actions;
|
|
@@ -88,6 +88,7 @@ var AudioTracksMenuButton = /*#__PURE__*/function (_Component) {
|
|
|
88
88
|
}))) : null);
|
|
89
89
|
}
|
|
90
90
|
}]);
|
|
91
|
+
return AudioTracksMenuButton;
|
|
91
92
|
}(_react.Component);
|
|
92
93
|
AudioTracksMenuButton.propTypes = propTypes;
|
|
93
94
|
AudioTracksMenuButton.displayName = 'AudioTracksMenuButton';
|
|
@@ -11,22 +11,22 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
11
11
|
var _components = require("@desynova-digital/components");
|
|
12
12
|
var _utils = require("../../utils");
|
|
13
13
|
var _templateObject;
|
|
14
|
-
function _interopRequireDefault(
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
15
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
16
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u &&
|
|
17
|
-
function _classCallCheck(
|
|
18
|
-
function _defineProperties(
|
|
19
|
-
function _createClass(
|
|
20
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i
|
|
16
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
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(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
21
21
|
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); }
|
|
22
22
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
23
|
-
function _possibleConstructorReturn(
|
|
24
|
-
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
23
|
+
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
24
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
26
|
-
function _getPrototypeOf(
|
|
27
|
-
function
|
|
28
|
-
function
|
|
29
|
-
function
|
|
25
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
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 _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 _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
30
30
|
var CameraButtonIcon = (0, _styledComponents["default"])(_components.Button)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background: transparent;\n border: none;\n margin: 0px;\n margin-right: 10px;\n &:hover,\n &:focus {\n background: transparent;\n }\n"])));
|
|
31
31
|
var propTypes = {
|
|
32
32
|
actions: _propTypes.PropTypes.instanceOf(Object),
|
|
@@ -34,15 +34,15 @@ var propTypes = {
|
|
|
34
34
|
handleClick: _propTypes.PropTypes.func
|
|
35
35
|
};
|
|
36
36
|
var CameraButton = /*#__PURE__*/function (_Component) {
|
|
37
|
+
_inherits(CameraButton, _Component);
|
|
37
38
|
function CameraButton(props, context) {
|
|
38
39
|
var _this;
|
|
39
40
|
_classCallCheck(this, CameraButton);
|
|
40
41
|
_this = _callSuper(this, CameraButton, [props, context]);
|
|
41
|
-
_this.handleClick = _this.handleClick.bind(_this);
|
|
42
|
+
_this.handleClick = _this.handleClick.bind(_assertThisInitialized(_this));
|
|
42
43
|
return _this;
|
|
43
44
|
}
|
|
44
|
-
|
|
45
|
-
return _createClass(CameraButton, [{
|
|
45
|
+
_createClass(CameraButton, [{
|
|
46
46
|
key: "handleClick",
|
|
47
47
|
value: function handleClick() {
|
|
48
48
|
var _this$props = this.props,
|
|
@@ -72,5 +72,6 @@ var CameraButton = /*#__PURE__*/function (_Component) {
|
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
74
|
}]);
|
|
75
|
+
return CameraButton;
|
|
75
76
|
}(_react.Component);
|
|
76
77
|
var _default = exports["default"] = CameraButton;
|