luna-one 3.1.554 → 3.1.555

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.
@@ -409,7 +409,7 @@ var renderVideo = function renderVideo(video, thumbnail, hovering, modalDeployed
409
409
  var setOverride = arguments.length > 19 ? arguments[19] : undefined;
410
410
  var setVisible = arguments.length > 20 ? arguments[20] : undefined;
411
411
 
412
- var _useState = (0, _react.useState)(true),
412
+ var _useState = (0, _react.useState)(false),
413
413
  _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
414
414
  isPaused = _useState2[0],
415
415
  setIsPaused = _useState2[1];
@@ -505,8 +505,18 @@ var renderVideo = function renderVideo(video, thumbnail, hovering, modalDeployed
505
505
  togglePlaying(true);
506
506
  },
507
507
  onPlay: function onPlay(videoProgress) {
508
+ var _player$current3, _content$video10;
509
+
508
510
  setIsPaused(false);
509
511
  togglePlaying(true);
512
+ setVideoProgress({
513
+ type: type,
514
+ eventType: event,
515
+ playedSeconds: playedSeconds,
516
+ video_action: "playing",
517
+ length: player === null || player === void 0 ? void 0 : (_player$current3 = player.current) === null || _player$current3 === void 0 ? void 0 : _player$current3.getDuration(),
518
+ title: content === null || content === void 0 ? void 0 : (_content$video10 = content.video) === null || _content$video10 === void 0 ? void 0 : _content$video10.videoTitle
519
+ });
510
520
  },
511
521
  onPause: function onPause(videoProgress) {
512
522
  setIsPaused(true);
@@ -102,39 +102,22 @@ var VidyardModal = /*#__PURE__*/function (_Component) {
102
102
 
103
103
  var paused = true;
104
104
  VidyardEmbed === null || VidyardEmbed === void 0 ? void 0 : (_VidyardEmbed$api2 = VidyardEmbed.api) === null || _VidyardEmbed$api2 === void 0 ? void 0 : _VidyardEmbed$api2.progressEvents(function (_ref) {
105
- var _this2$props3, _player$metadata2, _this2$props4;
105
+ var _this2$props, _player$metadata, _this2$props2;
106
106
 
107
107
  var chapter = _ref.chapter,
108
108
  event = _ref.event,
109
109
  player = _ref.player;
110
- player === null || player === void 0 ? void 0 : player.on("pause", function () {
111
- var _this2$props, _player$metadata, _this2$props2;
112
-
113
- paused = true;
114
- _this2 === null || _this2 === void 0 ? void 0 : (_this2$props = _this2.props) === null || _this2$props === void 0 ? void 0 : _this2$props.setVideoProgress({
115
- playedPercentage: event,
116
- id: player === null || player === void 0 ? void 0 : player.uuid,
117
- name: player === null || player === void 0 ? void 0 : (_player$metadata = player.metadata) === null || _player$metadata === void 0 ? void 0 : _player$metadata.name,
118
- video_action: "paused",
119
- videoProvider: "vidyard",
120
- type: (_this2$props2 = _this2.props) === null || _this2$props2 === void 0 ? void 0 : _this2$props2.type,
121
- title: _this2.props.video.videoTitle
122
- });
123
- });
124
- player === null || player === void 0 ? void 0 : player.on("play", function () {
125
- paused = false;
126
- });
127
110
  var name = player.metadata.chapters_attributes[chapter].video_attributes.name;
128
- _this2 === null || _this2 === void 0 ? void 0 : (_this2$props3 = _this2.props) === null || _this2$props3 === void 0 ? void 0 : _this2$props3.setVideoProgress({
111
+ _this2 === null || _this2 === void 0 ? void 0 : (_this2$props = _this2.props) === null || _this2$props === void 0 ? void 0 : _this2$props.setVideoProgress({
129
112
  playedPercentage: event,
130
113
  id: player === null || player === void 0 ? void 0 : player.uuid,
131
- name: player === null || player === void 0 ? void 0 : (_player$metadata2 = player.metadata) === null || _player$metadata2 === void 0 ? void 0 : _player$metadata2.name,
114
+ name: player === null || player === void 0 ? void 0 : (_player$metadata = player.metadata) === null || _player$metadata === void 0 ? void 0 : _player$metadata.name,
132
115
  video_action: "on-going",
133
116
  videoProvider: "vidyard",
134
- type: (_this2$props4 = _this2.props) === null || _this2$props4 === void 0 ? void 0 : _this2$props4.type,
117
+ type: (_this2$props2 = _this2.props) === null || _this2$props2 === void 0 ? void 0 : _this2$props2.type,
135
118
  title: _this2.props.video.videoTitle
136
119
  });
137
- }, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100]);
120
+ }, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100]);
138
121
  }
139
122
  }
140
123
  }, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "luna-one",
3
- "version": "3.1.554",
3
+ "version": "3.1.555",
4
4
  "peerDependencies": {
5
5
  "react": "^17.0.2",
6
6
  "react-dom": "^17.0.2",