@100mslive/roomkit-react 0.4.3-alpha.2 → 0.4.3-alpha.3

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.
@@ -2369,7 +2369,7 @@
2369
2369
  "format": "esm"
2370
2370
  },
2371
2371
  "src/Prebuilt/AppContext.tsx": {
2372
- "bytes": 909,
2372
+ "bytes": 881,
2373
2373
  "imports": [
2374
2374
  {
2375
2375
  "path": "react",
@@ -11311,7 +11311,7 @@
11311
11311
  ],
11312
11312
  "format": "esm"
11313
11313
  },
11314
- "../../../../../../../tmp/tmp-3260-PUBvZrZvdKvu/19cae6f743b3/tldraw.css": {
11314
+ "../../../../../../../tmp/tmp-3267-GrJljmUNkgO6/19cd124ec212/tldraw.css": {
11315
11315
  "bytes": 80111,
11316
11316
  "imports": [
11317
11317
  {
@@ -11361,7 +11361,7 @@
11361
11361
  }
11362
11362
  ]
11363
11363
  },
11364
- "../../../../../../../tmp/tmp-3260-PUBvZrZvdKvu/19cae6f742e1/index.css": {
11364
+ "../../../../../../../tmp/tmp-3267-GrJljmUNkgO6/19cd124ebc10/index.css": {
11365
11365
  "bytes": 597,
11366
11366
  "imports": [
11367
11367
  {
@@ -11370,7 +11370,7 @@
11370
11370
  "external": true
11371
11371
  },
11372
11372
  {
11373
- "path": "../../../../../../../tmp/tmp-3260-PUBvZrZvdKvu/19cae6f743b3/tldraw.css",
11373
+ "path": "../../../../../../../tmp/tmp-3267-GrJljmUNkgO6/19cd124ec212/tldraw.css",
11374
11374
  "kind": "import-rule",
11375
11375
  "original": "@tldraw/tldraw/tldraw.css"
11376
11376
  }
@@ -11445,7 +11445,7 @@
11445
11445
  "original": "../../common/constants"
11446
11446
  },
11447
11447
  {
11448
- "path": "../../../../../../../tmp/tmp-3260-PUBvZrZvdKvu/19cae6f742e1/index.css",
11448
+ "path": "../../../../../../../tmp/tmp-3267-GrJljmUNkgO6/19cd124ebc10/index.css",
11449
11449
  "kind": "import-statement",
11450
11450
  "original": "@100mslive/hms-whiteboard/index.css"
11451
11451
  },
@@ -12168,7 +12168,7 @@
12168
12168
  "format": "esm"
12169
12169
  },
12170
12170
  "src/Prebuilt/layouts/HLSView.jsx": {
12171
- "bytes": 30184,
12171
+ "bytes": 28662,
12172
12172
  "imports": [
12173
12173
  {
12174
12174
  "path": "react",
@@ -12295,11 +12295,6 @@
12295
12295
  "kind": "import-statement",
12296
12296
  "original": "../../Tooltip"
12297
12297
  },
12298
- {
12299
- "path": "src/Prebuilt/AppContext.tsx",
12300
- "kind": "import-statement",
12301
- "original": "../AppContext"
12302
- },
12303
12298
  {
12304
12299
  "path": "src/Prebuilt/layouts/WaitingView.tsx",
12305
12300
  "kind": "import-statement",
@@ -14596,7 +14591,7 @@
14596
14591
  "format": "esm"
14597
14592
  },
14598
14593
  "src/Prebuilt/App.tsx": {
14599
- "bytes": 11117,
14594
+ "bytes": 10920,
14600
14595
  "imports": [
14601
14596
  {
14602
14597
  "path": "react",
@@ -15714,7 +15709,7 @@
15714
15709
  "imports": [],
15715
15710
  "exports": [],
15716
15711
  "inputs": {},
15717
- "bytes": 3698218
15712
+ "bytes": 3695494
15718
15713
  },
15719
15714
  "dist/index.cjs.js": {
15720
15715
  "imports": [
@@ -19047,7 +19042,7 @@
19047
19042
  "cssBundle": "dist/index.cjs.css",
19048
19043
  "inputs": {
19049
19044
  "<define:process.env>": {
19050
- "bytesInOutput": 21789
19045
+ "bytesInOutput": 21904
19051
19046
  },
19052
19047
  "../../node_modules/lodash/lodash.js": {
19053
19048
  "bytesInOutput": 225096
@@ -19326,7 +19321,7 @@
19326
19321
  "bytesInOutput": 925
19327
19322
  },
19328
19323
  "src/Prebuilt/App.tsx": {
19329
- "bytesInOutput": 8704
19324
+ "bytesInOutput": 8536
19330
19325
  },
19331
19326
  "src/Prebuilt/components/AppData/AppData.tsx": {
19332
19327
  "bytesInOutput": 6918
@@ -19925,7 +19920,7 @@
19925
19920
  "src/Prebuilt/components/VideoLayouts/WhiteboardLayout.tsx": {
19926
19921
  "bytesInOutput": 3051
19927
19922
  },
19928
- "../../../../../../../tmp/tmp-3260-PUBvZrZvdKvu/19cae6f742e1/index.css": {
19923
+ "../../../../../../../tmp/tmp-3267-GrJljmUNkgO6/19cd124ebc10/index.css": {
19929
19924
  "bytesInOutput": 0
19930
19925
  },
19931
19926
  "src/Prebuilt/common/PeersSorter.ts": {
@@ -19935,7 +19930,7 @@
19935
19930
  "bytesInOutput": 2922
19936
19931
  },
19937
19932
  "src/Prebuilt/layouts/HLSView.jsx": {
19938
- "bytesInOutput": 31534
19933
+ "bytesInOutput": 30000
19939
19934
  },
19940
19935
  "src/Prebuilt/components/HlsStatsOverlay.jsx": {
19941
19936
  "bytesInOutput": 3395
@@ -20160,7 +20155,7 @@
20160
20155
  "bytesInOutput": 2777
20161
20156
  }
20162
20157
  },
20163
- "bytes": 1524778
20158
+ "bytes": 1523191
20164
20159
  },
20165
20160
  "dist/index.cjs.css.map": {
20166
20161
  "imports": [],
@@ -20222,10 +20217,10 @@
20222
20217
  }
20223
20218
  ],
20224
20219
  "inputs": {
20225
- "../../../../../../../tmp/tmp-3260-PUBvZrZvdKvu/19cae6f743b3/tldraw.css": {
20220
+ "../../../../../../../tmp/tmp-3267-GrJljmUNkgO6/19cd124ec212/tldraw.css": {
20226
20221
  "bytesInOutput": 75223
20227
20222
  },
20228
- "../../../../../../../tmp/tmp-3260-PUBvZrZvdKvu/19cae6f742e1/index.css": {
20223
+ "../../../../../../../tmp/tmp-3267-GrJljmUNkgO6/19cd124ebc10/index.css": {
20229
20224
  "bytesInOutput": 401
20230
20225
  }
20231
20226
  },
@@ -2369,7 +2369,7 @@
2369
2369
  "format": "esm"
2370
2370
  },
2371
2371
  "src/Prebuilt/AppContext.tsx": {
2372
- "bytes": 909,
2372
+ "bytes": 881,
2373
2373
  "imports": [
2374
2374
  {
2375
2375
  "path": "react",
@@ -11311,7 +11311,7 @@
11311
11311
  ],
11312
11312
  "format": "esm"
11313
11313
  },
11314
- "../../../../../../../tmp/tmp-3260-F7uOIFgAcFyi/19cae6f743b2/tldraw.css": {
11314
+ "../../../../../../../tmp/tmp-3267-a4cgp65ro622/19cd124ec843/tldraw.css": {
11315
11315
  "bytes": 80111,
11316
11316
  "imports": [
11317
11317
  {
@@ -11361,7 +11361,7 @@
11361
11361
  }
11362
11362
  ]
11363
11363
  },
11364
- "../../../../../../../tmp/tmp-3260-F7uOIFgAcFyi/19cae6f73df0/index.css": {
11364
+ "../../../../../../../tmp/tmp-3267-a4cgp65ro622/19cd124ec181/index.css": {
11365
11365
  "bytes": 597,
11366
11366
  "imports": [
11367
11367
  {
@@ -11370,7 +11370,7 @@
11370
11370
  "external": true
11371
11371
  },
11372
11372
  {
11373
- "path": "../../../../../../../tmp/tmp-3260-F7uOIFgAcFyi/19cae6f743b2/tldraw.css",
11373
+ "path": "../../../../../../../tmp/tmp-3267-a4cgp65ro622/19cd124ec843/tldraw.css",
11374
11374
  "kind": "import-rule",
11375
11375
  "original": "@tldraw/tldraw/tldraw.css"
11376
11376
  }
@@ -11445,7 +11445,7 @@
11445
11445
  "original": "../../common/constants"
11446
11446
  },
11447
11447
  {
11448
- "path": "../../../../../../../tmp/tmp-3260-F7uOIFgAcFyi/19cae6f73df0/index.css",
11448
+ "path": "../../../../../../../tmp/tmp-3267-a4cgp65ro622/19cd124ec181/index.css",
11449
11449
  "kind": "import-statement",
11450
11450
  "original": "@100mslive/hms-whiteboard/index.css"
11451
11451
  },
@@ -12168,7 +12168,7 @@
12168
12168
  "format": "esm"
12169
12169
  },
12170
12170
  "src/Prebuilt/layouts/HLSView.jsx": {
12171
- "bytes": 30184,
12171
+ "bytes": 28662,
12172
12172
  "imports": [
12173
12173
  {
12174
12174
  "path": "react",
@@ -12295,11 +12295,6 @@
12295
12295
  "kind": "import-statement",
12296
12296
  "original": "../../Tooltip"
12297
12297
  },
12298
- {
12299
- "path": "src/Prebuilt/AppContext.tsx",
12300
- "kind": "import-statement",
12301
- "original": "../AppContext"
12302
- },
12303
12298
  {
12304
12299
  "path": "src/Prebuilt/layouts/WaitingView.tsx",
12305
12300
  "kind": "import-statement",
@@ -14596,7 +14591,7 @@
14596
14591
  "format": "esm"
14597
14592
  },
14598
14593
  "src/Prebuilt/App.tsx": {
14599
- "bytes": 11117,
14594
+ "bytes": 10920,
14600
14595
  "imports": [
14601
14596
  {
14602
14597
  "path": "react",
@@ -15714,7 +15709,7 @@
15714
15709
  "imports": [],
15715
15710
  "exports": [],
15716
15711
  "inputs": {},
15717
- "bytes": 3738197
15712
+ "bytes": 3735464
15718
15713
  },
15719
15714
  "dist/index.js": {
15720
15715
  "imports": [
@@ -19113,7 +19108,7 @@
19113
19108
  "cssBundle": "dist/index.css",
19114
19109
  "inputs": {
19115
19110
  "<define:process.env>": {
19116
- "bytesInOutput": 21789
19111
+ "bytesInOutput": 21904
19117
19112
  },
19118
19113
  "../../node_modules/lodash/lodash.js": {
19119
19114
  "bytesInOutput": 225091
@@ -19392,7 +19387,7 @@
19392
19387
  "bytesInOutput": 887
19393
19388
  },
19394
19389
  "src/Prebuilt/App.tsx": {
19395
- "bytesInOutput": 8204
19390
+ "bytesInOutput": 8036
19396
19391
  },
19397
19392
  "src/Prebuilt/components/AppData/AppData.tsx": {
19398
19393
  "bytesInOutput": 6633
@@ -19991,7 +19986,7 @@
19991
19986
  "src/Prebuilt/components/VideoLayouts/WhiteboardLayout.tsx": {
19992
19987
  "bytesInOutput": 2830
19993
19988
  },
19994
- "../../../../../../../tmp/tmp-3260-F7uOIFgAcFyi/19cae6f73df0/index.css": {
19989
+ "../../../../../../../tmp/tmp-3267-a4cgp65ro622/19cd124ec181/index.css": {
19995
19990
  "bytesInOutput": 0
19996
19991
  },
19997
19992
  "src/Prebuilt/common/PeersSorter.ts": {
@@ -20001,7 +19996,7 @@
20001
19996
  "bytesInOutput": 2787
20002
19997
  },
20003
19998
  "src/Prebuilt/layouts/HLSView.jsx": {
20004
- "bytesInOutput": 29541
19999
+ "bytesInOutput": 28045
20005
20000
  },
20006
20001
  "src/Prebuilt/components/HlsStatsOverlay.jsx": {
20007
20002
  "bytesInOutput": 3171
@@ -20226,7 +20221,7 @@
20226
20221
  "bytesInOutput": 2632
20227
20222
  }
20228
20223
  },
20229
- "bytes": 1469866
20224
+ "bytes": 1468317
20230
20225
  },
20231
20226
  "dist/index.css.map": {
20232
20227
  "imports": [],
@@ -20288,10 +20283,10 @@
20288
20283
  }
20289
20284
  ],
20290
20285
  "inputs": {
20291
- "../../../../../../../tmp/tmp-3260-F7uOIFgAcFyi/19cae6f743b2/tldraw.css": {
20286
+ "../../../../../../../tmp/tmp-3267-a4cgp65ro622/19cd124ec843/tldraw.css": {
20292
20287
  "bytesInOutput": 75223
20293
20288
  },
20294
- "../../../../../../../tmp/tmp-3260-F7uOIFgAcFyi/19cae6f73df0/index.css": {
20289
+ "../../../../../../../tmp/tmp-3267-a4cgp65ro622/19cd124ec181/index.css": {
20295
20290
  "bytesInOutput": 401
20296
20291
  }
20297
20292
  },
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "prebuilt",
11
11
  "roomkit"
12
12
  ],
13
- "version": "0.4.3-alpha.2",
13
+ "version": "0.4.3-alpha.3",
14
14
  "author": "100ms",
15
15
  "license": "MIT",
16
16
  "repository": {
@@ -63,12 +63,12 @@
63
63
  "react": ">=17.0.2 <19.0.0"
64
64
  },
65
65
  "dependencies": {
66
- "@100mslive/hls-player": "0.4.3-alpha.2",
66
+ "@100mslive/hls-player": "0.4.3-alpha.3",
67
67
  "@100mslive/hms-noise-cancellation": "0.0.2",
68
- "@100mslive/hms-virtual-background": "1.14.3-alpha.2",
69
- "@100mslive/hms-whiteboard": "0.1.3-alpha.2",
70
- "@100mslive/react-icons": "0.11.3-alpha.2",
71
- "@100mslive/react-sdk": "0.11.3-alpha.2",
68
+ "@100mslive/hms-virtual-background": "1.14.3-alpha.3",
69
+ "@100mslive/hms-whiteboard": "0.1.3-alpha.3",
70
+ "@100mslive/react-icons": "0.11.3-alpha.3",
71
+ "@100mslive/react-sdk": "0.11.3-alpha.3",
72
72
  "@100mslive/types-prebuilt": "0.12.12",
73
73
  "@emoji-mart/data": "^1.0.6",
74
74
  "@emoji-mart/react": "^1.0.1",
@@ -105,5 +105,5 @@
105
105
  "uuid": "^8.3.2",
106
106
  "worker-timers": "^7.0.40"
107
107
  },
108
- "gitHead": "b2be1a31b8d79a33a3e2f4f2475a483d68fdffbb"
108
+ "gitHead": "43ae4fb9ef619c492c010d185fe7200bd1e3fa45"
109
109
  }
@@ -57,7 +57,6 @@ export type HMSPrebuiltOptions = {
57
57
  userId?: string;
58
58
  endpoints?: object;
59
59
  effectsSDKKey?: string;
60
- managementToken?: string;
61
60
  };
62
61
 
63
62
  export type HMSPrebuiltProps = {
@@ -94,7 +93,7 @@ export const HMSPrebuilt = React.forwardRef<HMSPrebuiltRefType, HMSPrebuiltProps
94
93
  logo,
95
94
  typography,
96
95
  themes,
97
- options: { userName = '', userId = '', endpoints, managementToken } = {},
96
+ options: { userName = '', userId = '', endpoints } = {},
98
97
  screens,
99
98
  leaveOnUnload = true,
100
99
  onLeave,
@@ -142,14 +141,12 @@ export const HMSPrebuilt = React.forwardRef<HMSPrebuiltRefType, HMSPrebuiltProps
142
141
  tokenByRoomCode: string;
143
142
  roomLayout: string;
144
143
  event: string;
145
- passport: string;
146
144
  }
147
145
  | undefined;
148
146
  const tokenByRoomCodeEndpoint = endpointsObj?.tokenByRoomCode;
149
147
  const initEndpoint = endpointsObj?.init;
150
148
  const eventEndpoint = endpointsObj?.event;
151
149
  const roomLayoutEndpoint = endpointsObj?.roomLayout;
152
- const passportEndpoint = endpointsObj?.passport;
153
150
 
154
151
  const overrideLayout: Partial<Layout> = {
155
152
  logo,
@@ -183,13 +180,11 @@ export const HMSPrebuilt = React.forwardRef<HMSPrebuiltRefType, HMSPrebuiltProps
183
180
  onJoin,
184
181
  userName,
185
182
  userId,
186
- managementToken,
187
183
  endpoints: {
188
184
  tokenByRoomCode: tokenByRoomCodeEndpoint,
189
185
  init: initEndpoint,
190
186
  roomLayout: roomLayoutEndpoint,
191
187
  event: eventEndpoint,
192
- passport: passportEndpoint,
193
188
  },
194
189
  }}
195
190
  >
@@ -8,7 +8,6 @@ type HMSPrebuiltContextType = {
8
8
  userId?: string;
9
9
  containerSelector: string;
10
10
  endpoints?: Record<string, string | undefined>;
11
- managementToken?: string;
12
11
  onLeave?: () => void;
13
12
  onJoin?: () => void;
14
13
  };
@@ -34,7 +34,6 @@ import { Loading } from '../../Loading';
34
34
  import { Text } from '../../Text';
35
35
  import { config, theme, useTheme } from '../../Theme';
36
36
  import { Tooltip } from '../../Tooltip';
37
- import { useHMSPrebuiltContext } from '../AppContext';
38
37
  import { WaitingView } from './WaitingView';
39
38
  import { useSidepaneToggle } from '../components/AppData/useSidepane';
40
39
  import { useRoomLayoutConferencingScreen } from '../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';
@@ -80,8 +79,6 @@ const HLSView = () => {
80
79
  const [streamEnded, setStreamEnded] = useState(false);
81
80
  let [hlsStatsState, setHlsStatsState] = useState(null);
82
81
  const hlsUrl = hlsState.variants[0]?.url;
83
- const { endpoints, managementToken } = useHMSPrebuiltContext();
84
- const [resolvedHlsUrl, setResolvedHlsUrl] = useState(null);
85
82
  const [availableLayers, setAvailableLayers] = useState([]);
86
83
  const [isVideoLive, setIsVideoLive] = useState(true);
87
84
  const [isCaptionEnabled, setIsCaptionEnabled] = useState(true);
@@ -95,7 +92,7 @@ const HLSView = () => {
95
92
  });
96
93
  const [isPaused, setIsPaused] = useState(false);
97
94
  const [show, toggle] = useToggle(false);
98
- const lastHlsUrl = usePrevious(resolvedHlsUrl);
95
+ const lastHlsUrl = usePrevious(hlsUrl);
99
96
  const vanillaStore = useHMSVanillaStore();
100
97
  const [controlsVisible, setControlsVisible] = useState(true);
101
98
  const [isUserSelectedAuto, setIsUserSelectedAuto] = useState(true);
@@ -136,50 +133,6 @@ const HLSView = () => {
136
133
  }
137
134
  }, [hlsUrl, streamEnded, lastHlsUrl]);
138
135
 
139
- // Fetch signed URL from passport-api for authenticated CDN streams
140
- useEffect(() => {
141
- if (!hlsUrl) {
142
- setResolvedHlsUrl(null);
143
- return;
144
- }
145
- if (!hlsUrl.includes('/s/')) {
146
- setResolvedHlsUrl(hlsUrl);
147
- return;
148
- }
149
- const passportEndpoint = endpoints?.passport;
150
- if (!passportEndpoint || !managementToken) {
151
- setResolvedHlsUrl(hlsUrl);
152
- return;
153
- }
154
- let cancelled = false;
155
- const fetchSignedUrl = async () => {
156
- try {
157
- const resp = await fetch(`${passportEndpoint}/token`, {
158
- method: 'POST',
159
- headers: {
160
- 'Content-Type': 'application/json',
161
- Authorization: `Bearer ${managementToken}`,
162
- },
163
- body: JSON.stringify({ url: hlsUrl }),
164
- });
165
- if (!resp.ok) throw new Error(`passport-api returned ${resp.status}`);
166
- const data = await resp.json();
167
- if (!cancelled) {
168
- setResolvedHlsUrl(data.tokenized_url || hlsUrl);
169
- }
170
- } catch (err) {
171
- console.error('[HLSView] Failed to fetch signed URL from passport-api:', err);
172
- if (!cancelled) {
173
- setResolvedHlsUrl(hlsUrl);
174
- }
175
- }
176
- };
177
- fetchSignedUrl();
178
- return () => {
179
- cancelled = true;
180
- };
181
- }, [hlsUrl, endpoints?.passport, managementToken]);
182
-
183
136
  useEffect(() => {
184
137
  if (!notification) return;
185
138
  const toastID = toastMap?.[notification.data.id];
@@ -308,8 +261,8 @@ const HLSView = () => {
308
261
  };
309
262
 
310
263
  const handleAutoplayBlock = data => setIsHlsAutoplayBlocked(!!data);
311
- if (videoEl && resolvedHlsUrl) {
312
- hlsPlayer = new HMSHLSPlayer(resolvedHlsUrl, videoEl);
264
+ if (videoEl && hlsUrl) {
265
+ hlsPlayer = new HMSHLSPlayer(hlsUrl, videoEl);
313
266
  hlsPlayer.on(HMSHLSPlayerEvents.SEEK_POS_BEHIND_LIVE_EDGE, handleNoLongerLive);
314
267
  hlsPlayer.on(HMSHLSPlayerEvents.TIMED_METADATA_LOADED, metadataLoadedHandler);
315
268
  hlsPlayer.on(HMSHLSPlayerEvents.ERROR, handleError);
@@ -333,7 +286,7 @@ const HLSView = () => {
333
286
  };
334
287
  }
335
288
  // eslint-disable-next-line react-hooks/exhaustive-deps
336
- }, [resolvedHlsUrl, vanillaStore, hmsActions]);
289
+ }, [hlsUrl, vanillaStore, hmsActions]);
337
290
 
338
291
  /**
339
292
  * initialize and subscribe to hlsState