@100mslive/roomkit-react 0.3.20-alpha.0 → 0.3.20-alpha.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -2369,7 +2369,7 @@
2369
2369
  "format": "esm"
2370
2370
  },
2371
2371
  "src/Prebuilt/AppContext.tsx": {
2372
- "bytes": 869,
2372
+ "bytes": 881,
2373
2373
  "imports": [
2374
2374
  {
2375
2375
  "path": "react",
@@ -2585,7 +2585,7 @@
2585
2585
  "imports": []
2586
2586
  },
2587
2587
  "src/Prebuilt/components/AuthToken.tsx": {
2588
- "bytes": 5170,
2588
+ "bytes": 5171,
2589
2589
  "imports": [
2590
2590
  {
2591
2591
  "path": "react",
@@ -5749,7 +5749,7 @@
5749
5749
  "format": "cjs"
5750
5750
  },
5751
5751
  "../hms-video-store/dist/index.js": {
5752
- "bytes": 367546,
5752
+ "bytes": 367512,
5753
5753
  "imports": [
5754
5754
  {
5755
5755
  "path": "../../node_modules/reselect/es/index.js",
@@ -5961,7 +5961,7 @@
5961
5961
  "format": "esm"
5962
5962
  },
5963
5963
  "src/Prebuilt/components/MoreSettings/ChangeNameContent.tsx": {
5964
- "bytes": 3152,
5964
+ "bytes": 3309,
5965
5965
  "imports": [
5966
5966
  {
5967
5967
  "path": "react",
@@ -6007,7 +6007,7 @@
6007
6007
  "format": "esm"
6008
6008
  },
6009
6009
  "src/Prebuilt/components/MoreSettings/ChangeNameModal.tsx": {
6010
- "bytes": 2330,
6010
+ "bytes": 2372,
6011
6011
  "imports": [
6012
6012
  {
6013
6013
  "path": "react",
@@ -11291,7 +11291,7 @@
11291
11291
  ],
11292
11292
  "format": "esm"
11293
11293
  },
11294
- "../../../../../../../tmp/tmp-2794-9MjVo32PL1Ra/191e53e10ba3/tldraw.css": {
11294
+ "../../../../../../../tmp/tmp-2899-IUZE5yGNG4PA/191eb73f5702/tldraw.css": {
11295
11295
  "bytes": 80111,
11296
11296
  "imports": [
11297
11297
  {
@@ -11341,7 +11341,7 @@
11341
11341
  }
11342
11342
  ]
11343
11343
  },
11344
- "../../../../../../../tmp/tmp-2794-9MjVo32PL1Ra/191e53e10281/index.css": {
11344
+ "../../../../../../../tmp/tmp-2899-IUZE5yGNG4PA/191eb73f5271/index.css": {
11345
11345
  "bytes": 597,
11346
11346
  "imports": [
11347
11347
  {
@@ -11350,7 +11350,7 @@
11350
11350
  "external": true
11351
11351
  },
11352
11352
  {
11353
- "path": "../../../../../../../tmp/tmp-2794-9MjVo32PL1Ra/191e53e10ba3/tldraw.css",
11353
+ "path": "../../../../../../../tmp/tmp-2899-IUZE5yGNG4PA/191eb73f5702/tldraw.css",
11354
11354
  "kind": "import-rule",
11355
11355
  "original": "@tldraw/tldraw/tldraw.css"
11356
11356
  }
@@ -11425,7 +11425,7 @@
11425
11425
  "original": "../../common/constants"
11426
11426
  },
11427
11427
  {
11428
- "path": "../../../../../../../tmp/tmp-2794-9MjVo32PL1Ra/191e53e10281/index.css",
11428
+ "path": "../../../../../../../tmp/tmp-2899-IUZE5yGNG4PA/191eb73f5271/index.css",
11429
11429
  "kind": "import-statement",
11430
11430
  "original": "@100mslive/hms-whiteboard/index.css"
11431
11431
  },
@@ -11761,7 +11761,7 @@
11761
11761
  "format": "esm"
11762
11762
  },
11763
11763
  "src/Prebuilt/components/HMSVideo/HMSVideo.jsx": {
11764
- "bytes": 1391,
11764
+ "bytes": 1973,
11765
11765
  "imports": [
11766
11766
  {
11767
11767
  "path": "react",
@@ -12281,7 +12281,7 @@
12281
12281
  "format": "esm"
12282
12282
  },
12283
12283
  "src/Prebuilt/layouts/HLSView.jsx": {
12284
- "bytes": 28639,
12284
+ "bytes": 28626,
12285
12285
  "imports": [
12286
12286
  {
12287
12287
  "path": "react",
@@ -14350,7 +14350,7 @@
14350
14350
  "format": "esm"
14351
14351
  },
14352
14352
  "src/Prebuilt/App.tsx": {
14353
- "bytes": 11109,
14353
+ "bytes": 11054,
14354
14354
  "imports": [
14355
14355
  {
14356
14356
  "path": "react",
@@ -15413,7 +15413,7 @@
15413
15413
  "dist/index.js": {
15414
15414
  "imports": [
15415
15415
  {
15416
- "path": "dist/chunk-JCM6FDIX.js",
15416
+ "path": "dist/chunk-I6M7HK22.js",
15417
15417
  "kind": "import-statement"
15418
15418
  }
15419
15419
  ],
@@ -15489,16 +15489,16 @@
15489
15489
  "inputs": {},
15490
15490
  "bytes": 1882
15491
15491
  },
15492
- "dist/HLSView-VBMAXHBP.js.map": {
15492
+ "dist/HLSView-WY2KZLYW.js.map": {
15493
15493
  "imports": [],
15494
15494
  "exports": [],
15495
15495
  "inputs": {},
15496
- "bytes": 100275
15496
+ "bytes": 101299
15497
15497
  },
15498
- "dist/HLSView-VBMAXHBP.js": {
15498
+ "dist/HLSView-WY2KZLYW.js": {
15499
15499
  "imports": [
15500
15500
  {
15501
- "path": "dist/chunk-JCM6FDIX.js",
15501
+ "path": "dist/chunk-I6M7HK22.js",
15502
15502
  "kind": "import-statement"
15503
15503
  },
15504
15504
  {
@@ -15676,10 +15676,10 @@
15676
15676
  "default"
15677
15677
  ],
15678
15678
  "entryPoint": "src/Prebuilt/layouts/HLSView.jsx",
15679
- "cssBundle": "dist/HLSView-5JM7XVA4.css",
15679
+ "cssBundle": "dist/HLSView-KVYOXQXT.css",
15680
15680
  "inputs": {
15681
15681
  "src/Prebuilt/layouts/HLSView.jsx": {
15682
- "bytesInOutput": 27671
15682
+ "bytesInOutput": 27634
15683
15683
  },
15684
15684
  "src/Prebuilt/components/HlsStatsOverlay.jsx": {
15685
15685
  "bytesInOutput": 3521
@@ -15691,7 +15691,7 @@
15691
15691
  "bytesInOutput": 416
15692
15692
  },
15693
15693
  "src/Prebuilt/components/HMSVideo/HMSVideo.jsx": {
15694
- "bytesInOutput": 1522
15694
+ "bytesInOutput": 2100
15695
15695
  },
15696
15696
  "src/Prebuilt/components/HMSVideo/PlayPauseSeekControls.tsx": {
15697
15697
  "bytesInOutput": 4256
@@ -15706,7 +15706,7 @@
15706
15706
  "bytesInOutput": 328
15707
15707
  },
15708
15708
  "src/Prebuilt/components/HMSVideo/VideoProgress.tsx": {
15709
- "bytesInOutput": 2986
15709
+ "bytesInOutput": 3016
15710
15710
  },
15711
15711
  "src/Prebuilt/components/HMSVideo/utils.ts": {
15712
15712
  "bytesInOutput": 917
@@ -15733,15 +15733,15 @@
15733
15733
  "bytesInOutput": 2101
15734
15734
  }
15735
15735
  },
15736
- "bytes": 61702
15736
+ "bytes": 62273
15737
15737
  },
15738
- "dist/chunk-JCM6FDIX.js.map": {
15738
+ "dist/chunk-I6M7HK22.js.map": {
15739
15739
  "imports": [],
15740
15740
  "exports": [],
15741
15741
  "inputs": {},
15742
- "bytes": 3521854
15742
+ "bytes": 3522545
15743
15743
  },
15744
- "dist/chunk-JCM6FDIX.js": {
15744
+ "dist/chunk-I6M7HK22.js": {
15745
15745
  "imports": [
15746
15746
  {
15747
15747
  "path": "react",
@@ -18289,7 +18289,7 @@
18289
18289
  "external": true
18290
18290
  },
18291
18291
  {
18292
- "path": "dist/HLSView-VBMAXHBP.js",
18292
+ "path": "dist/HLSView-WY2KZLYW.js",
18293
18293
  "kind": "dynamic-import"
18294
18294
  },
18295
18295
  {
@@ -18908,7 +18908,7 @@
18908
18908
  ],
18909
18909
  "inputs": {
18910
18910
  "<define:process.env>": {
18911
- "bytesInOutput": 18008
18911
+ "bytesInOutput": 18027
18912
18912
  },
18913
18913
  "../../node_modules/lodash/lodash.js": {
18914
18914
  "bytesInOutput": 224301
@@ -18926,7 +18926,7 @@
18926
18926
  "bytesInOutput": 16120
18927
18927
  },
18928
18928
  "../../node_modules/sdp-transform/lib/parser.js": {
18929
- "bytesInOutput": 3495
18929
+ "bytesInOutput": 3500
18930
18930
  },
18931
18931
  "../../node_modules/sdp-transform/lib/writer.js": {
18932
18932
  "bytesInOutput": 3068
@@ -18935,7 +18935,7 @@
18935
18935
  "bytesInOutput": 615
18936
18936
  },
18937
18937
  "../../node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js": {
18938
- "bytesInOutput": 3855
18938
+ "bytesInOutput": 3852
18939
18939
  },
18940
18940
  "../../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js": {
18941
18941
  "bytesInOutput": 7632
@@ -19193,7 +19193,7 @@
19193
19193
  "bytesInOutput": 887
19194
19194
  },
19195
19195
  "src/Prebuilt/App.tsx": {
19196
- "bytesInOutput": 8093
19196
+ "bytesInOutput": 8061
19197
19197
  },
19198
19198
  "src/Prebuilt/components/AppData/AppData.tsx": {
19199
19199
  "bytesInOutput": 6633
@@ -19466,7 +19466,7 @@
19466
19466
  "bytesInOutput": 6313
19467
19467
  },
19468
19468
  "../../node_modules/webrtc-adapter/src/js/chrome/chrome_shim.js": {
19469
- "bytesInOutput": 22678
19469
+ "bytesInOutput": 22676
19470
19470
  },
19471
19471
  "../../node_modules/webrtc-adapter/src/js/chrome/getusermedia.js": {
19472
19472
  "bytesInOutput": 6095
@@ -19484,16 +19484,16 @@
19484
19484
  "bytesInOutput": 842
19485
19485
  },
19486
19486
  "../../node_modules/webrtc-adapter/src/js/safari/safari_shim.js": {
19487
- "bytesInOutput": 11868
19487
+ "bytesInOutput": 11866
19488
19488
  },
19489
19489
  "../../node_modules/webrtc-adapter/src/js/common_shim.js": {
19490
19490
  "bytesInOutput": 12458
19491
19491
  },
19492
19492
  "src/Prebuilt/components/MoreSettings/ChangeNameModal.tsx": {
19493
- "bytesInOutput": 2228
19493
+ "bytesInOutput": 2272
19494
19494
  },
19495
19495
  "src/Prebuilt/components/MoreSettings/ChangeNameContent.tsx": {
19496
- "bytesInOutput": 3302
19496
+ "bytesInOutput": 3576
19497
19497
  },
19498
19498
  "src/Prebuilt/components/AppData/useSheet.ts": {
19499
19499
  "bytesInOutput": 846
@@ -19772,7 +19772,7 @@
19772
19772
  "bytesInOutput": 1204
19773
19773
  },
19774
19774
  "src/Prebuilt/components/hooks/useTileLayout.tsx": {
19775
- "bytesInOutput": 3837
19775
+ "bytesInOutput": 3833
19776
19776
  },
19777
19777
  "src/Prebuilt/components/VideoLayouts/RoleProminence.tsx": {
19778
19778
  "bytesInOutput": 1948
@@ -19801,7 +19801,7 @@
19801
19801
  "src/Prebuilt/components/VideoLayouts/WhiteboardLayout.tsx": {
19802
19802
  "bytesInOutput": 2830
19803
19803
  },
19804
- "../../../../../../../tmp/tmp-2794-9MjVo32PL1Ra/191e53e10281/index.css": {
19804
+ "../../../../../../../tmp/tmp-2899-IUZE5yGNG4PA/191eb73f5271/index.css": {
19805
19805
  "bytesInOutput": 0
19806
19806
  },
19807
19807
  "src/Prebuilt/common/PeersSorter.ts": {
@@ -19970,7 +19970,7 @@
19970
19970
  "bytesInOutput": 2628
19971
19971
  }
19972
19972
  },
19973
- "bytes": 1460606
19973
+ "bytes": 1460905
19974
19974
  },
19975
19975
  "dist/index.css.map": {
19976
19976
  "imports": [],
@@ -20032,22 +20032,22 @@
20032
20032
  }
20033
20033
  ],
20034
20034
  "inputs": {
20035
- "../../../../../../../tmp/tmp-2794-9MjVo32PL1Ra/191e53e10ba3/tldraw.css": {
20035
+ "../../../../../../../tmp/tmp-2899-IUZE5yGNG4PA/191eb73f5702/tldraw.css": {
20036
20036
  "bytesInOutput": 75223
20037
20037
  },
20038
- "../../../../../../../tmp/tmp-2794-9MjVo32PL1Ra/191e53e10281/index.css": {
20038
+ "../../../../../../../tmp/tmp-2899-IUZE5yGNG4PA/191eb73f5271/index.css": {
20039
20039
  "bytesInOutput": 401
20040
20040
  }
20041
20041
  },
20042
20042
  "bytes": 75901
20043
20043
  },
20044
- "dist/HLSView-5JM7XVA4.css.map": {
20044
+ "dist/HLSView-KVYOXQXT.css.map": {
20045
20045
  "imports": [],
20046
20046
  "exports": [],
20047
20047
  "inputs": {},
20048
20048
  "bytes": 122402
20049
20049
  },
20050
- "dist/HLSView-5JM7XVA4.css": {
20050
+ "dist/HLSView-KVYOXQXT.css": {
20051
20051
  "imports": [
20052
20052
  {
20053
20053
  "path": "https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap",
@@ -20101,10 +20101,10 @@
20101
20101
  }
20102
20102
  ],
20103
20103
  "inputs": {
20104
- "../../../../../../../tmp/tmp-2794-9MjVo32PL1Ra/191e53e10ba3/tldraw.css": {
20104
+ "../../../../../../../tmp/tmp-2899-IUZE5yGNG4PA/191eb73f5702/tldraw.css": {
20105
20105
  "bytesInOutput": 75223
20106
20106
  },
20107
- "../../../../../../../tmp/tmp-2794-9MjVo32PL1Ra/191e53e10281/index.css": {
20107
+ "../../../../../../../tmp/tmp-2899-IUZE5yGNG4PA/191eb73f5271/index.css": {
20108
20108
  "bytesInOutput": 401
20109
20109
  }
20110
20110
  },
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "prebuilt",
11
11
  "roomkit"
12
12
  ],
13
- "version": "0.3.20-alpha.0",
13
+ "version": "0.3.20-alpha.1",
14
14
  "author": "100ms",
15
15
  "license": "MIT",
16
16
  "repository": {
@@ -75,12 +75,12 @@
75
75
  "react": ">=17.0.2 <19.0.0"
76
76
  },
77
77
  "dependencies": {
78
- "@100mslive/hls-player": "0.3.20-alpha.0",
78
+ "@100mslive/hls-player": "0.3.20-alpha.1",
79
79
  "@100mslive/hms-noise-cancellation": "0.0.1",
80
- "@100mslive/hms-virtual-background": "1.13.20-alpha.0",
81
- "@100mslive/hms-whiteboard": "0.0.10-alpha.0",
82
- "@100mslive/react-icons": "0.10.20-alpha.0",
83
- "@100mslive/react-sdk": "0.10.20-alpha.0",
80
+ "@100mslive/hms-virtual-background": "1.13.20-alpha.1",
81
+ "@100mslive/hms-whiteboard": "0.0.10-alpha.1",
82
+ "@100mslive/react-icons": "0.10.20-alpha.1",
83
+ "@100mslive/react-sdk": "0.10.20-alpha.1",
84
84
  "@100mslive/types-prebuilt": "0.12.12",
85
85
  "@emoji-mart/data": "^1.0.6",
86
86
  "@emoji-mart/react": "^1.0.1",
@@ -117,5 +117,5 @@
117
117
  "uuid": "^8.3.2",
118
118
  "worker-timers": "^7.0.40"
119
119
  },
120
- "gitHead": "9292ef206d23ad3743254e046fce98240fa3a134"
120
+ "gitHead": "1772ffc7344d3a8d0c3548779e1d7e808e3715ad"
121
121
  }
@@ -143,10 +143,10 @@ export const HMSPrebuilt = React.forwardRef<HMSPrebuiltRefType, HMSPrebuiltProps
143
143
  event: string;
144
144
  }
145
145
  | undefined;
146
- const tokenByRoomCodeEndpoint: string = endpointsObj?.tokenByRoomCode || '';
147
- const initEndpoint: string = endpointsObj?.init || '';
148
- const eventEndpoint: string = endpointsObj?.event || '';
149
- const roomLayoutEndpoint: string = endpointsObj?.roomLayout || '';
146
+ const tokenByRoomCodeEndpoint = endpointsObj?.tokenByRoomCode;
147
+ const initEndpoint = endpointsObj?.init;
148
+ const eventEndpoint = endpointsObj?.event;
149
+ const roomLayoutEndpoint = endpointsObj?.roomLayout;
150
150
 
151
151
  const overrideLayout: Partial<Layout> = {
152
152
  logo,
@@ -288,7 +288,7 @@ function AppRoutes({
288
288
  authTokenByRoomCodeEndpoint,
289
289
  defaultAuthToken,
290
290
  }: {
291
- authTokenByRoomCodeEndpoint: string;
291
+ authTokenByRoomCodeEndpoint?: string;
292
292
  defaultAuthToken?: string;
293
293
  }) {
294
294
  const roomLayout = useRoomLayout();
@@ -7,7 +7,7 @@ type HMSPrebuiltContextType = {
7
7
  userName?: string;
8
8
  userId?: string;
9
9
  containerSelector: string;
10
- endpoints?: Record<string, string>;
10
+ endpoints?: Record<string, string | undefined>;
11
11
  onLeave?: () => void;
12
12
  onJoin?: () => void;
13
13
  };
@@ -25,7 +25,7 @@ import { APP_DATA } from '../common/constants';
25
25
  * ui_mode=activespeaker => lands in active speaker mode after joining the room
26
26
  */
27
27
  const AuthToken = React.memo<{
28
- authTokenByRoomCodeEndpoint: string;
28
+ authTokenByRoomCodeEndpoint?: string;
29
29
  defaultAuthToken?: string;
30
30
  activeState?: PrebuiltStates;
31
31
  }>(({ authTokenByRoomCodeEndpoint, defaultAuthToken, activeState }) => {
@@ -1,7 +1,28 @@
1
- import React, { forwardRef } from 'react';
1
+ import React, { forwardRef, useEffect, useState } from 'react';
2
2
  import { Flex } from '../../../Layout';
3
3
 
4
4
  export const HMSVideo = forwardRef(({ children, ...props }, videoRef) => {
5
+ const [width, setWidth] = useState('auto');
6
+
7
+ useEffect(() => {
8
+ const updatingVideoWidth = () => {
9
+ const videoEl = videoRef.current;
10
+ if (!videoEl) {
11
+ return;
12
+ }
13
+ if (videoEl.videoWidth > videoEl.videoHeight && width !== '100%') {
14
+ setWidth('100%');
15
+ }
16
+ };
17
+ const videoEl = videoRef.current;
18
+ if (!videoEl) {
19
+ return;
20
+ }
21
+ videoEl.addEventListener('loadedmetadata', updatingVideoWidth);
22
+ return () => {
23
+ videoEl.removeEventListener('loadedmetadata', updatingVideoWidth);
24
+ };
25
+ }, []);
5
26
  return (
6
27
  <Flex
7
28
  data-testid="hms-video"
@@ -11,9 +32,8 @@ export const HMSVideo = forwardRef(({ children, ...props }, videoRef) => {
11
32
  justifyContent: 'center',
12
33
  transition: 'all 0.3s ease-in-out',
13
34
  '@md': {
14
- height: 'auto',
15
35
  '& video': {
16
- height: '$60 !important',
36
+ height: props.isFullScreen ? '' : '$60 !important',
17
37
  },
18
38
  },
19
39
  '& video::cue': {
@@ -41,7 +61,7 @@ export const HMSVideo = forwardRef(({ children, ...props }, videoRef) => {
41
61
  style={{
42
62
  margin: '0 auto',
43
63
  objectFit: 'contain',
44
- width: 'auto',
64
+ width: width,
45
65
  height: '100%',
46
66
  maxWidth: '100%',
47
67
  }}
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React, { useEffect, useRef } from 'react';
2
2
  import { ChevronLeftIcon, CrossIcon } from '@100mslive/react-icons';
3
3
  import { Button } from '../../../Button';
4
4
  import { Input } from '../../../Input';
@@ -22,6 +22,16 @@ export const ChangeNameContent = ({
22
22
  onExit: () => void;
23
23
  onBackClick: () => void;
24
24
  }) => {
25
+ const inputRef = useRef<HTMLInputElement>(null);
26
+
27
+ useEffect(() => {
28
+ if (isMobile) {
29
+ setTimeout(() => {
30
+ inputRef.current?.focus();
31
+ }, 200);
32
+ }
33
+ }, [isMobile]);
34
+
25
35
  return (
26
36
  <form
27
37
  onSubmit={async e => {
@@ -53,10 +63,10 @@ export const ChangeNameContent = ({
53
63
  </Text>
54
64
  <Flex justify="center" align="center" css={{ my: '$8', w: '100%', '@md': { px: '$8' } }}>
55
65
  <Input
66
+ ref={inputRef}
56
67
  css={{ width: '100%', bg: '$surface_default' }}
57
68
  value={currentName}
58
- // Prevents popup from showing up on chrome mweb
59
- type={isMobile ? 'search' : 'text'}
69
+ type="text"
60
70
  onChange={e => {
61
71
  setCurrentName(e.target.value);
62
72
  }}
@@ -58,7 +58,7 @@ export const ChangeNameModal = ({
58
58
  if (isMobile) {
59
59
  return (
60
60
  <Sheet.Root defaultOpen onOpenChange={onOpenChange}>
61
- <Sheet.Content css={{ bg: '$surface_dim', p: '$8 0' }}>
61
+ <Sheet.Content css={{ bg: '$surface_dim', p: '$8 0' }} onOpenAutoFocus={e => e.preventDefault()}>
62
62
  <ChangeNameContent {...props} />
63
63
  </Sheet.Content>
64
64
  </Sheet.Root>
@@ -485,11 +485,6 @@ const HLSView = () => {
485
485
  css={{
486
486
  flex: isLandscape ? '2 1 0' : '1 1 0',
487
487
  transition: 'all 0.3s ease-in-out',
488
- '&:fullscreen': {
489
- '& video': {
490
- height: 'unset !important',
491
- },
492
- },
493
488
  }}
494
489
  >
495
490
  {hlsViewRef.current && (isMobile || isLandscape) && (
@@ -541,6 +536,7 @@ const HLSView = () => {
541
536
  onMouseMove={onHoverHandler}
542
537
  onMouseLeave={onHoverHandler}
543
538
  onClick={onClickHandler}
539
+ isFullScreen={isFullScreen}
544
540
  onDoubleClick={e => {
545
541
  onDoubleClickHandler(e);
546
542
  }}
@@ -728,6 +724,7 @@ const HLSView = () => {
728
724
  selection={currentSelectedQuality}
729
725
  onQualityChange={handleQuality}
730
726
  isAuto={isUserSelectedAuto}
727
+ containerRef={hlsViewRef.current}
731
728
  />
732
729
  ) : null}
733
730
  {isFullScreenSupported ? (