@desynova-digital/player 4.0.94 → 4.0.95

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.
@@ -272,7 +272,7 @@ var Player = exports["default"] = /*#__PURE__*/function (_Component) {
272
272
  _this.actions.handlePlayerType(props.playerType);
273
273
  _this.actions.handleControlType(props.controlType);
274
274
  if (_this.props.fullScreenRef) {
275
- _this.props.fullScreenRef.current = _this;
275
+ _this.props.fullScreenRef.current.player = _this;
276
276
  }
277
277
  return _this;
278
278
  }
@@ -476,6 +476,8 @@ var Player = exports["default"] = /*#__PURE__*/function (_Component) {
476
476
  key: "progress-control",
477
477
  order: 3
478
478
  })), /*#__PURE__*/_react["default"].createElement(_RenderCommentMarkers["default"], _extends({
479
+ isRightMenuVisible: isRightMenuVisible,
480
+ fullScreenRef: this.props.fullScreenRef,
479
481
  duration: fullProps === null || fullProps === void 0 || (_fullProps$player = fullProps.player) === null || _fullProps$player === void 0 ? void 0 : _fullProps$player.duration,
480
482
  playerType: fullProps.playerType,
481
483
  isFullscreen: fullProps === null || fullProps === void 0 || (_fullProps$player2 = fullProps.player) === null || _fullProps$player2 === void 0 ? void 0 : _fullProps$player2.isFullscreen,
@@ -47,12 +47,17 @@ var CameraButton = /*#__PURE__*/function (_Component) {
47
47
  value: function handleClick() {
48
48
  var _this$props = this.props,
49
49
  onTakeSnapshot = _this$props.onTakeSnapshot,
50
- video = _this$props.video;
50
+ video = _this$props.video,
51
+ onRightMenuVisible = _this$props.onRightMenuVisible,
52
+ actions = _this$props.actions,
53
+ player = _this$props.player;
51
54
  var timeObj = {
52
- "thumbnail": (0, _utils.secondsToTime)(this.props.video.currentTime, this.props.frameRate, this.props.initialTime),
53
- "thumbnail_seconds": this.props.video.currentTime
55
+ thumbnail: (0, _utils.secondsToTime)(this.props.video.currentTime, this.props.frameRate, this.props.initialTime),
56
+ thumbnail_seconds: this.props.video.currentTime
54
57
  };
55
58
  onTakeSnapshot(timeObj);
59
+ actions.toggleRightBar(player, true);
60
+ onRightMenuVisible(true);
56
61
  }
57
62
  }, {
58
63
  key: "render",
@@ -48,13 +48,13 @@ var MarkerLine = _styledComponents["default"].div(_templateObject4 || (_template
48
48
  HOVER BOX
49
49
  ---------------------------------------------------------- */
50
50
 
51
- var HoverScroll = _styledComponents["default"].div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n overflow-y: auto;\n max-height: 360px; /* 400 total - header height */\n \n /* Hide scrollbar everywhere */\n scrollbar-width: none; \n -ms-overflow-style: none; \n &::-webkit-scrollbar {\n display: none;\n }\n"])));
51
+ var HoverScroll = _styledComponents["default"].div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n overflow-y: auto;\n max-height: 360px; /* 400 total - header height */\n\n /* Hide scrollbar everywhere */\n scrollbar-width: none;\n -ms-overflow-style: none;\n &::-webkit-scrollbar {\n display: none;\n }\n"])));
52
52
  var HoverBox = _styledComponents["default"].div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n position: absolute;\n bottom: 40px;\n left: 0;\n right: auto !important;\n width: max-content;\n\n background: #303f51;\n border: 2px solid rgba(255, 255, 255, 0.15);\n backdrop-filter: blur(12px);\n border-radius: 12px;\n padding: 0;\n color: white;\n z-index: 999999;\n box-shadow: 0 6px 22px rgba(0, 0, 0, 0.32);\n animation: fadeInBox 0.18s ease-out;\n\n display: flex;\n flex-direction: column;\n\n min-width: 180px;\n max-width: 220px;\n max-height: 400px;\n overflow: hidden; /* prevent scroll at root */\n"])));
53
53
  var HoverHeader = _styledComponents["default"].div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n background: #3e6673;\n color: #00cec6;\n font-size: 12px;\n font-weight: 700;\n padding: 10px 12px;\n border-top-left-radius: 12px;\n border-top-right-radius: 12px;\n font-family: SFUIText-Regular;\n\n position: sticky;\n top: 0;\n z-index: 2; /* must be above scroll content */\n\n width: 100%;\n box-sizing: border-box;\n"])));
54
54
  var HoverComment = _styledComponents["default"].div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n padding: 12px 14px;\n background: transparent;\n transition: background 0.15s ease, transform 0.15s ease;\n border-radius: 6px;\n position: relative;\n\n /* FIX */\n width: 100%;\n max-width: 100%;\n box-sizing: border-box;\n\n &:hover {\n background: rgba(255, 255, 255, 0.07);\n }\n\n &:not(:last-child)::after {\n content: '';\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 1.3px;\n background: rgba(255, 255, 255, 0.12);\n }\n"])));
55
55
  var HoverName = _styledComponents["default"].div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n color: #afb2ba;\n font-family: SFUIText-Regular;\n font-size: 12px;\n font-weight: 700;\n margin-bottom: 6px;\n text-transform: capitalize;\n"])));
56
56
  var HoverTime = _styledComponents["default"].div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n font-family: SFUIText-Regular;\n font-size: 11px;\n color: #9fa4ad;\n margin-bottom: 6px;\n"])));
57
- var HoverText = _styledComponents["default"].div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n font-family: SFUIText-Light;\n font-size: 14px;\n font-weight: 300;\n color: #ffffff;\n line-height: 18px;\n display: block;\n white-space: normal;\n overflow: visible;\n text-overflow: unset;\n\n /* FIX */\n width: 100%;\n max-width: 100%;\n box-sizing: border-box;\n"])));
57
+ var HoverText = _styledComponents["default"].div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n font-family: SFUIText-Light;\n font-size: 14px;\n font-weight: 300;\n color: #ffffff;\n line-height: 18px;\n display: block;\n white-space: normal;\n overflow: visible;\n text-overflow: unset;\n\n /* FIX */\n width: 100%;\n max-width: 100%;\n box-sizing: border-box;\n"])));
58
58
 
59
59
  /* ----------------------------------------------------------
60
60
  UTILITIES (FIXED)
@@ -101,7 +101,9 @@ var RenderCommentMarkers = function RenderCommentMarkers(_ref) {
101
101
  onRightMenuVisible = _ref.onRightMenuVisible,
102
102
  actions = _ref.actions,
103
103
  player = _ref.player,
104
- frameRate = _ref.frameRate;
104
+ frameRate = _ref.frameRate,
105
+ fullScreenRef = _ref.fullScreenRef,
106
+ isRightMenuVisible = _ref.isRightMenuVisible;
105
107
  if (!['snp_edit', 'pgm_edit'].includes(playerType)) return null;
106
108
  var _useState = (0, _react.useState)(null),
107
109
  _useState2 = _slicedToArray(_useState, 2),
@@ -141,6 +143,10 @@ var RenderCommentMarkers = function RenderCommentMarkers(_ref) {
141
143
  (acc[key] = acc[key] || []).push(item);
142
144
  return acc;
143
145
  }, {});
146
+ var originalIndexMap = new Map();
147
+ data.forEach(function (item, i) {
148
+ originalIndexMap.set(item.id, i);
149
+ });
144
150
  var containerWidth = (_containerRef$current = containerRef.current) === null || _containerRef$current === void 0 ? void 0 : _containerRef$current.offsetWidth;
145
151
  return /*#__PURE__*/_react["default"].createElement(MarkerTimeline, {
146
152
  ref: containerRef
@@ -210,8 +216,10 @@ var RenderCommentMarkers = function RenderCommentMarkers(_ref) {
210
216
  return /*#__PURE__*/_react["default"].createElement(HoverComment, {
211
217
  key: c.id,
212
218
  onClick: function onClick(e) {
219
+ var _fullScreenRef$curren, _fullScreenRef$curren2;
213
220
  e.stopPropagation();
214
221
  onSegmentClick(c.value.in_time, c.value.out_time, false);
222
+ (_fullScreenRef$curren = fullScreenRef.current.timeline) === null || _fullScreenRef$curren === void 0 || (_fullScreenRef$curren2 = _fullScreenRef$curren.handleTimelineIndex) === null || _fullScreenRef$curren2 === void 0 || _fullScreenRef$curren2.call(_fullScreenRef$curren, originalIndexMap.get(c.id));
215
223
  onRightMenuVisible(true);
216
224
  actions.toggleRightBar(player, true);
217
225
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@desynova-digital/player",
3
- "version": "4.0.94",
3
+ "version": "4.0.95",
4
4
  "description": "Video Player Package for Contido Application",
5
5
  "main": "index.js",
6
6
  "scripts": {