@100mslive/roomkit-react 0.3.3-alpha.6 → 0.3.3-alpha.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -4201,8 +4201,8 @@
4201
4201
  ],
4202
4202
  "format": "esm"
4203
4203
  },
4204
- "src/Prebuilt/components/hooks/useMetadata.tsx": {
4205
- "bytes": 1631,
4204
+ "src/Prebuilt/components/hooks/useMetadata.jsx": {
4205
+ "bytes": 1700,
4206
4206
  "imports": [
4207
4207
  {
4208
4208
  "path": "react",
@@ -4228,7 +4228,7 @@
4228
4228
  "format": "esm"
4229
4229
  },
4230
4230
  "src/Prebuilt/components/MoreSettings/SplitComponents/DesktopOptions.tsx": {
4231
- "bytes": 8164,
4231
+ "bytes": 8195,
4232
4232
  "imports": [
4233
4233
  {
4234
4234
  "path": "react",
@@ -4321,7 +4321,7 @@
4321
4321
  "original": "../../hooks/useDropdownList"
4322
4322
  },
4323
4323
  {
4324
- "path": "src/Prebuilt/components/hooks/useMetadata.tsx",
4324
+ "path": "src/Prebuilt/components/hooks/useMetadata.jsx",
4325
4325
  "kind": "import-statement",
4326
4326
  "original": "../../hooks/useMetadata"
4327
4327
  },
@@ -4691,7 +4691,7 @@
4691
4691
  "format": "cjs"
4692
4692
  },
4693
4693
  "../hms-video-store/dist/index.js": {
4694
- "bytes": 328494,
4694
+ "bytes": 328471,
4695
4695
  "imports": [
4696
4696
  {
4697
4697
  "path": "../../node_modules/reselect/es/index.js",
@@ -5201,7 +5201,7 @@
5201
5201
  "format": "esm"
5202
5202
  },
5203
5203
  "src/Prebuilt/components/MoreSettings/SplitComponents/MwebOptions.tsx": {
5204
- "bytes": 12899,
5204
+ "bytes": 13053,
5205
5205
  "imports": [
5206
5206
  {
5207
5207
  "path": "react",
@@ -5309,7 +5309,7 @@
5309
5309
  "original": "../../hooks/useDropdownList"
5310
5310
  },
5311
5311
  {
5312
- "path": "src/Prebuilt/components/hooks/useMetadata.tsx",
5312
+ "path": "src/Prebuilt/components/hooks/useMetadata.jsx",
5313
5313
  "kind": "import-statement",
5314
5314
  "original": "../../hooks/useMetadata"
5315
5315
  },
@@ -5393,7 +5393,7 @@
5393
5393
  "format": "esm"
5394
5394
  },
5395
5395
  "src/Prebuilt/components/RaiseHand.tsx": {
5396
- "bytes": 986,
5396
+ "bytes": 798,
5397
5397
  "imports": [
5398
5398
  {
5399
5399
  "path": "react",
@@ -5421,12 +5421,7 @@
5421
5421
  "original": "../IconButton"
5422
5422
  },
5423
5423
  {
5424
- "path": "src/Prebuilt/provider/roomLayoutProvider/hooks/useRoomLayoutScreen.ts",
5425
- "kind": "import-statement",
5426
- "original": "../provider/roomLayoutProvider/hooks/useRoomLayoutScreen"
5427
- },
5428
- {
5429
- "path": "src/Prebuilt/components/hooks/useMetadata.tsx",
5424
+ "path": "src/Prebuilt/components/hooks/useMetadata.jsx",
5430
5425
  "kind": "import-statement",
5431
5426
  "original": "./hooks/useMetadata"
5432
5427
  },
@@ -6342,7 +6337,7 @@
6342
6337
  "format": "esm"
6343
6338
  },
6344
6339
  "src/Prebuilt/components/Footer/Footer.tsx": {
6345
- "bytes": 3777,
6340
+ "bytes": 3967,
6346
6341
  "imports": [
6347
6342
  {
6348
6343
  "path": "react",
@@ -6364,6 +6359,11 @@
6364
6359
  "kind": "import-statement",
6365
6360
  "external": true
6366
6361
  },
6362
+ {
6363
+ "path": "@100mslive/react-sdk",
6364
+ "kind": "import-statement",
6365
+ "external": true
6366
+ },
6367
6367
  {
6368
6368
  "path": "src/index.ts",
6369
6369
  "kind": "import-statement",
@@ -8243,7 +8243,7 @@
8243
8243
  "format": "esm"
8244
8244
  },
8245
8245
  "src/Prebuilt/components/Chat/ChatFooter.tsx": {
8246
- "bytes": 10287,
8246
+ "bytes": 10438,
8247
8247
  "imports": [
8248
8248
  {
8249
8249
  "path": "react",
@@ -9794,7 +9794,7 @@
9794
9794
  "format": "esm"
9795
9795
  },
9796
9796
  "src/Prebuilt/components/RoleChangeRequest/RoleChangeRequestModal.tsx": {
9797
- "bytes": 2927,
9797
+ "bytes": 2958,
9798
9798
  "imports": [
9799
9799
  {
9800
9800
  "path": "react",
@@ -9827,7 +9827,7 @@
9827
9827
  "original": "../../provider/roomLayoutProvider/hooks/useRoomLayoutScreen"
9828
9828
  },
9829
9829
  {
9830
- "path": "src/Prebuilt/components/hooks/useMetadata.tsx",
9830
+ "path": "src/Prebuilt/components/hooks/useMetadata.jsx",
9831
9831
  "kind": "import-statement",
9832
9832
  "original": "../hooks/useMetadata"
9833
9833
  },
@@ -11934,7 +11934,7 @@
11934
11934
  "format": "esm"
11935
11935
  },
11936
11936
  "src/Prebuilt/components/PreviousRoleInMetadata.tsx": {
11937
- "bytes": 738,
11937
+ "bytes": 769,
11938
11938
  "imports": [
11939
11939
  {
11940
11940
  "path": "react",
@@ -11947,7 +11947,7 @@
11947
11947
  "external": true
11948
11948
  },
11949
11949
  {
11950
- "path": "src/Prebuilt/components/hooks/useMetadata.tsx",
11950
+ "path": "src/Prebuilt/components/hooks/useMetadata.jsx",
11951
11951
  "kind": "import-statement",
11952
11952
  "original": "./hooks/useMetadata"
11953
11953
  },
@@ -11960,7 +11960,7 @@
11960
11960
  "format": "esm"
11961
11961
  },
11962
11962
  "src/Prebuilt/components/ConferenceScreen.tsx": {
11963
- "bytes": 8106,
11963
+ "bytes": 8259,
11964
11964
  "imports": [
11965
11965
  {
11966
11966
  "path": "react",
@@ -13775,7 +13775,7 @@
13775
13775
  "dist/index.js": {
13776
13776
  "imports": [
13777
13777
  {
13778
- "path": "dist/chunk-3JLNG275.js",
13778
+ "path": "dist/chunk-4NHNNVQ3.js",
13779
13779
  "kind": "import-statement"
13780
13780
  }
13781
13781
  ],
@@ -13848,16 +13848,16 @@
13848
13848
  "inputs": {},
13849
13849
  "bytes": 1822
13850
13850
  },
13851
- "dist/HLSView-XI2Q44RQ.js.map": {
13851
+ "dist/HLSView-UN7O7GT2.js.map": {
13852
13852
  "imports": [],
13853
13853
  "exports": [],
13854
13854
  "inputs": {},
13855
13855
  "bytes": 99220
13856
13856
  },
13857
- "dist/HLSView-XI2Q44RQ.js": {
13857
+ "dist/HLSView-UN7O7GT2.js": {
13858
13858
  "imports": [
13859
13859
  {
13860
- "path": "dist/chunk-3JLNG275.js",
13860
+ "path": "dist/chunk-4NHNNVQ3.js",
13861
13861
  "kind": "import-statement"
13862
13862
  },
13863
13863
  {
@@ -14093,13 +14093,13 @@
14093
14093
  },
14094
14094
  "bytes": 61275
14095
14095
  },
14096
- "dist/chunk-3JLNG275.js.map": {
14096
+ "dist/chunk-4NHNNVQ3.js.map": {
14097
14097
  "imports": [],
14098
14098
  "exports": [],
14099
14099
  "inputs": {},
14100
- "bytes": 3189379
14100
+ "bytes": 3188882
14101
14101
  },
14102
- "dist/chunk-3JLNG275.js": {
14102
+ "dist/chunk-4NHNNVQ3.js": {
14103
14103
  "imports": [
14104
14104
  {
14105
14105
  "path": "react",
@@ -14536,6 +14536,11 @@
14536
14536
  "kind": "import-statement",
14537
14537
  "external": true
14538
14538
  },
14539
+ {
14540
+ "path": "@100mslive/react-sdk",
14541
+ "kind": "import-statement",
14542
+ "external": true
14543
+ },
14539
14544
  {
14540
14545
  "path": "react",
14541
14546
  "kind": "import-statement",
@@ -16482,7 +16487,7 @@
16482
16487
  "external": true
16483
16488
  },
16484
16489
  {
16485
- "path": "dist/HLSView-XI2Q44RQ.js",
16490
+ "path": "dist/HLSView-UN7O7GT2.js",
16486
16491
  "kind": "dynamic-import"
16487
16492
  },
16488
16493
  {
@@ -16958,10 +16963,10 @@
16958
16963
  ],
16959
16964
  "inputs": {
16960
16965
  "<define:process.env>": {
16961
- "bytesInOutput": 18233
16966
+ "bytesInOutput": 18236
16962
16967
  },
16963
16968
  "../../node_modules/lodash/lodash.js": {
16964
- "bytesInOutput": 224298
16969
+ "bytesInOutput": 224291
16965
16970
  },
16966
16971
  "../../node_modules/ua-parser-js/src/ua-parser.js": {
16967
16972
  "bytesInOutput": 42482
@@ -16970,7 +16975,7 @@
16970
16975
  "bytesInOutput": 26591
16971
16976
  },
16972
16977
  "../../node_modules/sdp/sdp.js": {
16973
- "bytesInOutput": 22275
16978
+ "bytesInOutput": 22288
16974
16979
  },
16975
16980
  "../../node_modules/sdp-transform/lib/grammar.js": {
16976
16981
  "bytesInOutput": 16120
@@ -17141,7 +17146,7 @@
17141
17146
  "bytesInOutput": 755
17142
17147
  },
17143
17148
  "src/AudioLevel/AudioLevel.tsx": {
17144
- "bytesInOutput": 2196
17149
+ "bytesInOutput": 2195
17145
17150
  },
17146
17151
  "src/AudioLevel/audio-level.png": {
17147
17152
  "bytesInOutput": 880
@@ -17243,7 +17248,7 @@
17243
17248
  "bytesInOutput": 1486
17244
17249
  },
17245
17250
  "src/Prebuilt/common/utils.js": {
17246
- "bytesInOutput": 3208
17251
+ "bytesInOutput": 3211
17247
17252
  },
17248
17253
  "src/Prebuilt/components/AppData/useSidepane.js": {
17249
17254
  "bytesInOutput": 2499
@@ -17258,10 +17263,10 @@
17258
17263
  "bytesInOutput": 4698
17259
17264
  },
17260
17265
  "src/Prebuilt/components/ConferenceScreen.tsx": {
17261
- "bytesInOutput": 7205
17266
+ "bytesInOutput": 7373
17262
17267
  },
17263
17268
  "src/Prebuilt/components/Footer/Footer.tsx": {
17264
- "bytesInOutput": 3145
17269
+ "bytesInOutput": 3350
17265
17270
  },
17266
17271
  "src/Prebuilt/components/AudioVideoToggle.tsx": {
17267
17272
  "bytesInOutput": 10284
@@ -17386,20 +17391,20 @@
17386
17391
  "src/Prebuilt/components/MoreSettings/constants.ts": {
17387
17392
  "bytesInOutput": 437
17388
17393
  },
17389
- "src/Prebuilt/components/hooks/useMetadata.tsx": {
17390
- "bytesInOutput": 1826
17394
+ "src/Prebuilt/components/hooks/useMetadata.jsx": {
17395
+ "bytesInOutput": 1948
17391
17396
  },
17392
17397
  "src/Prebuilt/components/MoreSettings/SplitComponents/MwebOptions.tsx": {
17393
- "bytesInOutput": 10902
17398
+ "bytesInOutput": 11042
17394
17399
  },
17395
17400
  "src/Prebuilt/components/Header/StreamActions.tsx": {
17396
17401
  "bytesInOutput": 10031
17397
17402
  },
17398
17403
  "../hms-video-store/dist/index.js": {
17399
- "bytesInOutput": 50213
17404
+ "bytesInOutput": 48766
17400
17405
  },
17401
17406
  "../../node_modules/reselect/es/index.js": {
17402
- "bytesInOutput": 2537
17407
+ "bytesInOutput": 2539
17403
17408
  },
17404
17409
  "../../node_modules/webrtc-adapter/src/js/adapter_core.js": {
17405
17410
  "bytesInOutput": 118
@@ -17414,7 +17419,7 @@
17414
17419
  "bytesInOutput": 22678
17415
17420
  },
17416
17421
  "../../node_modules/webrtc-adapter/src/js/chrome/getusermedia.js": {
17417
- "bytesInOutput": 6094
17422
+ "bytesInOutput": 6097
17418
17423
  },
17419
17424
  "../../node_modules/webrtc-adapter/src/js/chrome/getdisplaymedia.js": {
17420
17425
  "bytesInOutput": 1256
@@ -17423,7 +17428,7 @@
17423
17428
  "bytesInOutput": 9143
17424
17429
  },
17425
17430
  "../../node_modules/webrtc-adapter/src/js/firefox/getusermedia.js": {
17426
- "bytesInOutput": 2122
17431
+ "bytesInOutput": 2125
17427
17432
  },
17428
17433
  "../../node_modules/webrtc-adapter/src/js/firefox/getdisplaymedia.js": {
17429
17434
  "bytesInOutput": 842
@@ -17432,7 +17437,7 @@
17432
17437
  "bytesInOutput": 11868
17433
17438
  },
17434
17439
  "../../node_modules/webrtc-adapter/src/js/common_shim.js": {
17435
- "bytesInOutput": 12465
17440
+ "bytesInOutput": 12460
17436
17441
  },
17437
17442
  "src/Prebuilt/components/Header/AdditionalRoomState.jsx": {
17438
17443
  "bytesInOutput": 6823
@@ -17459,7 +17464,7 @@
17459
17464
  "bytesInOutput": 658
17460
17465
  },
17461
17466
  "src/Prebuilt/components/RaiseHand.tsx": {
17462
- "bytesInOutput": 905
17467
+ "bytesInOutput": 796
17463
17468
  },
17464
17469
  "src/Prebuilt/components/ScreenShareToggle.jsx": {
17465
17470
  "bytesInOutput": 1619
@@ -17534,7 +17539,7 @@
17534
17539
  "bytesInOutput": 3077
17535
17540
  },
17536
17541
  "src/Prebuilt/components/Preview/PreviewJoin.tsx": {
17537
- "bytesInOutput": 9638
17542
+ "bytesInOutput": 9637
17538
17543
  },
17539
17544
  "src/Prebuilt/layouts/SidePane.tsx": {
17540
17545
  "bytesInOutput": 6274
@@ -17543,7 +17548,7 @@
17543
17548
  "bytesInOutput": 735
17544
17549
  },
17545
17550
  "src/Prebuilt/components/Polls/CreatePollQuiz/PollsQuizMenu.tsx": {
17546
- "bytesInOutput": 7995
17551
+ "bytesInOutput": 7999
17547
17552
  },
17548
17553
  "src/Prebuilt/components/Streaming/Common.jsx": {
17549
17554
  "bytesInOutput": 2247
@@ -17642,7 +17647,7 @@
17642
17647
  "bytesInOutput": 1210
17643
17648
  },
17644
17649
  "src/Prebuilt/components/hooks/usePinnedMessages.ts": {
17645
- "bytesInOutput": 2758
17650
+ "bytesInOutput": 2757
17646
17651
  },
17647
17652
  "src/Prebuilt/components/Chat/EmptyChat.tsx": {
17648
17653
  "bytesInOutput": 1952
@@ -17654,7 +17659,7 @@
17654
17659
  "bytesInOutput": 710
17655
17660
  },
17656
17661
  "src/Prebuilt/components/Chat/ChatFooter.tsx": {
17657
- "bytesInOutput": 9627
17662
+ "bytesInOutput": 9793
17658
17663
  },
17659
17664
  "src/Prebuilt/components/Chat/ChatSelectorContainer.tsx": {
17660
17665
  "bytesInOutput": 5318
@@ -17678,7 +17683,7 @@
17678
17683
  "bytesInOutput": 1021
17679
17684
  },
17680
17685
  "src/Prebuilt/components/Chat/StickIndicator.tsx": {
17681
- "bytesInOutput": 543
17686
+ "bytesInOutput": 542
17682
17687
  },
17683
17688
  "src/Prebuilt/components/Footer/PaginatedParticipants.tsx": {
17684
17689
  "bytesInOutput": 4205
@@ -17747,13 +17752,13 @@
17747
17752
  "bytesInOutput": 451
17748
17753
  },
17749
17754
  "src/Prebuilt/components/Pagination.tsx": {
17750
- "bytesInOutput": 1699
17755
+ "bytesInOutput": 1698
17751
17756
  },
17752
17757
  "src/Prebuilt/components/VideoLayouts/Grid.tsx": {
17753
17758
  "bytesInOutput": 1204
17754
17759
  },
17755
17760
  "src/Prebuilt/components/hooks/useTileLayout.tsx": {
17756
- "bytesInOutput": 3839
17761
+ "bytesInOutput": 3834
17757
17762
  },
17758
17763
  "src/Prebuilt/components/VideoLayouts/RoleProminence.tsx": {
17759
17764
  "bytesInOutput": 2183
@@ -17783,7 +17788,7 @@
17783
17788
  "bytesInOutput": 2887
17784
17789
  },
17785
17790
  "src/Prebuilt/common/PeersSorter.ts": {
17786
- "bytesInOutput": 3099
17791
+ "bytesInOutput": 3098
17787
17792
  },
17788
17793
  "src/Prebuilt/layouts/EmbedView.jsx": {
17789
17794
  "bytesInOutput": 2785
@@ -17840,7 +17845,7 @@
17840
17845
  "bytesInOutput": 27
17841
17846
  },
17842
17847
  "src/Prebuilt/components/Notifications/Notifications.tsx": {
17843
- "bytesInOutput": 7974
17848
+ "bytesInOutput": 7971
17844
17849
  },
17845
17850
  "src/Prebuilt/components/Notifications/AutoplayBlockedModal.tsx": {
17846
17851
  "bytesInOutput": 1053
@@ -17855,7 +17860,7 @@
17855
17860
  "bytesInOutput": 1983
17856
17861
  },
17857
17862
  "src/Prebuilt/components/Toast/ToastConfig.jsx": {
17858
- "bytesInOutput": 7229
17863
+ "bytesInOutput": 7228
17859
17864
  },
17860
17865
  "src/Prebuilt/components/Notifications/InitErrorModal.tsx": {
17861
17866
  "bytesInOutput": 1596
@@ -17918,7 +17923,7 @@
17918
17923
  "bytesInOutput": 651
17919
17924
  }
17920
17925
  },
17921
- "bytes": 1308418
17926
+ "bytes": 1307673
17922
17927
  }
17923
17928
  }
17924
17929
  }
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "prebuilt",
11
11
  "roomkit"
12
12
  ],
13
- "version": "0.3.3-alpha.6",
13
+ "version": "0.3.3-alpha.8",
14
14
  "author": "100ms",
15
15
  "license": "MIT",
16
16
  "repository": {
@@ -82,12 +82,12 @@
82
82
  "react": ">=17.0.2 <19.0.0"
83
83
  },
84
84
  "dependencies": {
85
- "@100mslive/hls-player": "0.3.3-alpha.6",
86
- "@100mslive/hms-noise-cancellation": "0.0.0-alpha.1",
87
- "@100mslive/hms-virtual-background": "1.13.3-alpha.6",
88
- "@100mslive/react-icons": "0.10.3-alpha.6",
89
- "@100mslive/react-sdk": "0.10.3-alpha.6",
90
- "@100mslive/types-prebuilt": "0.12.8",
85
+ "@100mslive/hls-player": "0.3.3-alpha.8",
86
+ "@100mslive/hms-noise-cancellation": "0.0.0-alpha.5",
87
+ "@100mslive/hms-virtual-background": "1.13.3-alpha.8",
88
+ "@100mslive/react-icons": "0.10.3-alpha.8",
89
+ "@100mslive/react-sdk": "0.10.3-alpha.8",
90
+ "@100mslive/types-prebuilt": "0.12.7",
91
91
  "@emoji-mart/data": "^1.0.6",
92
92
  "@emoji-mart/react": "^1.0.1",
93
93
  "@radix-ui/react-accordion": "1.0.0",
@@ -122,5 +122,5 @@
122
122
  "uuid": "^8.3.2",
123
123
  "worker-timers": "^7.0.40"
124
124
  },
125
- "gitHead": "b096cea8bf439c4d3e99d27b4d758d87f54c9512"
125
+ "gitHead": "c7653c282d747c8e4d34c0e0fcef3eead588e293"
126
126
  }
@@ -2,7 +2,7 @@ import React, { ReactNode, useCallback, useEffect, useRef, useState } from 'reac
2
2
  import { useMedia } from 'react-use';
3
3
  import data from '@emoji-mart/data';
4
4
  import Picker from '@emoji-mart/react';
5
- import { HMSException, selectLocalPeer, useHMSActions, useHMSStore } from '@100mslive/react-sdk';
5
+ import { HMSException, selectLocalPeer, useAVToggle, useHMSActions, useHMSStore } from '@100mslive/react-sdk';
6
6
  import { EmojiIcon, PauseCircleIcon, SendIcon, VerticalMenuIcon } from '@100mslive/react-icons';
7
7
  import { Box, config as cssConfig, Flex, IconButton as BaseIconButton, Popover, styled, Text } from '../../..';
8
8
  import { IconButton } from '../../../IconButton';
@@ -89,6 +89,8 @@ export const ChatFooter = ({ onSend, children }: { onSend: (count: number) => vo
89
89
  const defaultSelection = useDefaultChatSelection();
90
90
  const selection = selectedPeer.name || selectedRole || defaultSelection;
91
91
  const isLocalPeerBlacklisted = useIsPeerBlacklisted({ local: true });
92
+ const { toggleAudio, toggleVideo } = useAVToggle();
93
+ const noAVPermissions = !(toggleAudio || toggleVideo);
92
94
  const isMwebHLSStream = useMobileHLSStream();
93
95
  const isLandscapeHLSStream = useLandscapeHLSStream();
94
96
 
@@ -273,7 +275,7 @@ export const ChatFooter = ({ onSend, children }: { onSend: (count: number) => vo
273
275
  }}
274
276
  gap="2"
275
277
  >
276
- <RaiseHand css={{ bg: '$surface_default' }} />
278
+ {noAVPermissions ? <RaiseHand css={{ bg: '$surface_default' }} /> : null}
277
279
  <MoreSettings elements={elements} screenType={screenType} />
278
280
  </Flex>
279
281
  </>
@@ -6,6 +6,7 @@ import {
6
6
  selectAppData,
7
7
  selectIsConnectedToRoom,
8
8
  selectRoomState,
9
+ useAVToggle,
9
10
  useHMSActions,
10
11
  useHMSStore,
11
12
  } from '@100mslive/react-sdk';
@@ -53,6 +54,8 @@ export const ConferenceScreen = () => {
53
54
  const dropdownListRef = useRef<string[]>();
54
55
  const [isHLSStarted] = useSetAppDataByKey(APP_DATA.hlsStarted);
55
56
 
57
+ const { toggleAudio, toggleVideo } = useAVToggle();
58
+ const noAVPermissions = !(toggleAudio || toggleVideo);
56
59
  // using it in hls stream to show action button when chat is disabled
57
60
  const showChat = !!screenProps.elements?.chat;
58
61
  const autoRoomJoined = useRef(isPreviewScreenEnabled);
@@ -199,7 +202,7 @@ export const ConferenceScreen = () => {
199
202
  justify="end"
200
203
  gap="2"
201
204
  >
202
- <RaiseHand />
205
+ {noAVPermissions ? <RaiseHand /> : null}
203
206
  <MoreSettings elements={screenProps.elements} screenType={screenProps.screenType} />
204
207
  <Box
205
208
  css={{
@@ -2,6 +2,7 @@ import React, { useEffect } from 'react';
2
2
  import { useMedia } from 'react-use';
3
3
  import { ConferencingScreen } from '@100mslive/types-prebuilt';
4
4
  import { Chat_ChatState } from '@100mslive/types-prebuilt/elements/chat';
5
+ import { useAVToggle } from '@100mslive/react-sdk';
5
6
  import { config as cssConfig, Footer as AppFooter } from '../../..';
6
7
  // @ts-ignore: No implicit Any
7
8
  import { AudioVideoToggle } from '../AudioVideoToggle';
@@ -40,6 +41,8 @@ export const Footer = ({
40
41
  const isOverlayChat = !!elements?.chat?.is_overlay;
41
42
  const openByDefault = elements?.chat?.initial_state === Chat_ChatState.CHAT_STATE_OPEN;
42
43
 
44
+ const { toggleAudio, toggleVideo } = useAVToggle();
45
+ const noAVPermissions = !(toggleAudio || toggleVideo);
43
46
  const isChatOpen = useIsSidepaneTypeOpen(SIDE_PANE_OPTIONS.CHAT);
44
47
  const toggleChat = useSidepaneToggle(SIDE_PANE_OPTIONS.CHAT);
45
48
  const { showPolls } = useShowPolls();
@@ -87,7 +90,7 @@ export const Footer = ({
87
90
  >
88
91
  {isMobile ? (
89
92
  <>
90
- <RaiseHand />
93
+ {noAVPermissions ? <RaiseHand /> : null}
91
94
  {elements?.chat && <ChatToggle />}
92
95
  <MoreSettings elements={elements} screenType={screenType} />
93
96
  </>
@@ -29,6 +29,7 @@ import { FullScreenItem } from '../FullScreenItem';
29
29
  import { MuteAllModal } from '../MuteAllModal';
30
30
  // @ts-ignore: No implicit any
31
31
  import { useDropdownList } from '../../hooks/useDropdownList';
32
+ // @ts-ignore: No implicit any
32
33
  import { useMyMetadata } from '../../hooks/useMetadata';
33
34
  // @ts-ignore: No implicit any
34
35
  import { APP_DATA, isMacOS } from '../../../common/constants';
@@ -6,6 +6,7 @@ import {
6
6
  selectIsConnectedToRoom,
7
7
  selectPeerCount,
8
8
  selectPermissions,
9
+ useAVToggle,
9
10
  useHMSActions,
10
11
  useHMSStore,
11
12
  useRecordingStreaming,
@@ -50,6 +51,7 @@ import { usePollViewToggle, useSidepaneToggle } from '../../AppData/useSidepane'
50
51
  import { useShowPolls } from '../../AppData/useUISettings';
51
52
  // @ts-ignore: No implicit any
52
53
  import { useDropdownList } from '../../hooks/useDropdownList';
54
+ // @ts-ignore: No implicit any
53
55
  import { useMyMetadata } from '../../hooks/useMetadata';
54
56
  import { useUnreadPollQuizPresent } from '../../hooks/useUnreadPollQuizPresent';
55
57
  import { useLandscapeHLSStream, useMobileHLSStream } from '../../../common/hooks';
@@ -93,6 +95,8 @@ export const MwebOptions = ({
93
95
  const peerCount = useHMSStore(selectPeerCount);
94
96
  const emojiCardRef = useRef(null);
95
97
  const { isBRBOn, toggleBRB, isHandRaised, toggleHandRaise } = useMyMetadata();
98
+ const { toggleAudio, toggleVideo } = useAVToggle();
99
+ const noAVPermissions = !(toggleAudio || toggleVideo);
96
100
  const { unreadPollQuiz, setUnreadPollQuiz } = useUnreadPollQuizPresent();
97
101
  const { title, description } = useRoomLayoutHeader();
98
102
  const toggleDetailsSheet = useSheetToggle(SHEET_OPTIONS.ROOM_DETAILS);
@@ -171,7 +175,7 @@ export const MwebOptions = ({
171
175
  </ActionTile.Root>
172
176
  )}
173
177
 
174
- {elements.hand_raise ? (
178
+ {!noAVPermissions ? (
175
179
  <ActionTile.Root
176
180
  active={isHandRaised}
177
181
  onClick={() => {
@@ -1,5 +1,6 @@
1
1
  import { useEffect } from 'react';
2
2
  import { selectLocalPeerRoleName, useHMSVanillaStore } from '@100mslive/react-sdk';
3
+ // @ts-ignore: No implicit Any
3
4
  import { useMyMetadata } from './hooks/useMetadata';
4
5
 
5
6
  export const PreviousRoleInMetadata = () => {
@@ -4,17 +4,11 @@ import { CSS } from '../../Theme';
4
4
  import { Tooltip } from '../../Tooltip';
5
5
  // @ts-ignore: No implicit Any
6
6
  import IconButton from '../IconButton';
7
- import { useRoomLayoutConferencingScreen } from '../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';
7
+ // @ts-ignore: No implicit Any
8
8
  import { useMyMetadata } from './hooks/useMetadata';
9
9
 
10
10
  export const RaiseHand = ({ css }: { css?: CSS }) => {
11
11
  const { isHandRaised, toggleHandRaise } = useMyMetadata();
12
- const { elements } = useRoomLayoutConferencingScreen();
13
-
14
- if (!elements.hand_raise) {
15
- return null;
16
- }
17
-
18
12
  return (
19
13
  <Tooltip title={isHandRaised ? 'Lower hand' : 'Raise hand'}>
20
14
  <IconButton
@@ -13,6 +13,7 @@ import { Flex, Text } from '../../..';
13
13
  import { PreviewControls, PreviewTile } from '../Preview/PreviewJoin';
14
14
  import { RequestPrompt } from './RequestPrompt';
15
15
  import { useRoomLayoutPreviewScreen } from '../../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';
16
+ // @ts-ignore: No implicit Any
16
17
  import { useMyMetadata } from '../hooks/useMetadata';
17
18
  // @ts-ignore: No implicit Any
18
19
  import { ROLE_CHANGE_DECLINED } from '../../common/constants';
@@ -15,7 +15,7 @@ export const useMyMetadata = () => {
15
15
  const metaData = useHMSStore(selectPeerMetadata(localPeerId));
16
16
  const isHandRaised = useHMSStore(selectHasPeerHandRaised(localPeerId));
17
17
 
18
- const update = async (updatedFields: Record<string, any>) => {
18
+ const update = async updatedFields => {
19
19
  try {
20
20
  // get current state from store and merge updated fields
21
21
  const currentMetadata = vanillaStore.getState(selectPeerMetadata(localPeerId));
@@ -24,7 +24,6 @@ export const useMyMetadata = () => {
24
24
  } catch (error) {
25
25
  console.error('failed to update metadata ', updatedFields);
26
26
  }
27
- return false;
28
27
  };
29
28
 
30
29
  const toggleHandRaise = useCallback(async () => {
@@ -44,6 +43,12 @@ export const useMyMetadata = () => {
44
43
  }
45
44
  }, [metaData?.isBRBOn]); //eslint-disable-line
46
45
 
46
+ const setPrevRole = async role => {
47
+ await update({
48
+ prevRole: role,
49
+ });
50
+ };
51
+
47
52
  return {
48
53
  isHandRaised,
49
54
  isBRBOn: !!metaData?.isBRBOn,
@@ -51,5 +56,6 @@ export const useMyMetadata = () => {
51
56
  updateMetaData: update,
52
57
  toggleHandRaise,
53
58
  toggleBRB,
59
+ setPrevRole,
54
60
  };
55
61
  };
@@ -1,8 +0,0 @@
1
- export declare const useMyMetadata: () => {
2
- isHandRaised: boolean;
3
- isBRBOn: boolean;
4
- metaData: any;
5
- updateMetaData: (updatedFields: Record<string, any>) => Promise<boolean>;
6
- toggleHandRaise: () => Promise<void>;
7
- toggleBRB: () => Promise<void>;
8
- };