@desynova-digital/player 3.13.18 → 3.13.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -66,6 +66,9 @@ var Shortcut = exports["default"] = /*#__PURE__*/function (_Component) {
66
66
  */
67
67
  _defineProperty(_assertThisInitialized(_this), "handleKeyMovement", function (keyCode) {
68
68
  var _this$props$markers$, _this$props$playerSel, _this$props$player, _this$props$player2;
69
+ if (keyCode === 81 || keyCode === 87) {
70
+ _this.isCalled = true;
71
+ }
69
72
  var frameRateNumber = parseInt(_this.props.frameRate);
70
73
  var timeAfterOverlap;
71
74
  var keyPressHandle = _this.defaultShortcuts.find(function (shortcut) {
@@ -94,6 +97,12 @@ var Shortcut = exports["default"] = /*#__PURE__*/function (_Component) {
94
97
  * Once we leave the keyCombo isCalled variable is set to false. This ensures that on the next combo press we will again execute Q/W key combo first.
95
98
  */
96
99
  _defineProperty(_assertThisInitialized(_this), "createThreeKeyCombo", function (event, handleKeyMovement, debounceKeyFunc, keyParameter) {
100
+ var _this$props = _this.props,
101
+ playerReadOnlyMode = _this$props.playerReadOnlyMode,
102
+ disablePlayerActions = _this$props.disablePlayerActions;
103
+ if (playerReadOnlyMode || disablePlayerActions.includes('marking_controls')) {
104
+ return;
105
+ }
97
106
  if (!_this.isCalled) {
98
107
  handleKeyMovement();
99
108
  }
@@ -241,19 +250,23 @@ var Shortcut = exports["default"] = /*#__PURE__*/function (_Component) {
241
250
  keyCode: 73,
242
251
  // I Key
243
252
  handle: function handle(player, actions) {
244
- var _this$props = _this.props,
245
- markers = _this$props.markers,
246
- playerType = _this$props.playerType,
247
- onAddMarker = _this$props.onAddMarker,
248
- playerReadOnlyMode = _this$props.playerReadOnlyMode,
249
- disablePlayerActions = _this$props.disablePlayerActions,
250
- playerSelectedMarker = _this$props.playerSelectedMarker;
253
+ var _args$;
254
+ var _this$props2 = _this.props,
255
+ markers = _this$props2.markers,
256
+ playerType = _this$props2.playerType,
257
+ onAddMarker = _this$props2.onAddMarker,
258
+ playerReadOnlyMode = _this$props2.playerReadOnlyMode,
259
+ disablePlayerActions = _this$props2.disablePlayerActions,
260
+ playerSelectedMarker = _this$props2.playerSelectedMarker;
251
261
  if (playerReadOnlyMode || disablePlayerActions.includes('marking_controls')) {
252
262
  return;
253
263
  }
254
264
  for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
255
265
  args[_key - 2] = arguments[_key];
256
266
  }
267
+ if ((_args$ = args[1]) !== null && _args$ !== void 0 && _args$.ctrlKey) {
268
+ return;
269
+ }
257
270
  var isOverLapTime = args[0].timeAfterOverlap;
258
271
  if (isOverLapTime) {
259
272
  onAddMarker(args[0].timeAfterOverlap, playerSelectedMarker.rightMarker, 'update');
@@ -301,20 +314,24 @@ var Shortcut = exports["default"] = /*#__PURE__*/function (_Component) {
301
314
  keyCode: 79,
302
315
  // O Key
303
316
  handle: function handle(player, actions) {
304
- var _this$props2 = _this.props,
305
- markers = _this$props2.markers,
306
- onMarkerSelect = _this$props2.onMarkerSelect,
307
- playerType = _this$props2.playerType,
308
- onAddMarker = _this$props2.onAddMarker,
309
- playerReadOnlyMode = _this$props2.playerReadOnlyMode,
310
- disablePlayerActions = _this$props2.disablePlayerActions,
311
- playerSelectedMarker = _this$props2.playerSelectedMarker;
317
+ var _args$2;
318
+ var _this$props3 = _this.props,
319
+ markers = _this$props3.markers,
320
+ onMarkerSelect = _this$props3.onMarkerSelect,
321
+ playerType = _this$props3.playerType,
322
+ onAddMarker = _this$props3.onAddMarker,
323
+ playerReadOnlyMode = _this$props3.playerReadOnlyMode,
324
+ disablePlayerActions = _this$props3.disablePlayerActions,
325
+ playerSelectedMarker = _this$props3.playerSelectedMarker;
312
326
  if (playerReadOnlyMode || disablePlayerActions.includes('marking_controls')) {
313
327
  return;
314
328
  }
315
329
  for (var _len2 = arguments.length, args = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
316
330
  args[_key2 - 2] = arguments[_key2];
317
331
  }
332
+ if ((_args$2 = args[1]) !== null && _args$2 !== void 0 && _args$2.ctrlKey) {
333
+ return;
334
+ }
318
335
  var isOverLapTime = args[0].timeAfterOverlap;
319
336
  if (isOverLapTime) {
320
337
  var data = {
@@ -464,9 +481,9 @@ var Shortcut = exports["default"] = /*#__PURE__*/function (_Component) {
464
481
  //'ctrl + ['
465
482
  ctrl: true,
466
483
  handle: function handle(player, actions, frameRate, e, markers) {
467
- var _this$props3 = _this.props,
468
- leftMarker = _this$props3.playerSelectedMarker.leftMarker,
469
- onTagClick = _this$props3.onTagClick;
484
+ var _this$props4 = _this.props,
485
+ leftMarker = _this$props4.playerSelectedMarker.leftMarker,
486
+ onTagClick = _this$props4.onTagClick;
470
487
  var newIndex = markers.findIndex(function (item) {
471
488
  return item.in_time === leftMarker;
472
489
  }) - 1;
@@ -481,9 +498,9 @@ var Shortcut = exports["default"] = /*#__PURE__*/function (_Component) {
481
498
  //'ctrl + ]'
482
499
  ctrl: true,
483
500
  handle: function handle(player, actions, frameRate, e, markers) {
484
- var _this$props4 = _this.props,
485
- leftMarker = _this$props4.playerSelectedMarker.leftMarker,
486
- onTagClick = _this$props4.onTagClick;
501
+ var _this$props5 = _this.props,
502
+ leftMarker = _this$props5.playerSelectedMarker.leftMarker,
503
+ onTagClick = _this$props5.onTagClick;
487
504
  var newIndex = markers.findIndex(function (item) {
488
505
  return item.in_time === leftMarker;
489
506
  }) + 1;
@@ -549,10 +566,10 @@ var Shortcut = exports["default"] = /*#__PURE__*/function (_Component) {
549
566
  }, {
550
567
  key: "componentDidUpdate",
551
568
  value: function componentDidUpdate(prevProps) {
552
- var _this$props5 = this.props,
553
- shortcuts = _this$props5.shortcuts,
554
- player = _this$props5.player,
555
- frameRate = _this$props5.frameRate;
569
+ var _this$props6 = this.props,
570
+ shortcuts = _this$props6.shortcuts,
571
+ player = _this$props6.player,
572
+ frameRate = _this$props6.frameRate;
556
573
  if (prevProps.shortcuts !== shortcuts) {
557
574
  this.mergeShortcuts();
558
575
  }
@@ -576,10 +593,10 @@ var Shortcut = exports["default"] = /*#__PURE__*/function (_Component) {
576
593
  }, {
577
594
  key: "rewindVideo",
578
595
  value: function rewindVideo() {
579
- var _this$props6 = this.props,
580
- player = _this$props6.player,
581
- actions = _this$props6.actions,
582
- frameRate = _this$props6.frameRate;
596
+ var _this$props7 = this.props,
597
+ player = _this$props7.player,
598
+ actions = _this$props7.actions,
599
+ frameRate = _this$props7.frameRate;
583
600
  if (player.currentTime == 0 || !player.rewindActive) {
584
601
  clearInterval(this.intervalRewind);
585
602
  this.intervalRewind = null;
@@ -708,11 +725,11 @@ var Shortcut = exports["default"] = /*#__PURE__*/function (_Component) {
708
725
  }, {
709
726
  key: "handleKeyPress",
710
727
  value: function handleKeyPress(e) {
711
- var _this$props7 = this.props,
712
- player = _this$props7.player,
713
- actions = _this$props7.actions,
714
- frameRate = _this$props7.frameRate,
715
- markers = _this$props7.markers;
728
+ var _this$props8 = this.props,
729
+ player = _this$props8.player,
730
+ actions = _this$props8.actions,
731
+ frameRate = _this$props8.frameRate,
732
+ markers = _this$props8.markers;
716
733
  if (!player.isActive) {
717
734
  return;
718
735
  }
@@ -751,10 +768,10 @@ var Shortcut = exports["default"] = /*#__PURE__*/function (_Component) {
751
768
  }, {
752
769
  key: "handleClick",
753
770
  value: function handleClick(e) {
754
- var _this$props8 = this.props,
755
- player = _this$props8.player,
756
- actions = _this$props8.actions,
757
- clickable = _this$props8.clickable;
771
+ var _this$props9 = this.props,
772
+ player = _this$props9.player,
773
+ actions = _this$props9.actions,
774
+ clickable = _this$props9.clickable;
758
775
  if (!this.canBeClicked(player, e) || !clickable) {
759
776
  return;
760
777
  }
@@ -764,10 +781,10 @@ var Shortcut = exports["default"] = /*#__PURE__*/function (_Component) {
764
781
  }, {
765
782
  key: "handleDoubleClick",
766
783
  value: function handleDoubleClick(e) {
767
- var _this$props9 = this.props,
768
- player = _this$props9.player,
769
- actions = _this$props9.actions,
770
- dblclickable = _this$props9.dblclickable;
784
+ var _this$props10 = this.props,
785
+ player = _this$props10.player,
786
+ actions = _this$props10.actions,
787
+ dblclickable = _this$props10.dblclickable;
771
788
  if (!this.canBeClicked(player, e) || !dblclickable) {
772
789
  return;
773
790
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@desynova-digital/player",
3
- "version": "3.13.18",
3
+ "version": "3.13.19",
4
4
  "description": "Video Player Package for Contido Application",
5
5
  "main": "index.js",
6
6
  "scripts": {