@100mslive/roomkit-react 0.2.4-alpha.2 → 0.2.4-alpha.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{HLSView-XSS3JNNS.js → HLSView-B7YXFUDK.js} +2 -2
- package/dist/{chunk-JSWIHHXP.js → chunk-QW3HEGVV.js} +31 -31
- package/dist/{chunk-JSWIHHXP.js.map → chunk-QW3HEGVV.js.map} +3 -3
- package/dist/index.cjs.js +16 -16
- package/dist/index.cjs.js.map +2 -2
- package/dist/index.js +1 -1
- package/dist/meta.cjs.json +7 -7
- package/dist/meta.esbuild.json +14 -14
- package/package.json +6 -6
- package/src/Prebuilt/components/ScreenshareTile.tsx +5 -10
- package/src/Prebuilt/components/VideoLayouts/ScreenshareLayout.tsx +12 -3
- /package/dist/{HLSView-XSS3JNNS.js.map → HLSView-B7YXFUDK.js.map} +0 -0
package/dist/index.js
CHANGED
package/dist/meta.cjs.json
CHANGED
@@ -9929,7 +9929,7 @@
|
|
9929
9929
|
"format": "esm"
|
9930
9930
|
},
|
9931
9931
|
"src/Prebuilt/components/ScreenshareTile.tsx": {
|
9932
|
-
"bytes":
|
9932
|
+
"bytes": 4462,
|
9933
9933
|
"imports": [
|
9934
9934
|
{
|
9935
9935
|
"path": "react",
|
@@ -10020,7 +10020,7 @@
|
|
10020
10020
|
"format": "esm"
|
10021
10021
|
},
|
10022
10022
|
"src/Prebuilt/components/VideoLayouts/ScreenshareLayout.tsx": {
|
10023
|
-
"bytes":
|
10023
|
+
"bytes": 3065,
|
10024
10024
|
"imports": [
|
10025
10025
|
{
|
10026
10026
|
"path": "react",
|
@@ -12775,7 +12775,7 @@
|
|
12775
12775
|
"imports": [],
|
12776
12776
|
"exports": [],
|
12777
12777
|
"inputs": {},
|
12778
|
-
"bytes":
|
12778
|
+
"bytes": 3165128
|
12779
12779
|
},
|
12780
12780
|
"dist/index.cjs.js": {
|
12781
12781
|
"imports": [
|
@@ -15479,7 +15479,7 @@
|
|
15479
15479
|
"entryPoint": "src/index.ts",
|
15480
15480
|
"inputs": {
|
15481
15481
|
"<define:process.env>": {
|
15482
|
-
"bytesInOutput":
|
15482
|
+
"bytesInOutput": 18093
|
15483
15483
|
},
|
15484
15484
|
"src/Theme/base.config.ts": {
|
15485
15485
|
"bytesInOutput": 6104
|
@@ -16292,10 +16292,10 @@
|
|
16292
16292
|
"bytesInOutput": 1707
|
16293
16293
|
},
|
16294
16294
|
"src/Prebuilt/components/ScreenshareTile.tsx": {
|
16295
|
-
"bytesInOutput":
|
16295
|
+
"bytesInOutput": 5566
|
16296
16296
|
},
|
16297
16297
|
"src/Prebuilt/components/VideoLayouts/ScreenshareLayout.tsx": {
|
16298
|
-
"bytesInOutput":
|
16298
|
+
"bytesInOutput": 3419
|
16299
16299
|
},
|
16300
16300
|
"src/Prebuilt/common/PeersSorter.ts": {
|
16301
16301
|
"bytesInOutput": 3604
|
@@ -16487,7 +16487,7 @@
|
|
16487
16487
|
"bytesInOutput": 2980
|
16488
16488
|
}
|
16489
16489
|
},
|
16490
|
-
"bytes":
|
16490
|
+
"bytes": 1486850
|
16491
16491
|
}
|
16492
16492
|
}
|
16493
16493
|
}
|
package/dist/meta.esbuild.json
CHANGED
@@ -9929,7 +9929,7 @@
|
|
9929
9929
|
"format": "esm"
|
9930
9930
|
},
|
9931
9931
|
"src/Prebuilt/components/ScreenshareTile.tsx": {
|
9932
|
-
"bytes":
|
9932
|
+
"bytes": 4462,
|
9933
9933
|
"imports": [
|
9934
9934
|
{
|
9935
9935
|
"path": "react",
|
@@ -10020,7 +10020,7 @@
|
|
10020
10020
|
"format": "esm"
|
10021
10021
|
},
|
10022
10022
|
"src/Prebuilt/components/VideoLayouts/ScreenshareLayout.tsx": {
|
10023
|
-
"bytes":
|
10023
|
+
"bytes": 3065,
|
10024
10024
|
"imports": [
|
10025
10025
|
{
|
10026
10026
|
"path": "react",
|
@@ -12780,7 +12780,7 @@
|
|
12780
12780
|
"dist/index.js": {
|
12781
12781
|
"imports": [
|
12782
12782
|
{
|
12783
|
-
"path": "dist/chunk-
|
12783
|
+
"path": "dist/chunk-QW3HEGVV.js",
|
12784
12784
|
"kind": "import-statement"
|
12785
12785
|
}
|
12786
12786
|
],
|
@@ -12853,16 +12853,16 @@
|
|
12853
12853
|
"inputs": {},
|
12854
12854
|
"bytes": 1822
|
12855
12855
|
},
|
12856
|
-
"dist/HLSView-
|
12856
|
+
"dist/HLSView-B7YXFUDK.js.map": {
|
12857
12857
|
"imports": [],
|
12858
12858
|
"exports": [],
|
12859
12859
|
"inputs": {},
|
12860
12860
|
"bytes": 58854
|
12861
12861
|
},
|
12862
|
-
"dist/HLSView-
|
12862
|
+
"dist/HLSView-B7YXFUDK.js": {
|
12863
12863
|
"imports": [
|
12864
12864
|
{
|
12865
|
-
"path": "dist/chunk-
|
12865
|
+
"path": "dist/chunk-QW3HEGVV.js",
|
12866
12866
|
"kind": "import-statement"
|
12867
12867
|
},
|
12868
12868
|
{
|
@@ -13026,13 +13026,13 @@
|
|
13026
13026
|
},
|
13027
13027
|
"bytes": 36972
|
13028
13028
|
},
|
13029
|
-
"dist/chunk-
|
13029
|
+
"dist/chunk-QW3HEGVV.js.map": {
|
13030
13030
|
"imports": [],
|
13031
13031
|
"exports": [],
|
13032
13032
|
"inputs": {},
|
13033
|
-
"bytes":
|
13033
|
+
"bytes": 3101962
|
13034
13034
|
},
|
13035
|
-
"dist/chunk-
|
13035
|
+
"dist/chunk-QW3HEGVV.js": {
|
13036
13036
|
"imports": [
|
13037
13037
|
{
|
13038
13038
|
"path": "react",
|
@@ -15280,7 +15280,7 @@
|
|
15280
15280
|
"external": true
|
15281
15281
|
},
|
15282
15282
|
{
|
15283
|
-
"path": "dist/HLSView-
|
15283
|
+
"path": "dist/HLSView-B7YXFUDK.js",
|
15284
15284
|
"kind": "dynamic-import"
|
15285
15285
|
},
|
15286
15286
|
{
|
@@ -15702,7 +15702,7 @@
|
|
15702
15702
|
],
|
15703
15703
|
"inputs": {
|
15704
15704
|
"<define:process.env>": {
|
15705
|
-
"bytesInOutput":
|
15705
|
+
"bytesInOutput": 18093
|
15706
15706
|
},
|
15707
15707
|
"../../node_modules/lodash/lodash.js": {
|
15708
15708
|
"bytesInOutput": 224267
|
@@ -16488,10 +16488,10 @@
|
|
16488
16488
|
"bytesInOutput": 961
|
16489
16489
|
},
|
16490
16490
|
"src/Prebuilt/components/VideoLayouts/ScreenshareLayout.tsx": {
|
16491
|
-
"bytesInOutput":
|
16491
|
+
"bytesInOutput": 2664
|
16492
16492
|
},
|
16493
16493
|
"src/Prebuilt/components/ScreenshareTile.tsx": {
|
16494
|
-
"bytesInOutput":
|
16494
|
+
"bytesInOutput": 4430
|
16495
16495
|
},
|
16496
16496
|
"src/Prebuilt/components/LayoutModeSelector.tsx": {
|
16497
16497
|
"bytesInOutput": 3093
|
@@ -16629,7 +16629,7 @@
|
|
16629
16629
|
"bytesInOutput": 651
|
16630
16630
|
}
|
16631
16631
|
},
|
16632
|
-
"bytes":
|
16632
|
+
"bytes": 1265070
|
16633
16633
|
}
|
16634
16634
|
}
|
16635
16635
|
}
|
package/package.json
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
"prebuilt",
|
11
11
|
"roomkit"
|
12
12
|
],
|
13
|
-
"version": "0.2.4-alpha.
|
13
|
+
"version": "0.2.4-alpha.3",
|
14
14
|
"author": "100ms",
|
15
15
|
"license": "MIT",
|
16
16
|
"repository": {
|
@@ -82,10 +82,10 @@
|
|
82
82
|
"react": ">=17.0.2 <19.0.0"
|
83
83
|
},
|
84
84
|
"dependencies": {
|
85
|
-
"@100mslive/hls-player": "0.2.4-alpha.
|
86
|
-
"@100mslive/hms-virtual-background": "1.12.4-alpha.
|
87
|
-
"@100mslive/react-icons": "0.9.4-alpha.
|
88
|
-
"@100mslive/react-sdk": "0.9.4-alpha.
|
85
|
+
"@100mslive/hls-player": "0.2.4-alpha.3",
|
86
|
+
"@100mslive/hms-virtual-background": "1.12.4-alpha.3",
|
87
|
+
"@100mslive/react-icons": "0.9.4-alpha.3",
|
88
|
+
"@100mslive/react-sdk": "0.9.4-alpha.3",
|
89
89
|
"@100mslive/types-prebuilt": "0.12.6",
|
90
90
|
"@emoji-mart/data": "^1.0.6",
|
91
91
|
"@emoji-mart/react": "^1.0.1",
|
@@ -120,5 +120,5 @@
|
|
120
120
|
"uuid": "^8.3.2",
|
121
121
|
"worker-timers": "^7.0.40"
|
122
122
|
},
|
123
|
-
"gitHead": "
|
123
|
+
"gitHead": "364fdcc42d01ca9cd41dde9915a0a9ef132a35d7"
|
124
124
|
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import React, { useRef, useState } from 'react';
|
2
|
-
import { useFullscreen } from 'react-use';
|
2
|
+
import { useFullscreen, useMedia } from 'react-use';
|
3
3
|
import screenfull from 'screenfull';
|
4
4
|
import {
|
5
5
|
selectLocalPeerID,
|
@@ -12,7 +12,7 @@ import { ExpandIcon, ShrinkIcon } from '@100mslive/react-icons';
|
|
12
12
|
import TileMenu from './TileMenu/TileMenu';
|
13
13
|
import { Box } from '../../Layout';
|
14
14
|
import { VideoTileStats } from '../../Stats';
|
15
|
-
import { useTheme } from '../../Theme';
|
15
|
+
import { config as cssConfig, useTheme } from '../../Theme';
|
16
16
|
import { Video } from '../../Video';
|
17
17
|
import { StyledVideoTile } from '../../VideoTile';
|
18
18
|
import { LayoutModeSelector } from './LayoutModeSelector';
|
@@ -39,6 +39,7 @@ const Tile = ({ peerId, width = '100%', height = '100%' }: { peerId: string; wid
|
|
39
39
|
const peer = useHMSStore(selectPeerByID(peerId));
|
40
40
|
const isAudioOnly = useUISettings(UI_SETTINGS.isAudioOnly);
|
41
41
|
const [isMouseHovered, setIsMouseHovered] = useState(false);
|
42
|
+
const isMobile = useMedia(cssConfig.media.md);
|
42
43
|
const showStatsOnTiles = useUISettings(UI_SETTINGS.showStatsOnTiles);
|
43
44
|
const fullscreenRef = useRef<HTMLDivElement | null>(null);
|
44
45
|
// fullscreen is for desired state
|
@@ -94,7 +95,7 @@ const Tile = ({ peerId, width = '100%', height = '100%' }: { peerId: string; wid
|
|
94
95
|
{isFullscreen ? <ShrinkIcon /> : <ExpandIcon />}
|
95
96
|
</StyledVideoTile.FullScreenButton>
|
96
97
|
) : null}
|
97
|
-
{isMouseHovered && (
|
98
|
+
{!isMobile && isMouseHovered && (
|
98
99
|
<Box
|
99
100
|
css={{
|
100
101
|
position: 'absolute',
|
@@ -111,13 +112,7 @@ const Tile = ({ peerId, width = '100%', height = '100%' }: { peerId: string; wid
|
|
111
112
|
)}
|
112
113
|
|
113
114
|
{track ? (
|
114
|
-
<Video
|
115
|
-
screenShare={true}
|
116
|
-
mirror={peer.isLocal}
|
117
|
-
attach={!isAudioOnly}
|
118
|
-
trackId={track.id}
|
119
|
-
css={{ minHeight: 0 }}
|
120
|
-
/>
|
115
|
+
<Video screenShare={true} mirror={false} attach={!isAudioOnly} trackId={track.id} css={{ minHeight: 0 }} />
|
121
116
|
) : null}
|
122
117
|
<StyledVideoTile.Info css={labelStyles}>{label}</StyledVideoTile.Info>
|
123
118
|
{isMouseHovered && !peer.isLocal ? (
|
@@ -35,10 +35,19 @@ export const ScreenshareLayout = ({ peers, onPageChange, onPageSize, edgeToEdge
|
|
35
35
|
}, [activeSharePeer, peers, isMobile, layoutMode]);
|
36
36
|
|
37
37
|
useEffect(() => {
|
38
|
-
if (
|
39
|
-
setLayoutMode(LayoutMode.
|
38
|
+
if (isMobile) {
|
39
|
+
setLayoutMode(LayoutMode.GALLERY);
|
40
|
+
return;
|
40
41
|
}
|
41
|
-
|
42
|
+
if (layoutMode === LayoutMode.SIDEBAR) {
|
43
|
+
return;
|
44
|
+
}
|
45
|
+
setLayoutMode(LayoutMode.SIDEBAR);
|
46
|
+
return () => {
|
47
|
+
// reset to gallery once screenshare is stopped
|
48
|
+
setLayoutMode(LayoutMode.GALLERY);
|
49
|
+
};
|
50
|
+
}, [isMobile]); // eslint-disable-line react-hooks/exhaustive-deps
|
42
51
|
useEffect(() => {
|
43
52
|
setActiveScreenSharePeer(isMobile ? '' : activeSharePeer?.id);
|
44
53
|
return () => {
|
File without changes
|