@cuemath/leap 3.4.5-aa5 → 3.4.5-aa6

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,43 +1,49 @@
1
- import { jsxs as s, jsx as e, Fragment as _ } from "react/jsx-runtime";
2
- import { useUserMedia as w } from "@cuemath/av";
3
- import { memo as P, useRef as S, useCallback as m, useEffect as X } from "react";
4
- import h from "../../ui/inputs/select-input/select-input.js";
1
+ import { jsxs as s, jsx as e, Fragment as O } from "react/jsx-runtime";
2
+ import { useUserMedia as P } from "@cuemath/av";
3
+ import { memo as S, useRef as X, useCallback as f, useEffect as D } from "react";
4
+ import b from "../../ui/inputs/select-input/select-input.js";
5
5
  import a from "../../ui/layout/flex-view.js";
6
- import b from "../../ui/text/text.js";
7
- import { AVErrorSOPWrapper as O, AVErrorStepList as V } from "./av-preview-styled.js";
8
- import E from "./hooks/use-get-troubleshooting-steps.js";
9
- const k = { audio: !0, video: !0 }, I = P(({ children: $, logger: v }) => {
10
- const n = S(null), {
11
- selectedAudioDevice: g,
12
- selectedVideoDevice: A,
13
- videoDeviceError: d,
14
- devices: u,
6
+ import x from "../../ui/text/text.js";
7
+ import { AVErrorSOPWrapper as V, AVErrorStepList as E } from "./av-preview-styled.js";
8
+ import k from "./hooks/use-get-troubleshooting-steps.js";
9
+ const I = { audio: !0, video: !0 }, G = S(({ children: y, logger: $, onDeviceUpdate: g }) => {
10
+ const n = X(null), {
11
+ selectedAudioDevice: d,
12
+ selectedVideoDevice: u,
13
+ videoDeviceError: c,
14
+ devices: l,
15
15
  changeDevice: o,
16
- selectedAudioOutputDevice: D,
17
- audioDeviceError: c,
18
- userMedia: l
19
- } = w(k), f = d === "permissionDeniedBySystem" || d === "permissionDenied" || c === "permissionDeniedBySystem" || c === "permissionDenied", p = E(c, d), x = m(
16
+ selectedAudioOutputDevice: p,
17
+ audioDeviceError: m,
18
+ userMedia: h
19
+ } = P(I), A = c === "permissionDeniedBySystem" || c === "permissionDenied" || m === "permissionDeniedBySystem" || m === "permissionDenied", v = k(m, c), C = f(
20
20
  (i) => o(i, "audio"),
21
21
  [o]
22
- ), y = m(
22
+ ), _ = f(
23
23
  (i) => o(i, "video"),
24
24
  [o]
25
- ), C = m(
25
+ ), w = f(
26
26
  (i) => {
27
27
  const t = n.current;
28
28
  o(i, "audiooutput"), t && "setSinkId" in t && t.setSinkId(i).catch((r) => {
29
- v("av_preview_set_audio_output_device_error", {
29
+ $("av_preview_set_audio_output_device_error", {
30
30
  deviceId: i,
31
31
  error_name: r == null ? void 0 : r.name,
32
32
  error_message: r == null ? void 0 : r.message
33
33
  });
34
34
  });
35
35
  },
36
- [o, v]
36
+ [o, $]
37
37
  );
38
- return X(() => {
39
- n.current && l && (n.current.srcObject = l);
40
- }, [l]), /* @__PURE__ */ s(a, { $flexDirection: "row", $flexGapX: 2, children: [
38
+ return D(() => {
39
+ g({
40
+ audio: d,
41
+ video: u,
42
+ audioOutput: p
43
+ });
44
+ }, [d, u, p, g]), D(() => {
45
+ n.current && h && (n.current.srcObject = h);
46
+ }, [h]), /* @__PURE__ */ s(a, { $flexDirection: "row", $flexGapX: 2, children: [
41
47
  /* @__PURE__ */ e(a, { $widthX: 26, $heightX: 19.5, $background: "BLACK_1", children: /* @__PURE__ */ e(
42
48
  "video",
43
49
  {
@@ -51,59 +57,59 @@ const k = { audio: !0, video: !0 }, I = P(({ children: $, logger: v }) => {
51
57
  }
52
58
  ) }),
53
59
  /* @__PURE__ */ s(a, { $position: "relative", $widthX: 22, $flexGapX: 1, $justifyContent: "space-between", children: [
54
- /* @__PURE__ */ e(a, { $flexGapX: 1, children: !f && /* @__PURE__ */ s(_, { children: [
60
+ /* @__PURE__ */ e(a, { $flexGapX: 1, children: !A && /* @__PURE__ */ s(O, { children: [
55
61
  /* @__PURE__ */ e(
56
- h,
62
+ b,
57
63
  {
58
64
  label: "Camera",
59
65
  renderAs: "primary",
60
66
  shape: "borderLess",
61
- options: u.video,
62
- value: A,
63
- onChange: y
67
+ options: l.video,
68
+ value: u,
69
+ onChange: _
64
70
  }
65
71
  ),
66
72
  /* @__PURE__ */ e(
67
- h,
73
+ b,
68
74
  {
69
75
  label: "Microphone",
70
76
  renderAs: "primary",
71
77
  shape: "borderLess",
72
- options: u.audio,
73
- value: g,
74
- onChange: x
78
+ options: l.audio,
79
+ value: d,
80
+ onChange: C
75
81
  }
76
82
  ),
77
83
  /* @__PURE__ */ e(
78
- h,
84
+ b,
79
85
  {
80
86
  label: "Speaker",
81
87
  renderAs: "primary",
82
88
  shape: "borderLess",
83
- options: u.audioOutput,
84
- value: D,
85
- onChange: C
89
+ options: l.audioOutput,
90
+ value: p,
91
+ onChange: w
86
92
  }
87
93
  ),
88
- /* @__PURE__ */ e("div", { children: $ })
94
+ /* @__PURE__ */ e("div", { children: y })
89
95
  ] }) }),
90
- p && /* @__PURE__ */ s(
91
- O,
96
+ v && /* @__PURE__ */ s(
97
+ V,
92
98
  {
93
99
  $background: "ORANGE_2",
94
100
  $gutterX: 1,
95
101
  $gapX: 1,
96
- $width: f ? "100%" : "272px",
102
+ $width: A ? "100%" : "272px",
97
103
  children: [
98
- /* @__PURE__ */ e(b, { $renderAs: "ab1-bold", $marginBottomX: 1, children: p.heading }),
99
- /* @__PURE__ */ e(V, { children: p.steps.map((i, t) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(b, { $renderAs: "ub1", children: i }) }, t)) })
104
+ /* @__PURE__ */ e(x, { $renderAs: "ab1-bold", $marginBottomX: 1, children: v.heading }),
105
+ /* @__PURE__ */ e(E, { children: v.steps.map((i, t) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(x, { $renderAs: "ub1", children: i }) }, t)) })
100
106
  ]
101
107
  }
102
108
  )
103
109
  ] })
104
110
  ] });
105
- }), N = I;
111
+ }), K = G;
106
112
  export {
107
- N as default
113
+ K as default
108
114
  };
109
115
  //# sourceMappingURL=av-preview.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"av-preview.js","sources":["../../../../src/features/av/av-preview/av-preview.tsx"],"sourcesContent":["import { useUserMedia } from '@cuemath/av';\nimport type { FC } from 'react';\nimport { memo, useCallback, useEffect, useRef } from 'react';\n\nimport SelectInput from '../../ui/inputs/select-input/select-input';\nimport FlexView from '../../ui/layout/flex-view';\nimport Text from '../../ui/text/text';\nimport * as Styled from './av-preview-styled';\nimport type { ILogger } from './av-preview-types';\nimport useGetTroubleshootingInfo from './hooks/use-get-troubleshooting-steps';\n\ninterface IAVPreviewProps {\n children?: React.ReactNode;\n logger: ILogger;\n}\nconst OPTIONS = { audio: true, video: true };\n\nconst AVPreview: FC<IAVPreviewProps> = memo(({ children, logger }) => {\n const videoRef = useRef<HTMLVideoElement>(null);\n const {\n selectedAudioDevice,\n selectedVideoDevice,\n videoDeviceError,\n devices,\n changeDevice,\n selectedAudioOutputDevice,\n audioDeviceError,\n userMedia,\n } = useUserMedia(OPTIONS);\n\n const hasPermissionProblem =\n videoDeviceError === 'permissionDeniedBySystem' ||\n videoDeviceError === 'permissionDenied' ||\n audioDeviceError === 'permissionDeniedBySystem' ||\n audioDeviceError === 'permissionDenied';\n const troubleshootingInfo = useGetTroubleshootingInfo(audioDeviceError, videoDeviceError);\n\n const handleAudioDeviceChange = useCallback(\n (deviceId: string) => changeDevice(deviceId, 'audio'),\n [changeDevice],\n );\n\n const handleVideoDeviceChange = useCallback(\n (deviceId: string) => changeDevice(deviceId, 'video'),\n [changeDevice],\n );\n\n const handleAudioOutputDeviceChange = useCallback(\n (deviceId: string) => {\n const videoEl = videoRef.current;\n\n changeDevice(deviceId, 'audiooutput');\n if (videoEl && 'setSinkId' in videoEl) {\n videoEl.setSinkId(deviceId).catch(error => {\n logger('av_preview_set_audio_output_device_error', {\n deviceId,\n error_name: error?.name,\n error_message: error?.message,\n });\n });\n }\n },\n [changeDevice, logger],\n );\n\n useEffect(() => {\n if (videoRef.current && userMedia) {\n videoRef.current.srcObject = userMedia;\n }\n }, [userMedia]);\n\n return (\n <FlexView $flexDirection=\"row\" $flexGapX={2}>\n <FlexView $widthX={26} $heightX={19.5} $background=\"BLACK_1\">\n <video\n ref={videoRef}\n id=\"localVideo\"\n autoPlay\n playsInline\n controls={false}\n muted={true}\n disablePictureInPicture\n />\n </FlexView>\n <FlexView $position=\"relative\" $widthX={22} $flexGapX={1} $justifyContent=\"space-between\">\n <FlexView $flexGapX={1}>\n {!hasPermissionProblem && (\n <>\n <SelectInput\n label=\"Camera\"\n renderAs=\"primary\"\n shape=\"borderLess\"\n options={devices.video}\n value={selectedVideoDevice}\n onChange={handleVideoDeviceChange}\n />\n <SelectInput\n label=\"Microphone\"\n renderAs=\"primary\"\n shape=\"borderLess\"\n options={devices.audio}\n value={selectedAudioDevice}\n onChange={handleAudioDeviceChange}\n />\n <SelectInput\n label=\"Speaker\"\n renderAs=\"primary\"\n shape=\"borderLess\"\n options={devices.audioOutput}\n value={selectedAudioOutputDevice}\n onChange={handleAudioOutputDeviceChange}\n />\n <div>{children}</div>\n </>\n )}\n </FlexView>\n {troubleshootingInfo && (\n <Styled.AVErrorSOPWrapper\n $background=\"ORANGE_2\"\n $gutterX={1}\n $gapX={1}\n $width={hasPermissionProblem ? '100%' : '272px'}\n >\n <Text $renderAs=\"ab1-bold\" $marginBottomX={1}>\n {troubleshootingInfo.heading}\n </Text>\n <Styled.AVErrorStepList>\n {troubleshootingInfo.steps.map((step, index) => (\n <li key={index}>\n <Text $renderAs=\"ub1\">{step}</Text>\n </li>\n ))}\n </Styled.AVErrorStepList>\n </Styled.AVErrorSOPWrapper>\n )}\n </FlexView>\n </FlexView>\n );\n});\n\nexport default AVPreview;\n"],"names":["OPTIONS","AVPreview","memo","children","logger","videoRef","useRef","selectedAudioDevice","selectedVideoDevice","videoDeviceError","devices","changeDevice","selectedAudioOutputDevice","audioDeviceError","userMedia","useUserMedia","hasPermissionProblem","troubleshootingInfo","useGetTroubleshootingInfo","handleAudioDeviceChange","useCallback","deviceId","handleVideoDeviceChange","handleAudioOutputDeviceChange","videoEl","error","useEffect","jsxs","FlexView","jsx","Fragment","SelectInput","Styled.AVErrorSOPWrapper","Text","Styled.AVErrorStepList","step","index","AVPreview$1"],"mappings":";;;;;;;;AAeA,MAAMA,IAAU,EAAE,OAAO,IAAM,OAAO,GAAK,GAErCC,IAAiCC,EAAK,CAAC,EAAE,UAAAC,GAAU,QAAAC,QAAa;AAC9D,QAAAC,IAAWC,EAAyB,IAAI,GACxC;AAAA,IACJ,qBAAAC;AAAA,IACA,qBAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,SAAAC;AAAA,IACA,cAAAC;AAAA,IACA,2BAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,WAAAC;AAAA,EAAA,IACEC,EAAaf,CAAO,GAElBgB,IACJP,MAAqB,8BACrBA,MAAqB,sBACrBI,MAAqB,8BACrBA,MAAqB,oBACjBI,IAAsBC,EAA0BL,GAAkBJ,CAAgB,GAElFU,IAA0BC;AAAA,IAC9B,CAACC,MAAqBV,EAAaU,GAAU,OAAO;AAAA,IACpD,CAACV,CAAY;AAAA,EAAA,GAGTW,IAA0BF;AAAA,IAC9B,CAACC,MAAqBV,EAAaU,GAAU,OAAO;AAAA,IACpD,CAACV,CAAY;AAAA,EAAA,GAGTY,IAAgCH;AAAA,IACpC,CAACC,MAAqB;AACpB,YAAMG,IAAUnB,EAAS;AAEzB,MAAAM,EAAaU,GAAU,aAAa,GAChCG,KAAW,eAAeA,KAC5BA,EAAQ,UAAUH,CAAQ,EAAE,MAAM,CAASI,MAAA;AACzC,QAAArB,EAAO,4CAA4C;AAAA,UACjD,UAAAiB;AAAA,UACA,YAAYI,KAAA,gBAAAA,EAAO;AAAA,UACnB,eAAeA,KAAA,gBAAAA,EAAO;AAAA,QAAA,CACvB;AAAA,MAAA,CACF;AAAA,IAEL;AAAA,IACA,CAACd,GAAcP,CAAM;AAAA,EAAA;AAGvB,SAAAsB,EAAU,MAAM;AACV,IAAArB,EAAS,WAAWS,MACtBT,EAAS,QAAQ,YAAYS;AA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AAA,UACC,aAAY;AAAA,UACZ,UAAU;AAAA,UACV,OAAO;AAAA,UACP,QAAQhB,IAAuB,SAAS;AAAA,UAExC,UAAA;AAAA,YAAA,gBAAAa,EAACI,KAAK,WAAU,YAAW,gBAAgB,GACxC,YAAoB,SACvB;AAAA,YACA,gBAAAJ,EAACK,GAAA,EACE,YAAoB,MAAM,IAAI,CAACC,GAAMC,wBACnC,MACC,EAAA,UAAA,gBAAAP,EAACI,KAAK,WAAU,OAAO,aAAK,EADrB,GAAAG,CAET,CACD,EACH,CAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MACF;AAAA,IAAA,GAEJ;AAAA,EACF,EAAA,CAAA;AAEJ,CAAC,GAEDC,IAAepC;"}
1
+ {"version":3,"file":"av-preview.js","sources":["../../../../src/features/av/av-preview/av-preview.tsx"],"sourcesContent":["import { useUserMedia } from '@cuemath/av';\nimport type { FC } from 'react';\nimport { memo, useCallback, useEffect, useRef } from 'react';\n\nimport SelectInput from '../../ui/inputs/select-input/select-input';\nimport FlexView from '../../ui/layout/flex-view';\nimport Text from '../../ui/text/text';\nimport * as Styled from './av-preview-styled';\nimport type { ILogger } from './av-preview-types';\nimport useGetTroubleshootingInfo from './hooks/use-get-troubleshooting-steps';\n\ninterface IAVPreviewProps {\n children?: React.ReactNode;\n logger: ILogger;\n onDeviceUpdate: (selectedDevices: {\n audio?: string;\n video?: string;\n audioOutput?: string;\n }) => void;\n}\nconst OPTIONS = { audio: true, video: true };\n\nconst AVPreview: FC<IAVPreviewProps> = memo(({ children, logger, onDeviceUpdate }) => {\n const videoRef = useRef<HTMLVideoElement>(null);\n const {\n selectedAudioDevice,\n selectedVideoDevice,\n videoDeviceError,\n devices,\n changeDevice,\n selectedAudioOutputDevice,\n audioDeviceError,\n userMedia,\n } = useUserMedia(OPTIONS);\n\n const hasPermissionProblem =\n videoDeviceError === 'permissionDeniedBySystem' ||\n videoDeviceError === 'permissionDenied' ||\n audioDeviceError === 'permissionDeniedBySystem' ||\n audioDeviceError === 'permissionDenied';\n const troubleshootingInfo = useGetTroubleshootingInfo(audioDeviceError, videoDeviceError);\n\n const handleAudioDeviceChange = useCallback(\n (deviceId: string) => changeDevice(deviceId, 'audio'),\n [changeDevice],\n );\n\n const handleVideoDeviceChange = useCallback(\n (deviceId: string) => changeDevice(deviceId, 'video'),\n [changeDevice],\n );\n\n const handleAudioOutputDeviceChange = useCallback(\n (deviceId: string) => {\n const videoEl = videoRef.current;\n\n changeDevice(deviceId, 'audiooutput');\n if (videoEl && 'setSinkId' in videoEl) {\n videoEl.setSinkId(deviceId).catch(error => {\n logger('av_preview_set_audio_output_device_error', {\n deviceId,\n error_name: error?.name,\n error_message: error?.message,\n });\n });\n }\n },\n [changeDevice, logger],\n );\n\n // Call onDeviceUpdate when devices or selected devices change\n useEffect(() => {\n onDeviceUpdate({\n audio: selectedAudioDevice,\n video: selectedVideoDevice,\n audioOutput: selectedAudioOutputDevice,\n });\n }, [selectedAudioDevice, selectedVideoDevice, selectedAudioOutputDevice, onDeviceUpdate]);\n\n useEffect(() => {\n if (videoRef.current && userMedia) {\n videoRef.current.srcObject = userMedia;\n }\n }, [userMedia]);\n\n return (\n <FlexView $flexDirection=\"row\" $flexGapX={2}>\n <FlexView $widthX={26} $heightX={19.5} $background=\"BLACK_1\">\n <video\n ref={videoRef}\n id=\"localVideo\"\n autoPlay\n playsInline\n controls={false}\n muted={true}\n disablePictureInPicture\n />\n </FlexView>\n <FlexView $position=\"relative\" $widthX={22} $flexGapX={1} $justifyContent=\"space-between\">\n <FlexView $flexGapX={1}>\n {!hasPermissionProblem && (\n <>\n <SelectInput\n label=\"Camera\"\n renderAs=\"primary\"\n shape=\"borderLess\"\n options={devices.video}\n value={selectedVideoDevice}\n onChange={handleVideoDeviceChange}\n />\n <SelectInput\n label=\"Microphone\"\n renderAs=\"primary\"\n shape=\"borderLess\"\n options={devices.audio}\n value={selectedAudioDevice}\n onChange={handleAudioDeviceChange}\n />\n <SelectInput\n label=\"Speaker\"\n renderAs=\"primary\"\n shape=\"borderLess\"\n options={devices.audioOutput}\n value={selectedAudioOutputDevice}\n onChange={handleAudioOutputDeviceChange}\n />\n <div>{children}</div>\n </>\n )}\n </FlexView>\n {troubleshootingInfo && (\n <Styled.AVErrorSOPWrapper\n $background=\"ORANGE_2\"\n $gutterX={1}\n $gapX={1}\n $width={hasPermissionProblem ? '100%' : '272px'}\n >\n <Text $renderAs=\"ab1-bold\" $marginBottomX={1}>\n {troubleshootingInfo.heading}\n </Text>\n <Styled.AVErrorStepList>\n {troubleshootingInfo.steps.map((step, index) => (\n <li key={index}>\n <Text $renderAs=\"ub1\">{step}</Text>\n </li>\n ))}\n </Styled.AVErrorStepList>\n </Styled.AVErrorSOPWrapper>\n )}\n </FlexView>\n </FlexView>\n );\n});\n\nexport default AVPreview;\n"],"names":["OPTIONS","AVPreview","memo","children","logger","onDeviceUpdate","videoRef","useRef","selectedAudioDevice","selectedVideoDevice","videoDeviceError","devices","changeDevice","selectedAudioOutputDevice","audioDeviceError","userMedia","useUserMedia","hasPermissionProblem","troubleshootingInfo","useGetTroubleshootingInfo","handleAudioDeviceChange","useCallback","deviceId","handleVideoDeviceChange","handleAudioOutputDeviceChange","videoEl","error","useEffect","jsxs","FlexView","jsx","Fragment","SelectInput","Styled.AVErrorSOPWrapper","Text","Styled.AVErrorStepList","step","index","AVPreview$1"],"mappings":";;;;;;;;AAoBA,MAAMA,IAAU,EAAE,OAAO,IAAM,OAAO,GAAK,GAErCC,IAAiCC,EAAK,CAAC,EAAE,UAAAC,GAAU,QAAAC,GAAQ,gBAAAC,QAAqB;AAC9E,QAAAC,IAAWC,EAAyB,IAAI,GACxC;AAAA,IACJ,qBAAAC;AAAA,IACA,qBAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,SAAAC;AAAA,IACA,cAAAC;AAAA,IACA,2BAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,WAAAC;AAAA,EAAA,IACEC,EAAahB,CAAO,GAElBiB,IACJP,MAAqB,8BACrB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,GAAAG,CAET,CACD,EACH,CAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MACF;AAAA,IAAA,GAEJ;AAAA,EACF,EAAA,CAAA;AAEJ,CAAC,GAEDC,IAAerC;"}
package/dist/index.d.ts CHANGED
@@ -943,6 +943,11 @@ declare interface IAvatarProps {
943
943
  declare interface IAVPreviewProps {
944
944
  children?: React.ReactNode;
945
945
  logger: ILogger;
946
+ onDeviceUpdate: (selectedDevices: {
947
+ audio?: string;
948
+ video?: string;
949
+ audioOutput?: string;
950
+ }) => void;
946
951
  }
947
952
 
948
953
  declare interface IBaseInputProps {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cuemath/leap",
3
- "version": "3.4.5-aa5",
3
+ "version": "3.4.5-aa6",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"