@desynova-digital/player 4.0.85 → 4.0.86
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 +54 -3
- 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 +179 -107
- package/components/PlayerHeader.js +120 -65
- 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 +85 -75
- package/components/Slider.js +33 -33
- package/components/TagsBar.js +15 -16
- package/components/Video.js +127 -123
- 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 +24 -19
- 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/RenderCommentMarkers.js +186 -0
- package/components/progress-bar/SeekBar.js +31 -32
- 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/Player.js
CHANGED
|
@@ -20,33 +20,34 @@ var _Playlist = _interopRequireDefault(require("./Playlist"));
|
|
|
20
20
|
var _AudioMeter = _interopRequireDefault(require("./AudioMeter"));
|
|
21
21
|
var _utils = require("../utils");
|
|
22
22
|
var _fullscreen = _interopRequireDefault(require("../utils/fullscreen"));
|
|
23
|
+
var _RenderCommentMarkers = _interopRequireDefault(require("./progress-bar/RenderCommentMarkers"));
|
|
23
24
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
24
|
-
function _interopRequireDefault(
|
|
25
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
25
26
|
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); }
|
|
26
|
-
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 &&
|
|
27
|
-
function _toConsumableArray(
|
|
27
|
+
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; }
|
|
28
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
28
29
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
29
|
-
function _unsupportedIterableToArray(
|
|
30
|
-
function _iterableToArray(
|
|
31
|
-
function _arrayWithoutHoles(
|
|
32
|
-
function _arrayLikeToArray(
|
|
30
|
+
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; } }
|
|
31
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
32
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
33
|
+
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; }
|
|
33
34
|
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; }
|
|
34
35
|
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; }
|
|
35
|
-
function
|
|
36
|
-
function
|
|
37
|
-
function
|
|
38
|
-
function
|
|
39
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
40
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
41
|
-
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); }
|
|
36
|
+
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); }
|
|
37
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
38
|
+
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); } }
|
|
39
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
42
40
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
43
|
-
function _possibleConstructorReturn(
|
|
41
|
+
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); }
|
|
42
|
+
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
44
43
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
45
|
-
function _getPrototypeOf(
|
|
46
|
-
function
|
|
47
|
-
function
|
|
48
|
-
function
|
|
49
|
-
function
|
|
44
|
+
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
45
|
+
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); }
|
|
46
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
47
|
+
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; }
|
|
48
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
49
|
+
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); }
|
|
50
|
+
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
50
51
|
var propTypes = {
|
|
51
52
|
store: _propTypes.PropTypes.instanceOf(Object),
|
|
52
53
|
width: _propTypes.PropTypes.oneOfType([_propTypes.PropTypes.string, _propTypes.PropTypes.number]),
|
|
@@ -158,6 +159,9 @@ var defaultProps = {
|
|
|
158
159
|
};
|
|
159
160
|
var PlayerBlock = _styledComponents["default"].div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n height: 100%;\n"])));
|
|
160
161
|
var PlayerContainer = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: flex-start;\n background: #000000;\n .left-video-section {\n width: ", ";\n position: relative;\n }\n .audio-meter-block {\n position: relative;\n width: 0px;\n display: none;\n &.qc {\n width: 70px;\n display: block;\n }\n }\n .right-video-section {\n width: ", ";\n position: relative;\n }\n"])), function (props) {
|
|
162
|
+
if (!props.isRightMenuVisible) {
|
|
163
|
+
return '100%';
|
|
164
|
+
}
|
|
161
165
|
if (props.hasRightSection) {
|
|
162
166
|
return '63.67%';
|
|
163
167
|
} else {
|
|
@@ -191,110 +195,120 @@ var AudioMeterBlock = (0, _styledComponents["default"])('div')(_templateObject3
|
|
|
191
195
|
});
|
|
192
196
|
var ControlContainer = _styledComponents["default"].div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral([""])));
|
|
193
197
|
var Player = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
194
|
-
_inherits(Player, _Component);
|
|
195
198
|
function Player(props) {
|
|
196
199
|
var _this;
|
|
197
200
|
_classCallCheck(this, Player);
|
|
198
201
|
_this = _callSuper(this, Player, [props]);
|
|
202
|
+
_defineProperty(_this, "closeSidemenu", function () {
|
|
203
|
+
var _this$props = _this.props,
|
|
204
|
+
player = _this$props.player,
|
|
205
|
+
onRightMenuVisible = _this$props.onRightMenuVisible;
|
|
206
|
+
_this.actions.toggleRightBar(player, false);
|
|
207
|
+
onRightMenuVisible(false);
|
|
208
|
+
});
|
|
199
209
|
_this.controlsHideTimer = null;
|
|
200
210
|
_this.meterHeight = 40;
|
|
201
211
|
_this.video = null; // the Video component
|
|
202
212
|
_this.manager = new _Manager["default"](props.store);
|
|
203
213
|
_this.actions = _this.manager.getActions();
|
|
204
|
-
_this.manager.subscribeToPlayerStateChange(_this.handleStateChange.bind(
|
|
205
|
-
_this.handleResize = _this.handleResize.bind(
|
|
206
|
-
_this.getChildren = _this.getChildren.bind(
|
|
207
|
-
_this.handleFullScreenChange = _this.handleFullScreenChange.bind(
|
|
208
|
-
_this.handleFocus = _this.handleFocus.bind(
|
|
209
|
-
_this.handleBlur = _this.handleBlur.bind(
|
|
214
|
+
_this.manager.subscribeToPlayerStateChange(_this.handleStateChange.bind(_this));
|
|
215
|
+
_this.handleResize = _this.handleResize.bind(_this);
|
|
216
|
+
_this.getChildren = _this.getChildren.bind(_this);
|
|
217
|
+
_this.handleFullScreenChange = _this.handleFullScreenChange.bind(_this);
|
|
218
|
+
_this.handleFocus = _this.handleFocus.bind(_this);
|
|
219
|
+
_this.handleBlur = _this.handleBlur.bind(_this);
|
|
210
220
|
_this.actions.handlePlayerType(props.playerType);
|
|
211
221
|
_this.actions.handleControlType(props.controlType);
|
|
222
|
+
if (_this.props.fullScreenRef) {
|
|
223
|
+
_this.props.fullScreenRef.current = _this;
|
|
224
|
+
}
|
|
212
225
|
return _this;
|
|
213
226
|
}
|
|
214
|
-
|
|
227
|
+
_inherits(Player, _Component);
|
|
228
|
+
return _createClass(Player, [{
|
|
215
229
|
key: "handleMarginsAndGrid",
|
|
216
230
|
value: function handleMarginsAndGrid() {
|
|
217
|
-
var _this$
|
|
218
|
-
quality = _this$
|
|
219
|
-
playerType = _this$
|
|
220
|
-
if ([
|
|
231
|
+
var _this$props2 = this.props,
|
|
232
|
+
quality = _this$props2.quality,
|
|
233
|
+
playerType = _this$props2.playerType;
|
|
234
|
+
if (['snp_edit', 'promo_review', 'pgm_edit', 'dubbing_review'].includes(playerType)) {
|
|
221
235
|
this.actions.handleSDBorderChange({
|
|
222
|
-
key:
|
|
236
|
+
key: 'fourThreeSafeArea',
|
|
223
237
|
value: false
|
|
224
238
|
});
|
|
225
239
|
this.actions.handleSDBorderChange({
|
|
226
|
-
key:
|
|
240
|
+
key: 'SDBorderActive',
|
|
227
241
|
value: false
|
|
228
242
|
});
|
|
229
243
|
this.actions.handleSDBorderChange({
|
|
230
|
-
key:
|
|
244
|
+
key: 'HDBorderActive',
|
|
231
245
|
value: false
|
|
232
246
|
});
|
|
233
247
|
this.actions.handleSDBorderChange({
|
|
234
|
-
key:
|
|
248
|
+
key: 'sixteenNineSafeArea',
|
|
235
249
|
value: false
|
|
236
250
|
});
|
|
237
251
|
} else if (playerType === 'qc') {
|
|
238
252
|
if (quality === 'hd' || quality === 'uhd') {
|
|
239
253
|
this.actions.handleSDBorderChange({
|
|
240
|
-
key:
|
|
254
|
+
key: 'fourThreeSafeArea',
|
|
241
255
|
value: false
|
|
242
256
|
});
|
|
243
257
|
this.actions.handleSDBorderChange({
|
|
244
|
-
key:
|
|
258
|
+
key: 'SDBorderActive',
|
|
245
259
|
value: false
|
|
246
260
|
});
|
|
247
261
|
this.actions.handleSDBorderChange({
|
|
248
|
-
key:
|
|
262
|
+
key: 'sixteenNineSafeArea',
|
|
249
263
|
value: true
|
|
250
264
|
});
|
|
251
265
|
this.actions.handleSDBorderChange({
|
|
252
|
-
key:
|
|
266
|
+
key: 'HDBorderActive',
|
|
253
267
|
value: true
|
|
254
268
|
});
|
|
255
269
|
} else if (quality === 'sd') {
|
|
256
270
|
this.actions.handleSDBorderChange({
|
|
257
|
-
key:
|
|
271
|
+
key: 'HDBorderActive',
|
|
258
272
|
value: false
|
|
259
273
|
});
|
|
260
274
|
this.actions.handleSDBorderChange({
|
|
261
|
-
key:
|
|
275
|
+
key: 'sixteenNineSafeArea',
|
|
262
276
|
value: false
|
|
263
277
|
});
|
|
264
278
|
this.actions.handleSDBorderChange({
|
|
265
|
-
key:
|
|
279
|
+
key: 'fourThreeSafeArea',
|
|
266
280
|
value: true
|
|
267
281
|
});
|
|
268
282
|
this.actions.handleSDBorderChange({
|
|
269
|
-
key:
|
|
283
|
+
key: 'SDBorderActive',
|
|
270
284
|
value: true
|
|
271
285
|
});
|
|
272
286
|
}
|
|
273
287
|
} else {
|
|
274
288
|
this.actions.handleSDBorderChange({
|
|
275
|
-
key:
|
|
289
|
+
key: 'fourThreeSafeArea',
|
|
276
290
|
value: false
|
|
277
291
|
});
|
|
278
292
|
this.actions.handleSDBorderChange({
|
|
279
|
-
key:
|
|
293
|
+
key: 'sixteenNineSafeArea',
|
|
280
294
|
value: false
|
|
281
295
|
});
|
|
282
296
|
if (quality === 'hd' || quality === 'uhd') {
|
|
283
297
|
this.actions.handleSDBorderChange({
|
|
284
|
-
key:
|
|
298
|
+
key: 'SDBorderActive',
|
|
285
299
|
value: false
|
|
286
300
|
});
|
|
287
301
|
this.actions.handleSDBorderChange({
|
|
288
|
-
key:
|
|
302
|
+
key: 'HDBorderActive',
|
|
289
303
|
value: true
|
|
290
304
|
});
|
|
291
305
|
} else if (quality === 'sd') {
|
|
292
306
|
this.actions.handleSDBorderChange({
|
|
293
|
-
key:
|
|
307
|
+
key: 'HDBorderActive',
|
|
294
308
|
value: false
|
|
295
309
|
});
|
|
296
310
|
this.actions.handleSDBorderChange({
|
|
297
|
-
key:
|
|
311
|
+
key: 'SDBorderActive',
|
|
298
312
|
value: true
|
|
299
313
|
});
|
|
300
314
|
}
|
|
@@ -307,18 +321,18 @@ var Player = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
307
321
|
window.addEventListener('resize', this.handleResize);
|
|
308
322
|
_fullscreen["default"].addEventListener(this.handleFullScreenChange);
|
|
309
323
|
this.handleMarginsAndGrid();
|
|
310
|
-
/*
|
|
311
|
-
* const { player } = this.manager.getState();
|
|
312
|
-
* this.actions.toggleFullscreen(player);
|
|
324
|
+
/*
|
|
325
|
+
* const { player } = this.manager.getState();
|
|
326
|
+
* this.actions.toggleFullscreen(player);
|
|
313
327
|
*/
|
|
314
328
|
}
|
|
315
329
|
}, {
|
|
316
330
|
key: "componentDidUpdate",
|
|
317
331
|
value: function componentDidUpdate(prevProps, prevState) {
|
|
318
|
-
var _this$
|
|
319
|
-
playerType = _this$
|
|
320
|
-
activeSDBorder = _this$
|
|
321
|
-
activeVersion = _this$
|
|
332
|
+
var _this$props3 = this.props,
|
|
333
|
+
playerType = _this$props3.playerType,
|
|
334
|
+
activeSDBorder = _this$props3.activeSDBorder,
|
|
335
|
+
activeVersion = _this$props3.activeVersion;
|
|
322
336
|
this.handleResize();
|
|
323
337
|
if (activeSDBorder !== prevProps.activeSDBorder) {
|
|
324
338
|
this.actions.handleSDBorderChange(activeSDBorder || false);
|
|
@@ -358,17 +372,25 @@ var Player = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
358
372
|
}, {
|
|
359
373
|
key: "getDefaultChildren",
|
|
360
374
|
value: function getDefaultChildren(props, fullProps) {
|
|
361
|
-
var _this2 = this
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
375
|
+
var _this2 = this,
|
|
376
|
+
_fullProps$player,
|
|
377
|
+
_fullProps$player2,
|
|
378
|
+
_fullProps$player3,
|
|
379
|
+
_tabMetadata$edit_dat;
|
|
380
|
+
var _this$props4 = this.props,
|
|
381
|
+
playerSvgRef = _this$props4.playerSvgRef,
|
|
382
|
+
parentAnnotations = _this$props4.parentAnnotations,
|
|
383
|
+
onShapeMouseDown = _this$props4.onShapeMouseDown,
|
|
384
|
+
handleMouseDown = _this$props4.handleMouseDown,
|
|
385
|
+
handleMouseMove = _this$props4.handleMouseMove,
|
|
386
|
+
handleMouseUp = _this$props4.handleMouseUp,
|
|
387
|
+
isSvgLayer = _this$props4.isSvgLayer,
|
|
388
|
+
inTime = _this$props4.inTime,
|
|
389
|
+
outTime = _this$props4.outTime,
|
|
390
|
+
isRightMenuVisible = _this$props4.isRightMenuVisible,
|
|
391
|
+
tabMetadata = _this$props4.tabMetadata,
|
|
392
|
+
player = _this$props4.player,
|
|
393
|
+
onRightMenuVisible = _this$props4.onRightMenuVisible;
|
|
372
394
|
return [/*#__PURE__*/_react["default"].createElement(_PlayerHeader["default"], _extends({
|
|
373
395
|
ref: function ref(c) {
|
|
374
396
|
_this2._playerHeader = c;
|
|
@@ -389,6 +411,7 @@ var Player = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
389
411
|
isSvgLayer: isSvgLayer,
|
|
390
412
|
inTime: inTime,
|
|
391
413
|
outTime: outTime,
|
|
414
|
+
isRightMenuVisible: isRightMenuVisible,
|
|
392
415
|
key: "video",
|
|
393
416
|
order: 2
|
|
394
417
|
}, fullProps)), /*#__PURE__*/_react["default"].createElement(_ProgressControl["default"], _extends({
|
|
@@ -398,13 +421,38 @@ var Player = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
398
421
|
}, this.props, {
|
|
399
422
|
key: "progress-control",
|
|
400
423
|
order: 3
|
|
401
|
-
})), /*#__PURE__*/_react["default"].createElement(
|
|
424
|
+
})), /*#__PURE__*/_react["default"].createElement(_RenderCommentMarkers["default"], _extends({
|
|
425
|
+
duration: fullProps === null || fullProps === void 0 || (_fullProps$player = fullProps.player) === null || _fullProps$player === void 0 ? void 0 : _fullProps$player.duration,
|
|
426
|
+
playerType: fullProps.playerType,
|
|
427
|
+
isFullscreen: fullProps === null || fullProps === void 0 || (_fullProps$player2 = fullProps.player) === null || _fullProps$player2 === void 0 ? void 0 : _fullProps$player2.isFullscreen,
|
|
428
|
+
zoom: fullProps === null || fullProps === void 0 || (_fullProps$player3 = fullProps.player) === null || _fullProps$player3 === void 0 ? void 0 : _fullProps$player3.zoom,
|
|
429
|
+
onSegmentClick: this.onSegmentClick,
|
|
430
|
+
player: fullProps === null || fullProps === void 0 ? void 0 : fullProps.player,
|
|
431
|
+
onRightMenuVisible: onRightMenuVisible,
|
|
432
|
+
actions: fullProps === null || fullProps === void 0 ? void 0 : fullProps.actions,
|
|
433
|
+
order: 4,
|
|
434
|
+
data: tabMetadata === null || tabMetadata === void 0 || (_tabMetadata$edit_dat = tabMetadata.edit_data) === null || _tabMetadata$edit_dat === void 0 || (_tabMetadata$edit_dat = _tabMetadata$edit_dat[0]) === null || _tabMetadata$edit_dat === void 0 || (_tabMetadata$edit_dat = _tabMetadata$edit_dat.value) === null || _tabMetadata$edit_dat === void 0 ? void 0 : _tabMetadata$edit_dat.map(function (item) {
|
|
435
|
+
var _item$marker_data;
|
|
436
|
+
var itemObj = _objectSpread(_objectSpread({}, item.marker_data), {}, {
|
|
437
|
+
comment_type: item === null || item === void 0 ? void 0 : item.comment_type,
|
|
438
|
+
access: item === null || item === void 0 ? void 0 : item.access,
|
|
439
|
+
id: item === null || item === void 0 ? void 0 : item.marker_db_id,
|
|
440
|
+
ingest_db_id: item === null || item === void 0 ? void 0 : item.ingest_db_id,
|
|
441
|
+
reply_count: item === null || item === void 0 ? void 0 : item.reply_count,
|
|
442
|
+
value: _objectSpread(_objectSpread({}, item === null || item === void 0 || (_item$marker_data = item.marker_data) === null || _item$marker_data === void 0 ? void 0 : _item$marker_data.value), {}, {
|
|
443
|
+
created_by: item === null || item === void 0 ? void 0 : item.created_by
|
|
444
|
+
}),
|
|
445
|
+
hideComments: true
|
|
446
|
+
});
|
|
447
|
+
return itemObj;
|
|
448
|
+
})
|
|
449
|
+
}, this.props)), /*#__PURE__*/_react["default"].createElement(_ControlBar["default"], _extends({
|
|
402
450
|
ref: function ref(c) {
|
|
403
451
|
_this2._controlBar = c;
|
|
404
452
|
},
|
|
405
453
|
key: "control-bar",
|
|
406
454
|
pauseOnOutMarkerSelect: fullProps.pauseOnOutMarkerSelect,
|
|
407
|
-
order:
|
|
455
|
+
order: 5,
|
|
408
456
|
playerType: fullProps.playerType
|
|
409
457
|
}, this.props)), /*#__PURE__*/_react["default"].createElement(_Shortcut["default"], _extends({
|
|
410
458
|
key: "shortcut",
|
|
@@ -412,7 +460,9 @@ var Player = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
412
460
|
}, props, {
|
|
413
461
|
pauseOnOutMarkerSelect: fullProps.pauseOnOutMarkerSelect,
|
|
414
462
|
playerType: fullProps.playerType,
|
|
415
|
-
frameRate: fullProps.frameRate
|
|
463
|
+
frameRate: fullProps.frameRate,
|
|
464
|
+
isRightMenuVisible: isRightMenuVisible,
|
|
465
|
+
onRightMenuVisible: onRightMenuVisible
|
|
416
466
|
}))];
|
|
417
467
|
}
|
|
418
468
|
}, {
|
|
@@ -434,15 +484,15 @@ var Player = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
434
484
|
order: 0.0
|
|
435
485
|
}, fullProps)),
|
|
436
486
|
/*#__PURE__*/
|
|
437
|
-
/*
|
|
438
|
-
* <ControlBar
|
|
439
|
-
* ref={(c) => {
|
|
440
|
-
* this._controlBar = c;
|
|
441
|
-
* }}
|
|
442
|
-
* key="control-bar"
|
|
443
|
-
* order={2}
|
|
444
|
-
* {...this.props}
|
|
445
|
-
* />,
|
|
487
|
+
/*
|
|
488
|
+
* <ControlBar
|
|
489
|
+
* ref={(c) => {
|
|
490
|
+
* this._controlBar = c;
|
|
491
|
+
* }}
|
|
492
|
+
* key="control-bar"
|
|
493
|
+
* order={2}
|
|
494
|
+
* {...this.props}
|
|
495
|
+
* />,
|
|
446
496
|
*/
|
|
447
497
|
_react["default"].createElement(_Shortcut["default"], _extends({
|
|
448
498
|
key: "shortcut",
|
|
@@ -453,16 +503,20 @@ var Player = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
453
503
|
key: "getAdvancedChildren",
|
|
454
504
|
value: function getAdvancedChildren(props, fullProps) {
|
|
455
505
|
var _this4 = this;
|
|
456
|
-
var _this$
|
|
457
|
-
playerSvgRef = _this$
|
|
458
|
-
parentAnnotations = _this$
|
|
459
|
-
onShapeMouseDown = _this$
|
|
460
|
-
handleMouseDown = _this$
|
|
461
|
-
handleMouseMove = _this$
|
|
462
|
-
handleMouseUp = _this$
|
|
463
|
-
isSvgLayer = _this$
|
|
464
|
-
inTime = _this$
|
|
465
|
-
outTime = _this$
|
|
506
|
+
var _this$props5 = this.props,
|
|
507
|
+
playerSvgRef = _this$props5.playerSvgRef,
|
|
508
|
+
parentAnnotations = _this$props5.parentAnnotations,
|
|
509
|
+
onShapeMouseDown = _this$props5.onShapeMouseDown,
|
|
510
|
+
handleMouseDown = _this$props5.handleMouseDown,
|
|
511
|
+
handleMouseMove = _this$props5.handleMouseMove,
|
|
512
|
+
handleMouseUp = _this$props5.handleMouseUp,
|
|
513
|
+
isSvgLayer = _this$props5.isSvgLayer,
|
|
514
|
+
inTime = _this$props5.inTime,
|
|
515
|
+
outTime = _this$props5.outTime,
|
|
516
|
+
tabMetadata = _this$props5.tabMetadata,
|
|
517
|
+
isRightMenuVisible = _this$props5.isRightMenuVisible,
|
|
518
|
+
isFullscreen = _this$props5.isFullscreen,
|
|
519
|
+
player = _this$props5.player;
|
|
466
520
|
return [/*#__PURE__*/_react["default"].createElement(_PlayerHeader["default"], _extends({
|
|
467
521
|
ref: function ref(c) {
|
|
468
522
|
_this4._playerHeader = c;
|
|
@@ -483,6 +537,7 @@ var Player = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
483
537
|
isSvgLayer: isSvgLayer,
|
|
484
538
|
inTime: inTime,
|
|
485
539
|
outTime: outTime,
|
|
540
|
+
isRightMenuVisible: isRightMenuVisible,
|
|
486
541
|
key: "video",
|
|
487
542
|
order: 0.0
|
|
488
543
|
}, fullProps)), /*#__PURE__*/_react["default"].createElement(_ControlBar["default"], _extends({
|
|
@@ -491,7 +546,7 @@ var Player = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
491
546
|
},
|
|
492
547
|
key: "control-bar",
|
|
493
548
|
pauseOnOutMarkerSelect: fullProps.pauseOnOutMarkerSelect,
|
|
494
|
-
order:
|
|
549
|
+
order: 3,
|
|
495
550
|
playerType: fullProps.playerType
|
|
496
551
|
}, this.props)), /*#__PURE__*/_react["default"].createElement(_Shortcut["default"], _extends({
|
|
497
552
|
key: "shortcut",
|
|
@@ -527,9 +582,9 @@ var Player = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
527
582
|
var defaultChildren = props.controlType === 'advanced' ? this.getAdvancedChildren(propsWithoutChildren, props) : this.getDefaultChildren(propsWithoutChildren, props);
|
|
528
583
|
return (0, _utils.mergeAndSortChildren)(defaultChildren, children, propsWithoutChildren);
|
|
529
584
|
}
|
|
530
|
-
/*
|
|
531
|
-
* get redux state
|
|
532
|
-
* { player, operation }
|
|
585
|
+
/*
|
|
586
|
+
* get redux state
|
|
587
|
+
* { player, operation }
|
|
533
588
|
*/
|
|
534
589
|
}, {
|
|
535
590
|
key: "getState",
|
|
@@ -544,9 +599,9 @@ var Player = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
544
599
|
return this.video.playbackRate;
|
|
545
600
|
}
|
|
546
601
|
|
|
547
|
-
/*
|
|
548
|
-
* set playback rate
|
|
549
|
-
* speed of video
|
|
602
|
+
/*
|
|
603
|
+
* set playback rate
|
|
604
|
+
* speed of video
|
|
550
605
|
*/,
|
|
551
606
|
set: function set(rate) {
|
|
552
607
|
this.video.playbackRate = rate;
|
|
@@ -654,7 +709,7 @@ var Player = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
654
709
|
return this.manager.subscribeToPlayerStateChange(listener);
|
|
655
710
|
}
|
|
656
711
|
|
|
657
|
-
// player resize
|
|
712
|
+
// player resize changes
|
|
658
713
|
}, {
|
|
659
714
|
key: "handleResize",
|
|
660
715
|
value: function handleResize() {
|
|
@@ -669,16 +724,29 @@ var Player = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
669
724
|
var controlBar = (0, _reactDom.findDOMNode)(this._controlBar);
|
|
670
725
|
var playlist = (0, _reactDom.findDOMNode)(this._playlist);
|
|
671
726
|
var playerContainer = (0, _reactDom.findDOMNode)(this._playerContainer);
|
|
672
|
-
var _this$
|
|
673
|
-
controlType = _this$
|
|
674
|
-
playerType = _this$
|
|
675
|
-
fileType = _this$
|
|
727
|
+
var _this$props6 = this.props,
|
|
728
|
+
controlType = _this$props6.controlType,
|
|
729
|
+
playerType = _this$props6.playerType,
|
|
730
|
+
fileType = _this$props6.fileType;
|
|
731
|
+
//added for header height
|
|
732
|
+
var headerHeight = playerHeader ? playerHeader.offsetHeight : 60;
|
|
733
|
+
var totalHeight = window.innerHeight;
|
|
734
|
+
var newHeight;
|
|
676
735
|
var height = 0;
|
|
677
736
|
_toConsumableArray(leftSectionRef.children).forEach(function (child) {
|
|
678
737
|
return height += child.offsetHeight;
|
|
679
738
|
});
|
|
680
739
|
if (rightSectionRef) {
|
|
681
740
|
rightSectionRef.style.height = height + 'px';
|
|
741
|
+
//for rightsection top to again 0px
|
|
742
|
+
rightSectionRef.style.top = '0px';
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
//added for full screen with right section to little down for video player
|
|
746
|
+
if (rightSectionRef && player.isFullscreen) {
|
|
747
|
+
newHeight = totalHeight - headerHeight;
|
|
748
|
+
rightSectionRef.style.top = "".concat(headerHeight, "px");
|
|
749
|
+
rightSectionRef.style.height = "".concat(newHeight, "px");
|
|
682
750
|
}
|
|
683
751
|
if (audioMeterBlock) {
|
|
684
752
|
audioMeterBlock.style.height = video.offsetHeight + 'px';
|
|
@@ -785,9 +853,12 @@ var Player = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
785
853
|
video: this.video ? this.video.video : null
|
|
786
854
|
});
|
|
787
855
|
var childrensLeft = this.getChildren(props, 'left');
|
|
788
|
-
var _this$
|
|
789
|
-
rightSection = _this$
|
|
790
|
-
playerType = _this$
|
|
856
|
+
var _this$props7 = this.props,
|
|
857
|
+
rightSection = _this$props7.rightSection,
|
|
858
|
+
playerType = _this$props7.playerType,
|
|
859
|
+
isFullscreen = _this$props7.isFullscreen,
|
|
860
|
+
tabMetadata = _this$props7.tabMetadata,
|
|
861
|
+
isRightMenuVisible = _this$props7.isRightMenuVisible;
|
|
791
862
|
return /*#__PURE__*/_react["default"].createElement(PlayerBlock, {
|
|
792
863
|
ref: function ref(c) {
|
|
793
864
|
_this5.manager.rootElement = c;
|
|
@@ -797,11 +868,13 @@ var Player = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
797
868
|
onBlur: this.handleBlur,
|
|
798
869
|
tabIndex: "-1"
|
|
799
870
|
}, /*#__PURE__*/_react["default"].createElement(PlayerContainer, _extends({
|
|
871
|
+
className: "player-container",
|
|
800
872
|
ref: function ref(playerContainer) {
|
|
801
873
|
_this5._playerContainer = playerContainer;
|
|
802
874
|
}
|
|
803
875
|
}, props, {
|
|
804
|
-
hasRightSection: !!rightSection
|
|
876
|
+
hasRightSection: !!rightSection,
|
|
877
|
+
isRightMenuVisible: isRightMenuVisible
|
|
805
878
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
806
879
|
className: "left-video-section",
|
|
807
880
|
ref: function ref(leftSectionRef) {
|
|
@@ -842,7 +915,6 @@ var Player = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
842
915
|
}, this.props)));
|
|
843
916
|
}
|
|
844
917
|
}]);
|
|
845
|
-
return Player;
|
|
846
918
|
}(_react.Component);
|
|
847
919
|
Player.contextTypes = {
|
|
848
920
|
store: _propTypes.PropTypes.instanceOf(Object)
|