@100mslive/roomkit-react 0.2.8-alpha.10 → 0.2.8-alpha.12
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{HLSView-FBEGJ3L7.js → HLSView-IIPEBXAG.js} +43 -23
- package/dist/HLSView-IIPEBXAG.js.map +7 -0
- package/dist/Prebuilt/components/Chat/Chat.d.ts +1 -1
- package/dist/{chunk-R2JJJQR3.js → chunk-B22UTHMR.js} +13 -6
- package/dist/{chunk-R2JJJQR3.js.map → chunk-B22UTHMR.js.map} +2 -2
- package/dist/index.cjs.js +89 -64
- package/dist/index.cjs.js.map +3 -3
- package/dist/index.js +1 -1
- package/dist/meta.cjs.json +23 -13
- package/dist/meta.esbuild.json +34 -23
- package/package.json +6 -6
- package/src/Prebuilt/components/Chat/Chat.tsx +4 -0
- package/src/Prebuilt/components/Footer/RoleOptions.tsx +4 -1
- package/src/Prebuilt/components/HMSVideo/HMSVideo.jsx +1 -0
- package/src/Prebuilt/components/HMSVideo/MwebHLSViewTitle.tsx +6 -4
- package/src/Prebuilt/layouts/HLSView.jsx +67 -38
- package/dist/HLSView-FBEGJ3L7.js.map +0 -7
package/dist/index.js
CHANGED
package/dist/meta.cjs.json
CHANGED
@@ -5935,7 +5935,7 @@
|
|
5935
5935
|
"format": "esm"
|
5936
5936
|
},
|
5937
5937
|
"src/Prebuilt/components/Footer/RoleOptions.tsx": {
|
5938
|
-
"bytes":
|
5938
|
+
"bytes": 7089,
|
5939
5939
|
"imports": [
|
5940
5940
|
{
|
5941
5941
|
"path": "react",
|
@@ -8446,7 +8446,7 @@
|
|
8446
8446
|
"format": "esm"
|
8447
8447
|
},
|
8448
8448
|
"src/Prebuilt/components/Chat/Chat.tsx": {
|
8449
|
-
"bytes":
|
8449
|
+
"bytes": 4861,
|
8450
8450
|
"imports": [
|
8451
8451
|
{
|
8452
8452
|
"path": "react",
|
@@ -10846,7 +10846,7 @@
|
|
10846
10846
|
"format": "esm"
|
10847
10847
|
},
|
10848
10848
|
"src/Prebuilt/components/HMSVideo/HMSVideo.jsx": {
|
10849
|
-
"bytes":
|
10849
|
+
"bytes": 1333,
|
10850
10850
|
"imports": [
|
10851
10851
|
{
|
10852
10852
|
"path": "react",
|
@@ -11259,7 +11259,7 @@
|
|
11259
11259
|
"format": "esm"
|
11260
11260
|
},
|
11261
11261
|
"src/Prebuilt/components/HMSVideo/MwebHLSViewTitle.tsx": {
|
11262
|
-
"bytes":
|
11262
|
+
"bytes": 2527,
|
11263
11263
|
"imports": [
|
11264
11264
|
{
|
11265
11265
|
"path": "react",
|
@@ -11315,7 +11315,7 @@
|
|
11315
11315
|
"format": "esm"
|
11316
11316
|
},
|
11317
11317
|
"src/Prebuilt/layouts/HLSView.jsx": {
|
11318
|
-
"bytes":
|
11318
|
+
"bytes": 26567,
|
11319
11319
|
"imports": [
|
11320
11320
|
{
|
11321
11321
|
"path": "react",
|
@@ -11337,6 +11337,11 @@
|
|
11337
11337
|
"kind": "import-statement",
|
11338
11338
|
"external": true
|
11339
11339
|
},
|
11340
|
+
{
|
11341
|
+
"path": "ts-pattern",
|
11342
|
+
"kind": "import-statement",
|
11343
|
+
"external": true
|
11344
|
+
},
|
11340
11345
|
{
|
11341
11346
|
"path": "@100mslive/react-sdk",
|
11342
11347
|
"kind": "import-statement",
|
@@ -13602,7 +13607,7 @@
|
|
13602
13607
|
"imports": [],
|
13603
13608
|
"exports": [],
|
13604
13609
|
"inputs": {},
|
13605
|
-
"bytes":
|
13610
|
+
"bytes": 3261627
|
13606
13611
|
},
|
13607
13612
|
"dist/index.cjs.js": {
|
13608
13613
|
"imports": [
|
@@ -16071,6 +16076,11 @@
|
|
16071
16076
|
"kind": "require-call",
|
16072
16077
|
"external": true
|
16073
16078
|
},
|
16079
|
+
{
|
16080
|
+
"path": "ts-pattern",
|
16081
|
+
"kind": "require-call",
|
16082
|
+
"external": true
|
16083
|
+
},
|
16074
16084
|
{
|
16075
16085
|
"path": "@100mslive/react-sdk",
|
16076
16086
|
"kind": "require-call",
|
@@ -16506,7 +16516,7 @@
|
|
16506
16516
|
"entryPoint": "src/index.ts",
|
16507
16517
|
"inputs": {
|
16508
16518
|
"<define:process.env>": {
|
16509
|
-
"bytesInOutput":
|
16519
|
+
"bytesInOutput": 18259
|
16510
16520
|
},
|
16511
16521
|
"src/Theme/base.config.ts": {
|
16512
16522
|
"bytesInOutput": 6104
|
@@ -17079,7 +17089,7 @@
|
|
17079
17089
|
"bytesInOutput": 1694
|
17080
17090
|
},
|
17081
17091
|
"src/Prebuilt/components/Footer/RoleOptions.tsx": {
|
17082
|
-
"bytesInOutput":
|
17092
|
+
"bytesInOutput": 8531
|
17083
17093
|
},
|
17084
17094
|
"src/Prebuilt/components/Footer/RoleAccordion.tsx": {
|
17085
17095
|
"bytesInOutput": 5338
|
@@ -17235,7 +17245,7 @@
|
|
17235
17245
|
"bytesInOutput": 6106
|
17236
17246
|
},
|
17237
17247
|
"src/Prebuilt/components/Chat/Chat.tsx": {
|
17238
|
-
"bytesInOutput":
|
17248
|
+
"bytesInOutput": 5683
|
17239
17249
|
},
|
17240
17250
|
"src/Prebuilt/components/Footer/PaginatedParticipants.tsx": {
|
17241
17251
|
"bytesInOutput": 5344
|
@@ -17370,7 +17380,7 @@
|
|
17370
17380
|
"bytesInOutput": 656
|
17371
17381
|
},
|
17372
17382
|
"src/Prebuilt/components/HMSVideo/HMSVideo.jsx": {
|
17373
|
-
"bytesInOutput":
|
17383
|
+
"bytesInOutput": 1903
|
17374
17384
|
},
|
17375
17385
|
"src/Prebuilt/components/HMSVideo/PlayerContext.tsx": {
|
17376
17386
|
"bytesInOutput": 489
|
@@ -17409,10 +17419,10 @@
|
|
17409
17419
|
"bytesInOutput": 8496
|
17410
17420
|
},
|
17411
17421
|
"src/Prebuilt/components/HMSVideo/MwebHLSViewTitle.tsx": {
|
17412
|
-
"bytesInOutput":
|
17422
|
+
"bytesInOutput": 2886
|
17413
17423
|
},
|
17414
17424
|
"src/Prebuilt/layouts/HLSView.jsx": {
|
17415
|
-
"bytesInOutput":
|
17425
|
+
"bytesInOutput": 31039
|
17416
17426
|
},
|
17417
17427
|
"src/Prebuilt/layouts/VideoStreamingSection.tsx": {
|
17418
17428
|
"bytesInOutput": 5017
|
@@ -17550,7 +17560,7 @@
|
|
17550
17560
|
"bytesInOutput": 2980
|
17551
17561
|
}
|
17552
17562
|
},
|
17553
|
-
"bytes":
|
17563
|
+
"bytes": 1549124
|
17554
17564
|
}
|
17555
17565
|
}
|
17556
17566
|
}
|
package/dist/meta.esbuild.json
CHANGED
@@ -5935,7 +5935,7 @@
|
|
5935
5935
|
"format": "esm"
|
5936
5936
|
},
|
5937
5937
|
"src/Prebuilt/components/Footer/RoleOptions.tsx": {
|
5938
|
-
"bytes":
|
5938
|
+
"bytes": 7089,
|
5939
5939
|
"imports": [
|
5940
5940
|
{
|
5941
5941
|
"path": "react",
|
@@ -8446,7 +8446,7 @@
|
|
8446
8446
|
"format": "esm"
|
8447
8447
|
},
|
8448
8448
|
"src/Prebuilt/components/Chat/Chat.tsx": {
|
8449
|
-
"bytes":
|
8449
|
+
"bytes": 4861,
|
8450
8450
|
"imports": [
|
8451
8451
|
{
|
8452
8452
|
"path": "react",
|
@@ -10846,7 +10846,7 @@
|
|
10846
10846
|
"format": "esm"
|
10847
10847
|
},
|
10848
10848
|
"src/Prebuilt/components/HMSVideo/HMSVideo.jsx": {
|
10849
|
-
"bytes":
|
10849
|
+
"bytes": 1333,
|
10850
10850
|
"imports": [
|
10851
10851
|
{
|
10852
10852
|
"path": "react",
|
@@ -11259,7 +11259,7 @@
|
|
11259
11259
|
"format": "esm"
|
11260
11260
|
},
|
11261
11261
|
"src/Prebuilt/components/HMSVideo/MwebHLSViewTitle.tsx": {
|
11262
|
-
"bytes":
|
11262
|
+
"bytes": 2527,
|
11263
11263
|
"imports": [
|
11264
11264
|
{
|
11265
11265
|
"path": "react",
|
@@ -11315,7 +11315,7 @@
|
|
11315
11315
|
"format": "esm"
|
11316
11316
|
},
|
11317
11317
|
"src/Prebuilt/layouts/HLSView.jsx": {
|
11318
|
-
"bytes":
|
11318
|
+
"bytes": 26567,
|
11319
11319
|
"imports": [
|
11320
11320
|
{
|
11321
11321
|
"path": "react",
|
@@ -11337,6 +11337,11 @@
|
|
11337
11337
|
"kind": "import-statement",
|
11338
11338
|
"external": true
|
11339
11339
|
},
|
11340
|
+
{
|
11341
|
+
"path": "ts-pattern",
|
11342
|
+
"kind": "import-statement",
|
11343
|
+
"external": true
|
11344
|
+
},
|
11340
11345
|
{
|
11341
11346
|
"path": "@100mslive/react-sdk",
|
11342
11347
|
"kind": "import-statement",
|
@@ -13607,7 +13612,7 @@
|
|
13607
13612
|
"dist/index.js": {
|
13608
13613
|
"imports": [
|
13609
13614
|
{
|
13610
|
-
"path": "dist/chunk-
|
13615
|
+
"path": "dist/chunk-B22UTHMR.js",
|
13611
13616
|
"kind": "import-statement"
|
13612
13617
|
}
|
13613
13618
|
],
|
@@ -13680,16 +13685,16 @@
|
|
13680
13685
|
"inputs": {},
|
13681
13686
|
"bytes": 1822
|
13682
13687
|
},
|
13683
|
-
"dist/HLSView-
|
13688
|
+
"dist/HLSView-IIPEBXAG.js.map": {
|
13684
13689
|
"imports": [],
|
13685
13690
|
"exports": [],
|
13686
13691
|
"inputs": {},
|
13687
|
-
"bytes":
|
13692
|
+
"bytes": 88957
|
13688
13693
|
},
|
13689
|
-
"dist/HLSView-
|
13694
|
+
"dist/HLSView-IIPEBXAG.js": {
|
13690
13695
|
"imports": [
|
13691
13696
|
{
|
13692
|
-
"path": "dist/chunk-
|
13697
|
+
"path": "dist/chunk-B22UTHMR.js",
|
13693
13698
|
"kind": "import-statement"
|
13694
13699
|
},
|
13695
13700
|
{
|
@@ -13712,6 +13717,11 @@
|
|
13712
13717
|
"kind": "import-statement",
|
13713
13718
|
"external": true
|
13714
13719
|
},
|
13720
|
+
{
|
13721
|
+
"path": "ts-pattern",
|
13722
|
+
"kind": "import-statement",
|
13723
|
+
"external": true
|
13724
|
+
},
|
13715
13725
|
{
|
13716
13726
|
"path": "@100mslive/react-sdk",
|
13717
13727
|
"kind": "import-statement",
|
@@ -13849,7 +13859,7 @@
|
|
13849
13859
|
"entryPoint": "src/Prebuilt/layouts/HLSView.jsx",
|
13850
13860
|
"inputs": {
|
13851
13861
|
"src/Prebuilt/layouts/HLSView.jsx": {
|
13852
|
-
"bytesInOutput":
|
13862
|
+
"bytesInOutput": 25432
|
13853
13863
|
},
|
13854
13864
|
"src/Prebuilt/components/HlsStatsOverlay.jsx": {
|
13855
13865
|
"bytesInOutput": 3521
|
@@ -13861,7 +13871,7 @@
|
|
13861
13871
|
"bytesInOutput": 416
|
13862
13872
|
},
|
13863
13873
|
"src/Prebuilt/components/HMSVideo/HMSVideo.jsx": {
|
13864
|
-
"bytesInOutput":
|
13874
|
+
"bytesInOutput": 1464
|
13865
13875
|
},
|
13866
13876
|
"src/Prebuilt/components/HMSVideo/PlayPauseButton.tsx": {
|
13867
13877
|
"bytesInOutput": 851
|
@@ -13897,18 +13907,18 @@
|
|
13897
13907
|
"bytesInOutput": 7482
|
13898
13908
|
},
|
13899
13909
|
"src/Prebuilt/components/HMSVideo/MwebHLSViewTitle.tsx": {
|
13900
|
-
"bytesInOutput":
|
13910
|
+
"bytesInOutput": 2101
|
13901
13911
|
}
|
13902
13912
|
},
|
13903
|
-
"bytes":
|
13913
|
+
"bytes": 54476
|
13904
13914
|
},
|
13905
|
-
"dist/chunk-
|
13915
|
+
"dist/chunk-B22UTHMR.js.map": {
|
13906
13916
|
"imports": [],
|
13907
13917
|
"exports": [],
|
13908
13918
|
"inputs": {},
|
13909
|
-
"bytes":
|
13919
|
+
"bytes": 3168087
|
13910
13920
|
},
|
13911
|
-
"dist/chunk-
|
13921
|
+
"dist/chunk-B22UTHMR.js": {
|
13912
13922
|
"imports": [
|
13913
13923
|
{
|
13914
13924
|
"path": "react",
|
@@ -16276,7 +16286,7 @@
|
|
16276
16286
|
"external": true
|
16277
16287
|
},
|
16278
16288
|
{
|
16279
|
-
"path": "dist/HLSView-
|
16289
|
+
"path": "dist/HLSView-IIPEBXAG.js",
|
16280
16290
|
"kind": "dynamic-import"
|
16281
16291
|
},
|
16282
16292
|
{
|
@@ -16691,6 +16701,8 @@
|
|
16691
16701
|
"Link",
|
16692
16702
|
"Loading",
|
16693
16703
|
"Logo",
|
16704
|
+
"POLL_STATE",
|
16705
|
+
"POLL_VIEWS",
|
16694
16706
|
"PasswordInput",
|
16695
16707
|
"Popover",
|
16696
16708
|
"Progress",
|
@@ -16741,7 +16753,6 @@
|
|
16741
16753
|
"useBorderAudioLevel",
|
16742
16754
|
"useIsLandscape",
|
16743
16755
|
"useIsSidepaneTypeOpen",
|
16744
|
-
"usePollViewToggle",
|
16745
16756
|
"useRoomLayoutConferencingScreen",
|
16746
16757
|
"useRoomLayoutHeader",
|
16747
16758
|
"useSidepaneToggle",
|
@@ -16749,7 +16760,7 @@
|
|
16749
16760
|
],
|
16750
16761
|
"inputs": {
|
16751
16762
|
"<define:process.env>": {
|
16752
|
-
"bytesInOutput":
|
16763
|
+
"bytesInOutput": 18259
|
16753
16764
|
},
|
16754
16765
|
"../../node_modules/lodash/lodash.js": {
|
16755
16766
|
"bytesInOutput": 224291
|
@@ -17304,7 +17315,7 @@
|
|
17304
17315
|
"bytesInOutput": 4229
|
17305
17316
|
},
|
17306
17317
|
"src/Prebuilt/components/Footer/RoleOptions.tsx": {
|
17307
|
-
"bytesInOutput":
|
17318
|
+
"bytesInOutput": 7326
|
17308
17319
|
},
|
17309
17320
|
"src/Prebuilt/components/Footer/PollsToggle.tsx": {
|
17310
17321
|
"bytesInOutput": 1073
|
@@ -17412,7 +17423,7 @@
|
|
17412
17423
|
"bytesInOutput": 7554
|
17413
17424
|
},
|
17414
17425
|
"src/Prebuilt/components/Chat/Chat.tsx": {
|
17415
|
-
"bytesInOutput":
|
17426
|
+
"bytesInOutput": 4500
|
17416
17427
|
},
|
17417
17428
|
"src/Prebuilt/components/Chat/ChatBody.tsx": {
|
17418
17429
|
"bytesInOutput": 14396
|
@@ -17703,7 +17714,7 @@
|
|
17703
17714
|
"bytesInOutput": 651
|
17704
17715
|
}
|
17705
17716
|
},
|
17706
|
-
"bytes":
|
17717
|
+
"bytes": 1298112
|
17707
17718
|
}
|
17708
17719
|
}
|
17709
17720
|
}
|
package/package.json
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
"prebuilt",
|
11
11
|
"roomkit"
|
12
12
|
],
|
13
|
-
"version": "0.2.8-alpha.
|
13
|
+
"version": "0.2.8-alpha.12",
|
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.2.8-alpha.
|
85
|
+
"@100mslive/hls-player": "0.2.8-alpha.12",
|
86
86
|
"@100mslive/hms-noise-cancellation": "0.0.0-alpha.1",
|
87
|
-
"@100mslive/hms-virtual-background": "1.12.8-alpha.
|
88
|
-
"@100mslive/react-icons": "0.9.8-alpha.
|
89
|
-
"@100mslive/react-sdk": "0.9.8-alpha.
|
87
|
+
"@100mslive/hms-virtual-background": "1.12.8-alpha.12",
|
88
|
+
"@100mslive/react-icons": "0.9.8-alpha.12",
|
89
|
+
"@100mslive/react-sdk": "0.9.8-alpha.12",
|
90
90
|
"@100mslive/types-prebuilt": "0.12.7",
|
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": "
|
125
|
+
"gitHead": "c5c687051efa9506328ae118b2bf8cd79b9a655c"
|
126
126
|
}
|
@@ -80,9 +80,12 @@ export const RoleOptions = ({ roleName, peerList }: { roleName: string; peerList
|
|
80
80
|
const { on_stage_role, off_stage_roles = [] } = (elements as DefaultConferencingScreen_Elements)?.on_stage_exp || {};
|
81
81
|
const canRemoveRoleFromStage = permissions?.changeRole && roleName === on_stage_role;
|
82
82
|
const role = useHMSStore(selectRoleByRoleName(roleName));
|
83
|
+
const tracks = useHMSStore(selectTracksMap);
|
84
|
+
if (!role) {
|
85
|
+
return null;
|
86
|
+
}
|
83
87
|
const canPublishAudio = role.publishParams.allowed.includes('audio');
|
84
88
|
const canPublishVideo = role.publishParams.allowed.includes('video');
|
85
|
-
const tracks = useHMSStore(selectTracksMap);
|
86
89
|
|
87
90
|
let isVideoOnForSomePeers = false;
|
88
91
|
let isAudioOnForSomePeers = false;
|
@@ -17,7 +17,7 @@ import { SIDE_PANE_OPTIONS } from '../../common/constants';
|
|
17
17
|
half page will have chat or participant view
|
18
18
|
*/
|
19
19
|
export const HLSViewTitle = () => {
|
20
|
-
const { title, details } = useRoomLayoutHeader();
|
20
|
+
const { title, details, description } = useRoomLayoutHeader();
|
21
21
|
const toggleDetailsPane = useSidepaneToggle(SIDE_PANE_OPTIONS.ROOM_DETAILS);
|
22
22
|
const isDetailSidepaneOpen = useIsSidepaneTypeOpen(SIDE_PANE_OPTIONS.ROOM_DETAILS);
|
23
23
|
|
@@ -74,9 +74,11 @@ export const HLSViewTitle = () => {
|
|
74
74
|
) : null}
|
75
75
|
<Flex>
|
76
76
|
<RoomDetailsRow details={details} />
|
77
|
-
|
78
|
-
|
79
|
-
|
77
|
+
{description ? (
|
78
|
+
<Text variant="caption" css={{ color: '$on_surface_medium' }} onClick={toggleDetailsPane}>
|
79
|
+
...more
|
80
|
+
</Text>
|
81
|
+
) : null}
|
80
82
|
</Flex>
|
81
83
|
</Flex>
|
82
84
|
</Flex>
|
@@ -2,6 +2,7 @@ import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
2
2
|
import { useFullscreen, useMedia, usePrevious, useToggle } from 'react-use';
|
3
3
|
import { HLSPlaybackState, HMSHLSPlayer, HMSHLSPlayerEvents } from '@100mslive/hls-player';
|
4
4
|
import screenfull from 'screenfull';
|
5
|
+
import { match, P } from 'ts-pattern';
|
5
6
|
import {
|
6
7
|
HLSPlaylistType,
|
7
8
|
HMSNotificationTypes,
|
@@ -33,20 +34,41 @@ import { Loading } from '../../Loading';
|
|
33
34
|
import { Text } from '../../Text';
|
34
35
|
import { config, theme, useTheme } from '../../Theme';
|
35
36
|
import { Tooltip } from '../../Tooltip';
|
36
|
-
import {
|
37
|
+
import { useSidepaneToggle } from '../components/AppData/useSidepane';
|
37
38
|
import { useRoomLayoutConferencingScreen } from '../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';
|
38
39
|
import { useIsLandscape } from '../common/hooks';
|
39
|
-
import { APP_DATA, EMOJI_REACTION_TYPE, SIDE_PANE_OPTIONS } from '../common/constants';
|
40
|
+
import { APP_DATA, EMOJI_REACTION_TYPE, POLL_STATE, POLL_VIEWS, SIDE_PANE_OPTIONS } from '../common/constants';
|
40
41
|
|
41
42
|
let hlsPlayer;
|
42
43
|
const toastMap = {};
|
43
44
|
|
45
|
+
const ToggleChat = () => {
|
46
|
+
const { elements } = useRoomLayoutConferencingScreen();
|
47
|
+
const sidepane = useHMSStore(selectAppData(APP_DATA.sidePane));
|
48
|
+
const toggleChat = useSidepaneToggle(SIDE_PANE_OPTIONS.CHAT);
|
49
|
+
const showChat = !!elements?.chat;
|
50
|
+
const isMobile = useMedia(config.media.md);
|
51
|
+
const hmsActions = useHMSActions();
|
52
|
+
|
53
|
+
useEffect(() => {
|
54
|
+
match({ sidepane, isMobile, showChat })
|
55
|
+
.with({ isMobile: true, showChat: true, sidepane: P.when(value => !value) }, () => {
|
56
|
+
toggleChat();
|
57
|
+
})
|
58
|
+
.with({ showChat: false, isMobile: true, sidepane: SIDE_PANE_OPTIONS.CHAT }, () => {
|
59
|
+
hmsActions.setAppData(APP_DATA.sidePane, '');
|
60
|
+
})
|
61
|
+
.otherwise(() => {
|
62
|
+
//do nothing
|
63
|
+
});
|
64
|
+
}, [sidepane, isMobile, toggleChat, showChat, hmsActions]);
|
65
|
+
return null;
|
66
|
+
};
|
44
67
|
const HLSView = () => {
|
45
68
|
const videoRef = useRef(null);
|
46
69
|
const hlsViewRef = useRef();
|
47
70
|
const hlsState = useHMSStore(selectHLSState);
|
48
71
|
const enablHlsStats = useHMSStore(selectAppData(APP_DATA.hlsStats));
|
49
|
-
const { elements, screenType } = useRoomLayoutConferencingScreen();
|
50
72
|
const notification = useHMSNotifications(HMSNotificationTypes.POLL_STOPPED);
|
51
73
|
const hmsActions = useHMSActions();
|
52
74
|
const { themeType } = useTheme();
|
@@ -63,17 +85,13 @@ const HLSView = () => {
|
|
63
85
|
const [isPaused, setIsPaused] = useState(false);
|
64
86
|
const [show, toggle] = useToggle(false);
|
65
87
|
const lastHlsUrl = usePrevious(hlsUrl);
|
66
|
-
const togglePollView = usePollViewToggle();
|
67
88
|
const vanillaStore = useHMSVanillaStore();
|
68
89
|
const [controlsVisible, setControlsVisible] = useState(true);
|
69
90
|
const [isUserSelectedAuto, setIsUserSelectedAuto] = useState(true);
|
70
91
|
const [qualityDropDownOpen, setQualityDropDownOpen] = useState(false);
|
71
92
|
const controlsRef = useRef(null);
|
72
93
|
const controlsTimerRef = useRef();
|
73
|
-
const sidepane = useHMSStore(selectAppData(APP_DATA.sidePane));
|
74
|
-
const toggleChat = useSidepaneToggle(SIDE_PANE_OPTIONS.CHAT);
|
75
94
|
const [seekProgress, setSeekProgress] = useState(false);
|
76
|
-
const showChat = !!elements?.chat;
|
77
95
|
const isFullScreenSupported = screenfull.isEnabled;
|
78
96
|
|
79
97
|
const isMobile = useMedia(config.media.md);
|
@@ -84,13 +102,6 @@ const HLSView = () => {
|
|
84
102
|
});
|
85
103
|
const [showLoader, setShowLoader] = useState(false);
|
86
104
|
|
87
|
-
const isMwebHLSStream = screenType === 'hls_live_streaming' && isMobile;
|
88
|
-
|
89
|
-
useEffect(() => {
|
90
|
-
if (sidepane === '' && isMwebHLSStream && showChat) {
|
91
|
-
toggleChat();
|
92
|
-
}
|
93
|
-
}, [sidepane, isMwebHLSStream, toggleChat, showChat]);
|
94
105
|
// FIXME: move this logic to player controller in next release
|
95
106
|
useEffect(() => {
|
96
107
|
/**
|
@@ -176,7 +187,12 @@ const HLSView = () => {
|
|
176
187
|
title: `${pollStartedBy} started a ${poll.type}: ${poll.title}`,
|
177
188
|
action: (
|
178
189
|
<Button
|
179
|
-
onClick={() =>
|
190
|
+
onClick={() => {
|
191
|
+
hmsActions.setAppData({
|
192
|
+
[POLL_STATE.pollInView]: pollId,
|
193
|
+
[POLL_STATE.view]: POLL_VIEWS.VOTE,
|
194
|
+
});
|
195
|
+
}}
|
180
196
|
variant="standard"
|
181
197
|
css={{
|
182
198
|
backgroundColor: '$surface_bright',
|
@@ -246,7 +262,7 @@ const HLSView = () => {
|
|
246
262
|
hlsPlayer.reset();
|
247
263
|
};
|
248
264
|
}
|
249
|
-
}, [hlsUrl,
|
265
|
+
}, [hlsUrl, vanillaStore, hmsActions]);
|
250
266
|
|
251
267
|
/**
|
252
268
|
* initialize and subscribe to hlsState
|
@@ -352,28 +368,36 @@ const HLSView = () => {
|
|
352
368
|
|
353
369
|
if (!hlsUrl || streamEnded) {
|
354
370
|
return (
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
371
|
+
<>
|
372
|
+
<ToggleChat />
|
373
|
+
{hlsViewRef.current && (isMobile || isLandscape) && (
|
374
|
+
<Box css={{ position: 'fixed', left: '$4', top: '$4', zIndex: 11 }}>
|
375
|
+
<LeaveRoom screenType="hls_live_streaming" container={hlsViewRef.current} />
|
376
|
+
</Box>
|
377
|
+
)}
|
378
|
+
<Flex
|
379
|
+
key="hls-viewer"
|
380
|
+
id={`hls-viewer-${themeType}`}
|
381
|
+
ref={hlsViewRef}
|
382
|
+
direction={isMobile || isLandscape ? 'column' : 'row'}
|
383
|
+
justify="center"
|
384
|
+
css={{
|
385
|
+
flex: isLandscape ? '2 1 0' : '1 1 0',
|
386
|
+
}}
|
387
|
+
>
|
388
|
+
<Flex align="center" justify="center" direction="column" css={{ size: '100%', px: '$10' }}>
|
389
|
+
<Flex css={{ c: '$on_surface_high', r: '$round', bg: '$surface_default', p: '$2' }}>
|
390
|
+
{streamEnded ? <ColoredHandIcon height={56} width={56} /> : <GoLiveIcon height={56} width={56} />}
|
391
|
+
</Flex>
|
392
|
+
<Text variant="h5" css={{ c: '$on_surface_high', mt: '$10', mb: 0, textAlign: 'center' }}>
|
393
|
+
{streamEnded ? 'Stream has ended' : 'Stream yet to start'}
|
394
|
+
</Text>
|
395
|
+
<Text variant="md" css={{ textAlign: 'center', mt: '$4', c: '$on_surface_medium' }}>
|
396
|
+
{streamEnded ? 'Have a nice day!' : 'Sit back and relax'}
|
397
|
+
</Text>
|
368
398
|
</Flex>
|
369
|
-
<Text variant="h5" css={{ c: '$on_surface_high', mt: '$10', mb: 0, textAlign: 'center' }}>
|
370
|
-
{streamEnded ? 'Stream has ended' : 'Stream yet to start'}
|
371
|
-
</Text>
|
372
|
-
<Text variant="md" css={{ textAlign: 'center', mt: '$4', c: '$on_surface_medium' }}>
|
373
|
-
{streamEnded ? 'Have a nice day!' : 'Sit back and relax'}
|
374
|
-
</Text>
|
375
399
|
</Flex>
|
376
|
-
|
400
|
+
</>
|
377
401
|
);
|
378
402
|
}
|
379
403
|
return (
|
@@ -385,11 +409,16 @@ const HLSView = () => {
|
|
385
409
|
justify="center"
|
386
410
|
css={{
|
387
411
|
flex: isLandscape ? '2 1 0' : '1 1 0',
|
412
|
+
'&:fullscreen': {
|
413
|
+
'& video': {
|
414
|
+
height: 'unset !important',
|
415
|
+
},
|
416
|
+
},
|
388
417
|
}}
|
389
418
|
>
|
390
419
|
{hlsViewRef.current && (isMobile || isLandscape) && (
|
391
420
|
<Box css={{ position: 'fixed', left: '$4', top: '$4', zIndex: 11 }}>
|
392
|
-
<LeaveRoom screenType=
|
421
|
+
<LeaveRoom screenType="hls_live_streaming" container={hlsViewRef.current} />
|
393
422
|
</Box>
|
394
423
|
)}
|
395
424
|
|
@@ -638,7 +667,7 @@ const HLSView = () => {
|
|
638
667
|
</HMSVideoPlayer.Root>
|
639
668
|
</Flex>
|
640
669
|
</HMSPlayerContext.Provider>
|
641
|
-
|
670
|
+
<ToggleChat />
|
642
671
|
{isMobile && !isFullScreen && <HLSViewTitle />}
|
643
672
|
</Flex>
|
644
673
|
);
|