@myinterview/widget-react 1.1.23-beta-df99642 → 1.1.23-beta-78ffddc

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.
@@ -1,8 +1,8 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  interface CountDownProps {
3
3
  countDown: number;
4
4
  forceMobileCounter?: boolean;
5
5
  numberOfSecondsToHighlight?: number;
6
6
  }
7
- export declare const CountDown: ({ countDown, forceMobileCounter, numberOfSecondsToHighlight }: CountDownProps) => JSX.Element;
7
+ export declare const CountDown: ({ countDown, forceMobileCounter, numberOfSecondsToHighlight }: CountDownProps) => React.JSX.Element;
8
8
  export {};
@@ -1,8 +1,8 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  interface CounterProps {
3
3
  counter: number;
4
4
  limit: number;
5
5
  isRecording: boolean;
6
6
  }
7
- export declare const Counter: ({ counter, limit, isRecording }: CounterProps) => JSX.Element;
7
+ export declare const Counter: ({ counter, limit, isRecording }: CounterProps) => React.JSX.Element;
8
8
  export {};
@@ -9,4 +9,4 @@ export interface IDeviceSelectorProps {
9
9
  myinterviewRef: React.RefObject<HTMLDivElement>;
10
10
  recordWithoutVideo?: boolean;
11
11
  }
12
- export declare const DeviceSelector: ({ handleDeviceChange, videoDevices, audioDevices, selectedAudioDevice, selectedVideoDevice, myinterviewRef, recordWithoutVideo, }: IDeviceSelectorProps) => JSX.Element;
12
+ export declare const DeviceSelector: ({ handleDeviceChange, videoDevices, audioDevices, selectedAudioDevice, selectedVideoDevice, myinterviewRef, recordWithoutVideo, }: IDeviceSelectorProps) => React.JSX.Element;
package/dist/cjs/index.js CHANGED
@@ -30354,7 +30354,12 @@ const DEVICE = {
30354
30354
  PLATFORM: PLATFORMS_OPTIONS.find((p) => { var _a, _b; return (_b = (_a = platform.os) === null || _a === void 0 ? void 0 : _a.family) === null || _b === void 0 ? void 0 : _b.toUpperCase().includes(p === 'MACBOOK' ? 'OS X' : p); }) || 'WINDOWS',
30355
30355
  BROWSER: BROWSERS_OPTIONS.find((b) => { var _a; return (_a = platform.name) === null || _a === void 0 ? void 0 : _a.toUpperCase().includes(b); }) || 'CHROME',
30356
30356
  };
30357
- const isPortrait = () => !screen.orientation.type.startsWith('landscape');
30357
+ const isPortrait = () => {
30358
+ if (typeof window.matchMedia !== 'undefined') {
30359
+ return window.matchMedia('(orientation: portrait)').matches;
30360
+ }
30361
+ return window.innerHeight > window.innerWidth;
30362
+ };
30358
30363
  const iPhoneModels = [
30359
30364
  { pixelRatio: 2, width: 640, height: 1136, model: 'iPhone SE (1st generation)' },
30360
30365
  { pixelRatio: 2, width: 750, height: 1334, model: 'iPhone SE (2nd generation)/6/6S/7/8' },
@@ -43505,7 +43510,9 @@ var AsapAction = (function (_super) {
43505
43510
  var actions = scheduler.actions;
43506
43511
  if (id != null && ((_a = actions[actions.length - 1]) === null || _a === void 0 ? void 0 : _a.id) !== id) {
43507
43512
  immediateProvider.clearImmediate(id);
43508
- scheduler._scheduled = undefined;
43513
+ if (scheduler._scheduled === id) {
43514
+ scheduler._scheduled = undefined;
43515
+ }
43509
43516
  }
43510
43517
  return undefined;
43511
43518
  };
@@ -44326,7 +44333,7 @@ const recorderMachineV2 = createMachine({
44326
44333
  audio: {
44327
44334
  deviceId: audioDeviceId ? { exact: audioDeviceId } : undefined,
44328
44335
  },
44329
- video: isVideoOff() ? false : Object.assign(Object.assign({}, context.constraint.video), { deviceId: videoDeviceId ? { exact: videoDeviceId } : undefined, aspectRatio: 16 / 9 }),
44336
+ video: isVideoOff() ? false : Object.assign(Object.assign({}, context.constraint.video), { facingMode: context.facingMode, aspectRatio: 4 / 3 }),
44330
44337
  };
44331
44338
  const desktopConstraints = {
44332
44339
  audio: {