@desynova-digital/player 4.0.63 → 4.0.65
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 +8 -9
- package/actions/player.js +1 -1
- package/components/AudioMeter.js +27 -28
- package/components/BigPlayButton.js +16 -17
- package/components/ImageViewer.js +16 -17
- package/components/MarkerBar.js +16 -17
- package/components/Menu.js +2 -2
- package/components/Player.js +45 -46
- package/components/PlayerHeader.js +23 -24
- package/components/Playlist.js +14 -15
- package/components/PointersBar.js +19 -20
- package/components/PosterImage.js +1 -1
- package/components/SDOutline.js +2 -2
- package/components/Shortcut.js +70 -70
- package/components/Slider.js +33 -33
- package/components/TagsBar.js +15 -16
- package/components/Video.js +271 -249
- package/components/control-bar/AudioTracksMenuButton.js +14 -15
- package/components/control-bar/CameraButton.js +15 -16
- package/components/control-bar/CaptionControlMenuButton.js +19 -20
- package/components/control-bar/CommentsButton.js +16 -17
- package/components/control-bar/ControlBar.js +17 -18
- package/components/control-bar/EditorControlMenuButton.js +16 -17
- package/components/control-bar/ForwardControl.js +1 -1
- package/components/control-bar/ForwardReplayControl.js +15 -16
- package/components/control-bar/FullscreenToggle.js +15 -16
- package/components/control-bar/PlayToggle.js +15 -16
- package/components/control-bar/ReplayControl.js +1 -1
- package/components/control-bar/SettingsMenuButton.js +4 -4
- package/components/control-bar/SubtitleLanguagesMenuButton.js +14 -15
- package/components/control-bar/SubtitleMovementMenu.js +16 -17
- package/components/control-bar/VolumeMenuButton.js +16 -17
- package/components/control-bar/ZoomMenuButton.js +16 -17
- package/components/marking-controls/MarkInControl.js +15 -16
- package/components/marking-controls/MarkOutControl.js +15 -16
- package/components/marking-controls/MarkingAddButton.js +15 -16
- package/components/marking-controls/MarkingControl.js +2 -2
- package/components/marking-controls/MarkingDeleteButton.js +15 -16
- package/components/marking-controls/MarkingDuration.js +2 -2
- package/components/marking-controls/MarkingPreview.js +15 -16
- package/components/marking-controls/TimecodeFormatSelector.js +7 -7
- package/components/progress-bar/AudioWaveform.js +15 -16
- 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 +19 -20
- package/components/progress-bar/SeekBar.js +27 -28
- package/components/progress-bar/Timeline.js +14 -15
- package/components/settings-menu-control/CameraControl.js +3 -3
- package/components/settings-menu-control/ChildMenuComponent.js +28 -29
- package/components/settings-menu-control/ParentMenuComponent.js +17 -18
- package/components/settings-menu-control/PlaybackRateControl.js +15 -16
- package/components/settings-menu-control/SafeAreaControl.js +15 -16
- 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 +24 -25
- package/components/volume-control/VolumeControl.js +1 -1
- package/components/volume-control/VolumeLevel.js +2 -2
- package/components/zoom-control/ZoomBar.js +23 -24
- 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 +5 -6
- package/utils/index.js +54 -54
package/components/Video.js
CHANGED
|
@@ -17,32 +17,32 @@ var _SDOutline = _interopRequireDefault(require("./SDOutline"));
|
|
|
17
17
|
var _components = require("@desynova-digital/components/components");
|
|
18
18
|
var _utils2 = require("@desynova-digital/player/utils");
|
|
19
19
|
var _templateObject, _templateObject2;
|
|
20
|
-
function _interopRequireDefault(
|
|
20
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
21
21
|
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); }
|
|
22
|
-
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 &&
|
|
22
|
+
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 && {}.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; }
|
|
23
23
|
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; }
|
|
24
24
|
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; }
|
|
25
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
26
|
-
function _slicedToArray(
|
|
25
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
26
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
27
27
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
28
|
-
function _unsupportedIterableToArray(
|
|
29
|
-
function _arrayLikeToArray(
|
|
28
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
29
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
30
30
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
31
|
-
function _arrayWithHoles(
|
|
32
|
-
function _classCallCheck(
|
|
33
|
-
function _defineProperties(
|
|
34
|
-
function _createClass(
|
|
31
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
32
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
33
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
34
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
35
35
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
36
|
-
function _possibleConstructorReturn(
|
|
36
|
+
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
37
|
+
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
37
38
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
38
|
-
function _getPrototypeOf(
|
|
39
|
-
function
|
|
40
|
-
function
|
|
41
|
-
function
|
|
42
|
-
function
|
|
43
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
39
|
+
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
40
|
+
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
41
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
42
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
43
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
44
44
|
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); }
|
|
45
|
-
function _taggedTemplateLiteral(
|
|
45
|
+
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
46
46
|
var propTypes = {
|
|
47
47
|
actions: _propTypes.PropTypes.instanceOf(Object),
|
|
48
48
|
player: _propTypes.PropTypes.instanceOf(Object),
|
|
@@ -111,12 +111,24 @@ var VideoBlock = _styledComponents["default"].div(_templateObject2 || (_template
|
|
|
111
111
|
return props.HDBorder ? '"16:9 Safe Area"' : '';
|
|
112
112
|
});
|
|
113
113
|
var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
114
|
-
_inherits(Video, _Component);
|
|
115
114
|
function Video(props) {
|
|
116
115
|
var _this;
|
|
117
116
|
_classCallCheck(this, Video);
|
|
118
117
|
_this = _callSuper(this, Video, [props]);
|
|
119
|
-
_defineProperty(
|
|
118
|
+
_defineProperty(_this, "updateAnnotateVisibility", function () {
|
|
119
|
+
if (!_this.video) return;
|
|
120
|
+
var _this$getTimeData = _this.getTimeData(_this.video.currentTime),
|
|
121
|
+
shouldShow = _this$getTimeData.shouldShow;
|
|
122
|
+
if (_this.state.shouldShowAnnotate !== shouldShow) {
|
|
123
|
+
_this.setState({
|
|
124
|
+
shouldShowAnnotate: shouldShow
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
_defineProperty(_this, "onVideoTimeUpdate", function () {
|
|
129
|
+
_this.updateAnnotateVisibility();
|
|
130
|
+
});
|
|
131
|
+
_defineProperty(_this, "buildSmoothPath", function (points) {
|
|
120
132
|
if (!points || points.length < 2) return '';
|
|
121
133
|
var path = "M ".concat(points[0].x, " ").concat(points[0].y);
|
|
122
134
|
for (var i = 1; i < points.length - 1; i++) {
|
|
@@ -128,7 +140,7 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
128
140
|
path += " L ".concat(last.x, " ").concat(last.y);
|
|
129
141
|
return path;
|
|
130
142
|
});
|
|
131
|
-
_defineProperty(
|
|
143
|
+
_defineProperty(_this, "getTimeData", function (time) {
|
|
132
144
|
var _this$props = _this.props,
|
|
133
145
|
inTime = _this$props.inTime,
|
|
134
146
|
outTime = _this$props.outTime,
|
|
@@ -187,45 +199,46 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
187
199
|
};
|
|
188
200
|
_this.video = null; // the html5 video
|
|
189
201
|
_this.manager = new _Manager["default"](props.store);
|
|
190
|
-
_this.getStyle = _this.getStyle.bind(
|
|
191
|
-
_this.getChildren = _this.getChildren.bind(
|
|
192
|
-
_this.play = _this.play.bind(
|
|
193
|
-
_this.pause = _this.pause.bind(
|
|
194
|
-
_this.seek = _this.seek.bind(
|
|
195
|
-
_this.forward = _this.forward.bind(
|
|
196
|
-
_this.replay = _this.replay.bind(
|
|
197
|
-
_this.toggleFullscreen = _this.toggleFullscreen.bind(
|
|
198
|
-
_this.getProperties = _this.getProperties.bind(
|
|
199
|
-
_this.renderChildren = _this.renderChildren.bind(
|
|
200
|
-
_this.handleLoadStart = _this.handleLoadStart.bind(
|
|
201
|
-
_this.handleCanPlay = _this.handleCanPlay.bind(
|
|
202
|
-
_this.handleCanPlayThrough = _this.handleCanPlayThrough.bind(
|
|
203
|
-
_this.handlePlay = _this.handlePlay.bind(
|
|
204
|
-
_this.handlePlaying = _this.handlePlaying.bind(
|
|
205
|
-
_this.handlePause = _this.handlePause.bind(
|
|
206
|
-
_this.handleEnded = _this.handleEnded.bind(
|
|
207
|
-
_this.handleWaiting = _this.handleWaiting.bind(
|
|
208
|
-
_this.handleSeeking = _this.handleSeeking.bind(
|
|
209
|
-
_this.handleSeeked = _this.handleSeeked.bind(
|
|
210
|
-
_this.handleFullscreenChange = _this.handleFullscreenChange.bind(
|
|
211
|
-
_this.handleError = _this.handleError.bind(
|
|
212
|
-
_this.handleSuspend = _this.handleSuspend.bind(
|
|
213
|
-
_this.handleAbort = _this.handleAbort.bind(
|
|
214
|
-
_this.handleEmptied = _this.handleEmptied.bind(
|
|
215
|
-
_this.handleStalled = _this.handleStalled.bind(
|
|
216
|
-
_this.handleLoadedMetaData = _this.handleLoadedMetaData.bind(
|
|
217
|
-
_this.handleLoadedData = _this.handleLoadedData.bind(
|
|
218
|
-
_this.handleTimeUpdate = _this.handleTimeUpdate.bind(
|
|
219
|
-
_this.handleRateChange = _this.handleRateChange.bind(
|
|
220
|
-
_this.handleVolumeChange = _this.handleVolumeChange.bind(
|
|
221
|
-
_this.handleDurationChange = _this.handleDurationChange.bind(
|
|
222
|
-
_this.handleProgress = (0, _utils.throttle)(_this.handleProgress.bind(
|
|
223
|
-
_this.handleKeypress = _this.handleKeypress.bind(
|
|
224
|
-
_this.audioVisualizer = _this.audioVisualizer.bind(
|
|
225
|
-
_this.checkWatermark = _this.checkWatermark.bind(
|
|
202
|
+
_this.getStyle = _this.getStyle.bind(_this);
|
|
203
|
+
_this.getChildren = _this.getChildren.bind(_this);
|
|
204
|
+
_this.play = _this.play.bind(_this);
|
|
205
|
+
_this.pause = _this.pause.bind(_this);
|
|
206
|
+
_this.seek = _this.seek.bind(_this);
|
|
207
|
+
_this.forward = _this.forward.bind(_this);
|
|
208
|
+
_this.replay = _this.replay.bind(_this);
|
|
209
|
+
_this.toggleFullscreen = _this.toggleFullscreen.bind(_this);
|
|
210
|
+
_this.getProperties = _this.getProperties.bind(_this);
|
|
211
|
+
_this.renderChildren = _this.renderChildren.bind(_this);
|
|
212
|
+
_this.handleLoadStart = _this.handleLoadStart.bind(_this);
|
|
213
|
+
_this.handleCanPlay = _this.handleCanPlay.bind(_this);
|
|
214
|
+
_this.handleCanPlayThrough = _this.handleCanPlayThrough.bind(_this);
|
|
215
|
+
_this.handlePlay = _this.handlePlay.bind(_this);
|
|
216
|
+
_this.handlePlaying = _this.handlePlaying.bind(_this);
|
|
217
|
+
_this.handlePause = _this.handlePause.bind(_this);
|
|
218
|
+
_this.handleEnded = _this.handleEnded.bind(_this);
|
|
219
|
+
_this.handleWaiting = _this.handleWaiting.bind(_this);
|
|
220
|
+
_this.handleSeeking = _this.handleSeeking.bind(_this);
|
|
221
|
+
_this.handleSeeked = _this.handleSeeked.bind(_this);
|
|
222
|
+
_this.handleFullscreenChange = _this.handleFullscreenChange.bind(_this);
|
|
223
|
+
_this.handleError = _this.handleError.bind(_this);
|
|
224
|
+
_this.handleSuspend = _this.handleSuspend.bind(_this);
|
|
225
|
+
_this.handleAbort = _this.handleAbort.bind(_this);
|
|
226
|
+
_this.handleEmptied = _this.handleEmptied.bind(_this);
|
|
227
|
+
_this.handleStalled = _this.handleStalled.bind(_this);
|
|
228
|
+
_this.handleLoadedMetaData = _this.handleLoadedMetaData.bind(_this);
|
|
229
|
+
_this.handleLoadedData = _this.handleLoadedData.bind(_this);
|
|
230
|
+
_this.handleTimeUpdate = _this.handleTimeUpdate.bind(_this);
|
|
231
|
+
_this.handleRateChange = _this.handleRateChange.bind(_this);
|
|
232
|
+
_this.handleVolumeChange = _this.handleVolumeChange.bind(_this);
|
|
233
|
+
_this.handleDurationChange = _this.handleDurationChange.bind(_this);
|
|
234
|
+
_this.handleProgress = (0, _utils.throttle)(_this.handleProgress.bind(_this), 250);
|
|
235
|
+
_this.handleKeypress = _this.handleKeypress.bind(_this);
|
|
236
|
+
_this.audioVisualizer = _this.audioVisualizer.bind(_this);
|
|
237
|
+
_this.checkWatermark = _this.checkWatermark.bind(_this);
|
|
226
238
|
return _this;
|
|
227
239
|
}
|
|
228
|
-
|
|
240
|
+
_inherits(Video, _Component);
|
|
241
|
+
return _createClass(Video, [{
|
|
229
242
|
key: "componentDidMount",
|
|
230
243
|
value: function componentDidMount() {
|
|
231
244
|
var src = this.props.src;
|
|
@@ -246,13 +259,22 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
246
259
|
this.setState({
|
|
247
260
|
watermarkInterval: watermarkInterval
|
|
248
261
|
});
|
|
262
|
+
if (this.video) {
|
|
263
|
+
this.video.addEventListener("timeupdate", this.onVideoTimeUpdate);
|
|
264
|
+
}
|
|
249
265
|
}
|
|
250
266
|
}, {
|
|
251
267
|
key: "componentDidUpdate",
|
|
252
268
|
value: function componentDidUpdate(prevProps) {
|
|
269
|
+
var _this$props2 = this.props,
|
|
270
|
+
inTime = _this$props2.inTime,
|
|
271
|
+
outTime = _this$props2.outTime;
|
|
253
272
|
if (this.props.isSvgLayer && this.props.isSvgLayer !== prevProps.isSvgLayer) {
|
|
254
273
|
this.toggleViaAnnotatePlay();
|
|
255
274
|
}
|
|
275
|
+
if (inTime !== prevProps.inTime || outTime !== prevProps.outTime) {
|
|
276
|
+
this.updateAnnotateVisibility();
|
|
277
|
+
}
|
|
256
278
|
}
|
|
257
279
|
}, {
|
|
258
280
|
key: "componentWillUnmount",
|
|
@@ -266,18 +288,21 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
266
288
|
this.video.src = '';
|
|
267
289
|
}
|
|
268
290
|
clearInterval(watermarkInterval);
|
|
291
|
+
if (this.video) {
|
|
292
|
+
this.video.removeEventListener("timeupdate", this.onVideoTimeUpdate);
|
|
293
|
+
}
|
|
269
294
|
}
|
|
270
|
-
|
|
271
|
-
/**
|
|
272
|
-
* This function is triggered on interval to shuffle the position of watermark on Player area
|
|
273
|
-
*/
|
|
274
295
|
}, {
|
|
275
296
|
key: "checkWatermark",
|
|
276
|
-
value:
|
|
297
|
+
value:
|
|
298
|
+
/**
|
|
299
|
+
* This function is triggered on interval to shuffle the position of watermark on Player area
|
|
300
|
+
*/
|
|
301
|
+
function checkWatermark() {
|
|
277
302
|
var watermark = this.state.watermark;
|
|
278
|
-
var _this$
|
|
279
|
-
onPlayerClose = _this$
|
|
280
|
-
userEmail = _this$
|
|
303
|
+
var _this$props3 = this.props,
|
|
304
|
+
onPlayerClose = _this$props3.onPlayerClose,
|
|
305
|
+
userEmail = _this$props3.userEmail;
|
|
281
306
|
var watermark_text = document.querySelector('#watermark-text');
|
|
282
307
|
var video_player = null;
|
|
283
308
|
var watermark_dimension = null;
|
|
@@ -310,9 +335,9 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
310
335
|
key: "setupHLS",
|
|
311
336
|
value: function setupHLS(src) {
|
|
312
337
|
var _this2 = this;
|
|
313
|
-
var _this$
|
|
314
|
-
actions = _this$
|
|
315
|
-
activeTrackIndex = _this$
|
|
338
|
+
var _this$props4 = this.props,
|
|
339
|
+
actions = _this$props4.actions,
|
|
340
|
+
activeTrackIndex = _this$props4.activeTrackIndex;
|
|
316
341
|
var self = this;
|
|
317
342
|
// bind them together
|
|
318
343
|
this.hls.attachMedia(this.video);
|
|
@@ -360,7 +385,7 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
360
385
|
text: "4:3 Safe Area",
|
|
361
386
|
keyData: "SDBorderActive"
|
|
362
387
|
}, props)), /*#__PURE__*/_react["default"].createElement(_SDOutline["default"], _extends({
|
|
363
|
-
key: "sd-outline-
|
|
388
|
+
key: "sd-outline-2",
|
|
364
389
|
order: 3.0,
|
|
365
390
|
paddingLeftPercent: "100%",
|
|
366
391
|
paddingLeftRatio: " 0.998",
|
|
@@ -438,13 +463,13 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
438
463
|
var _this$manager$getStat2 = this.manager.getState(),
|
|
439
464
|
player = _this$manager$getStat2.player;
|
|
440
465
|
var style = {};
|
|
441
|
-
var _this$
|
|
442
|
-
aspectRatio = _this$
|
|
443
|
-
width = _this$
|
|
444
|
-
height = _this$
|
|
445
|
-
/*
|
|
446
|
-
* The aspect ratio is either used directly
|
|
447
|
-
* or to calculate width and height.
|
|
466
|
+
var _this$props5 = this.props,
|
|
467
|
+
aspectRatio = _this$props5.aspectRatio,
|
|
468
|
+
width = _this$props5.width,
|
|
469
|
+
height = _this$props5.height;
|
|
470
|
+
/*
|
|
471
|
+
* The aspect ratio is either used directly
|
|
472
|
+
* or to calculate width and height.
|
|
448
473
|
*/
|
|
449
474
|
if (player.videoWidth) {
|
|
450
475
|
// Otherwise try to get the aspect ratio from the video metadata
|
|
@@ -498,9 +523,9 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
498
523
|
return this.video.playbackRate;
|
|
499
524
|
}
|
|
500
525
|
|
|
501
|
-
/*
|
|
502
|
-
* set playback rate
|
|
503
|
-
* speed of video
|
|
526
|
+
/*
|
|
527
|
+
* set playback rate
|
|
528
|
+
* speed of video
|
|
504
529
|
*/,
|
|
505
530
|
set: function set(rate) {
|
|
506
531
|
this.video.playbackRate = rate;
|
|
@@ -544,12 +569,12 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
544
569
|
}, {
|
|
545
570
|
key: "UNSAFE_componentWillReceiveProps",
|
|
546
571
|
value: function UNSAFE_componentWillReceiveProps(newProps) {
|
|
547
|
-
var _this$
|
|
548
|
-
src = _this$
|
|
549
|
-
activeAudio = _this$
|
|
550
|
-
currentSubtitleObj = _this$
|
|
551
|
-
markers = _this$
|
|
552
|
-
playerType = _this$
|
|
572
|
+
var _this$props6 = this.props,
|
|
573
|
+
src = _this$props6.src,
|
|
574
|
+
activeAudio = _this$props6.player.activeAudio,
|
|
575
|
+
currentSubtitleObj = _this$props6.currentSubtitleObj,
|
|
576
|
+
markers = _this$props6.markers,
|
|
577
|
+
playerType = _this$props6.playerType;
|
|
553
578
|
if (markers && markers !== newProps.markers && newProps.markers) {
|
|
554
579
|
this.displaySubtitle(newProps.markers);
|
|
555
580
|
}
|
|
@@ -662,9 +687,7 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
662
687
|
}, {
|
|
663
688
|
key: "toggleViaAnnotatePlay",
|
|
664
689
|
value: function toggleViaAnnotatePlay() {
|
|
665
|
-
if (this.video.paused) {
|
|
666
|
-
this.play();
|
|
667
|
-
} else {
|
|
690
|
+
if (!this.video.paused) {
|
|
668
691
|
this.pause();
|
|
669
692
|
}
|
|
670
693
|
}
|
|
@@ -675,8 +698,8 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
675
698
|
value: function seek(time) {
|
|
676
699
|
try {
|
|
677
700
|
//for annotation time updatation for svg
|
|
678
|
-
var _this$
|
|
679
|
-
shouldShow = _this$
|
|
701
|
+
var _this$getTimeData2 = this.getTimeData(this.video.currentTime),
|
|
702
|
+
shouldShow = _this$getTimeData2.shouldShow;
|
|
680
703
|
if (this.state.shouldShowAnnotate !== shouldShow) {
|
|
681
704
|
this.setState({
|
|
682
705
|
shouldShowAnnotate: shouldShow
|
|
@@ -712,23 +735,23 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
712
735
|
}, {
|
|
713
736
|
key: "toggleFullscreen",
|
|
714
737
|
value: function toggleFullscreen() {
|
|
715
|
-
var _this$
|
|
716
|
-
player = _this$
|
|
717
|
-
actions = _this$
|
|
738
|
+
var _this$props7 = this.props,
|
|
739
|
+
player = _this$props7.player,
|
|
740
|
+
actions = _this$props7.actions;
|
|
718
741
|
actions.toggleFullscreen(player);
|
|
719
742
|
}
|
|
720
743
|
|
|
721
|
-
/*
|
|
722
|
-
* Fired when the user agent
|
|
723
|
-
* begins looking for media data
|
|
744
|
+
/*
|
|
745
|
+
* Fired when the user agent
|
|
746
|
+
* begins looking for media data
|
|
724
747
|
*/
|
|
725
748
|
}, {
|
|
726
749
|
key: "handleLoadStart",
|
|
727
750
|
value: function handleLoadStart() {
|
|
728
|
-
var _this$
|
|
729
|
-
actions = _this$
|
|
730
|
-
onLoadStart = _this$
|
|
731
|
-
fileType = _this$
|
|
751
|
+
var _this$props8 = this.props,
|
|
752
|
+
actions = _this$props8.actions,
|
|
753
|
+
onLoadStart = _this$props8.onLoadStart,
|
|
754
|
+
fileType = _this$props8.fileType;
|
|
732
755
|
if (fileType === 'audio') {
|
|
733
756
|
this.audioVisualizer();
|
|
734
757
|
}
|
|
@@ -738,48 +761,48 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
738
761
|
}
|
|
739
762
|
}
|
|
740
763
|
|
|
741
|
-
/*
|
|
742
|
-
* A handler for events that
|
|
743
|
-
* signal that waiting has ended
|
|
764
|
+
/*
|
|
765
|
+
* A handler for events that
|
|
766
|
+
* signal that waiting has ended
|
|
744
767
|
*/
|
|
745
768
|
}, {
|
|
746
769
|
key: "handleCanPlay",
|
|
747
770
|
value: function handleCanPlay() {
|
|
748
|
-
var _this$
|
|
749
|
-
actions = _this$
|
|
750
|
-
onCanPlay = _this$
|
|
771
|
+
var _this$props9 = this.props,
|
|
772
|
+
actions = _this$props9.actions,
|
|
773
|
+
onCanPlay = _this$props9.onCanPlay;
|
|
751
774
|
actions.handleCanPlay(this.getProperties());
|
|
752
775
|
if (onCanPlay) {
|
|
753
776
|
onCanPlay.apply(void 0, arguments);
|
|
754
777
|
}
|
|
755
778
|
}
|
|
756
779
|
|
|
757
|
-
/*
|
|
758
|
-
* A handler for events that
|
|
759
|
-
* signal that waiting has ended
|
|
780
|
+
/*
|
|
781
|
+
* A handler for events that
|
|
782
|
+
* signal that waiting has ended
|
|
760
783
|
*/
|
|
761
784
|
}, {
|
|
762
785
|
key: "handleCanPlayThrough",
|
|
763
786
|
value: function handleCanPlayThrough() {
|
|
764
|
-
var _this$
|
|
765
|
-
actions = _this$
|
|
766
|
-
onCanPlayThrough = _this$
|
|
787
|
+
var _this$props10 = this.props,
|
|
788
|
+
actions = _this$props10.actions,
|
|
789
|
+
onCanPlayThrough = _this$props10.onCanPlayThrough;
|
|
767
790
|
actions.handleCanPlayThrough(this.getProperties());
|
|
768
791
|
if (onCanPlayThrough) {
|
|
769
792
|
onCanPlayThrough.apply(void 0, arguments);
|
|
770
793
|
}
|
|
771
794
|
}
|
|
772
795
|
|
|
773
|
-
/*
|
|
774
|
-
* A handler for events that
|
|
775
|
-
* signal that waiting has ended
|
|
796
|
+
/*
|
|
797
|
+
* A handler for events that
|
|
798
|
+
* signal that waiting has ended
|
|
776
799
|
*/
|
|
777
800
|
}, {
|
|
778
801
|
key: "handlePlaying",
|
|
779
802
|
value: function handlePlaying() {
|
|
780
|
-
var _this$
|
|
781
|
-
actions = _this$
|
|
782
|
-
onPlaying = _this$
|
|
803
|
+
var _this$props11 = this.props,
|
|
804
|
+
actions = _this$props11.actions,
|
|
805
|
+
onPlaying = _this$props11.onPlaying;
|
|
783
806
|
actions.handlePlaying(this.getProperties());
|
|
784
807
|
if (onPlaying) {
|
|
785
808
|
onPlaying.apply(void 0, arguments);
|
|
@@ -790,9 +813,9 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
790
813
|
}, {
|
|
791
814
|
key: "handlePlay",
|
|
792
815
|
value: function handlePlay() {
|
|
793
|
-
var _this$
|
|
794
|
-
actions = _this$
|
|
795
|
-
onPlay = _this$
|
|
816
|
+
var _this$props12 = this.props,
|
|
817
|
+
actions = _this$props12.actions,
|
|
818
|
+
onPlay = _this$props12.onPlay;
|
|
796
819
|
actions.handlePlay(this.getProperties());
|
|
797
820
|
if (onPlay) {
|
|
798
821
|
onPlay.apply(void 0, arguments);
|
|
@@ -803,41 +826,41 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
803
826
|
}, {
|
|
804
827
|
key: "handlePause",
|
|
805
828
|
value: function handlePause() {
|
|
806
|
-
var _this$
|
|
807
|
-
actions = _this$
|
|
808
|
-
onPause = _this$
|
|
829
|
+
var _this$props13 = this.props,
|
|
830
|
+
actions = _this$props13.actions,
|
|
831
|
+
onPause = _this$props13.onPause;
|
|
809
832
|
actions.handlePause(this.getProperties());
|
|
810
833
|
if (onPause) {
|
|
811
834
|
onPause.apply(void 0, arguments);
|
|
812
835
|
}
|
|
813
836
|
}
|
|
814
837
|
|
|
815
|
-
/*
|
|
816
|
-
* Fired when the duration of
|
|
817
|
-
* the media resource is first known or changed
|
|
838
|
+
/*
|
|
839
|
+
* Fired when the duration of
|
|
840
|
+
* the media resource is first known or changed
|
|
818
841
|
*/
|
|
819
842
|
}, {
|
|
820
843
|
key: "handleDurationChange",
|
|
821
844
|
value: function handleDurationChange() {
|
|
822
|
-
var _this$
|
|
823
|
-
actions = _this$
|
|
824
|
-
onDurationChange = _this$
|
|
845
|
+
var _this$props14 = this.props,
|
|
846
|
+
actions = _this$props14.actions,
|
|
847
|
+
onDurationChange = _this$props14.onDurationChange;
|
|
825
848
|
actions.handleDurationChange(this.getProperties());
|
|
826
849
|
if (onDurationChange) {
|
|
827
850
|
onDurationChange.apply(void 0, arguments);
|
|
828
851
|
}
|
|
829
852
|
}
|
|
830
853
|
|
|
831
|
-
/*
|
|
832
|
-
* Fired while the user agent
|
|
833
|
-
* is downloading media data
|
|
854
|
+
/*
|
|
855
|
+
* Fired while the user agent
|
|
856
|
+
* is downloading media data
|
|
834
857
|
*/
|
|
835
858
|
}, {
|
|
836
859
|
key: "handleProgress",
|
|
837
860
|
value: function handleProgress() {
|
|
838
|
-
var _this$
|
|
839
|
-
actions = _this$
|
|
840
|
-
onProgress = _this$
|
|
861
|
+
var _this$props15 = this.props,
|
|
862
|
+
actions = _this$props15.actions,
|
|
863
|
+
onProgress = _this$props15.onProgress;
|
|
841
864
|
if (this.video) {
|
|
842
865
|
actions.handleProgressChange(this.getProperties());
|
|
843
866
|
}
|
|
@@ -858,11 +881,11 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
858
881
|
}, {
|
|
859
882
|
key: "displaySubtitle",
|
|
860
883
|
value: function displaySubtitle(marker) {
|
|
861
|
-
var _this$
|
|
862
|
-
markers = _this$
|
|
863
|
-
resetSubtitleData = _this$
|
|
864
|
-
subtitleReadOnly = _this$
|
|
865
|
-
subtitleDataList = _this$
|
|
884
|
+
var _this$props16 = this.props,
|
|
885
|
+
markers = _this$props16.markers,
|
|
886
|
+
resetSubtitleData = _this$props16.resetSubtitleData,
|
|
887
|
+
subtitleReadOnly = _this$props16.subtitleReadOnly,
|
|
888
|
+
subtitleDataList = _this$props16.subtitleDataList;
|
|
866
889
|
var currentSubtitleObj = this.state.currentSubtitleObj;
|
|
867
890
|
if (resetSubtitleData) {
|
|
868
891
|
resetSubtitleData();
|
|
@@ -897,18 +920,18 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
897
920
|
}
|
|
898
921
|
}
|
|
899
922
|
|
|
900
|
-
/*
|
|
901
|
-
* Fired when the end of the media resource
|
|
902
|
-
* is reached (currentTime == duration)
|
|
923
|
+
/*
|
|
924
|
+
* Fired when the end of the media resource
|
|
925
|
+
* is reached (currentTime == duration)
|
|
903
926
|
*/
|
|
904
927
|
}, {
|
|
905
928
|
key: "handleEnded",
|
|
906
929
|
value: function handleEnded() {
|
|
907
|
-
var _this$
|
|
908
|
-
loop = _this$
|
|
909
|
-
player = _this$
|
|
910
|
-
actions = _this$
|
|
911
|
-
onEnded = _this$
|
|
930
|
+
var _this$props17 = this.props,
|
|
931
|
+
loop = _this$props17.loop,
|
|
932
|
+
player = _this$props17.player,
|
|
933
|
+
actions = _this$props17.actions,
|
|
934
|
+
onEnded = _this$props17.onEnded;
|
|
912
935
|
if (loop) {
|
|
913
936
|
this.seek(0);
|
|
914
937
|
this.play();
|
|
@@ -925,41 +948,41 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
925
948
|
}, {
|
|
926
949
|
key: "handleWaiting",
|
|
927
950
|
value: function handleWaiting() {
|
|
928
|
-
var _this$
|
|
929
|
-
actions = _this$
|
|
930
|
-
onWaiting = _this$
|
|
951
|
+
var _this$props18 = this.props,
|
|
952
|
+
actions = _this$props18.actions,
|
|
953
|
+
onWaiting = _this$props18.onWaiting;
|
|
931
954
|
actions.handleWaiting(this.getProperties());
|
|
932
955
|
if (onWaiting) {
|
|
933
956
|
onWaiting.apply(void 0, arguments);
|
|
934
957
|
}
|
|
935
958
|
}
|
|
936
959
|
|
|
937
|
-
/*
|
|
938
|
-
* Fired whenever the player
|
|
939
|
-
* is jumping to a new time
|
|
960
|
+
/*
|
|
961
|
+
* Fired whenever the player
|
|
962
|
+
* is jumping to a new time
|
|
940
963
|
*/
|
|
941
964
|
}, {
|
|
942
965
|
key: "handleSeeking",
|
|
943
966
|
value: function handleSeeking() {
|
|
944
|
-
var _this$
|
|
945
|
-
actions = _this$
|
|
946
|
-
onSeeking = _this$
|
|
967
|
+
var _this$props19 = this.props,
|
|
968
|
+
actions = _this$props19.actions,
|
|
969
|
+
onSeeking = _this$props19.onSeeking;
|
|
947
970
|
actions.handleSeeking(this.getProperties());
|
|
948
971
|
if (onSeeking) {
|
|
949
972
|
onSeeking.apply(void 0, arguments);
|
|
950
973
|
}
|
|
951
974
|
}
|
|
952
975
|
|
|
953
|
-
/*
|
|
954
|
-
* Fired when the player has
|
|
955
|
-
* finished jumping to a new time
|
|
976
|
+
/*
|
|
977
|
+
* Fired when the player has
|
|
978
|
+
* finished jumping to a new time
|
|
956
979
|
*/
|
|
957
980
|
}, {
|
|
958
981
|
key: "handleSeeked",
|
|
959
982
|
value: function handleSeeked() {
|
|
960
|
-
var _this$
|
|
961
|
-
actions = _this$
|
|
962
|
-
onSeeked = _this$
|
|
983
|
+
var _this$props20 = this.props,
|
|
984
|
+
actions = _this$props20.actions,
|
|
985
|
+
onSeeked = _this$props20.onSeeked;
|
|
963
986
|
actions.handleSeeked(this.getProperties());
|
|
964
987
|
if (onSeeked) {
|
|
965
988
|
onSeeked.apply(void 0, arguments);
|
|
@@ -971,16 +994,16 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
971
994
|
key: "handleFullscreenChange",
|
|
972
995
|
value: function handleFullscreenChange() {}
|
|
973
996
|
|
|
974
|
-
/*
|
|
975
|
-
* Fires when the browser is
|
|
976
|
-
* intentionally not getting media data
|
|
997
|
+
/*
|
|
998
|
+
* Fires when the browser is
|
|
999
|
+
* intentionally not getting media data
|
|
977
1000
|
*/
|
|
978
1001
|
}, {
|
|
979
1002
|
key: "handleSuspend",
|
|
980
1003
|
value: function handleSuspend() {
|
|
981
|
-
var _this$
|
|
982
|
-
actions = _this$
|
|
983
|
-
onSuspend = _this$
|
|
1004
|
+
var _this$props21 = this.props,
|
|
1005
|
+
actions = _this$props21.actions,
|
|
1006
|
+
onSuspend = _this$props21.onSuspend;
|
|
984
1007
|
actions.handleSuspend(this.getProperties());
|
|
985
1008
|
if (onSuspend) {
|
|
986
1009
|
onSuspend.apply(void 0, arguments);
|
|
@@ -991,9 +1014,9 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
991
1014
|
}, {
|
|
992
1015
|
key: "handleAbort",
|
|
993
1016
|
value: function handleAbort() {
|
|
994
|
-
var _this$
|
|
995
|
-
actions = _this$
|
|
996
|
-
onAbort = _this$
|
|
1017
|
+
var _this$props22 = this.props,
|
|
1018
|
+
actions = _this$props22.actions,
|
|
1019
|
+
onAbort = _this$props22.onAbort;
|
|
997
1020
|
actions.handleAbort(this.getProperties());
|
|
998
1021
|
if (onAbort) {
|
|
999
1022
|
onAbort.apply(void 0, arguments);
|
|
@@ -1004,42 +1027,42 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
1004
1027
|
}, {
|
|
1005
1028
|
key: "handleEmptied",
|
|
1006
1029
|
value: function handleEmptied() {
|
|
1007
|
-
var _this$
|
|
1008
|
-
actions = _this$
|
|
1009
|
-
onEmptied = _this$
|
|
1030
|
+
var _this$props23 = this.props,
|
|
1031
|
+
actions = _this$props23.actions,
|
|
1032
|
+
onEmptied = _this$props23.onEmptied;
|
|
1010
1033
|
actions.handleEmptied(this.getProperties());
|
|
1011
1034
|
if (onEmptied) {
|
|
1012
1035
|
onEmptied.apply(void 0, arguments);
|
|
1013
1036
|
}
|
|
1014
1037
|
}
|
|
1015
1038
|
|
|
1016
|
-
/*
|
|
1017
|
-
* Fires when the browser is trying to
|
|
1018
|
-
* get media data, but data is not available
|
|
1039
|
+
/*
|
|
1040
|
+
* Fires when the browser is trying to
|
|
1041
|
+
* get media data, but data is not available
|
|
1019
1042
|
*/
|
|
1020
1043
|
}, {
|
|
1021
1044
|
key: "handleStalled",
|
|
1022
1045
|
value: function handleStalled() {
|
|
1023
|
-
var _this$
|
|
1024
|
-
actions = _this$
|
|
1025
|
-
onStalled = _this$
|
|
1046
|
+
var _this$props24 = this.props,
|
|
1047
|
+
actions = _this$props24.actions,
|
|
1048
|
+
onStalled = _this$props24.onStalled;
|
|
1026
1049
|
actions.handleStalled(this.getProperties());
|
|
1027
1050
|
if (onStalled) {
|
|
1028
1051
|
onStalled.apply(void 0, arguments);
|
|
1029
1052
|
}
|
|
1030
1053
|
}
|
|
1031
1054
|
|
|
1032
|
-
/*
|
|
1033
|
-
* Fires when the browser has loaded
|
|
1034
|
-
* meta data for the audio/video
|
|
1055
|
+
/*
|
|
1056
|
+
* Fires when the browser has loaded
|
|
1057
|
+
* meta data for the audio/video
|
|
1035
1058
|
*/
|
|
1036
1059
|
}, {
|
|
1037
1060
|
key: "handleLoadedMetaData",
|
|
1038
1061
|
value: function handleLoadedMetaData() {
|
|
1039
|
-
var _this$
|
|
1040
|
-
actions = _this$
|
|
1041
|
-
onLoadedMetadata = _this$
|
|
1042
|
-
startTime = _this$
|
|
1062
|
+
var _this$props25 = this.props,
|
|
1063
|
+
actions = _this$props25.actions,
|
|
1064
|
+
onLoadedMetadata = _this$props25.onLoadedMetadata,
|
|
1065
|
+
startTime = _this$props25.startTime;
|
|
1043
1066
|
if (startTime && startTime > 0) {
|
|
1044
1067
|
this.video.currentTime = startTime;
|
|
1045
1068
|
}
|
|
@@ -1049,38 +1072,38 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
1049
1072
|
}
|
|
1050
1073
|
}
|
|
1051
1074
|
|
|
1052
|
-
/*
|
|
1053
|
-
* Fires when the browser has loaded
|
|
1054
|
-
* the current frame of the audio/video
|
|
1075
|
+
/*
|
|
1076
|
+
* Fires when the browser has loaded
|
|
1077
|
+
* the current frame of the audio/video
|
|
1055
1078
|
*/
|
|
1056
1079
|
}, {
|
|
1057
1080
|
key: "handleLoadedData",
|
|
1058
1081
|
value: function handleLoadedData() {
|
|
1059
|
-
var _this$
|
|
1060
|
-
actions = _this$
|
|
1061
|
-
onLoadedData = _this$
|
|
1082
|
+
var _this$props26 = this.props,
|
|
1083
|
+
actions = _this$props26.actions,
|
|
1084
|
+
onLoadedData = _this$props26.onLoadedData;
|
|
1062
1085
|
actions.handleLoadedData(this.getProperties());
|
|
1063
1086
|
if (onLoadedData) {
|
|
1064
1087
|
onLoadedData.apply(void 0, arguments);
|
|
1065
1088
|
}
|
|
1066
1089
|
}
|
|
1067
1090
|
|
|
1068
|
-
/*
|
|
1069
|
-
* Fires when the current
|
|
1070
|
-
* playback position has changed
|
|
1091
|
+
/*
|
|
1092
|
+
* Fires when the current
|
|
1093
|
+
* playback position has changed
|
|
1071
1094
|
*/
|
|
1072
1095
|
}, {
|
|
1073
1096
|
key: "handleTimeUpdate",
|
|
1074
1097
|
value: function handleTimeUpdate() {
|
|
1075
|
-
var _this$
|
|
1076
|
-
previewActive = _this$
|
|
1077
|
-
actions = _this$
|
|
1078
|
-
onTimeUpdate = _this$
|
|
1079
|
-
rightMarker = _this$
|
|
1098
|
+
var _this$props27 = this.props,
|
|
1099
|
+
previewActive = _this$props27.player.previewActive,
|
|
1100
|
+
actions = _this$props27.actions,
|
|
1101
|
+
onTimeUpdate = _this$props27.onTimeUpdate,
|
|
1102
|
+
rightMarker = _this$props27.playerSelectedMarker.rightMarker;
|
|
1080
1103
|
|
|
1081
1104
|
//for annotation time updataton for svg
|
|
1082
|
-
var _this$
|
|
1083
|
-
shouldShow = _this$
|
|
1105
|
+
var _this$getTimeData3 = this.getTimeData(this.video.currentTime),
|
|
1106
|
+
shouldShow = _this$getTimeData3.shouldShow;
|
|
1084
1107
|
if (this.state.shouldShowAnnotate !== shouldShow) {
|
|
1085
1108
|
this.setState({
|
|
1086
1109
|
shouldShowAnnotate: shouldShow
|
|
@@ -1098,15 +1121,15 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
1098
1121
|
this.displaySubtitle();
|
|
1099
1122
|
}
|
|
1100
1123
|
|
|
1101
|
-
/**
|
|
1102
|
-
* Fires when the playing speed of the audio/video is changed
|
|
1124
|
+
/**
|
|
1125
|
+
* Fires when the playing speed of the audio/video is changed
|
|
1103
1126
|
*/
|
|
1104
1127
|
}, {
|
|
1105
1128
|
key: "handleRateChange",
|
|
1106
1129
|
value: function handleRateChange() {
|
|
1107
|
-
var _this$
|
|
1108
|
-
actions = _this$
|
|
1109
|
-
onRateChange = _this$
|
|
1130
|
+
var _this$props28 = this.props,
|
|
1131
|
+
actions = _this$props28.actions,
|
|
1132
|
+
onRateChange = _this$props28.onRateChange;
|
|
1110
1133
|
actions.handleRateChange(this.getProperties());
|
|
1111
1134
|
if (onRateChange) {
|
|
1112
1135
|
onRateChange.apply(void 0, arguments);
|
|
@@ -1117,25 +1140,25 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
1117
1140
|
}, {
|
|
1118
1141
|
key: "handleVolumeChange",
|
|
1119
1142
|
value: function handleVolumeChange() {
|
|
1120
|
-
var _this$
|
|
1121
|
-
actions = _this$
|
|
1122
|
-
onVolumeChange = _this$
|
|
1143
|
+
var _this$props29 = this.props,
|
|
1144
|
+
actions = _this$props29.actions,
|
|
1145
|
+
onVolumeChange = _this$props29.onVolumeChange;
|
|
1123
1146
|
actions.handleVolumeChange(this.getProperties());
|
|
1124
1147
|
if (onVolumeChange) {
|
|
1125
1148
|
onVolumeChange.apply(void 0, arguments);
|
|
1126
1149
|
}
|
|
1127
1150
|
}
|
|
1128
1151
|
|
|
1129
|
-
/*
|
|
1130
|
-
* Fires when an error occurred
|
|
1131
|
-
* during the loading of an audio/video
|
|
1152
|
+
/*
|
|
1153
|
+
* Fires when an error occurred
|
|
1154
|
+
* during the loading of an audio/video
|
|
1132
1155
|
*/
|
|
1133
1156
|
}, {
|
|
1134
1157
|
key: "handleError",
|
|
1135
1158
|
value: function handleError() {
|
|
1136
|
-
var _this$
|
|
1137
|
-
actions = _this$
|
|
1138
|
-
onError = _this$
|
|
1159
|
+
var _this$props30 = this.props,
|
|
1160
|
+
actions = _this$props30.actions,
|
|
1161
|
+
onError = _this$props30.onError;
|
|
1139
1162
|
actions.handleError(this.getProperties());
|
|
1140
1163
|
if (onError) {
|
|
1141
1164
|
onError.apply(void 0, arguments);
|
|
@@ -1179,10 +1202,10 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
1179
1202
|
for (var i = 0; i < bufferLength; i++) {
|
|
1180
1203
|
barHeight = dataArray[i] * 2;
|
|
1181
1204
|
|
|
1182
|
-
/*
|
|
1183
|
-
* var r = barHeight + (25 * (i / bufferLength));
|
|
1184
|
-
* var g = 250 * (i / bufferLength);
|
|
1185
|
-
* var b = s50;
|
|
1205
|
+
/*
|
|
1206
|
+
* var r = barHeight + (25 * (i / bufferLength));
|
|
1207
|
+
* var g = 250 * (i / bufferLength);
|
|
1208
|
+
* var b = s50;
|
|
1186
1209
|
*/
|
|
1187
1210
|
|
|
1188
1211
|
ctx.fillStyle = '#0c141d'; // 'rgb(' + r + ',' + g + ',' + b + ')';
|
|
@@ -1229,9 +1252,9 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
1229
1252
|
}, {
|
|
1230
1253
|
key: "handleSubtitleContainerClick",
|
|
1231
1254
|
value: function handleSubtitleContainerClick() {
|
|
1232
|
-
var _this$
|
|
1233
|
-
actions = _this$
|
|
1234
|
-
player = _this$
|
|
1255
|
+
var _this$props31 = this.props,
|
|
1256
|
+
actions = _this$props31.actions,
|
|
1257
|
+
player = _this$props31.player;
|
|
1235
1258
|
if (player.paused) {
|
|
1236
1259
|
actions.play();
|
|
1237
1260
|
} else {
|
|
@@ -1241,11 +1264,11 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
1241
1264
|
}, {
|
|
1242
1265
|
key: "handleSubtitleClick",
|
|
1243
1266
|
value: function handleSubtitleClick(e) {
|
|
1244
|
-
var _this$
|
|
1245
|
-
actions = _this$
|
|
1246
|
-
player = _this$
|
|
1247
|
-
onScreenSubtitleClick = _this$
|
|
1248
|
-
controlType = _this$
|
|
1267
|
+
var _this$props32 = this.props,
|
|
1268
|
+
actions = _this$props32.actions,
|
|
1269
|
+
player = _this$props32.player,
|
|
1270
|
+
onScreenSubtitleClick = _this$props32.onScreenSubtitleClick,
|
|
1271
|
+
controlType = _this$props32.controlType;
|
|
1249
1272
|
var currentSubtitleObj = this.state.currentSubtitleObj;
|
|
1250
1273
|
if (controlType === 'advanced') {
|
|
1251
1274
|
if (onScreenSubtitleClick) {
|
|
@@ -1270,21 +1293,21 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
1270
1293
|
_this$props$parentAnn2,
|
|
1271
1294
|
_this$props$parentAnn3,
|
|
1272
1295
|
_this$props$parentAnn4;
|
|
1273
|
-
var _this$
|
|
1274
|
-
loop = _this$
|
|
1275
|
-
poster = _this$
|
|
1276
|
-
preload = _this$
|
|
1277
|
-
autoPlay = _this$
|
|
1278
|
-
playsInline = _this$
|
|
1279
|
-
muted = _this$
|
|
1280
|
-
crossOrigin = _this$
|
|
1281
|
-
videoId = _this$
|
|
1282
|
-
fileType = _this$
|
|
1283
|
-
userEmail = _this$
|
|
1284
|
-
theme = _this$
|
|
1285
|
-
player = _this$
|
|
1286
|
-
playerType = _this$
|
|
1287
|
-
markers = _this$
|
|
1296
|
+
var _this$props33 = this.props,
|
|
1297
|
+
loop = _this$props33.loop,
|
|
1298
|
+
poster = _this$props33.poster,
|
|
1299
|
+
preload = _this$props33.preload,
|
|
1300
|
+
autoPlay = _this$props33.autoPlay,
|
|
1301
|
+
playsInline = _this$props33.playsInline,
|
|
1302
|
+
muted = _this$props33.muted,
|
|
1303
|
+
crossOrigin = _this$props33.crossOrigin,
|
|
1304
|
+
videoId = _this$props33.videoId,
|
|
1305
|
+
fileType = _this$props33.fileType,
|
|
1306
|
+
userEmail = _this$props33.userEmail,
|
|
1307
|
+
theme = _this$props33.theme,
|
|
1308
|
+
player = _this$props33.player,
|
|
1309
|
+
playerType = _this$props33.playerType,
|
|
1310
|
+
markers = _this$props33.markers;
|
|
1288
1311
|
var _this$state2 = this.state,
|
|
1289
1312
|
isBuffering = _this$state2.isBuffering,
|
|
1290
1313
|
watermark = _this$state2.watermark,
|
|
@@ -1400,7 +1423,7 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
1400
1423
|
width: '100%',
|
|
1401
1424
|
height: '100%',
|
|
1402
1425
|
pointerEvents: this.state.shouldShowAnnotate ? 'auto' : 'none',
|
|
1403
|
-
zIndex:
|
|
1426
|
+
zIndex: 999
|
|
1404
1427
|
}
|
|
1405
1428
|
}, ((_this$props$parentAnn2 = this.props.parentAnnotations) === null || _this$props$parentAnn2 === void 0 ? void 0 : _this$props$parentAnn2.length) && ((_this$props$parentAnn3 = this.props.parentAnnotations) === null || _this$props$parentAnn3 === void 0 ? void 0 : _this$props$parentAnn3.map(function (ann, idx) {
|
|
1406
1429
|
var _this5$props$playerSv;
|
|
@@ -1521,7 +1544,6 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
1521
1544
|
}) || null)));
|
|
1522
1545
|
}
|
|
1523
1546
|
}]);
|
|
1524
|
-
return Video;
|
|
1525
1547
|
}(_react.Component);
|
|
1526
1548
|
Video.propTypes = propTypes;
|
|
1527
1549
|
Video.defaultProps = defaultProps;
|