@desynova-digital/player 3.13.18 → 3.13.20

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,13 +250,13 @@ 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 _this$props2 = _this.props,
254
+ markers = _this$props2.markers,
255
+ playerType = _this$props2.playerType,
256
+ onAddMarker = _this$props2.onAddMarker,
257
+ playerReadOnlyMode = _this$props2.playerReadOnlyMode,
258
+ disablePlayerActions = _this$props2.disablePlayerActions,
259
+ playerSelectedMarker = _this$props2.playerSelectedMarker;
251
260
  if (playerReadOnlyMode || disablePlayerActions.includes('marking_controls')) {
252
261
  return;
253
262
  }
@@ -301,14 +310,14 @@ var Shortcut = exports["default"] = /*#__PURE__*/function (_Component) {
301
310
  keyCode: 79,
302
311
  // O Key
303
312
  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;
313
+ var _this$props3 = _this.props,
314
+ markers = _this$props3.markers,
315
+ onMarkerSelect = _this$props3.onMarkerSelect,
316
+ playerType = _this$props3.playerType,
317
+ onAddMarker = _this$props3.onAddMarker,
318
+ playerReadOnlyMode = _this$props3.playerReadOnlyMode,
319
+ disablePlayerActions = _this$props3.disablePlayerActions,
320
+ playerSelectedMarker = _this$props3.playerSelectedMarker;
312
321
  if (playerReadOnlyMode || disablePlayerActions.includes('marking_controls')) {
313
322
  return;
314
323
  }
@@ -464,9 +473,9 @@ var Shortcut = exports["default"] = /*#__PURE__*/function (_Component) {
464
473
  //'ctrl + ['
465
474
  ctrl: true,
466
475
  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;
476
+ var _this$props4 = _this.props,
477
+ leftMarker = _this$props4.playerSelectedMarker.leftMarker,
478
+ onTagClick = _this$props4.onTagClick;
470
479
  var newIndex = markers.findIndex(function (item) {
471
480
  return item.in_time === leftMarker;
472
481
  }) - 1;
@@ -481,9 +490,9 @@ var Shortcut = exports["default"] = /*#__PURE__*/function (_Component) {
481
490
  //'ctrl + ]'
482
491
  ctrl: true,
483
492
  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;
493
+ var _this$props5 = _this.props,
494
+ leftMarker = _this$props5.playerSelectedMarker.leftMarker,
495
+ onTagClick = _this$props5.onTagClick;
487
496
  var newIndex = markers.findIndex(function (item) {
488
497
  return item.in_time === leftMarker;
489
498
  }) + 1;
@@ -506,22 +515,22 @@ var Shortcut = exports["default"] = /*#__PURE__*/function (_Component) {
506
515
  key: "componentDidMount",
507
516
  value: function componentDidMount() {
508
517
  this.mergeShortcuts();
509
- (0, _hotkeysJs["default"])('ctrl+i+left, ctrl+left+i, i+ctrl+left, i+left+ ctrl, left+ ctrl+ i, left+i+ ctrl', {
518
+ (0, _hotkeysJs["default"])('o+right,right+o', {
510
519
  keyup: true,
511
520
  keydown: true
512
- }, this.threeKeyCombo4);
513
- (0, _hotkeysJs["default"])('ctrl+i+right,ctrl+right+i,i+ctrl+right,i+right+ctrl,right+ctrl+i,right+i+ctrl', {
521
+ }, this.threeKeyCombo1);
522
+ (0, _hotkeysJs["default"])('o+left,left+o', {
514
523
  keyup: true,
515
524
  keydown: true
516
- }, this.threeKeyCombo3);
517
- (0, _hotkeysJs["default"])('ctrl+o+left,ctrl+left+o,o+ctrl+left,o+left+ctrl,left+ctrl+o,left+o+ctrl', {
525
+ }, this.threeKeyCombo2);
526
+ (0, _hotkeysJs["default"])('i+right,right+i', {
518
527
  keyup: true,
519
528
  keydown: true
520
- }, this.threeKeyCombo2);
521
- (0, _hotkeysJs["default"])('ctrl+o+right,ctrl+right+o,o+ctrl+right,o+right+ctrl,right+ctrl+o,right+o+ctrl', {
529
+ }, this.threeKeyCombo3);
530
+ (0, _hotkeysJs["default"])('i+left,left+i', {
522
531
  keyup: true,
523
532
  keydown: true
524
- }, this.threeKeyCombo1);
533
+ }, this.threeKeyCombo4);
525
534
  document.addEventListener('keydown', this.handleKeyPress);
526
535
  document.addEventListener('click', this.handleClick);
527
536
  document.addEventListener('dblclick', this.handleDoubleClick);
@@ -549,10 +558,10 @@ var Shortcut = exports["default"] = /*#__PURE__*/function (_Component) {
549
558
  }, {
550
559
  key: "componentDidUpdate",
551
560
  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;
561
+ var _this$props6 = this.props,
562
+ shortcuts = _this$props6.shortcuts,
563
+ player = _this$props6.player,
564
+ frameRate = _this$props6.frameRate;
556
565
  if (prevProps.shortcuts !== shortcuts) {
557
566
  this.mergeShortcuts();
558
567
  }
@@ -565,10 +574,10 @@ var Shortcut = exports["default"] = /*#__PURE__*/function (_Component) {
565
574
  }, {
566
575
  key: "componentWillUnmount",
567
576
  value: function componentWillUnmount() {
568
- _hotkeysJs["default"].unbind('ctrl+i+left, ctrl+left+i, i+ctrl+left, i+left+ ctrl, left+ ctrl+ i, left+i+ ctrl');
569
- _hotkeysJs["default"].unbind('ctrl+i+right,ctrl+right+i,i+ctrl+right,i+right+ctrl,right+ctrl+i,right+i+ctrl');
570
- _hotkeysJs["default"].unbind('ctrl+o+left,ctrl+left+o,o+ctrl+left,o+left+ctrl,left+ctrl+o,left+o+ctrl');
571
- _hotkeysJs["default"].unbind('ctrl+o+right,ctrl+right+o,o+ctrl+right,o+right+ctrl,right+ctrl+o,right+o+ctrl');
577
+ _hotkeysJs["default"].unbind('o+right,right+o');
578
+ _hotkeysJs["default"].unbind('i+right,right+i');
579
+ _hotkeysJs["default"].unbind('i+left,left+i');
580
+ _hotkeysJs["default"].unbind('o+left,left+o');
572
581
  document.removeEventListener('keydown', this.handleKeyPress);
573
582
  document.removeEventListener('click', this.handleClick);
574
583
  document.removeEventListener('dblclick', this.handleDoubleClick);
@@ -576,10 +585,10 @@ var Shortcut = exports["default"] = /*#__PURE__*/function (_Component) {
576
585
  }, {
577
586
  key: "rewindVideo",
578
587
  value: function rewindVideo() {
579
- var _this$props6 = this.props,
580
- player = _this$props6.player,
581
- actions = _this$props6.actions,
582
- frameRate = _this$props6.frameRate;
588
+ var _this$props7 = this.props,
589
+ player = _this$props7.player,
590
+ actions = _this$props7.actions,
591
+ frameRate = _this$props7.frameRate;
583
592
  if (player.currentTime == 0 || !player.rewindActive) {
584
593
  clearInterval(this.intervalRewind);
585
594
  this.intervalRewind = null;
@@ -708,11 +717,11 @@ var Shortcut = exports["default"] = /*#__PURE__*/function (_Component) {
708
717
  }, {
709
718
  key: "handleKeyPress",
710
719
  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;
720
+ var _this$props8 = this.props,
721
+ player = _this$props8.player,
722
+ actions = _this$props8.actions,
723
+ frameRate = _this$props8.frameRate,
724
+ markers = _this$props8.markers;
716
725
  if (!player.isActive) {
717
726
  return;
718
727
  }
@@ -751,10 +760,10 @@ var Shortcut = exports["default"] = /*#__PURE__*/function (_Component) {
751
760
  }, {
752
761
  key: "handleClick",
753
762
  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;
763
+ var _this$props9 = this.props,
764
+ player = _this$props9.player,
765
+ actions = _this$props9.actions,
766
+ clickable = _this$props9.clickable;
758
767
  if (!this.canBeClicked(player, e) || !clickable) {
759
768
  return;
760
769
  }
@@ -764,10 +773,10 @@ var Shortcut = exports["default"] = /*#__PURE__*/function (_Component) {
764
773
  }, {
765
774
  key: "handleDoubleClick",
766
775
  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;
776
+ var _this$props10 = this.props,
777
+ player = _this$props10.player,
778
+ actions = _this$props10.actions,
779
+ dblclickable = _this$props10.dblclickable;
771
780
  if (!this.canBeClicked(player, e) || !dblclickable) {
772
781
  return;
773
782
  }
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.20",
4
4
  "description": "Video Player Package for Contido Application",
5
5
  "main": "index.js",
6
6
  "scripts": {