@myinterview/widget-react 1.1.29-development-5e151f4 → 1.1.30-beta-4fa3a39

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/dist/cjs/index.js CHANGED
@@ -30258,7 +30258,7 @@ const configGenerator = () => {
30258
30258
  let release;
30259
30259
  try {
30260
30260
  environment !== null && environment !== void 0 ? environment : (environment = "staging");
30261
- release !== null && release !== void 0 ? release : (release = "1.1.29");
30261
+ release !== null && release !== void 0 ? release : (release = "1.1.30");
30262
30262
  }
30263
30263
  catch (_a) {
30264
30264
  console.error('sentry configGenerator error');
@@ -44144,27 +44144,29 @@ const recorderMachineV2 = createMachine({
44144
44144
  const audioDeviceId = context.selectedAudioDevice && context.selectedAudioDevice.deviceId;
44145
44145
  const videoDeviceId = context.selectedVideoDevice && context.selectedVideoDevice.deviceId;
44146
44146
  const isVideoOff = () => !!context.recordWithoutVideo;
44147
- const defaultConstraint = {
44147
+ const isMobileAspectForced = context.forcedView === 'mobile';
44148
+ const isDesktopAspectForced = context.forcedView === 'desktop';
44149
+ const defaultConstraints = {
44148
44150
  video: !isVideoOff(),
44149
44151
  audio: true,
44150
44152
  };
44151
- const mobileConstrains = {
44153
+ const mobileConstraints = {
44152
44154
  audio: {
44153
44155
  deviceId: audioDeviceId ? { exact: audioDeviceId } : undefined,
44154
44156
  },
44155
- video: isVideoOff() ? false : Object.assign(Object.assign({}, context.constraint.video), { facingMode: context.facingMode, aspectRatio: 4 / 3 }),
44157
+ video: isVideoOff() ? false : Object.assign(Object.assign({}, (!isDesktopAspectForced && context.constraint.video)), { facingMode: context.facingMode, aspectRatio: isDesktopAspectForced ? 9 / 16 : 4 / 3 }),
44156
44158
  };
44157
44159
  const desktopConstraints = {
44158
44160
  audio: {
44159
44161
  deviceId: audioDeviceId ? { exact: audioDeviceId } : undefined,
44160
44162
  },
44161
- video: isVideoOff() ? false : Object.assign(Object.assign({}, context.constraint.video), { deviceId: videoDeviceId ? { exact: videoDeviceId } : undefined, aspectRatio: 16 / 9 }),
44163
+ video: isVideoOff() ? false : Object.assign(Object.assign({}, (!isMobileAspectForced && context.constraint.video)), { deviceId: videoDeviceId ? { exact: videoDeviceId } : undefined, aspectRatio: isMobileAspectForced ? 3 / 4 : 16 / 9 }),
44162
44164
  };
44163
44165
  const constraintCheck = () => {
44164
44166
  if (context.isSafeMode)
44165
- return defaultConstraint;
44167
+ return defaultConstraints;
44166
44168
  if (isMobile)
44167
- return mobileConstrains;
44169
+ return mobileConstraints;
44168
44170
  return desktopConstraints;
44169
44171
  };
44170
44172
  const mediaStream = yield navigator.mediaDevices.getUserMedia(constraintCheck());
@@ -45664,7 +45666,7 @@ const accWidgetMachine = createMachine({
45664
45666
  storageRef: spawn(storageMachine, { name: 'storage' }),
45665
45667
  })),
45666
45668
  [ACTIONS$6.SPAWN_RECORDER]: assign$2((context) => ({
45667
- recorderRef: spawn(recorderMachineV2.withContext(Object.assign(Object.assign({}, recorderMachineV2.context), { videoRef: context.videoRef, speedTestLevel: SPEED_TEST_LEVEL.HIGH, recordWithoutVideo: context.widgetConfig.config.recordWithoutVideo })), { name: 'recorder' }),
45669
+ recorderRef: spawn(recorderMachineV2.withContext(Object.assign(Object.assign({}, recorderMachineV2.context), { videoRef: context.videoRef, speedTestLevel: SPEED_TEST_LEVEL.HIGH, recordWithoutVideo: context.widgetConfig.config.recordWithoutVideo, forcedView: context.widgetConfig.config.forcedView })), { name: 'recorder' }),
45668
45670
  })),
45669
45671
  [ACTIONS$6.SPAWN_PREVIEW]: assign$2((_) => ({
45670
45672
  previewRef: spawn(previewMachine, { name: 'preview' }),
@@ -48422,6 +48424,11 @@ const Main = ({ widgetConfig, setShouldShowWaterMark, myinterviewRef, isWidgetMi
48422
48424
  alignment: isRtl(job === null || job === void 0 ? void 0 : job.language) ? 'left' : 'right',
48423
48425
  });
48424
48426
  }
48427
+ SentryHub.configureScope((scope) => {
48428
+ scope.setTags({
48429
+ company_id: candidate === null || candidate === void 0 ? void 0 : candidate.company_id,
48430
+ });
48431
+ });
48425
48432
  }, [candidate, job === null || job === void 0 ? void 0 : job.language]);
48426
48433
  const setBackgroundOpacity = () => {
48427
48434
  var _a;
@@ -48610,7 +48617,10 @@ const Widget = React.forwardRef(({ candidate, job, video, config, disabled = fal
48610
48617
  ")"))), [styleUrls]);
48611
48618
  React.useEffect(() => {
48612
48619
  SentryHub.configureScope((scope) => {
48613
- scope.setUser(Object.assign({ email: candidate.email }, (isIphone && { iphone: getIPhoneModel() })));
48620
+ scope.setUser({
48621
+ email: candidate.email,
48622
+ });
48623
+ scope.setTags(Object.assign({}, (isIphone && { iphoneModel: getIPhoneModel() })));
48614
48624
  });
48615
48625
  }, [candidate.email]);
48616
48626
  React.useEffect(() => {