@100mslive/roomkit-react 0.1.10 → 0.1.11-alpha.1

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.js CHANGED
@@ -61,7 +61,7 @@ import {
61
61
  theme,
62
62
  useBorderAudioLevel,
63
63
  useTheme
64
- } from "./chunk-N5HPVHTK.js";
64
+ } from "./chunk-Y4STTXFY.js";
65
65
  export {
66
66
  Accordion,
67
67
  AudioLevel,
@@ -4112,7 +4112,7 @@
4112
4112
  "format": "esm"
4113
4113
  },
4114
4114
  "src/Prebuilt/common/utils.js": {
4115
- "bytes": 4241,
4115
+ "bytes": 4325,
4116
4116
  "imports": [
4117
4117
  {
4118
4118
  "path": "src/Prebuilt/common/constants.js",
@@ -7469,7 +7469,7 @@
7469
7469
  "format": "esm"
7470
7470
  },
7471
7471
  "src/Prebuilt/components/Preview/PreviewForm.tsx": {
7472
- "bytes": 2720,
7472
+ "bytes": 2777,
7473
7473
  "imports": [
7474
7474
  {
7475
7475
  "path": "react",
@@ -9535,7 +9535,7 @@
9535
9535
  "format": "esm"
9536
9536
  },
9537
9537
  "src/Prebuilt/components/MwebLandscapePrompt.tsx": {
9538
- "bytes": 2466,
9538
+ "bytes": 2625,
9539
9539
  "imports": [
9540
9540
  {
9541
9541
  "path": "react",
@@ -9577,6 +9577,11 @@
9577
9577
  "kind": "import-statement",
9578
9578
  "original": "../../Theme"
9579
9579
  },
9580
+ {
9581
+ "path": "src/Prebuilt/common/utils.js",
9582
+ "kind": "import-statement",
9583
+ "original": "../common/utils"
9584
+ },
9580
9585
  {
9581
9586
  "path": "<define:process.env>",
9582
9587
  "kind": "import-statement",
@@ -10256,7 +10261,7 @@
10256
10261
  "format": "esm"
10257
10262
  },
10258
10263
  "src/Prebuilt/components/hooks/useAutoStartStreaming.tsx": {
10259
- "bytes": 1857,
10264
+ "bytes": 1965,
10260
10265
  "imports": [
10261
10266
  {
10262
10267
  "path": "react",
@@ -10701,7 +10706,7 @@
10701
10706
  "imports": [],
10702
10707
  "exports": [],
10703
10708
  "inputs": {},
10704
- "bytes": 1105442
10709
+ "bytes": 1106049
10705
10710
  },
10706
10711
  "dist/index.cjs.js": {
10707
10712
  "imports": [
@@ -12985,7 +12990,7 @@
12985
12990
  "entryPoint": "src/index.ts",
12986
12991
  "inputs": {
12987
12992
  "<define:process.env>": {
12988
- "bytesInOutput": 18484
12993
+ "bytesInOutput": 18606
12989
12994
  },
12990
12995
  "src/Theme/base.config.ts": {
12991
12996
  "bytesInOutput": 6104
@@ -13405,7 +13410,7 @@
13405
13410
  "bytesInOutput": 8156
13406
13411
  },
13407
13412
  "src/Prebuilt/common/utils.js": {
13408
- "bytesInOutput": 2815
13413
+ "bytesInOutput": 2908
13409
13414
  },
13410
13415
  "src/Prebuilt/services/FeatureFlags.jsx": {
13411
13416
  "bytesInOutput": 1701
@@ -13624,7 +13629,7 @@
13624
13629
  "bytesInOutput": 2165
13625
13630
  },
13626
13631
  "src/Prebuilt/components/Preview/PreviewForm.tsx": {
13627
- "bytesInOutput": 3330
13632
+ "bytesInOutput": 3383
13628
13633
  },
13629
13634
  "src/Prebuilt/components/Preview/PreviewJoin.tsx": {
13630
13635
  "bytesInOutput": 12099
@@ -13762,7 +13767,7 @@
13762
13767
  "bytesInOutput": 2925
13763
13768
  },
13764
13769
  "src/Prebuilt/components/MwebLandscapePrompt.tsx": {
13765
- "bytesInOutput": 3069
13770
+ "bytesInOutput": 3195
13766
13771
  },
13767
13772
  "src/Prebuilt/components/Toast/ToastConfig.jsx": {
13768
13773
  "bytesInOutput": 7487
@@ -13822,7 +13827,7 @@
13822
13827
  "bytesInOutput": 823
13823
13828
  },
13824
13829
  "src/Prebuilt/components/hooks/useAutoStartStreaming.tsx": {
13825
- "bytesInOutput": 2053
13830
+ "bytesInOutput": 2105
13826
13831
  },
13827
13832
  "src/Prebuilt/App.tsx": {
13828
13833
  "bytesInOutput": 9863
@@ -13837,7 +13842,7 @@
13837
13842
  "bytesInOutput": 2930
13838
13843
  }
13839
13844
  },
13840
- "bytes": 900457
13845
+ "bytes": 900903
13841
13846
  }
13842
13847
  }
13843
13848
  }
@@ -4112,7 +4112,7 @@
4112
4112
  "format": "esm"
4113
4113
  },
4114
4114
  "src/Prebuilt/common/utils.js": {
4115
- "bytes": 4241,
4115
+ "bytes": 4325,
4116
4116
  "imports": [
4117
4117
  {
4118
4118
  "path": "src/Prebuilt/common/constants.js",
@@ -7469,7 +7469,7 @@
7469
7469
  "format": "esm"
7470
7470
  },
7471
7471
  "src/Prebuilt/components/Preview/PreviewForm.tsx": {
7472
- "bytes": 2720,
7472
+ "bytes": 2777,
7473
7473
  "imports": [
7474
7474
  {
7475
7475
  "path": "react",
@@ -9535,7 +9535,7 @@
9535
9535
  "format": "esm"
9536
9536
  },
9537
9537
  "src/Prebuilt/components/MwebLandscapePrompt.tsx": {
9538
- "bytes": 2466,
9538
+ "bytes": 2625,
9539
9539
  "imports": [
9540
9540
  {
9541
9541
  "path": "react",
@@ -9577,6 +9577,11 @@
9577
9577
  "kind": "import-statement",
9578
9578
  "original": "../../Theme"
9579
9579
  },
9580
+ {
9581
+ "path": "src/Prebuilt/common/utils.js",
9582
+ "kind": "import-statement",
9583
+ "original": "../common/utils"
9584
+ },
9580
9585
  {
9581
9586
  "path": "<define:process.env>",
9582
9587
  "kind": "import-statement",
@@ -10256,7 +10261,7 @@
10256
10261
  "format": "esm"
10257
10262
  },
10258
10263
  "src/Prebuilt/components/hooks/useAutoStartStreaming.tsx": {
10259
- "bytes": 1857,
10264
+ "bytes": 1965,
10260
10265
  "imports": [
10261
10266
  {
10262
10267
  "path": "react",
@@ -10706,7 +10711,7 @@
10706
10711
  "dist/index.js": {
10707
10712
  "imports": [
10708
10713
  {
10709
- "path": "dist/chunk-N5HPVHTK.js",
10714
+ "path": "dist/chunk-Y4STTXFY.js",
10710
10715
  "kind": "import-statement"
10711
10716
  }
10712
10717
  ],
@@ -10778,16 +10783,16 @@
10778
10783
  "inputs": {},
10779
10784
  "bytes": 1798
10780
10785
  },
10781
- "dist/HLSView-7WXNI2WP.js.map": {
10786
+ "dist/HLSView-ZGRQ5DG4.js.map": {
10782
10787
  "imports": [],
10783
10788
  "exports": [],
10784
10789
  "inputs": {},
10785
10790
  "bytes": 53119
10786
10791
  },
10787
- "dist/HLSView-7WXNI2WP.js": {
10792
+ "dist/HLSView-ZGRQ5DG4.js": {
10788
10793
  "imports": [
10789
10794
  {
10790
- "path": "dist/chunk-N5HPVHTK.js",
10795
+ "path": "dist/chunk-Y4STTXFY.js",
10791
10796
  "kind": "import-statement"
10792
10797
  },
10793
10798
  {
@@ -10938,13 +10943,13 @@
10938
10943
  },
10939
10944
  "bytes": 32956
10940
10945
  },
10941
- "dist/chunk-N5HPVHTK.js.map": {
10946
+ "dist/chunk-Y4STTXFY.js.map": {
10942
10947
  "imports": [],
10943
10948
  "exports": [],
10944
10949
  "inputs": {},
10945
- "bytes": 1042751
10950
+ "bytes": 1043326
10946
10951
  },
10947
- "dist/chunk-N5HPVHTK.js": {
10952
+ "dist/chunk-Y4STTXFY.js": {
10948
10953
  "imports": [
10949
10954
  {
10950
10955
  "path": "react",
@@ -12837,7 +12842,7 @@
12837
12842
  "external": true
12838
12843
  },
12839
12844
  {
12840
- "path": "dist/HLSView-7WXNI2WP.js",
12845
+ "path": "dist/HLSView-ZGRQ5DG4.js",
12841
12846
  "kind": "dynamic-import"
12842
12847
  },
12843
12848
  {
@@ -13201,7 +13206,7 @@
13201
13206
  ],
13202
13207
  "inputs": {
13203
13208
  "<define:process.env>": {
13204
- "bytesInOutput": 18377
13209
+ "bytesInOutput": 18499
13205
13210
  },
13206
13211
  "src/Button/Button.tsx": {
13207
13212
  "bytesInOutput": 4304
@@ -13612,7 +13617,7 @@
13612
13617
  "bytesInOutput": 1733
13613
13618
  },
13614
13619
  "src/Prebuilt/common/utils.js": {
13615
- "bytesInOutput": 2303
13620
+ "bytesInOutput": 2377
13616
13621
  },
13617
13622
  "src/Prebuilt/services/FeatureFlags.jsx": {
13618
13623
  "bytesInOutput": 1400
@@ -13819,7 +13824,7 @@
13819
13824
  "bytesInOutput": 1599
13820
13825
  },
13821
13826
  "src/Prebuilt/components/Preview/PreviewForm.tsx": {
13822
- "bytesInOutput": 2607
13827
+ "bytesInOutput": 2660
13823
13828
  },
13824
13829
  "src/Prebuilt/components/RoleChangeRequest/RequestPrompt.tsx": {
13825
13830
  "bytesInOutput": 2014
@@ -13909,7 +13914,7 @@
13909
13914
  "bytesInOutput": 464
13910
13915
  },
13911
13916
  "src/Prebuilt/components/MwebLandscapePrompt.tsx": {
13912
- "bytesInOutput": 2398
13917
+ "bytesInOutput": 2489
13913
13918
  },
13914
13919
  "src/Prebuilt/components/Notifications/Notifications.tsx": {
13915
13920
  "bytesInOutput": 6988
@@ -13969,13 +13974,13 @@
13969
13974
  "bytesInOutput": 578
13970
13975
  },
13971
13976
  "src/Prebuilt/components/hooks/useAutoStartStreaming.tsx": {
13972
- "bytesInOutput": 1692
13977
+ "bytesInOutput": 1744
13973
13978
  },
13974
13979
  "src/Progress/index.tsx": {
13975
13980
  "bytesInOutput": 391
13976
13981
  }
13977
13982
  },
13978
- "bytes": 700019
13983
+ "bytes": 700411
13979
13984
  }
13980
13985
  }
13981
13986
  }
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "prebuilt",
11
11
  "roomkit"
12
12
  ],
13
- "version": "0.1.10",
13
+ "version": "0.1.11-alpha.1",
14
14
  "author": "100ms",
15
15
  "license": "MIT",
16
16
  "files": [
@@ -76,10 +76,10 @@
76
76
  "react": ">=17.0.2 <19.0.0"
77
77
  },
78
78
  "dependencies": {
79
- "@100mslive/hls-player": "0.1.19",
80
- "@100mslive/hms-virtual-background": "1.11.19",
81
- "@100mslive/react-icons": "0.8.19",
82
- "@100mslive/react-sdk": "0.8.19",
79
+ "@100mslive/hls-player": "0.1.20-alpha.1",
80
+ "@100mslive/hms-virtual-background": "1.11.20-alpha.1",
81
+ "@100mslive/react-icons": "0.8.20-alpha.1",
82
+ "@100mslive/react-sdk": "0.8.20-alpha.1",
83
83
  "@100mslive/types-prebuilt": "0.12.0",
84
84
  "@emoji-mart/data": "^1.0.6",
85
85
  "@emoji-mart/react": "^1.0.1",
@@ -114,5 +114,5 @@
114
114
  "uuid": "^8.3.2",
115
115
  "worker-timers": "^7.0.40"
116
116
  },
117
- "gitHead": "0764f906bf58ec5d5c4738942ad6411ffa07eddc"
117
+ "gitHead": "4f83c845def51e14e085f6ecab89d03479091d5d"
118
118
  }
@@ -135,3 +135,5 @@ export const calculateAvatarAndAttribBoxSize = (calculatedWidth, calculatedHeigh
135
135
 
136
136
  return [avatarSize, attribBoxSize];
137
137
  };
138
+
139
+ export const isMobileUserAgent = /Mobi|Android|iPhone/i.test(navigator.userAgent);
@@ -6,12 +6,19 @@ import { Box, Flex } from '../../Layout';
6
6
  import { Dialog } from '../../Modal';
7
7
  import { Text } from '../../Text';
8
8
  import { config as cssConfig } from '../../Theme';
9
+ // @ts-ignore
10
+ import { isMobileUserAgent } from '../common/utils';
9
11
 
10
12
  export const MwebLandscapePrompt = () => {
11
13
  const [showMwebLandscapePrompt, setShowMwebLandscapePrompt] = useState(false);
12
14
  const isLandscape = useMedia(cssConfig.media.ls);
13
15
 
14
16
  useEffect(() => {
17
+ if (!isMobileUserAgent) {
18
+ setShowMwebLandscapePrompt(false);
19
+ return;
20
+ }
21
+
15
22
  if (!window.screen?.orientation) {
16
23
  setShowMwebLandscapePrompt(isLandscape);
17
24
  return;
@@ -27,7 +27,7 @@ const PreviewForm = ({
27
27
  e.preventDefault();
28
28
  };
29
29
  const isMobile = useMedia(cssConfig.media.md);
30
- const { isHLSRunning, isRTMPRunning, isRecordingOn } = useRecordingStreaming();
30
+ const { isHLSRunning, isRTMPRunning, isHLSRecordingOn, isBrowserRecordingOn } = useRecordingStreaming();
31
31
 
32
32
  const layout = useRoomLayout();
33
33
  const { join_form: joinForm = {} } = layout?.screens?.preview?.default?.elements || {};
@@ -36,7 +36,8 @@ const PreviewForm = ({
36
36
  joinForm?.join_btn_type === JoinForm_JoinBtnType.JOIN_BTN_TYPE_JOIN_AND_GO_LIVE &&
37
37
  !isHLSRunning &&
38
38
  !isRTMPRunning &&
39
- !isRecordingOn;
39
+ !isHLSRecordingOn &&
40
+ !isBrowserRecordingOn;
40
41
 
41
42
  return (
42
43
  <Form
@@ -19,12 +19,19 @@ export const useAutoStartStreaming = () => {
19
19
  const showStreamingUI = useShowStreamingUI();
20
20
  const hmsActions = useHMSActions();
21
21
  const isConnected = useHMSStore(selectIsConnectedToRoom);
22
- const { isHLSRunning, isRTMPRunning, isRecordingOn } = useRecordingStreaming();
22
+ const { isHLSRunning, isRTMPRunning, isHLSRecordingOn, isBrowserRecordingOn } = useRecordingStreaming();
23
23
  const streamStartedRef = useRef(false);
24
24
 
25
25
  const startHLS = useCallback(async () => {
26
26
  try {
27
- if (isHLSStarted || !showStreamingUI || isHLSRunning || isRTMPRunning) {
27
+ if (
28
+ isHLSStarted ||
29
+ !showStreamingUI ||
30
+ isHLSRunning ||
31
+ isRTMPRunning ||
32
+ isHLSRecordingOn ||
33
+ isBrowserRecordingOn
34
+ ) {
28
35
  return;
29
36
  }
30
37
  setHLSStarted(true);
@@ -44,7 +51,7 @@ export const useAutoStartStreaming = () => {
44
51
  }, [isHLSStarted, isHLSRunning]);
45
52
 
46
53
  useEffect(() => {
47
- if (!isConnected || streamStartedRef.current || !permissions?.hlsStreaming || isRecordingOn) {
54
+ if (!isConnected || streamStartedRef.current || !permissions?.hlsStreaming) {
48
55
  return;
49
56
  }
50
57
  // Is a streaming kit and peer with streaming permissions joins