@100mslive/roomkit-react 0.3.14-alpha.5 → 0.3.14-alpha.7
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/Diagnostics/BrowserTest.d.ts +5 -0
- package/dist/Diagnostics/components.d.ts +2 -0
- package/dist/{HLSView-AV4CONPM.js → HLSView-RRYP5FV5.js} +2 -2
- package/dist/{HLSView-HMJGKVNU.css → HLSView-YIIBVIYC.css} +3 -3
- package/dist/{HLSView-HMJGKVNU.css.map → HLSView-YIIBVIYC.css.map} +1 -1
- package/dist/Prebuilt/App.d.ts +1 -2
- package/dist/{chunk-W6E3MUWX.js → chunk-DR5OAQOV.js} +846 -787
- package/dist/chunk-DR5OAQOV.js.map +7 -0
- package/dist/index.cjs.css +2 -2
- package/dist/index.cjs.css.map +1 -1
- package/dist/index.cjs.js +811 -752
- package/dist/index.cjs.js.map +4 -4
- package/dist/index.css +2 -2
- package/dist/index.css.map +1 -1
- package/dist/index.js +1 -1
- package/dist/meta.cjs.json +28 -28
- package/dist/meta.esbuild.json +38 -38
- package/package.json +7 -7
- package/src/Diagnostics/AudioTest.tsx +55 -41
- package/src/Diagnostics/BrowserTest.tsx +9 -4
- package/src/Diagnostics/ConnectivityTest.tsx +5 -2
- package/src/Diagnostics/Diagnostics.tsx +11 -10
- package/src/Diagnostics/VideoTest.tsx +3 -3
- package/src/Diagnostics/components.tsx +12 -0
- package/src/Prebuilt/App.tsx +1 -9
- package/dist/chunk-W6E3MUWX.js.map +0 -7
- /package/dist/{HLSView-AV4CONPM.js.map → HLSView-RRYP5FV5.js.map} +0 -0
package/dist/meta.esbuild.json
CHANGED
@@ -4951,7 +4951,7 @@
|
|
4951
4951
|
"format": "cjs"
|
4952
4952
|
},
|
4953
4953
|
"../hms-video-store/dist/index.js": {
|
4954
|
-
"bytes":
|
4954
|
+
"bytes": 355745,
|
4955
4955
|
"imports": [
|
4956
4956
|
{
|
4957
4957
|
"path": "../../node_modules/reselect/es/index.js",
|
@@ -10974,7 +10974,7 @@
|
|
10974
10974
|
],
|
10975
10975
|
"format": "esm"
|
10976
10976
|
},
|
10977
|
-
"../../../../../../../tmp/tmp-
|
10977
|
+
"../../../../../../../tmp/tmp-2777-zkWjkXYni4cX/19035d7bc873/tldraw.css": {
|
10978
10978
|
"bytes": 80111,
|
10979
10979
|
"imports": [
|
10980
10980
|
{
|
@@ -11024,7 +11024,7 @@
|
|
11024
11024
|
}
|
11025
11025
|
]
|
11026
11026
|
},
|
11027
|
-
"../../../../../../../tmp/tmp-
|
11027
|
+
"../../../../../../../tmp/tmp-2777-zkWjkXYni4cX/19035d7bc181/index.css": {
|
11028
11028
|
"bytes": 597,
|
11029
11029
|
"imports": [
|
11030
11030
|
{
|
@@ -11033,7 +11033,7 @@
|
|
11033
11033
|
"external": true
|
11034
11034
|
},
|
11035
11035
|
{
|
11036
|
-
"path": "../../../../../../../tmp/tmp-
|
11036
|
+
"path": "../../../../../../../tmp/tmp-2777-zkWjkXYni4cX/19035d7bc873/tldraw.css",
|
11037
11037
|
"kind": "import-rule",
|
11038
11038
|
"original": "@tldraw/tldraw/tldraw.css"
|
11039
11039
|
}
|
@@ -11108,7 +11108,7 @@
|
|
11108
11108
|
"original": "../../common/constants"
|
11109
11109
|
},
|
11110
11110
|
{
|
11111
|
-
"path": "../../../../../../../tmp/tmp-
|
11111
|
+
"path": "../../../../../../../tmp/tmp-2777-zkWjkXYni4cX/19035d7bc181/index.css",
|
11112
11112
|
"kind": "import-statement",
|
11113
11113
|
"original": "@100mslive/hms-whiteboard/index.css"
|
11114
11114
|
},
|
@@ -13891,7 +13891,7 @@
|
|
13891
13891
|
"format": "esm"
|
13892
13892
|
},
|
13893
13893
|
"src/Prebuilt/App.tsx": {
|
13894
|
-
"bytes":
|
13894
|
+
"bytes": 10754,
|
13895
13895
|
"imports": [
|
13896
13896
|
{
|
13897
13897
|
"path": "react",
|
@@ -14147,7 +14147,7 @@
|
|
14147
14147
|
"format": "esm"
|
14148
14148
|
},
|
14149
14149
|
"src/Diagnostics/components.tsx": {
|
14150
|
-
"bytes":
|
14150
|
+
"bytes": 2686,
|
14151
14151
|
"imports": [
|
14152
14152
|
{
|
14153
14153
|
"path": "react",
|
@@ -14409,7 +14409,7 @@
|
|
14409
14409
|
"format": "esm"
|
14410
14410
|
},
|
14411
14411
|
"src/Diagnostics/AudioTest.tsx": {
|
14412
|
-
"bytes":
|
14412
|
+
"bytes": 5269,
|
14413
14413
|
"imports": [
|
14414
14414
|
{
|
14415
14415
|
"path": "react",
|
@@ -14480,7 +14480,7 @@
|
|
14480
14480
|
"format": "esm"
|
14481
14481
|
},
|
14482
14482
|
"src/Diagnostics/BrowserTest.tsx": {
|
14483
|
-
"bytes":
|
14483
|
+
"bytes": 4184,
|
14484
14484
|
"imports": [
|
14485
14485
|
{
|
14486
14486
|
"path": "react",
|
@@ -14521,7 +14521,7 @@
|
|
14521
14521
|
"format": "esm"
|
14522
14522
|
},
|
14523
14523
|
"src/Diagnostics/ConnectivityTest.tsx": {
|
14524
|
-
"bytes":
|
14524
|
+
"bytes": 11322,
|
14525
14525
|
"imports": [
|
14526
14526
|
{
|
14527
14527
|
"path": "react",
|
@@ -14582,7 +14582,7 @@
|
|
14582
14582
|
"format": "esm"
|
14583
14583
|
},
|
14584
14584
|
"src/Diagnostics/VideoTest.tsx": {
|
14585
|
-
"bytes":
|
14585
|
+
"bytes": 2346,
|
14586
14586
|
"imports": [
|
14587
14587
|
{
|
14588
14588
|
"path": "react",
|
@@ -14648,7 +14648,7 @@
|
|
14648
14648
|
"format": "esm"
|
14649
14649
|
},
|
14650
14650
|
"src/Diagnostics/Diagnostics.tsx": {
|
14651
|
-
"bytes":
|
14651
|
+
"bytes": 4666,
|
14652
14652
|
"imports": [
|
14653
14653
|
{
|
14654
14654
|
"path": "react",
|
@@ -14961,7 +14961,7 @@
|
|
14961
14961
|
"dist/index.js": {
|
14962
14962
|
"imports": [
|
14963
14963
|
{
|
14964
|
-
"path": "dist/chunk-
|
14964
|
+
"path": "dist/chunk-DR5OAQOV.js",
|
14965
14965
|
"kind": "import-statement"
|
14966
14966
|
}
|
14967
14967
|
],
|
@@ -15037,16 +15037,16 @@
|
|
15037
15037
|
"inputs": {},
|
15038
15038
|
"bytes": 1882
|
15039
15039
|
},
|
15040
|
-
"dist/HLSView-
|
15040
|
+
"dist/HLSView-RRYP5FV5.js.map": {
|
15041
15041
|
"imports": [],
|
15042
15042
|
"exports": [],
|
15043
15043
|
"inputs": {},
|
15044
15044
|
"bytes": 100275
|
15045
15045
|
},
|
15046
|
-
"dist/HLSView-
|
15046
|
+
"dist/HLSView-RRYP5FV5.js": {
|
15047
15047
|
"imports": [
|
15048
15048
|
{
|
15049
|
-
"path": "dist/chunk-
|
15049
|
+
"path": "dist/chunk-DR5OAQOV.js",
|
15050
15050
|
"kind": "import-statement"
|
15051
15051
|
},
|
15052
15052
|
{
|
@@ -15224,7 +15224,7 @@
|
|
15224
15224
|
"default"
|
15225
15225
|
],
|
15226
15226
|
"entryPoint": "src/Prebuilt/layouts/HLSView.jsx",
|
15227
|
-
"cssBundle": "dist/HLSView-
|
15227
|
+
"cssBundle": "dist/HLSView-YIIBVIYC.css",
|
15228
15228
|
"inputs": {
|
15229
15229
|
"src/Prebuilt/layouts/HLSView.jsx": {
|
15230
15230
|
"bytesInOutput": 27671
|
@@ -15283,13 +15283,13 @@
|
|
15283
15283
|
},
|
15284
15284
|
"bytes": 61702
|
15285
15285
|
},
|
15286
|
-
"dist/chunk-
|
15286
|
+
"dist/chunk-DR5OAQOV.js.map": {
|
15287
15287
|
"imports": [],
|
15288
15288
|
"exports": [],
|
15289
15289
|
"inputs": {},
|
15290
|
-
"bytes":
|
15290
|
+
"bytes": 3893083
|
15291
15291
|
},
|
15292
|
-
"dist/chunk-
|
15292
|
+
"dist/chunk-DR5OAQOV.js": {
|
15293
15293
|
"imports": [
|
15294
15294
|
{
|
15295
15295
|
"path": "react",
|
@@ -17772,7 +17772,7 @@
|
|
17772
17772
|
"external": true
|
17773
17773
|
},
|
17774
17774
|
{
|
17775
|
-
"path": "dist/HLSView-
|
17775
|
+
"path": "dist/HLSView-RRYP5FV5.js",
|
17776
17776
|
"kind": "dynamic-import"
|
17777
17777
|
},
|
17778
17778
|
{
|
@@ -18356,7 +18356,7 @@
|
|
18356
18356
|
],
|
18357
18357
|
"inputs": {
|
18358
18358
|
"<define:process.env>": {
|
18359
|
-
"bytesInOutput":
|
18359
|
+
"bytesInOutput": 17870
|
18360
18360
|
},
|
18361
18361
|
"../../node_modules/lodash/lodash.js": {
|
18362
18362
|
"bytesInOutput": 224414
|
@@ -18641,7 +18641,7 @@
|
|
18641
18641
|
"bytesInOutput": 887
|
18642
18642
|
},
|
18643
18643
|
"src/Prebuilt/App.tsx": {
|
18644
|
-
"bytesInOutput":
|
18644
|
+
"bytesInOutput": 7946
|
18645
18645
|
},
|
18646
18646
|
"src/Prebuilt/components/AppData/AppData.tsx": {
|
18647
18647
|
"bytesInOutput": 6013
|
@@ -18839,7 +18839,7 @@
|
|
18839
18839
|
"bytesInOutput": 9484
|
18840
18840
|
},
|
18841
18841
|
"../hms-video-store/dist/index.js": {
|
18842
|
-
"bytesInOutput":
|
18842
|
+
"bytesInOutput": 458428
|
18843
18843
|
},
|
18844
18844
|
"../../node_modules/reselect/es/index.js": {
|
18845
18845
|
"bytesInOutput": 2550
|
@@ -19237,7 +19237,7 @@
|
|
19237
19237
|
"src/Prebuilt/components/VideoLayouts/WhiteboardLayout.tsx": {
|
19238
19238
|
"bytesInOutput": 2797
|
19239
19239
|
},
|
19240
|
-
"../../../../../../../tmp/tmp-
|
19240
|
+
"../../../../../../../tmp/tmp-2777-zkWjkXYni4cX/19035d7bc181/index.css": {
|
19241
19241
|
"bytesInOutput": 0
|
19242
19242
|
},
|
19243
19243
|
"src/Prebuilt/common/PeersSorter.ts": {
|
@@ -19382,31 +19382,31 @@
|
|
19382
19382
|
"bytesInOutput": 27
|
19383
19383
|
},
|
19384
19384
|
"src/Diagnostics/Diagnostics.tsx": {
|
19385
|
-
"bytesInOutput":
|
19385
|
+
"bytesInOutput": 4900
|
19386
19386
|
},
|
19387
19387
|
"src/Diagnostics/components.tsx": {
|
19388
|
-
"bytesInOutput":
|
19388
|
+
"bytesInOutput": 2375
|
19389
19389
|
},
|
19390
19390
|
"src/Diagnostics/hms.ts": {
|
19391
19391
|
"bytesInOutput": 237
|
19392
19392
|
},
|
19393
19393
|
"src/Diagnostics/AudioTest.tsx": {
|
19394
|
-
"bytesInOutput":
|
19394
|
+
"bytesInOutput": 5538
|
19395
19395
|
},
|
19396
19396
|
"src/Diagnostics/DeviceSelector.jsx": {
|
19397
19397
|
"bytesInOutput": 2155
|
19398
19398
|
},
|
19399
19399
|
"src/Diagnostics/BrowserTest.tsx": {
|
19400
|
-
"bytesInOutput":
|
19400
|
+
"bytesInOutput": 4243
|
19401
19401
|
},
|
19402
19402
|
"src/Diagnostics/ConnectivityTest.tsx": {
|
19403
|
-
"bytesInOutput":
|
19403
|
+
"bytesInOutput": 12614
|
19404
19404
|
},
|
19405
19405
|
"src/Diagnostics/VideoTest.tsx": {
|
19406
|
-
"bytesInOutput":
|
19406
|
+
"bytesInOutput": 2295
|
19407
19407
|
}
|
19408
19408
|
},
|
19409
|
-
"bytes":
|
19409
|
+
"bytes": 1850795
|
19410
19410
|
},
|
19411
19411
|
"dist/index.css.map": {
|
19412
19412
|
"imports": [],
|
@@ -19468,22 +19468,22 @@
|
|
19468
19468
|
}
|
19469
19469
|
],
|
19470
19470
|
"inputs": {
|
19471
|
-
"../../../../../../../tmp/tmp-
|
19471
|
+
"../../../../../../../tmp/tmp-2777-zkWjkXYni4cX/19035d7bc873/tldraw.css": {
|
19472
19472
|
"bytesInOutput": 75223
|
19473
19473
|
},
|
19474
|
-
"../../../../../../../tmp/tmp-
|
19474
|
+
"../../../../../../../tmp/tmp-2777-zkWjkXYni4cX/19035d7bc181/index.css": {
|
19475
19475
|
"bytesInOutput": 401
|
19476
19476
|
}
|
19477
19477
|
},
|
19478
19478
|
"bytes": 75901
|
19479
19479
|
},
|
19480
|
-
"dist/HLSView-
|
19480
|
+
"dist/HLSView-YIIBVIYC.css.map": {
|
19481
19481
|
"imports": [],
|
19482
19482
|
"exports": [],
|
19483
19483
|
"inputs": {},
|
19484
19484
|
"bytes": 122402
|
19485
19485
|
},
|
19486
|
-
"dist/HLSView-
|
19486
|
+
"dist/HLSView-YIIBVIYC.css": {
|
19487
19487
|
"imports": [
|
19488
19488
|
{
|
19489
19489
|
"path": "https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap",
|
@@ -19537,10 +19537,10 @@
|
|
19537
19537
|
}
|
19538
19538
|
],
|
19539
19539
|
"inputs": {
|
19540
|
-
"../../../../../../../tmp/tmp-
|
19540
|
+
"../../../../../../../tmp/tmp-2777-zkWjkXYni4cX/19035d7bc873/tldraw.css": {
|
19541
19541
|
"bytesInOutput": 75223
|
19542
19542
|
},
|
19543
|
-
"../../../../../../../tmp/tmp-
|
19543
|
+
"../../../../../../../tmp/tmp-2777-zkWjkXYni4cX/19035d7bc181/index.css": {
|
19544
19544
|
"bytesInOutput": 401
|
19545
19545
|
}
|
19546
19546
|
},
|
package/package.json
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
"prebuilt",
|
11
11
|
"roomkit"
|
12
12
|
],
|
13
|
-
"version": "0.3.14-alpha.
|
13
|
+
"version": "0.3.14-alpha.7",
|
14
14
|
"author": "100ms",
|
15
15
|
"license": "MIT",
|
16
16
|
"repository": {
|
@@ -74,12 +74,12 @@
|
|
74
74
|
"react": ">=17.0.2 <19.0.0"
|
75
75
|
},
|
76
76
|
"dependencies": {
|
77
|
-
"@100mslive/hls-player": "0.3.14-alpha.
|
77
|
+
"@100mslive/hls-player": "0.3.14-alpha.7",
|
78
78
|
"@100mslive/hms-noise-cancellation": "0.0.1",
|
79
|
-
"@100mslive/hms-virtual-background": "1.13.14-alpha.
|
80
|
-
"@100mslive/hms-whiteboard": "0.0.4-alpha.
|
81
|
-
"@100mslive/react-icons": "0.10.14-alpha.
|
82
|
-
"@100mslive/react-sdk": "0.10.14-alpha.
|
79
|
+
"@100mslive/hms-virtual-background": "1.13.14-alpha.7",
|
80
|
+
"@100mslive/hms-whiteboard": "0.0.4-alpha.7",
|
81
|
+
"@100mslive/react-icons": "0.10.14-alpha.7",
|
82
|
+
"@100mslive/react-sdk": "0.10.14-alpha.7",
|
83
83
|
"@100mslive/types-prebuilt": "0.12.9",
|
84
84
|
"@emoji-mart/data": "^1.0.6",
|
85
85
|
"@emoji-mart/react": "^1.0.1",
|
@@ -115,5 +115,5 @@
|
|
115
115
|
"uuid": "^8.3.2",
|
116
116
|
"worker-timers": "^7.0.40"
|
117
117
|
},
|
118
|
-
"gitHead": "
|
118
|
+
"gitHead": "c57e858bbc09c5b82722610c4ae0fcf200e61161"
|
119
119
|
}
|
@@ -21,21 +21,25 @@ import { useAudioOutputTest } from '../Prebuilt/components/hooks/useAudioOutputT
|
|
21
21
|
import { TEST_AUDIO_URL } from '../Prebuilt/common/constants';
|
22
22
|
|
23
23
|
const SelectContainer = ({ children }: { children: React.ReactNode }) => (
|
24
|
-
<Box css={{ w: '50%', '@lg': { w: '100%' } }}>{children}</Box>
|
24
|
+
<Box css={{ w: 'calc(50% - 0.75rem)', '@lg': { w: '100%' } }}>{children}</Box>
|
25
25
|
);
|
26
26
|
|
27
27
|
const MicTest = () => {
|
28
28
|
const devices = useHMSStore(selectDevices);
|
29
29
|
const [isRecording, setIsRecording] = useState(false);
|
30
30
|
const { audioInputDeviceId } = useHMSStore(selectLocalMediaSettings);
|
31
|
-
const [selectedMic, setSelectedMic] = useState(audioInputDeviceId ||
|
31
|
+
const [selectedMic, setSelectedMic] = useState(audioInputDeviceId || devices.audioInput[0]?.deviceId);
|
32
32
|
const trackID = useHMSStore(selectLocalAudioTrackID);
|
33
33
|
const audioLevel = useHMSStore(selectTrackAudioByID(trackID));
|
34
|
+
const { audioOutputDeviceId } = useHMSStore(selectLocalMediaSettings);
|
35
|
+
const { playing, setPlaying, audioRef } = useAudioOutputTest({
|
36
|
+
deviceId: audioOutputDeviceId || devices.audioOutput[0]?.deviceId,
|
37
|
+
});
|
34
38
|
|
35
39
|
return (
|
36
40
|
<SelectContainer>
|
37
41
|
<DeviceSelector
|
38
|
-
title="Microphone(Input)"
|
42
|
+
title="Microphone (Input)"
|
39
43
|
devices={devices.audioInput}
|
40
44
|
selection={selectedMic}
|
41
45
|
icon={<MicOnIcon />}
|
@@ -47,6 +51,8 @@ const MicTest = () => {
|
|
47
51
|
/>
|
48
52
|
<Flex css={{ gap: '$6', alignItems: 'center' }}>
|
49
53
|
<Button
|
54
|
+
variant="standard"
|
55
|
+
icon
|
50
56
|
onClick={() =>
|
51
57
|
hmsDiagnostics
|
52
58
|
.startMicCheck(selectedMic, () => {
|
@@ -58,23 +64,45 @@ const MicTest = () => {
|
|
58
64
|
}
|
59
65
|
disabled={isRecording}
|
60
66
|
>
|
67
|
+
<MicOnIcon />
|
61
68
|
{isRecording ? 'Recording...' : 'Record'}
|
62
69
|
</Button>
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
70
|
+
|
71
|
+
<Button
|
72
|
+
icon
|
73
|
+
variant="standard"
|
74
|
+
outlined={hmsDiagnostics.getRecordedAudio() === TEST_AUDIO_URL}
|
75
|
+
onClick={() => {
|
76
|
+
if (audioRef.current) {
|
77
|
+
audioRef.current.src = hmsDiagnostics.getRecordedAudio() || '';
|
78
|
+
audioRef.current.play();
|
79
|
+
}
|
80
|
+
}}
|
81
|
+
disabled={playing || hmsDiagnostics.getRecordedAudio() === TEST_AUDIO_URL}
|
82
|
+
>
|
83
|
+
<SpeakerIcon />
|
84
|
+
{playing ? 'Playing...' : 'Playback'}
|
85
|
+
</Button>
|
86
|
+
<audio
|
87
|
+
ref={audioRef}
|
88
|
+
onEnded={() => setPlaying(false)}
|
89
|
+
onPlay={() => setPlaying(true)}
|
90
|
+
style={{ display: 'none' }}
|
91
|
+
/>
|
92
|
+
</Flex>
|
93
|
+
|
94
|
+
<Flex align="center" css={{ mt: '$4', maxWidth: '10rem', opacity: isRecording ? '1' : '0', gap: '$4' }}>
|
95
|
+
<Text>
|
96
|
+
<MicOnIcon />
|
97
|
+
</Text>
|
98
|
+
<Progress.Root value={audioLevel} css={{ h: '$2' }}>
|
99
|
+
<Progress.Content
|
100
|
+
style={{
|
101
|
+
transform: `translateX(-${100 - audioLevel}%)`,
|
102
|
+
transition: 'transform 0.3s',
|
103
|
+
}}
|
104
|
+
/>
|
105
|
+
</Progress.Root>
|
78
106
|
</Flex>
|
79
107
|
</SelectContainer>
|
80
108
|
);
|
@@ -84,37 +112,22 @@ const SpeakerTest = () => {
|
|
84
112
|
const actions = useHMSActions();
|
85
113
|
const devices = useHMSStore(selectDevices);
|
86
114
|
const { audioOutputDeviceId } = useHMSStore(selectLocalMediaSettings);
|
87
|
-
|
115
|
+
|
116
|
+
if (devices.audioOutput.length === 0) {
|
117
|
+
return <></>;
|
118
|
+
}
|
88
119
|
|
89
120
|
return (
|
90
121
|
<SelectContainer>
|
91
122
|
<DeviceSelector
|
92
|
-
title="Speaker(
|
123
|
+
title="Speaker (Output)"
|
93
124
|
devices={devices.audioOutput}
|
94
|
-
selection={audioOutputDeviceId ||
|
125
|
+
selection={audioOutputDeviceId || devices.audioOutput[0]?.deviceId}
|
95
126
|
icon={<SpeakerIcon />}
|
96
127
|
onChange={(deviceId: string) => {
|
97
128
|
actions.setAudioOutputDevice(deviceId);
|
98
129
|
}}
|
99
130
|
/>
|
100
|
-
<Button
|
101
|
-
onClick={() => {
|
102
|
-
if (audioRef.current) {
|
103
|
-
audioRef.current.src = hmsDiagnostics.getRecordedAudio() || TEST_AUDIO_URL;
|
104
|
-
audioRef.current.play();
|
105
|
-
}
|
106
|
-
}}
|
107
|
-
disabled={playing}
|
108
|
-
>
|
109
|
-
<SpeakerIcon />
|
110
|
-
<Text css={{ ml: '$4' }}>{playing ? 'Playing' : 'Playback'}</Text>
|
111
|
-
</Button>
|
112
|
-
<audio
|
113
|
-
ref={audioRef}
|
114
|
-
onEnded={() => setPlaying(false)}
|
115
|
-
onPlay={() => setPlaying(true)}
|
116
|
-
style={{ display: 'none' }}
|
117
|
-
/>
|
118
131
|
</SelectContainer>
|
119
132
|
);
|
120
133
|
};
|
@@ -129,8 +142,9 @@ export const AudioTest = () => {
|
|
129
142
|
<>
|
130
143
|
<TestContainer>
|
131
144
|
<Text variant="body2" css={{ c: '$on_primary_medium' }}>
|
132
|
-
Record
|
133
|
-
make sure your volume is turned up, try a different speaker or microphone, or check your bluetooth
|
145
|
+
Record a 10 second audio clip and play it back to check that your microphone and speaker are working. If they
|
146
|
+
aren't, make sure your volume is turned up, try a different speaker or microphone, or check your bluetooth
|
147
|
+
settings.
|
134
148
|
</Text>
|
135
149
|
|
136
150
|
<Flex
|
@@ -71,6 +71,11 @@ export const browserTypeIconInfo = {
|
|
71
71
|
val: 'Safari',
|
72
72
|
icon: `${CMS_MEDIA_SERVER}cms/Safari_254e74ed94/Safari_254e74ed94.svg`,
|
73
73
|
},
|
74
|
+
'mobile safari': {
|
75
|
+
key: 'safari',
|
76
|
+
val: 'Safari',
|
77
|
+
icon: `${CMS_MEDIA_SERVER}cms/Safari_254e74ed94/Safari_254e74ed94.svg`,
|
78
|
+
},
|
74
79
|
edge: {
|
75
80
|
key: 'edge',
|
76
81
|
val: 'Edge',
|
@@ -88,11 +93,11 @@ const CheckDetails = ({ title, value, iconURL }: { title: string; value: string;
|
|
88
93
|
<Text css={{ c: '$on_primary_medium', mb: '$6' }}>{title}</Text>
|
89
94
|
<Flex align="center">
|
90
95
|
{iconURL && (
|
91
|
-
<Box css={{ size: '2rem', r: '$round', bg: '$surface_brighter' }}>
|
96
|
+
<Box css={{ size: '2rem', r: '$round', bg: '$surface_brighter', mr: '$4' }}>
|
92
97
|
<img style={{ objectFit: 'contain', width: '2rem' }} src={iconURL} alt={value} />
|
93
98
|
</Box>
|
94
99
|
)}
|
95
|
-
<Text
|
100
|
+
<Text>{value}</Text>
|
96
101
|
</Flex>
|
97
102
|
</Box>
|
98
103
|
);
|
@@ -114,7 +119,7 @@ export const BrowserTest = () => {
|
|
114
119
|
iconURL={
|
115
120
|
parsedUserAgent.getBrowser().name &&
|
116
121
|
browserTypeIconInfo[parsedUserAgent.getBrowser().name?.toLowerCase() as keyof typeof browserTypeIconInfo]
|
117
|
-
|
122
|
+
?.icon
|
118
123
|
}
|
119
124
|
value={`${parsedUserAgent.getBrowser().name} ${parsedUserAgent.getBrowser().version}`}
|
120
125
|
/>
|
@@ -123,7 +128,7 @@ export const BrowserTest = () => {
|
|
123
128
|
iconURL={
|
124
129
|
parsedUserAgent.getOS().name &&
|
125
130
|
operatingSystemIconInfo[parsedUserAgent.getOS().name?.toLowerCase() as keyof typeof operatingSystemIconInfo]
|
126
|
-
|
131
|
+
?.icon
|
127
132
|
}
|
128
133
|
value={`${parsedUserAgent.getOS().name} ${parsedUserAgent.getOS().version}`}
|
129
134
|
/>
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import React, { useState } from 'react';
|
1
|
+
import React, { useContext, useState } from 'react';
|
2
2
|
import { ConnectivityCheckResult, ConnectivityState, DiagnosticsRTCStats } from '@100mslive/react-sdk';
|
3
3
|
import { CheckCircleIcon, CrossCircleIcon, LinkIcon } from '@100mslive/react-icons';
|
4
|
-
import { TestContainer, TestFooter } from './components';
|
4
|
+
import { DiagnosticsContext, TestContainer, TestFooter } from './components';
|
5
5
|
import { Button } from '../Button';
|
6
6
|
import { Box, Flex } from '../Layout';
|
7
7
|
import { Loading } from '../Loading';
|
@@ -310,12 +310,14 @@ const RegionSelector = ({
|
|
310
310
|
};
|
311
311
|
|
312
312
|
export const ConnectivityTest = () => {
|
313
|
+
const { setConnectivityTested } = useContext(DiagnosticsContext);
|
313
314
|
const [region, setRegion] = useState<string | undefined>(Object.keys(Regions)[0]);
|
314
315
|
const [error, setError] = useState<Error | undefined>();
|
315
316
|
const [progress, setProgress] = useState<ConnectivityState>();
|
316
317
|
const [result, setResult] = useState<ConnectivityCheckResult | undefined>();
|
317
318
|
|
318
319
|
const startTest = () => {
|
320
|
+
setConnectivityTested(false);
|
319
321
|
setError(undefined);
|
320
322
|
setResult(undefined);
|
321
323
|
hmsDiagnostics
|
@@ -324,6 +326,7 @@ export const ConnectivityTest = () => {
|
|
324
326
|
setProgress(state);
|
325
327
|
},
|
326
328
|
result => {
|
329
|
+
setConnectivityTested(true);
|
327
330
|
setResult(result);
|
328
331
|
},
|
329
332
|
region,
|
@@ -21,8 +21,8 @@ const DiagnosticsStepIcon: Record<string, React.ReactNode> = {
|
|
21
21
|
const Container = ({ children }: { children: React.ReactNode }) => (
|
22
22
|
<Box
|
23
23
|
css={{
|
24
|
-
px: '
|
25
|
-
py: '
|
24
|
+
px: '120px',
|
25
|
+
py: '120px',
|
26
26
|
bg: '$background_dim',
|
27
27
|
lineHeight: '1.5',
|
28
28
|
'-webkit-text-size-adjust': '100%',
|
@@ -67,7 +67,7 @@ const DiagnosticsStepHeader = () => {
|
|
67
67
|
|
68
68
|
const DiagnosticsStep = () => {
|
69
69
|
return (
|
70
|
-
<Box css={{ border: '1px solid $border_default', r: '$1', w: '75%', '@lg': { w: '100%' } }}>
|
70
|
+
<Box css={{ border: '1px solid $border_default', r: '$1', w: '75%', maxWidth: '65rem', '@lg': { w: '100%' } }}>
|
71
71
|
<DiagnosticsStepHeader />
|
72
72
|
<Box css={{ maxHeight: '55vh', overflowY: 'auto' }}>
|
73
73
|
<DiagnosticsStepTest />
|
@@ -77,7 +77,7 @@ const DiagnosticsStep = () => {
|
|
77
77
|
};
|
78
78
|
|
79
79
|
const DiagnosticsStepsList = () => {
|
80
|
-
const { activeStep } = useContext(DiagnosticsContext);
|
80
|
+
const { activeStep, connectivityTested } = useContext(DiagnosticsContext);
|
81
81
|
|
82
82
|
return (
|
83
83
|
<Box css={{ w: '25%', '@lg': { display: 'none' } }}>
|
@@ -85,18 +85,18 @@ const DiagnosticsStepsList = () => {
|
|
85
85
|
const keys = Object.keys(DiagnosticsSteps);
|
86
86
|
const activeStepIndex = keys.indexOf(activeStep);
|
87
87
|
const keyIndex = keys.indexOf(key);
|
88
|
-
const isStepCompleted = activeStepIndex > keyIndex;
|
88
|
+
const isStepCompleted = activeStepIndex > keyIndex || (activeStep === 'connectivity' && connectivityTested);
|
89
89
|
|
90
90
|
let color = '$on_primary_low';
|
91
|
-
if (isStepCompleted) {
|
92
|
-
color = '$primary_bright';
|
93
|
-
}
|
94
91
|
if (activeStep === key) {
|
95
92
|
color = '$on_primary_high';
|
96
93
|
}
|
94
|
+
if (isStepCompleted) {
|
95
|
+
color = '$primary_bright';
|
96
|
+
}
|
97
97
|
|
98
98
|
return (
|
99
|
-
<Flex css={{ mb: '$10', c: color, gap: '$4', alignItems: 'center' }}>
|
99
|
+
<Flex key={key} css={{ mb: '$10', c: color, gap: '$4', alignItems: 'center' }}>
|
100
100
|
{isStepCompleted ? (
|
101
101
|
<CheckCircleIcon width="1rem" height="1rem" />
|
102
102
|
) : (
|
@@ -112,10 +112,11 @@ const DiagnosticsStepsList = () => {
|
|
112
112
|
|
113
113
|
export const Diagnostics = () => {
|
114
114
|
const [activeStep, setActiveStep] = React.useState(Object.keys(DiagnosticsSteps)[0]);
|
115
|
+
const [connectivityTested, setConnectivityTested] = React.useState(false);
|
115
116
|
return (
|
116
117
|
<HMSRoomProvider store={hmsStore} actions={hmsActions} notifications={hmsNotifications} stats={hmsStats}>
|
117
118
|
<HMSThemeProvider themeType="default">
|
118
|
-
<DiagnosticsContext.Provider value={{ activeStep, setActiveStep }}>
|
119
|
+
<DiagnosticsContext.Provider value={{ activeStep, setActiveStep, connectivityTested, setConnectivityTested }}>
|
119
120
|
<Container>
|
120
121
|
<Text variant="h4">Pre-call Test</Text>
|
121
122
|
<Text variant="md" css={{ c: '$on_primary_medium' }}>
|
@@ -27,10 +27,10 @@ export const VideoTest = () => {
|
|
27
27
|
{trackID && (
|
28
28
|
<StyledVideoTile.Container
|
29
29
|
css={{
|
30
|
-
|
31
|
-
|
30
|
+
width: '90%',
|
31
|
+
aspectRatio: '16/9',
|
32
32
|
mr: '$10',
|
33
|
-
'@lg': { mr: 0, mb: '$10' },
|
33
|
+
'@lg': { mr: 0, mb: '$10', aspectRatio: '1/1' },
|
34
34
|
}}
|
35
35
|
>
|
36
36
|
<Video mirror={true} trackId={trackID} />
|
@@ -15,11 +15,17 @@ export const DiagnosticsSteps: Record<string, string> = {
|
|
15
15
|
export const DiagnosticsContext = React.createContext<{
|
16
16
|
activeStep: string;
|
17
17
|
setActiveStep: React.Dispatch<React.SetStateAction<string>>;
|
18
|
+
connectivityTested: boolean;
|
19
|
+
setConnectivityTested: React.Dispatch<React.SetStateAction<boolean>>;
|
18
20
|
}>({
|
19
21
|
activeStep: 'video',
|
20
22
|
setActiveStep: () => {
|
21
23
|
return;
|
22
24
|
},
|
25
|
+
connectivityTested: false,
|
26
|
+
setConnectivityTested: () => {
|
27
|
+
return;
|
28
|
+
},
|
23
29
|
});
|
24
30
|
|
25
31
|
export const TestContainer = ({ css, children }: { css?: CSS; children: React.ReactNode }) => {
|
@@ -55,11 +61,17 @@ export const TestFooter = ({
|
|
55
61
|
css={{
|
56
62
|
py: '$8',
|
57
63
|
px: '$10',
|
64
|
+
position: 'sticky',
|
65
|
+
bottom: '0',
|
66
|
+
background: '$background_dim',
|
58
67
|
justifyContent: 'space-between',
|
59
68
|
alignItems: 'center',
|
60
69
|
borderTop: '1px solid $border_default',
|
61
70
|
fontSize: '$sm',
|
71
|
+
borderBottomLeftRadius: '$1',
|
72
|
+
borderBottomRightRadius: '$1',
|
62
73
|
lineHeight: '$sm',
|
74
|
+
zIndex: 1001,
|
63
75
|
'@lg': { flexDirection: 'column', gap: '$8' },
|
64
76
|
}}
|
65
77
|
>
|