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

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.js CHANGED
@@ -62,7 +62,7 @@ import {
62
62
  theme,
63
63
  useBorderAudioLevel,
64
64
  useTheme
65
- } from "./chunk-BKAJ6YG4.js";
65
+ } from "./chunk-G5EI4B2P.js";
66
66
  export {
67
67
  Accordion,
68
68
  AudioLevel,
@@ -4778,7 +4778,7 @@
4778
4778
  "format": "cjs"
4779
4779
  },
4780
4780
  "../hms-video-store/dist/index.js": {
4781
- "bytes": 332801,
4781
+ "bytes": 333031,
4782
4782
  "imports": [
4783
4783
  {
4784
4784
  "path": "../../node_modules/reselect/es/index.js",
@@ -13369,7 +13369,7 @@
13369
13369
  "format": "esm"
13370
13370
  },
13371
13371
  "src/Prebuilt/plugins/FlyingEmoji.jsx": {
13372
- "bytes": 3826,
13372
+ "bytes": 4255,
13373
13373
  "imports": [
13374
13374
  {
13375
13375
  "path": "react",
@@ -13410,6 +13410,11 @@
13410
13410
  "path": "<define:process.env>",
13411
13411
  "kind": "import-statement",
13412
13412
  "external": true
13413
+ },
13414
+ {
13415
+ "path": "<runtime>",
13416
+ "kind": "import-statement",
13417
+ "external": true
13413
13418
  }
13414
13419
  ],
13415
13420
  "format": "esm"
@@ -13943,7 +13948,7 @@
13943
13948
  "imports": [],
13944
13949
  "exports": [],
13945
13950
  "inputs": {},
13946
- "bytes": 3329809
13951
+ "bytes": 3330969
13947
13952
  },
13948
13953
  "dist/index.cjs.js": {
13949
13954
  "imports": [
@@ -16937,7 +16942,7 @@
16937
16942
  "entryPoint": "src/index.ts",
16938
16943
  "inputs": {
16939
16944
  "<define:process.env>": {
16940
- "bytesInOutput": 18307
16945
+ "bytesInOutput": 18308
16941
16946
  },
16942
16947
  "src/Theme/base.config.ts": {
16943
16948
  "bytesInOutput": 6104
@@ -17105,7 +17110,7 @@
17105
17110
  "bytesInOutput": 983
17106
17111
  },
17107
17112
  "src/AudioLevel/AudioLevel.tsx": {
17108
- "bytesInOutput": 2808
17113
+ "bytesInOutput": 2807
17109
17114
  },
17110
17115
  "src/AudioLevel/index.ts": {
17111
17116
  "bytesInOutput": 175
@@ -17216,7 +17221,7 @@
17216
17221
  "bytesInOutput": 3450
17217
17222
  },
17218
17223
  "../../node_modules/lodash/lodash.js": {
17219
- "bytesInOutput": 224317
17224
+ "bytesInOutput": 224308
17220
17225
  },
17221
17226
  "src/Prebuilt/provider/roomLayoutProvider/constants/index.ts": {
17222
17227
  "bytesInOutput": 1887
@@ -17633,7 +17638,7 @@
17633
17638
  "bytesInOutput": 1528
17634
17639
  },
17635
17640
  "src/Prebuilt/components/hooks/usePinnedMessages.ts": {
17636
- "bytesInOutput": 3165
17641
+ "bytesInOutput": 3164
17637
17642
  },
17638
17643
  "src/Prebuilt/components/Chat/ChatActions.tsx": {
17639
17644
  "bytesInOutput": 11568
@@ -17672,7 +17677,7 @@
17672
17677
  "bytesInOutput": 1403
17673
17678
  },
17674
17679
  "src/Prebuilt/components/Chat/StickIndicator.tsx": {
17675
- "bytesInOutput": 828
17680
+ "bytesInOutput": 827
17676
17681
  },
17677
17682
  "src/Prebuilt/components/Chat/PinnedMessage.tsx": {
17678
17683
  "bytesInOutput": 6242
@@ -17735,7 +17740,7 @@
17735
17740
  "bytesInOutput": 3422
17736
17741
  },
17737
17742
  "src/Prebuilt/components/Preview/PreviewJoin.tsx": {
17738
- "bytesInOutput": 11956
17743
+ "bytesInOutput": 11955
17739
17744
  },
17740
17745
  "src/Prebuilt/components/RoleChangeRequest/RequestPrompt.tsx": {
17741
17746
  "bytesInOutput": 2807
@@ -17750,13 +17755,13 @@
17750
17755
  "bytesInOutput": 5183
17751
17756
  },
17752
17757
  "src/Prebuilt/components/Pagination.tsx": {
17753
- "bytesInOutput": 2119
17758
+ "bytesInOutput": 2118
17754
17759
  },
17755
17760
  "src/Prebuilt/components/VideoLayouts/Grid.tsx": {
17756
17761
  "bytesInOutput": 1620
17757
17762
  },
17758
17763
  "src/Prebuilt/components/hooks/useTileLayout.tsx": {
17759
- "bytesInOutput": 4486
17764
+ "bytesInOutput": 4481
17760
17765
  },
17761
17766
  "src/Prebuilt/components/VideoLayouts/EqualProminence.tsx": {
17762
17767
  "bytesInOutput": 2453
@@ -17789,7 +17794,7 @@
17789
17794
  "bytesInOutput": 3759
17790
17795
  },
17791
17796
  "src/Prebuilt/common/PeersSorter.ts": {
17792
- "bytesInOutput": 3605
17797
+ "bytesInOutput": 3604
17793
17798
  },
17794
17799
  "src/Prebuilt/components/VideoLayouts/GridLayout.tsx": {
17795
17800
  "bytesInOutput": 5493
@@ -17915,7 +17920,7 @@
17915
17920
  "bytesInOutput": 1821
17916
17921
  },
17917
17922
  "src/Prebuilt/components/Toast/ToastConfig.jsx": {
17918
- "bytesInOutput": 7703
17923
+ "bytesInOutput": 7702
17919
17924
  },
17920
17925
  "src/Prebuilt/components/Toast/ToastBatcher.js": {
17921
17926
  "bytesInOutput": 2394
@@ -17972,7 +17977,7 @@
17972
17977
  "bytesInOutput": 772
17973
17978
  },
17974
17979
  "src/Prebuilt/plugins/FlyingEmoji.jsx": {
17975
- "bytesInOutput": 4336
17980
+ "bytesInOutput": 4756
17976
17981
  },
17977
17982
  "src/Prebuilt/plugins/RemoteStopScreenshare.jsx": {
17978
17983
  "bytesInOutput": 827
@@ -17999,7 +18004,7 @@
17999
18004
  "bytesInOutput": 2980
18000
18005
  }
18001
18006
  },
18002
- "bytes": 1587273
18007
+ "bytes": 1587673
18003
18008
  }
18004
18009
  }
18005
18010
  }
@@ -4778,7 +4778,7 @@
4778
4778
  "format": "cjs"
4779
4779
  },
4780
4780
  "../hms-video-store/dist/index.js": {
4781
- "bytes": 332801,
4781
+ "bytes": 333031,
4782
4782
  "imports": [
4783
4783
  {
4784
4784
  "path": "../../node_modules/reselect/es/index.js",
@@ -13369,7 +13369,7 @@
13369
13369
  "format": "esm"
13370
13370
  },
13371
13371
  "src/Prebuilt/plugins/FlyingEmoji.jsx": {
13372
- "bytes": 3826,
13372
+ "bytes": 4255,
13373
13373
  "imports": [
13374
13374
  {
13375
13375
  "path": "react",
@@ -13410,6 +13410,11 @@
13410
13410
  "path": "<define:process.env>",
13411
13411
  "kind": "import-statement",
13412
13412
  "external": true
13413
+ },
13414
+ {
13415
+ "path": "<runtime>",
13416
+ "kind": "import-statement",
13417
+ "external": true
13413
13418
  }
13414
13419
  ],
13415
13420
  "format": "esm"
@@ -13948,7 +13953,7 @@
13948
13953
  "dist/index.js": {
13949
13954
  "imports": [
13950
13955
  {
13951
- "path": "dist/chunk-BKAJ6YG4.js",
13956
+ "path": "dist/chunk-G5EI4B2P.js",
13952
13957
  "kind": "import-statement"
13953
13958
  }
13954
13959
  ],
@@ -14021,16 +14026,16 @@
14021
14026
  "inputs": {},
14022
14027
  "bytes": 1822
14023
14028
  },
14024
- "dist/HLSView-SZL2TSWE.js.map": {
14029
+ "dist/HLSView-VU7EAULT.js.map": {
14025
14030
  "imports": [],
14026
14031
  "exports": [],
14027
14032
  "inputs": {},
14028
14033
  "bytes": 100708
14029
14034
  },
14030
- "dist/HLSView-SZL2TSWE.js": {
14035
+ "dist/HLSView-VU7EAULT.js": {
14031
14036
  "imports": [
14032
14037
  {
14033
- "path": "dist/chunk-BKAJ6YG4.js",
14038
+ "path": "dist/chunk-G5EI4B2P.js",
14034
14039
  "kind": "import-statement"
14035
14040
  },
14036
14041
  {
@@ -14266,13 +14271,13 @@
14266
14271
  },
14267
14272
  "bytes": 61939
14268
14273
  },
14269
- "dist/chunk-BKAJ6YG4.js.map": {
14274
+ "dist/chunk-G5EI4B2P.js.map": {
14270
14275
  "imports": [],
14271
14276
  "exports": [],
14272
14277
  "inputs": {},
14273
- "bytes": 3225135
14278
+ "bytes": 3226404
14274
14279
  },
14275
- "dist/chunk-BKAJ6YG4.js": {
14280
+ "dist/chunk-G5EI4B2P.js": {
14276
14281
  "imports": [
14277
14282
  {
14278
14283
  "path": "react",
@@ -16705,7 +16710,7 @@
16705
16710
  "external": true
16706
16711
  },
16707
16712
  {
16708
- "path": "dist/HLSView-SZL2TSWE.js",
16713
+ "path": "dist/HLSView-VU7EAULT.js",
16709
16714
  "kind": "dynamic-import"
16710
16715
  },
16711
16716
  {
@@ -17186,10 +17191,10 @@
17186
17191
  ],
17187
17192
  "inputs": {
17188
17193
  "<define:process.env>": {
17189
- "bytesInOutput": 18307
17194
+ "bytesInOutput": 18308
17190
17195
  },
17191
17196
  "../../node_modules/lodash/lodash.js": {
17192
- "bytesInOutput": 224310
17197
+ "bytesInOutput": 224301
17193
17198
  },
17194
17199
  "../../node_modules/ua-parser-js/src/ua-parser.js": {
17195
17200
  "bytesInOutput": 42482
@@ -17369,7 +17374,7 @@
17369
17374
  "bytesInOutput": 755
17370
17375
  },
17371
17376
  "src/AudioLevel/AudioLevel.tsx": {
17372
- "bytesInOutput": 2196
17377
+ "bytesInOutput": 2195
17373
17378
  },
17374
17379
  "src/AudioLevel/audio-level.png": {
17375
17380
  "bytesInOutput": 880
@@ -17768,7 +17773,7 @@
17768
17773
  "bytesInOutput": 3077
17769
17774
  },
17770
17775
  "src/Prebuilt/components/Preview/PreviewJoin.tsx": {
17771
- "bytesInOutput": 9772
17776
+ "bytesInOutput": 9771
17772
17777
  },
17773
17778
  "src/Prebuilt/layouts/SidePane.tsx": {
17774
17779
  "bytesInOutput": 6436
@@ -17876,7 +17881,7 @@
17876
17881
  "bytesInOutput": 1210
17877
17882
  },
17878
17883
  "src/Prebuilt/components/hooks/usePinnedMessages.ts": {
17879
- "bytesInOutput": 2758
17884
+ "bytesInOutput": 2757
17880
17885
  },
17881
17886
  "src/Prebuilt/components/Chat/EmptyChat.tsx": {
17882
17887
  "bytesInOutput": 1952
@@ -17912,7 +17917,7 @@
17912
17917
  "bytesInOutput": 1021
17913
17918
  },
17914
17919
  "src/Prebuilt/components/Chat/StickIndicator.tsx": {
17915
- "bytesInOutput": 543
17920
+ "bytesInOutput": 542
17916
17921
  },
17917
17922
  "src/Prebuilt/components/Footer/PaginatedParticipants.tsx": {
17918
17923
  "bytesInOutput": 4205
@@ -17981,13 +17986,13 @@
17981
17986
  "bytesInOutput": 451
17982
17987
  },
17983
17988
  "src/Prebuilt/components/Pagination.tsx": {
17984
- "bytesInOutput": 1699
17989
+ "bytesInOutput": 1698
17985
17990
  },
17986
17991
  "src/Prebuilt/components/VideoLayouts/Grid.tsx": {
17987
17992
  "bytesInOutput": 1204
17988
17993
  },
17989
17994
  "src/Prebuilt/components/hooks/useTileLayout.tsx": {
17990
- "bytesInOutput": 3835
17995
+ "bytesInOutput": 3830
17991
17996
  },
17992
17997
  "src/Prebuilt/components/VideoLayouts/RoleProminence.tsx": {
17993
17998
  "bytesInOutput": 2183
@@ -18017,7 +18022,7 @@
18017
18022
  "bytesInOutput": 2887
18018
18023
  },
18019
18024
  "src/Prebuilt/common/PeersSorter.ts": {
18020
- "bytesInOutput": 3099
18025
+ "bytesInOutput": 3098
18021
18026
  },
18022
18027
  "src/Prebuilt/layouts/EmbedView.jsx": {
18023
18028
  "bytesInOutput": 2787
@@ -18092,7 +18097,7 @@
18092
18097
  "bytesInOutput": 1983
18093
18098
  },
18094
18099
  "src/Prebuilt/components/Toast/ToastConfig.jsx": {
18095
- "bytesInOutput": 6413
18100
+ "bytesInOutput": 6412
18096
18101
  },
18097
18102
  "src/Prebuilt/components/Notifications/InitErrorModal.tsx": {
18098
18103
  "bytesInOutput": 1596
@@ -18137,7 +18142,7 @@
18137
18142
  "bytesInOutput": 1623
18138
18143
  },
18139
18144
  "src/Prebuilt/plugins/FlyingEmoji.jsx": {
18140
- "bytesInOutput": 3918
18145
+ "bytesInOutput": 4352
18141
18146
  },
18142
18147
  "src/Prebuilt/plugins/RemoteStopScreenshare.jsx": {
18143
18148
  "bytesInOutput": 605
@@ -18155,7 +18160,7 @@
18155
18160
  "bytesInOutput": 651
18156
18161
  }
18157
18162
  },
18158
- "bytes": 1322555
18163
+ "bytes": 1322969
18159
18164
  }
18160
18165
  }
18161
18166
  }
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "prebuilt",
11
11
  "roomkit"
12
12
  ],
13
- "version": "0.3.9-alpha.0",
13
+ "version": "0.3.9-alpha.1",
14
14
  "author": "100ms",
15
15
  "license": "MIT",
16
16
  "repository": {
@@ -82,11 +82,11 @@
82
82
  "react": ">=17.0.2 <19.0.0"
83
83
  },
84
84
  "dependencies": {
85
- "@100mslive/hls-player": "0.3.9-alpha.0",
85
+ "@100mslive/hls-player": "0.3.9-alpha.1",
86
86
  "@100mslive/hms-noise-cancellation": "0.0.1",
87
- "@100mslive/hms-virtual-background": "1.13.9-alpha.0",
88
- "@100mslive/react-icons": "0.10.9-alpha.0",
89
- "@100mslive/react-sdk": "0.10.9-alpha.0",
87
+ "@100mslive/hms-virtual-background": "1.13.9-alpha.1",
88
+ "@100mslive/react-icons": "0.10.9-alpha.1",
89
+ "@100mslive/react-sdk": "0.10.9-alpha.1",
90
90
  "@100mslive/types-prebuilt": "0.12.8",
91
91
  "@emoji-mart/data": "^1.0.6",
92
92
  "@emoji-mart/react": "^1.0.1",
@@ -122,5 +122,5 @@
122
122
  "uuid": "^8.3.2",
123
123
  "worker-timers": "^7.0.40"
124
124
  },
125
- "gitHead": "0e749918d6dddfed6208acd8e4dbfed267cc751e"
125
+ "gitHead": "1b8cdadaee116534032f5c9523f3128a2df52368"
126
126
  }
@@ -1,9 +1,11 @@
1
1
  import React, { useCallback, useEffect, useMemo, useState } from 'react';
2
2
  import { useMedia } from 'react-use';
3
3
  import {
4
+ selectIsLargeRoom,
4
5
  selectLocalPeerID,
5
6
  selectPeerNameByID,
6
7
  useCustomEvent,
8
+ useHMSActions,
7
9
  useHMSStore,
8
10
  useHMSVanillaStore,
9
11
  } from '@100mslive/react-sdk';
@@ -43,17 +45,23 @@ const getStartingPoints = isMobile => {
43
45
  export function FlyingEmoji() {
44
46
  const localPeerId = useHMSStore(selectLocalPeerID);
45
47
  const vanillaStore = useHMSVanillaStore();
48
+ const hmsActions = useHMSActions();
46
49
  const [emojis, setEmojis] = useState([]);
47
50
  const isMobile = useMedia(cssConfig.media.md);
51
+ const isLargeRoom = useHMSStore(selectIsLargeRoom);
48
52
 
49
53
  const startingPoints = useMemo(() => getStartingPoints(isMobile), [isMobile]);
50
54
 
51
55
  const showFlyingEmoji = useCallback(
52
- ({ emojiId, senderId }) => {
56
+ async ({ emojiId, senderId }) => {
53
57
  if (!emojiId || !senderId || document.hidden) {
54
58
  return;
55
59
  }
56
- const senderPeerName = vanillaStore.getState(selectPeerNameByID(senderId));
60
+ let senderPeerName = vanillaStore.getState(selectPeerNameByID(senderId));
61
+ if (!senderPeerName && isLargeRoom) {
62
+ const sender = await hmsActions.getPeer(senderId);
63
+ senderPeerName = sender?.name;
64
+ }
57
65
  const nameToShow = localPeerId === senderId ? 'You' : senderPeerName;
58
66
  const startingPoint = startingPoints[emojiCount % startingPoints.length];
59
67
  const id = emojiCount++;
@@ -71,7 +79,7 @@ export function FlyingEmoji() {
71
79
  ];
72
80
  });
73
81
  },
74
- [localPeerId, vanillaStore, startingPoints],
82
+ [vanillaStore, isLargeRoom, localPeerId, startingPoints, hmsActions],
75
83
  );
76
84
 
77
85
  useCustomEvent({
@@ -118,24 +126,28 @@ export function FlyingEmoji() {
118
126
  <Box>
119
127
  <em-emoji id={emoji.emojiId} size="48px" set="apple"></em-emoji>
120
128
  </Box>
121
- <Box
122
- css={{
123
- width: 'fit-content',
124
- padding: '$2 $4',
125
- background: '$surface_bright',
126
- borderRadius: '$1',
127
- }}
128
- >
129
- <Text
129
+ {emoji.senderName ? (
130
+ <Box
130
131
  css={{
131
- fontSize: '$space$6',
132
- lineHeight: '$xs',
133
- color: '$on_surface_high',
132
+ width: 'fit-content',
133
+ padding: '$2 $4',
134
+ background: '$surface_bright',
135
+ borderRadius: '$1',
134
136
  }}
135
137
  >
136
- {emoji.senderName}
137
- </Text>
138
- </Box>
138
+ <Text
139
+ css={{
140
+ fontSize: '$space$6',
141
+ lineHeight: '$xs',
142
+ color: '$on_surface_high',
143
+ }}
144
+ >
145
+ {emoji.senderName}
146
+ </Text>
147
+ </Box>
148
+ ) : (
149
+ ''
150
+ )}
139
151
  </Flex>
140
152
  );
141
153
  })}