@100mslive/roomkit-react 0.3.12-alpha.8 → 0.3.13-alpha.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{HLSView-YERRDOU3.css → HLSView-CU536VT4.css} +3 -3
- package/dist/{HLSView-YERRDOU3.css.map → HLSView-CU536VT4.css.map} +1 -1
- package/dist/{HLSView-HM5WEBLW.js → HLSView-K2ETVPZ6.js} +2 -2
- package/dist/Prebuilt/plugins/CaptionsViewer.d.ts +5 -1
- package/dist/{chunk-E2EX6WG2.js → chunk-3FTUSPXW.js} +232 -205
- package/dist/chunk-3FTUSPXW.js.map +7 -0
- package/dist/index.cjs.css +2 -2
- package/dist/index.cjs.css.map +1 -1
- package/dist/index.cjs.js +205 -178
- package/dist/index.cjs.js.map +4 -4
- package/dist/index.css +2 -2
- package/dist/index.css.map +1 -1
- package/dist/index.js +1 -1
- package/dist/meta.cjs.json +27 -22
- package/dist/meta.esbuild.json +37 -32
- package/package.json +7 -7
- package/src/Prebuilt/components/MoreSettings/CaptionContent.tsx +3 -0
- package/src/Prebuilt/layouts/VideoStreamingSection.tsx +5 -7
- package/src/Prebuilt/plugins/CaptionsViewer.tsx +19 -3
- package/dist/chunk-E2EX6WG2.js.map +0 -7
- /package/dist/{HLSView-HM5WEBLW.js.map → HLSView-K2ETVPZ6.js.map} +0 -0
package/dist/meta.esbuild.json
CHANGED
@@ -4109,7 +4109,7 @@
|
|
4109
4109
|
"format": "esm"
|
4110
4110
|
},
|
4111
4111
|
"src/Prebuilt/components/MoreSettings/CaptionContent.tsx": {
|
4112
|
-
"bytes":
|
4112
|
+
"bytes": 5207,
|
4113
4113
|
"imports": [
|
4114
4114
|
{
|
4115
4115
|
"path": "react",
|
@@ -4895,7 +4895,7 @@
|
|
4895
4895
|
"format": "cjs"
|
4896
4896
|
},
|
4897
4897
|
"../hms-video-store/dist/index.js": {
|
4898
|
-
"bytes":
|
4898
|
+
"bytes": 339574,
|
4899
4899
|
"imports": [
|
4900
4900
|
{
|
4901
4901
|
"path": "../../node_modules/reselect/es/index.js",
|
@@ -10949,7 +10949,7 @@
|
|
10949
10949
|
],
|
10950
10950
|
"format": "esm"
|
10951
10951
|
},
|
10952
|
-
"../../../../../../../tmp/tmp-
|
10952
|
+
"../../../../../../../tmp/tmp-2781-Tt5LvC5LyiIl/1900c87f9482/tldraw.css": {
|
10953
10953
|
"bytes": 80111,
|
10954
10954
|
"imports": [
|
10955
10955
|
{
|
@@ -10999,7 +10999,7 @@
|
|
10999
10999
|
}
|
11000
11000
|
]
|
11001
11001
|
},
|
11002
|
-
"../../../../../../../tmp/tmp-
|
11002
|
+
"../../../../../../../tmp/tmp-2781-Tt5LvC5LyiIl/1900c87f8e71/index.css": {
|
11003
11003
|
"bytes": 597,
|
11004
11004
|
"imports": [
|
11005
11005
|
{
|
@@ -11008,7 +11008,7 @@
|
|
11008
11008
|
"external": true
|
11009
11009
|
},
|
11010
11010
|
{
|
11011
|
-
"path": "../../../../../../../tmp/tmp-
|
11011
|
+
"path": "../../../../../../../tmp/tmp-2781-Tt5LvC5LyiIl/1900c87f9482/tldraw.css",
|
11012
11012
|
"kind": "import-rule",
|
11013
11013
|
"original": "@tldraw/tldraw/tldraw.css"
|
11014
11014
|
}
|
@@ -11083,7 +11083,7 @@
|
|
11083
11083
|
"original": "../../common/constants"
|
11084
11084
|
},
|
11085
11085
|
{
|
11086
|
-
"path": "../../../../../../../tmp/tmp-
|
11086
|
+
"path": "../../../../../../../tmp/tmp-2781-Tt5LvC5LyiIl/1900c87f8e71/index.css",
|
11087
11087
|
"kind": "import-statement",
|
11088
11088
|
"original": "@100mslive/hms-whiteboard/index.css"
|
11089
11089
|
},
|
@@ -11280,7 +11280,7 @@
|
|
11280
11280
|
"format": "esm"
|
11281
11281
|
},
|
11282
11282
|
"src/Prebuilt/plugins/CaptionsViewer.tsx": {
|
11283
|
-
"bytes":
|
11283
|
+
"bytes": 7689,
|
11284
11284
|
"imports": [
|
11285
11285
|
{
|
11286
11286
|
"path": "react",
|
@@ -12105,13 +12105,18 @@
|
|
12105
12105
|
"format": "esm"
|
12106
12106
|
},
|
12107
12107
|
"src/Prebuilt/layouts/VideoStreamingSection.tsx": {
|
12108
|
-
"bytes":
|
12108
|
+
"bytes": 6017,
|
12109
12109
|
"imports": [
|
12110
12110
|
{
|
12111
12111
|
"path": "react",
|
12112
12112
|
"kind": "import-statement",
|
12113
12113
|
"external": true
|
12114
12114
|
},
|
12115
|
+
{
|
12116
|
+
"path": "react-draggable",
|
12117
|
+
"kind": "import-statement",
|
12118
|
+
"external": true
|
12119
|
+
},
|
12115
12120
|
{
|
12116
12121
|
"path": "@100mslive/types-prebuilt",
|
12117
12122
|
"kind": "import-statement",
|
@@ -14312,7 +14317,7 @@
|
|
14312
14317
|
"dist/index.js": {
|
14313
14318
|
"imports": [
|
14314
14319
|
{
|
14315
|
-
"path": "dist/chunk-
|
14320
|
+
"path": "dist/chunk-3FTUSPXW.js",
|
14316
14321
|
"kind": "import-statement"
|
14317
14322
|
}
|
14318
14323
|
],
|
@@ -14386,16 +14391,16 @@
|
|
14386
14391
|
"inputs": {},
|
14387
14392
|
"bytes": 1822
|
14388
14393
|
},
|
14389
|
-
"dist/HLSView-
|
14394
|
+
"dist/HLSView-K2ETVPZ6.js.map": {
|
14390
14395
|
"imports": [],
|
14391
14396
|
"exports": [],
|
14392
14397
|
"inputs": {},
|
14393
14398
|
"bytes": 100275
|
14394
14399
|
},
|
14395
|
-
"dist/HLSView-
|
14400
|
+
"dist/HLSView-K2ETVPZ6.js": {
|
14396
14401
|
"imports": [
|
14397
14402
|
{
|
14398
|
-
"path": "dist/chunk-
|
14403
|
+
"path": "dist/chunk-3FTUSPXW.js",
|
14399
14404
|
"kind": "import-statement"
|
14400
14405
|
},
|
14401
14406
|
{
|
@@ -14573,7 +14578,7 @@
|
|
14573
14578
|
"default"
|
14574
14579
|
],
|
14575
14580
|
"entryPoint": "src/Prebuilt/layouts/HLSView.jsx",
|
14576
|
-
"cssBundle": "dist/HLSView-
|
14581
|
+
"cssBundle": "dist/HLSView-CU536VT4.css",
|
14577
14582
|
"inputs": {
|
14578
14583
|
"src/Prebuilt/layouts/HLSView.jsx": {
|
14579
14584
|
"bytesInOutput": 27671
|
@@ -14632,13 +14637,13 @@
|
|
14632
14637
|
},
|
14633
14638
|
"bytes": 61702
|
14634
14639
|
},
|
14635
|
-
"dist/chunk-
|
14640
|
+
"dist/chunk-3FTUSPXW.js.map": {
|
14636
14641
|
"imports": [],
|
14637
14642
|
"exports": [],
|
14638
14643
|
"inputs": {},
|
14639
|
-
"bytes":
|
14644
|
+
"bytes": 3279435
|
14640
14645
|
},
|
14641
|
-
"dist/chunk-
|
14646
|
+
"dist/chunk-3FTUSPXW.js": {
|
14642
14647
|
"imports": [
|
14643
14648
|
{
|
14644
14649
|
"path": "react",
|
@@ -17116,7 +17121,7 @@
|
|
17116
17121
|
"external": true
|
17117
17122
|
},
|
17118
17123
|
{
|
17119
|
-
"path": "dist/HLSView-
|
17124
|
+
"path": "dist/HLSView-K2ETVPZ6.js",
|
17120
17125
|
"kind": "dynamic-import"
|
17121
17126
|
},
|
17122
17127
|
{
|
@@ -17618,7 +17623,7 @@
|
|
17618
17623
|
],
|
17619
17624
|
"inputs": {
|
17620
17625
|
"<define:process.env>": {
|
17621
|
-
"bytesInOutput":
|
17626
|
+
"bytesInOutput": 17864
|
17622
17627
|
},
|
17623
17628
|
"../../node_modules/lodash/lodash.js": {
|
17624
17629
|
"bytesInOutput": 224310
|
@@ -17816,7 +17821,7 @@
|
|
17816
17821
|
"bytesInOutput": 8580
|
17817
17822
|
},
|
17818
17823
|
"src/Stats/formatBytes.ts": {
|
17819
|
-
"bytesInOutput":
|
17824
|
+
"bytesInOutput": 468
|
17820
17825
|
},
|
17821
17826
|
"src/Stats/StyledStats.tsx": {
|
17822
17827
|
"bytesInOutput": 708
|
@@ -18032,7 +18037,7 @@
|
|
18032
18037
|
"bytesInOutput": 7700
|
18033
18038
|
},
|
18034
18039
|
"src/Prebuilt/components/StatsForNerds.jsx": {
|
18035
|
-
"bytesInOutput":
|
18040
|
+
"bytesInOutput": 9842
|
18036
18041
|
},
|
18037
18042
|
"src/Prebuilt/components/MoreSettings/BulkRoleChangeModal.jsx": {
|
18038
18043
|
"bytesInOutput": 5008
|
@@ -18041,7 +18046,7 @@
|
|
18041
18046
|
"bytesInOutput": 1015
|
18042
18047
|
},
|
18043
18048
|
"src/Prebuilt/components/MoreSettings/CaptionContent.tsx": {
|
18044
|
-
"bytesInOutput":
|
18049
|
+
"bytesInOutput": 5090
|
18045
18050
|
},
|
18046
18051
|
"src/Prebuilt/components/MoreSettings/FullScreenItem.tsx": {
|
18047
18052
|
"bytesInOutput": 628
|
@@ -18068,7 +18073,7 @@
|
|
18068
18073
|
"bytesInOutput": 9482
|
18069
18074
|
},
|
18070
18075
|
"../hms-video-store/dist/index.js": {
|
18071
|
-
"bytesInOutput":
|
18076
|
+
"bytesInOutput": 49655
|
18072
18077
|
},
|
18073
18078
|
"../../node_modules/reselect/es/index.js": {
|
18074
18079
|
"bytesInOutput": 2537
|
@@ -18407,7 +18412,7 @@
|
|
18407
18412
|
"bytesInOutput": 2206
|
18408
18413
|
},
|
18409
18414
|
"src/Prebuilt/layouts/VideoStreamingSection.tsx": {
|
18410
|
-
"bytesInOutput":
|
18415
|
+
"bytesInOutput": 5199
|
18411
18416
|
},
|
18412
18417
|
"src/Prebuilt/components/VideoLayouts/GridLayout.tsx": {
|
18413
18418
|
"bytesInOutput": 4550
|
@@ -18460,7 +18465,7 @@
|
|
18460
18465
|
"src/Prebuilt/components/VideoLayouts/WhiteboardLayout.tsx": {
|
18461
18466
|
"bytesInOutput": 2793
|
18462
18467
|
},
|
18463
|
-
"../../../../../../../tmp/tmp-
|
18468
|
+
"../../../../../../../tmp/tmp-2781-Tt5LvC5LyiIl/1900c87f8e71/index.css": {
|
18464
18469
|
"bytesInOutput": 0
|
18465
18470
|
},
|
18466
18471
|
"src/Prebuilt/common/PeersSorter.ts": {
|
@@ -18473,7 +18478,7 @@
|
|
18473
18478
|
"bytesInOutput": 1536
|
18474
18479
|
},
|
18475
18480
|
"src/Prebuilt/plugins/CaptionsViewer.tsx": {
|
18476
|
-
"bytesInOutput":
|
18481
|
+
"bytesInOutput": 6888
|
18477
18482
|
},
|
18478
18483
|
"src/Prebuilt/components/hooks/useCloseScreenshareWhiteboard.tsx": {
|
18479
18484
|
"bytesInOutput": 619
|
@@ -18602,7 +18607,7 @@
|
|
18602
18607
|
"bytesInOutput": 651
|
18603
18608
|
}
|
18604
18609
|
},
|
18605
|
-
"bytes":
|
18610
|
+
"bytes": 1345358
|
18606
18611
|
},
|
18607
18612
|
"dist/index.css.map": {
|
18608
18613
|
"imports": [],
|
@@ -18664,22 +18669,22 @@
|
|
18664
18669
|
}
|
18665
18670
|
],
|
18666
18671
|
"inputs": {
|
18667
|
-
"../../../../../../../tmp/tmp-
|
18672
|
+
"../../../../../../../tmp/tmp-2781-Tt5LvC5LyiIl/1900c87f9482/tldraw.css": {
|
18668
18673
|
"bytesInOutput": 75223
|
18669
18674
|
},
|
18670
|
-
"../../../../../../../tmp/tmp-
|
18675
|
+
"../../../../../../../tmp/tmp-2781-Tt5LvC5LyiIl/1900c87f8e71/index.css": {
|
18671
18676
|
"bytesInOutput": 401
|
18672
18677
|
}
|
18673
18678
|
},
|
18674
18679
|
"bytes": 75901
|
18675
18680
|
},
|
18676
|
-
"dist/HLSView-
|
18681
|
+
"dist/HLSView-CU536VT4.css.map": {
|
18677
18682
|
"imports": [],
|
18678
18683
|
"exports": [],
|
18679
18684
|
"inputs": {},
|
18680
18685
|
"bytes": 122402
|
18681
18686
|
},
|
18682
|
-
"dist/HLSView-
|
18687
|
+
"dist/HLSView-CU536VT4.css": {
|
18683
18688
|
"imports": [
|
18684
18689
|
{
|
18685
18690
|
"path": "https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap",
|
@@ -18733,10 +18738,10 @@
|
|
18733
18738
|
}
|
18734
18739
|
],
|
18735
18740
|
"inputs": {
|
18736
|
-
"../../../../../../../tmp/tmp-
|
18741
|
+
"../../../../../../../tmp/tmp-2781-Tt5LvC5LyiIl/1900c87f9482/tldraw.css": {
|
18737
18742
|
"bytesInOutput": 75223
|
18738
18743
|
},
|
18739
|
-
"../../../../../../../tmp/tmp-
|
18744
|
+
"../../../../../../../tmp/tmp-2781-Tt5LvC5LyiIl/1900c87f8e71/index.css": {
|
18740
18745
|
"bytesInOutput": 401
|
18741
18746
|
}
|
18742
18747
|
},
|
package/package.json
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
"prebuilt",
|
11
11
|
"roomkit"
|
12
12
|
],
|
13
|
-
"version": "0.3.
|
13
|
+
"version": "0.3.13-alpha.0",
|
14
14
|
"author": "100ms",
|
15
15
|
"license": "MIT",
|
16
16
|
"repository": {
|
@@ -74,12 +74,12 @@
|
|
74
74
|
"react": ">=17.0.2 <19.0.0"
|
75
75
|
},
|
76
76
|
"dependencies": {
|
77
|
-
"@100mslive/hls-player": "0.3.
|
77
|
+
"@100mslive/hls-player": "0.3.13-alpha.0",
|
78
78
|
"@100mslive/hms-noise-cancellation": "0.0.1",
|
79
|
-
"@100mslive/hms-virtual-background": "1.13.
|
80
|
-
"@100mslive/hms-whiteboard": "0.0.
|
81
|
-
"@100mslive/react-icons": "0.10.
|
82
|
-
"@100mslive/react-sdk": "0.10.
|
79
|
+
"@100mslive/hms-virtual-background": "1.13.13-alpha.0",
|
80
|
+
"@100mslive/hms-whiteboard": "0.0.3-alpha.0",
|
81
|
+
"@100mslive/react-icons": "0.10.13-alpha.0",
|
82
|
+
"@100mslive/react-sdk": "0.10.13-alpha.0",
|
83
83
|
"@100mslive/types-prebuilt": "0.12.9",
|
84
84
|
"@emoji-mart/data": "^1.0.6",
|
85
85
|
"@emoji-mart/react": "^1.0.1",
|
@@ -115,5 +115,5 @@
|
|
115
115
|
"uuid": "^8.3.2",
|
116
116
|
"worker-timers": "^7.0.40"
|
117
117
|
},
|
118
|
-
"gitHead": "
|
118
|
+
"gitHead": "82f45fd8c79f9b264094447217d533d395e831fd"
|
119
119
|
}
|
@@ -93,6 +93,7 @@ export const CaptionContent = ({ isMobile, onExit }: { isMobile: boolean; onExit
|
|
93
93
|
await actions.stopTranscription({
|
94
94
|
mode: HMSTranscriptionMode.CAPTION,
|
95
95
|
});
|
96
|
+
setIsCaptionEnabled(false);
|
96
97
|
const id = ToastManager.replaceToast(toastId, {
|
97
98
|
title: `Disabling Closed Caption for everyone.`,
|
98
99
|
variant: 'standard',
|
@@ -120,6 +121,8 @@ export const CaptionContent = ({ isMobile, onExit }: { isMobile: boolean; onExit
|
|
120
121
|
icon: <AlertTriangleIcon style={{ marginRight: '0.5rem' }} />,
|
121
122
|
});
|
122
123
|
setToastId(id);
|
124
|
+
} finally {
|
125
|
+
setIsCaptionEnabled(true);
|
123
126
|
}
|
124
127
|
onExit();
|
125
128
|
}}
|
@@ -1,4 +1,5 @@
|
|
1
|
-
import React, { Suspense, useEffect } from 'react';
|
1
|
+
import React, { Suspense, useEffect, useState } from 'react';
|
2
|
+
import { ControlPosition } from 'react-draggable';
|
2
3
|
import {
|
3
4
|
ConferencingScreen,
|
4
5
|
DefaultConferencingScreen_Elements,
|
@@ -25,11 +26,7 @@ import SidePane from './SidePane';
|
|
25
26
|
import { WaitingView } from './WaitingView';
|
26
27
|
import { CaptionsViewer } from '../plugins/CaptionsViewer';
|
27
28
|
// @ts-ignore: No implicit Any
|
28
|
-
import {
|
29
|
-
usePDFConfig,
|
30
|
-
useUrlToEmbed,
|
31
|
-
// @ts-ignore: No implicit Any
|
32
|
-
} from '../components/AppData/useUISettings';
|
29
|
+
import { usePDFConfig, useUrlToEmbed } from '../components/AppData/useUISettings';
|
33
30
|
import { useCloseScreenshareWhiteboard } from '../components/hooks/useCloseScreenshareWhiteboard';
|
34
31
|
import { useLandscapeHLSStream, useMobileHLSStream, useWaitingRoomInfo } from '../common/hooks';
|
35
32
|
import { SESSION_STORE_KEY } from '../common/constants';
|
@@ -54,6 +51,7 @@ export const VideoStreamingSection = ({
|
|
54
51
|
const pdfAnnotatorActive = usePDFConfig();
|
55
52
|
const isMobileHLSStream = useMobileHLSStream();
|
56
53
|
const isLandscapeHLSStream = useLandscapeHLSStream();
|
54
|
+
const [captionPosition, setCaptionPosition] = useState<ControlPosition>({ x: -200, y: 0 });
|
57
55
|
useCloseScreenshareWhiteboard();
|
58
56
|
|
59
57
|
const { isNotAllowedToPublish, isScreenOnlyPublishParams, hasSubscribedRolePublishing } = useWaitingRoomInfo();
|
@@ -140,7 +138,7 @@ export const VideoStreamingSection = ({
|
|
140
138
|
// @ts-ignore
|
141
139
|
return <GridLayout {...(elements as DefaultConferencingScreen_Elements)?.video_tile_layout?.grid} />;
|
142
140
|
})}
|
143
|
-
<CaptionsViewer />
|
141
|
+
<CaptionsViewer setDefaultPosition={setCaptionPosition} defaultPosition={captionPosition} />
|
144
142
|
<Box
|
145
143
|
css={{
|
146
144
|
flex: match({ isLandscapeHLSStream, isMobileHLSStream })
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import React, { useEffect, useRef, useState } from 'react';
|
2
|
-
import Draggable from 'react-draggable';
|
2
|
+
import Draggable, { ControlPosition } from 'react-draggable';
|
3
3
|
import { useMedia } from 'react-use';
|
4
4
|
import {
|
5
5
|
HMSTranscript,
|
@@ -28,6 +28,9 @@ class SimpleQueue {
|
|
28
28
|
private storage: TranscriptData[] = [];
|
29
29
|
constructor(private capacity: number = 3, private MAX_STORAGE_TIME: number = 5000) {}
|
30
30
|
enqueue(data: TranscriptData): void {
|
31
|
+
if (!data.transcript.trim()) {
|
32
|
+
return;
|
33
|
+
}
|
31
34
|
if (this.size() === this.capacity && this.storage[this.size() - 1].final) {
|
32
35
|
this.dequeue(this.storage[this.size() - 1]);
|
33
36
|
}
|
@@ -165,7 +168,13 @@ const TranscriptView = ({ peer_id, data }: { peer_id: string; data: string }) =>
|
|
165
168
|
);
|
166
169
|
};
|
167
170
|
|
168
|
-
export const CaptionsViewer = (
|
171
|
+
export const CaptionsViewer = ({
|
172
|
+
defaultPosition,
|
173
|
+
setDefaultPosition,
|
174
|
+
}: {
|
175
|
+
defaultPosition: ControlPosition;
|
176
|
+
setDefaultPosition: (position: ControlPosition) => void;
|
177
|
+
}) => {
|
169
178
|
const { elements, screenType } = useRoomLayoutConferencingScreen();
|
170
179
|
const isMobile = useMedia(config.media.md);
|
171
180
|
const isChatOpen = useIsSidepaneTypeOpen(SIDE_PANE_OPTIONS.CHAT);
|
@@ -208,7 +217,14 @@ export const CaptionsViewer = () => {
|
|
208
217
|
return null;
|
209
218
|
}
|
210
219
|
return (
|
211
|
-
<Draggable
|
220
|
+
<Draggable
|
221
|
+
bounds="parent"
|
222
|
+
nodeRef={nodeRef}
|
223
|
+
defaultPosition={defaultPosition}
|
224
|
+
onStop={(_, data) => {
|
225
|
+
setDefaultPosition({ x: data.lastX, y: data.lastY });
|
226
|
+
}}
|
227
|
+
>
|
212
228
|
<Box
|
213
229
|
ref={nodeRef}
|
214
230
|
css={{
|