@100mslive/roomkit-react 0.1.14-alpha.2 → 0.1.15
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{HLSView-3RARRZJO.js → HLSView-MXBOUQBG.js} +128 -39
- package/dist/HLSView-MXBOUQBG.js.map +7 -0
- package/dist/Prebuilt/common/constants.d.ts +2 -1
- package/dist/Prebuilt/components/HMSVideo/HLSCaptionSelector.d.ts +5 -0
- package/dist/Prebuilt/components/Polls/Voting/Leaderboard.d.ts +4 -0
- package/dist/Prebuilt/components/Polls/Voting/LeaderboardEntry.d.ts +9 -0
- package/dist/Prebuilt/components/Polls/Voting/PeerParticipationSummary.d.ts +5 -0
- package/dist/{chunk-W76VLHN6.js → chunk-HEOH5H43.js} +6808 -1105
- package/dist/chunk-HEOH5H43.js.map +7 -0
- package/dist/index.cjs.js +7305 -1487
- package/dist/index.cjs.js.map +4 -4
- package/dist/index.js +1 -1
- package/dist/meta.cjs.json +338 -53
- package/dist/meta.esbuild.json +354 -68
- package/package.json +6 -6
- package/src/Prebuilt/common/PeersSorter.ts +12 -3
- package/src/Prebuilt/common/constants.ts +1 -0
- package/src/Prebuilt/common/utils.js +34 -0
- package/src/Prebuilt/components/Chat/Chat.jsx +3 -4
- package/src/Prebuilt/components/HMSVideo/HLSCaptionSelector.tsx +13 -0
- package/src/Prebuilt/components/HMSVideo/HMSVideo.jsx +34 -2
- package/src/Prebuilt/components/Notifications/Notifications.tsx +33 -2
- package/src/Prebuilt/components/Polls/CreatePollQuiz/PollsQuizMenu.jsx +3 -9
- package/src/Prebuilt/components/Polls/CreateQuestions/CreateQuestions.jsx +21 -1
- package/src/Prebuilt/components/Polls/CreateQuestions/QuestionForm.jsx +34 -7
- package/src/Prebuilt/components/Polls/CreateQuestions/SavedQuestion.jsx +2 -2
- package/src/Prebuilt/components/Polls/Polls.tsx +3 -0
- package/src/Prebuilt/components/Polls/Voting/Leaderboard.tsx +115 -0
- package/src/Prebuilt/components/Polls/Voting/LeaderboardEntry.tsx +63 -0
- package/src/Prebuilt/components/Polls/Voting/PeerParticipationSummary.tsx +38 -0
- package/src/Prebuilt/components/Polls/Voting/QuestionCard.jsx +28 -11
- package/src/Prebuilt/components/Polls/Voting/StandardVoting.jsx +7 -1
- package/src/Prebuilt/components/Polls/Voting/Voting.jsx +31 -13
- package/src/Prebuilt/components/Polls/common/MultipleChoiceOptions.jsx +33 -21
- package/src/Prebuilt/components/Polls/common/SingleChoiceOptions.jsx +47 -35
- package/src/Prebuilt/components/Polls/common/StatusIndicator.jsx +2 -22
- package/src/Prebuilt/components/Polls/common/VoteCount.jsx +1 -15
- package/src/Prebuilt/components/VideoLayouts/EqualProminence.tsx +6 -5
- package/src/Prebuilt/components/VideoLayouts/GridLayout.tsx +25 -6
- package/src/Prebuilt/components/VideoLayouts/ScreenshareLayout.tsx +0 -1
- package/src/Prebuilt/layouts/HLSView.jsx +51 -3
- package/dist/HLSView-3RARRZJO.js.map +0 -7
- package/dist/chunk-W76VLHN6.js.map +0 -7
@@ -21,16 +21,25 @@ import {
|
|
21
21
|
config,
|
22
22
|
init_define_process_env,
|
23
23
|
styled,
|
24
|
+
usePollViewToggle,
|
24
25
|
useTheme
|
25
|
-
} from "./chunk-
|
26
|
+
} from "./chunk-HEOH5H43.js";
|
26
27
|
|
27
28
|
// src/Prebuilt/layouts/HLSView.jsx
|
28
29
|
init_define_process_env();
|
29
|
-
import
|
30
|
+
import React11, { useCallback, useEffect as useEffect3, useRef as useRef2, useState as useState4 } from "react";
|
30
31
|
import { useFullscreen, useMedia, usePrevious, useToggle } from "react-use";
|
31
32
|
import { HLSPlaybackState, HMSHLSPlayer, HMSHLSPlayerEvents as HMSHLSPlayerEvents2 } from "@100mslive/hls-player";
|
32
33
|
import screenfull from "screenfull";
|
33
|
-
import {
|
34
|
+
import {
|
35
|
+
selectAppData,
|
36
|
+
selectHLSState,
|
37
|
+
selectPeerNameByID,
|
38
|
+
selectPollByID,
|
39
|
+
useHMSActions,
|
40
|
+
useHMSStore,
|
41
|
+
useHMSVanillaStore
|
42
|
+
} from "@100mslive/react-sdk";
|
34
43
|
import { ColoredHandIcon, ExpandIcon, PlayIcon as PlayIcon2, RadioIcon, ShrinkIcon } from "@100mslive/react-icons";
|
35
44
|
|
36
45
|
// src/Prebuilt/components/HlsStatsOverlay.jsx
|
@@ -144,7 +153,46 @@ init_define_process_env();
|
|
144
153
|
import React2, { forwardRef } from "react";
|
145
154
|
var HMSVideo = forwardRef((_a, videoRef) => {
|
146
155
|
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
147
|
-
return /* @__PURE__ */ React2.createElement(
|
156
|
+
return /* @__PURE__ */ React2.createElement(
|
157
|
+
Flex,
|
158
|
+
__spreadValues({
|
159
|
+
"data-testid": "hms-video",
|
160
|
+
css: {
|
161
|
+
size: "100%",
|
162
|
+
position: "relative",
|
163
|
+
"& video::cue": {
|
164
|
+
color: "white",
|
165
|
+
// textShadow: '0px 0px 4px #000',
|
166
|
+
whiteSpace: "pre-line",
|
167
|
+
fontSize: "$lg",
|
168
|
+
fontStyle: "normal",
|
169
|
+
fontWeight: "$semiBold",
|
170
|
+
lineHeight: "$sm",
|
171
|
+
letterSpacing: "0.5px"
|
172
|
+
},
|
173
|
+
"& video::-webkit-media-text-track-display": {
|
174
|
+
padding: "0 $4"
|
175
|
+
},
|
176
|
+
"& video::-webkit-media-text-track-container": {
|
177
|
+
fontSize: "$space$10 !important"
|
178
|
+
}
|
179
|
+
},
|
180
|
+
direction: "column"
|
181
|
+
}, props),
|
182
|
+
/* @__PURE__ */ React2.createElement(
|
183
|
+
"video",
|
184
|
+
{
|
185
|
+
style: {
|
186
|
+
flex: "1 1 0",
|
187
|
+
margin: "0 auto",
|
188
|
+
minHeight: "0"
|
189
|
+
},
|
190
|
+
ref: videoRef,
|
191
|
+
playsInline: true
|
192
|
+
}
|
193
|
+
),
|
194
|
+
children
|
195
|
+
);
|
148
196
|
});
|
149
197
|
|
150
198
|
// src/Prebuilt/components/HMSVideo/PlayButton.jsx
|
@@ -418,12 +466,20 @@ function HLSAutoplayBlockedPrompt({ open, unblockAutoPlay }) {
|
|
418
466
|
);
|
419
467
|
}
|
420
468
|
|
421
|
-
// src/Prebuilt/components/HMSVideo/
|
469
|
+
// src/Prebuilt/components/HMSVideo/HLSCaptionSelector.tsx
|
422
470
|
init_define_process_env();
|
423
471
|
import React9 from "react";
|
472
|
+
import { ClosedCaptionIcon, OpenCaptionIcon } from "@100mslive/react-icons";
|
473
|
+
function HLSCaptionSelector({ isEnabled, onClick }) {
|
474
|
+
return /* @__PURE__ */ React9.createElement(Tooltip, { title: "Subtitles/closed captions", side: "top" }, /* @__PURE__ */ React9.createElement(IconButton, { css: { p: "$2" }, onClick: () => onClick() }, isEnabled ? /* @__PURE__ */ React9.createElement(ClosedCaptionIcon, { width: "20", height: "20px" }) : /* @__PURE__ */ React9.createElement(OpenCaptionIcon, { width: "20", height: "20px" })));
|
475
|
+
}
|
476
|
+
|
477
|
+
// src/Prebuilt/components/HMSVideo/HLSQualitySelector.jsx
|
478
|
+
init_define_process_env();
|
479
|
+
import React10 from "react";
|
424
480
|
import { CheckIcon, SettingsIcon } from "@100mslive/react-icons";
|
425
481
|
function HLSQualitySelector({ open, onOpen, layers, onQualityChange, selection, isAuto }) {
|
426
|
-
return /* @__PURE__ */
|
482
|
+
return /* @__PURE__ */ React10.createElement(Dropdown.Root, { open, onOpenChange: (value) => onOpen(value) }, /* @__PURE__ */ React10.createElement(Dropdown.Trigger, { asChild: true, "data-testid": "quality_selector" }, /* @__PURE__ */ React10.createElement(
|
427
483
|
Flex,
|
428
484
|
{
|
429
485
|
css: {
|
@@ -433,7 +489,7 @@ function HLSQualitySelector({ open, onOpen, layers, onQualityChange, selection,
|
|
433
489
|
p: "$2"
|
434
490
|
}
|
435
491
|
},
|
436
|
-
/* @__PURE__ */
|
492
|
+
/* @__PURE__ */ React10.createElement(Tooltip, { title: "Select Quality", side: "top" }, /* @__PURE__ */ React10.createElement(Flex, { align: "center" }, /* @__PURE__ */ React10.createElement(
|
437
493
|
Box,
|
438
494
|
{
|
439
495
|
css: {
|
@@ -444,8 +500,8 @@ function HLSQualitySelector({ open, onOpen, layers, onQualityChange, selection,
|
|
444
500
|
c: "$on_surface_high"
|
445
501
|
}
|
446
502
|
},
|
447
|
-
/* @__PURE__ */
|
448
|
-
), /* @__PURE__ */
|
503
|
+
/* @__PURE__ */ React10.createElement(SettingsIcon, null)
|
504
|
+
), /* @__PURE__ */ React10.createElement(
|
449
505
|
Text,
|
450
506
|
{
|
451
507
|
variant: {
|
@@ -455,7 +511,7 @@ function HLSQualitySelector({ open, onOpen, layers, onQualityChange, selection,
|
|
455
511
|
},
|
456
512
|
css: { display: "flex", alignItems: "center", ml: "$2", c: "$on_surface_medium" }
|
457
513
|
},
|
458
|
-
isAuto && /* @__PURE__ */
|
514
|
+
isAuto && /* @__PURE__ */ React10.createElement(React10.Fragment, null, "Auto", /* @__PURE__ */ React10.createElement(
|
459
515
|
Box,
|
460
516
|
{
|
461
517
|
css: {
|
@@ -470,7 +526,7 @@ function HLSQualitySelector({ open, onOpen, layers, onQualityChange, selection,
|
|
470
526
|
selection && Math.min(selection.width, selection.height),
|
471
527
|
"p"
|
472
528
|
)))
|
473
|
-
)), layers.length > 0 && /* @__PURE__ */
|
529
|
+
)), layers.length > 0 && /* @__PURE__ */ React10.createElement(
|
474
530
|
Dropdown.Content,
|
475
531
|
{
|
476
532
|
sideOffset: 5,
|
@@ -486,7 +542,7 @@ function HLSQualitySelector({ open, onOpen, layers, onQualityChange, selection,
|
|
486
542
|
}
|
487
543
|
},
|
488
544
|
layers.map((layer) => {
|
489
|
-
return /* @__PURE__ */
|
545
|
+
return /* @__PURE__ */ React10.createElement(
|
490
546
|
Dropdown.Item,
|
491
547
|
{
|
492
548
|
onClick: () => onQualityChange(layer),
|
@@ -501,12 +557,12 @@ function HLSQualitySelector({ open, onOpen, layers, onQualityChange, selection,
|
|
501
557
|
gap: "$2"
|
502
558
|
}
|
503
559
|
},
|
504
|
-
/* @__PURE__ */
|
505
|
-
/* @__PURE__ */
|
506
|
-
!isAuto && layer.width === (selection == null ? void 0 : selection.width) && layer.height === (selection == null ? void 0 : selection.height) && /* @__PURE__ */
|
560
|
+
/* @__PURE__ */ React10.createElement(Text, { variant: "caption", css: { fontWeight: "$semiBold" } }, getQualityText(layer)),
|
561
|
+
/* @__PURE__ */ React10.createElement(Text, { variant: "caption", css: { flex: "1 1 0", c: "$on_surface_low", pl: "$2" } }, getBitrateText(layer)),
|
562
|
+
!isAuto && layer.width === (selection == null ? void 0 : selection.width) && layer.height === (selection == null ? void 0 : selection.height) && /* @__PURE__ */ React10.createElement(CheckIcon, { width: "16px", height: "16px" })
|
507
563
|
);
|
508
564
|
}),
|
509
|
-
/* @__PURE__ */
|
565
|
+
/* @__PURE__ */ React10.createElement(
|
510
566
|
Dropdown.Item,
|
511
567
|
{
|
512
568
|
onClick: () => onQualityChange({ height: "auto" }),
|
@@ -521,8 +577,8 @@ function HLSQualitySelector({ open, onOpen, layers, onQualityChange, selection,
|
|
521
577
|
gap: "$2"
|
522
578
|
}
|
523
579
|
},
|
524
|
-
/* @__PURE__ */
|
525
|
-
isAuto && /* @__PURE__ */
|
580
|
+
/* @__PURE__ */ React10.createElement(Text, { variant: "caption", css: { fontWeight: "$semiBold", flex: "1 1 0" } }, "Auto"),
|
581
|
+
isAuto && /* @__PURE__ */ React10.createElement(CheckIcon, { width: "16px", height: "16px" })
|
526
582
|
)
|
527
583
|
));
|
528
584
|
}
|
@@ -545,6 +601,8 @@ var HLSView = () => {
|
|
545
601
|
const [availableLayers, setAvailableLayers] = useState4([]);
|
546
602
|
const [isVideoLive, setIsVideoLive] = useState4(true);
|
547
603
|
const [isUserSelectedAuto, setIsUserSelectedAuto] = useState4(true);
|
604
|
+
const [isCaptionEnabled, setIsCaptionEnabled] = useState4(true);
|
605
|
+
const [hasCaptions, setHasCaptions] = useState4(false);
|
548
606
|
const [currentSelectedQuality, setCurrentSelectedQuality] = useState4(null);
|
549
607
|
const [isHlsAutoplayBlocked, setIsHlsAutoplayBlocked] = useState4(false);
|
550
608
|
const [isPaused, setIsPaused] = useState4(false);
|
@@ -555,6 +613,8 @@ var HLSView = () => {
|
|
555
613
|
const controlsTimerRef = useRef2();
|
556
614
|
const [qualityDropDownOpen, setQualityDropDownOpen] = useState4(false);
|
557
615
|
const lastHlsUrl = usePrevious(hlsUrl);
|
616
|
+
const togglePollView = usePollViewToggle();
|
617
|
+
const vanillaStore = useHMSVanillaStore();
|
558
618
|
const isMobile = useMedia(config.media.md);
|
559
619
|
const isFullScreen = useFullscreen(hlsViewRef, show, {
|
560
620
|
onClose: () => toggle(false)
|
@@ -591,6 +651,7 @@ var HLSView = () => {
|
|
591
651
|
let videoEl = videoRef.current;
|
592
652
|
const manifestLoadedHandler = ({ layers }) => {
|
593
653
|
setAvailableLayers(layers);
|
654
|
+
setHasCaptions(hlsPlayer == null ? void 0 : hlsPlayer.hasCaptions());
|
594
655
|
};
|
595
656
|
const layerUpdatedHandler = ({ layer }) => {
|
596
657
|
setCurrentSelectedQuality(layer);
|
@@ -607,6 +668,29 @@ var HLSView = () => {
|
|
607
668
|
};
|
608
669
|
const duration = rest.duration;
|
609
670
|
const parsedPayload = parsePayload(payload);
|
671
|
+
if (parsedPayload.startsWith("poll:")) {
|
672
|
+
const pollId = parsedPayload.substr(parsedPayload.indexOf(":") + 1);
|
673
|
+
const poll = vanillaStore.getState(selectPollByID(pollId));
|
674
|
+
const pollStartedBy = vanillaStore.getState(selectPeerNameByID(poll.startedBy)) || "Participant";
|
675
|
+
ToastManager.addToast({
|
676
|
+
title: `${pollStartedBy} started a ${poll.type}: ${poll.title}`,
|
677
|
+
action: /* @__PURE__ */ React11.createElement(
|
678
|
+
Button,
|
679
|
+
{
|
680
|
+
onClick: () => togglePollView(pollId),
|
681
|
+
variant: "standard",
|
682
|
+
css: {
|
683
|
+
backgroundColor: "$surface_bright",
|
684
|
+
fontWeight: "$semiBold",
|
685
|
+
color: "$on_surface_high",
|
686
|
+
p: "$xs $md"
|
687
|
+
}
|
688
|
+
},
|
689
|
+
poll.type === "quiz" ? "Answer" : "Vote"
|
690
|
+
)
|
691
|
+
});
|
692
|
+
return;
|
693
|
+
}
|
610
694
|
switch (parsedPayload.type) {
|
611
695
|
case EMOJI_REACTION_TYPE:
|
612
696
|
(_a3 = window.showFlyingEmoji) == null ? void 0 : _a3.call(window, { emojiId: parsedPayload == null ? void 0 : parsedPayload.emojiId, senderId: parsedPayload == null ? void 0 : parsedPayload.senderId });
|
@@ -629,6 +713,9 @@ var HLSView = () => {
|
|
629
713
|
setIsVideoLive(isLive);
|
630
714
|
};
|
631
715
|
const playbackEventHandler = (data) => setIsPaused(data.state === HLSPlaybackState.paused);
|
716
|
+
const captionEnabledEventHandler = (isCaptionEnabled2) => {
|
717
|
+
setIsCaptionEnabled(isCaptionEnabled2);
|
718
|
+
};
|
632
719
|
const handleAutoplayBlock = (data) => setIsHlsAutoplayBlocked(!!data);
|
633
720
|
if (videoEl && hlsUrl) {
|
634
721
|
hlsPlayer = new HMSHLSPlayer(hlsUrl, videoEl);
|
@@ -636,6 +723,7 @@ var HLSView = () => {
|
|
636
723
|
hlsPlayer.on(HMSHLSPlayerEvents2.TIMED_METADATA_LOADED, metadataLoadedHandler);
|
637
724
|
hlsPlayer.on(HMSHLSPlayerEvents2.ERROR, handleError);
|
638
725
|
hlsPlayer.on(HMSHLSPlayerEvents2.PLAYBACK_STATE, playbackEventHandler);
|
726
|
+
hlsPlayer.on(HMSHLSPlayerEvents2.CAPTION_ENABLED, captionEnabledEventHandler);
|
639
727
|
hlsPlayer.on(HMSHLSPlayerEvents2.AUTOPLAY_BLOCKED, handleAutoplayBlock);
|
640
728
|
hlsPlayer.on(HMSHLSPlayerEvents2.MANIFEST_LOADED, manifestLoadedHandler);
|
641
729
|
hlsPlayer.on(HMSHLSPlayerEvents2.LAYER_UPDATED, layerUpdatedHandler);
|
@@ -644,6 +732,7 @@ var HLSView = () => {
|
|
644
732
|
hlsPlayer.off(HMSHLSPlayerEvents2.ERROR, handleError);
|
645
733
|
hlsPlayer.off(HMSHLSPlayerEvents2.TIMED_METADATA_LOADED, metadataLoadedHandler);
|
646
734
|
hlsPlayer.off(HMSHLSPlayerEvents2.PLAYBACK_STATE, playbackEventHandler);
|
735
|
+
hlsPlayer.off(HMSHLSPlayerEvents2.CAPTION_ENABLED, captionEnabledEventHandler);
|
647
736
|
hlsPlayer.off(HMSHLSPlayerEvents2.AUTOPLAY_BLOCKED, handleAutoplayBlock);
|
648
737
|
hlsPlayer.off(HMSHLSPlayerEvents2.MANIFEST_LOADED, manifestLoadedHandler);
|
649
738
|
hlsPlayer.off(HMSHLSPlayerEvents2.LAYER_UPDATED, layerUpdatedHandler);
|
@@ -719,7 +808,7 @@ var HLSView = () => {
|
|
719
808
|
},
|
720
809
|
[controlsVisible, isFullScreen, qualityDropDownOpen]
|
721
810
|
);
|
722
|
-
return /* @__PURE__ */
|
811
|
+
return /* @__PURE__ */ React11.createElement(
|
723
812
|
Flex,
|
724
813
|
{
|
725
814
|
key: "hls-viewer",
|
@@ -729,8 +818,8 @@ var HLSView = () => {
|
|
729
818
|
size: "100%"
|
730
819
|
}
|
731
820
|
},
|
732
|
-
(hlsStatsState == null ? void 0 : hlsStatsState.url) && enablHlsStats ? /* @__PURE__ */
|
733
|
-
hlsUrl && !streamEnded ? /* @__PURE__ */
|
821
|
+
(hlsStatsState == null ? void 0 : hlsStatsState.url) && enablHlsStats ? /* @__PURE__ */ React11.createElement(HlsStatsOverlay, { hlsStatsState, onClose: sfnOverlayClose }) : null,
|
822
|
+
hlsUrl && !streamEnded ? /* @__PURE__ */ React11.createElement(
|
734
823
|
Flex,
|
735
824
|
{
|
736
825
|
id: "hls-player-container",
|
@@ -742,8 +831,8 @@ var HLSView = () => {
|
|
742
831
|
height: "100%"
|
743
832
|
}
|
744
833
|
},
|
745
|
-
/* @__PURE__ */
|
746
|
-
showLoader && /* @__PURE__ */
|
834
|
+
/* @__PURE__ */ React11.createElement(HLSAutoplayBlockedPrompt, { open: isHlsAutoplayBlocked, unblockAutoPlay }),
|
835
|
+
showLoader && /* @__PURE__ */ React11.createElement(
|
747
836
|
Flex,
|
748
837
|
{
|
749
838
|
align: "center",
|
@@ -752,9 +841,9 @@ var HLSView = () => {
|
|
752
841
|
position: "absolute"
|
753
842
|
}
|
754
843
|
},
|
755
|
-
/* @__PURE__ */
|
844
|
+
/* @__PURE__ */ React11.createElement(Loading, { width: 72, height: 72 })
|
756
845
|
),
|
757
|
-
/* @__PURE__ */
|
846
|
+
/* @__PURE__ */ React11.createElement(
|
758
847
|
HMSVideoPlayer.Root,
|
759
848
|
{
|
760
849
|
ref: videoRef,
|
@@ -762,7 +851,7 @@ var HLSView = () => {
|
|
762
851
|
onMouseMove: onHoverHandler,
|
763
852
|
onMouseLeave: onHoverHandler
|
764
853
|
},
|
765
|
-
isMobile && isPaused && /* @__PURE__ */
|
854
|
+
isMobile && isPaused && /* @__PURE__ */ React11.createElement(
|
766
855
|
Box,
|
767
856
|
{
|
768
857
|
css: {
|
@@ -778,11 +867,11 @@ var HLSView = () => {
|
|
778
867
|
zIndex: 21
|
779
868
|
}
|
780
869
|
},
|
781
|
-
/* @__PURE__ */
|
870
|
+
/* @__PURE__ */ React11.createElement(IconButton, { onClick: () => __async(void 0, null, function* () {
|
782
871
|
return yield hlsPlayer == null ? void 0 : hlsPlayer.play();
|
783
|
-
}), "data-testid": "play_btn" }, /* @__PURE__ */
|
872
|
+
}), "data-testid": "play_btn" }, /* @__PURE__ */ React11.createElement(PlayIcon2, { width: "60px", height: "60px" }))
|
784
873
|
),
|
785
|
-
/* @__PURE__ */
|
874
|
+
/* @__PURE__ */ React11.createElement(
|
786
875
|
Flex,
|
787
876
|
{
|
788
877
|
ref: controlsRef,
|
@@ -802,14 +891,14 @@ var HLSView = () => {
|
|
802
891
|
opacity: controlsVisible ? `1` : "0"
|
803
892
|
}
|
804
893
|
},
|
805
|
-
!isMobile && /* @__PURE__ */
|
894
|
+
!isMobile && /* @__PURE__ */ React11.createElement(
|
806
895
|
HMSVideoPlayer.Controls.Root,
|
807
896
|
{
|
808
897
|
css: {
|
809
898
|
p: "$4 $8"
|
810
899
|
}
|
811
900
|
},
|
812
|
-
/* @__PURE__ */
|
901
|
+
/* @__PURE__ */ React11.createElement(HMSVideoPlayer.Controls.Left, null, /* @__PURE__ */ React11.createElement(
|
813
902
|
HMSVideoPlayer.PlayButton,
|
814
903
|
{
|
815
904
|
onClick: () => __async(void 0, null, function* () {
|
@@ -817,7 +906,7 @@ var HLSView = () => {
|
|
817
906
|
}),
|
818
907
|
isPaused
|
819
908
|
}
|
820
|
-
), /* @__PURE__ */
|
909
|
+
), /* @__PURE__ */ React11.createElement(HMSVideoPlayer.Duration, { hlsPlayer }), /* @__PURE__ */ React11.createElement(HMSVideoPlayer.Volume, { hlsPlayer }), /* @__PURE__ */ React11.createElement(
|
821
910
|
IconButton,
|
822
911
|
{
|
823
912
|
variant: "standard",
|
@@ -829,7 +918,7 @@ var HLSView = () => {
|
|
829
918
|
key: "jump-to-live_btn",
|
830
919
|
"data-testid": "jump-to-live_btn"
|
831
920
|
},
|
832
|
-
/* @__PURE__ */
|
921
|
+
/* @__PURE__ */ React11.createElement(Tooltip, { title: "Go to Live", side: "top" }, /* @__PURE__ */ React11.createElement(Flex, { justify: "center", gap: 2, align: "center" }, /* @__PURE__ */ React11.createElement(
|
833
922
|
Box,
|
834
923
|
{
|
835
924
|
css: {
|
@@ -839,7 +928,7 @@ var HLSView = () => {
|
|
839
928
|
r: "$1"
|
840
929
|
}
|
841
930
|
}
|
842
|
-
), /* @__PURE__ */
|
931
|
+
), /* @__PURE__ */ React11.createElement(
|
843
932
|
Text,
|
844
933
|
{
|
845
934
|
variant: {
|
@@ -852,7 +941,7 @@ var HLSView = () => {
|
|
852
941
|
isVideoLive ? "LIVE" : "GO LIVE"
|
853
942
|
)))
|
854
943
|
)),
|
855
|
-
/* @__PURE__ */
|
944
|
+
/* @__PURE__ */ React11.createElement(HMSVideoPlayer.Controls.Right, null, hasCaptions && /* @__PURE__ */ React11.createElement(HLSCaptionSelector, { onClick: () => hlsPlayer == null ? void 0 : hlsPlayer.toggleCaption(), isEnabled: isCaptionEnabled }), availableLayers.length > 0 ? /* @__PURE__ */ React11.createElement(
|
856
945
|
HLSQualitySelector,
|
857
946
|
{
|
858
947
|
layers: availableLayers,
|
@@ -862,22 +951,22 @@ var HLSView = () => {
|
|
862
951
|
onQualityChange: handleQuality,
|
863
952
|
isAuto: isUserSelectedAuto
|
864
953
|
}
|
865
|
-
) : null, isFullScreenSupported ? /* @__PURE__ */
|
954
|
+
) : null, isFullScreenSupported ? /* @__PURE__ */ React11.createElement(
|
866
955
|
FullScreenButton,
|
867
956
|
{
|
868
957
|
isFullScreen,
|
869
958
|
onToggle: toggle,
|
870
|
-
icon: isFullScreen ? /* @__PURE__ */
|
959
|
+
icon: isFullScreen ? /* @__PURE__ */ React11.createElement(ShrinkIcon, null) : /* @__PURE__ */ React11.createElement(ExpandIcon, null)
|
871
960
|
}
|
872
961
|
) : null)
|
873
962
|
)
|
874
963
|
)
|
875
964
|
)
|
876
|
-
) : /* @__PURE__ */
|
965
|
+
) : /* @__PURE__ */ React11.createElement(Flex, { align: "center", justify: "center", direction: "column", css: { size: "100%", px: "$10" } }, /* @__PURE__ */ React11.createElement(Flex, { css: { c: "$on_surface_high", r: "$round", bg: "$surface_default", p: "$2" } }, streamEnded ? /* @__PURE__ */ React11.createElement(ColoredHandIcon, { height: 56, width: 56 }) : /* @__PURE__ */ React11.createElement(RadioIcon, { height: 56, width: 56 })), /* @__PURE__ */ React11.createElement(Text, { variant: "h5", css: { c: "$on_surface_high", mt: "$10", mb: 0, textAlign: "center" } }, streamEnded ? "Stream has ended" : "Stream yet to start"), /* @__PURE__ */ React11.createElement(Text, { variant: "md", css: { textAlign: "center", mt: "$4", c: "$on_surface_medium" } }, streamEnded ? "Have a nice day!" : "Sit back and relax"))
|
877
966
|
);
|
878
967
|
};
|
879
968
|
var HLSView_default = HLSView;
|
880
969
|
export {
|
881
970
|
HLSView_default as default
|
882
971
|
};
|
883
|
-
//# sourceMappingURL=HLSView-
|
972
|
+
//# sourceMappingURL=HLSView-MXBOUQBG.js.map
|
@@ -0,0 +1,7 @@
|
|
1
|
+
{
|
2
|
+
"version": 3,
|
3
|
+
"sources": ["../src/Prebuilt/layouts/HLSView.jsx", "../src/Prebuilt/components/HlsStatsOverlay.jsx", "../src/Prebuilt/components/HMSVideo/index.js", "../src/Prebuilt/components/HMSVideo/Controls.jsx", "../src/Prebuilt/components/HMSVideo/HMSVideo.jsx", "../src/Prebuilt/components/HMSVideo/PlayButton.jsx", "../src/Prebuilt/components/HMSVideo/VideoProgress.jsx", "../src/Prebuilt/components/HMSVideo/HMSVIdeoUtils.js", "../src/Prebuilt/components/HMSVideo/VideoTime.jsx", "../src/Prebuilt/components/HMSVideo/VolumeControl.jsx", "../src/Prebuilt/components/HMSVideo/FullscreenButton.jsx", "../src/Prebuilt/components/HMSVideo/HLSAutoplayBlockedPrompt.jsx", "../src/Prebuilt/components/HMSVideo/HLSCaptionSelector.tsx", "../src/Prebuilt/components/HMSVideo/HLSQualitySelector.jsx"],
|
4
|
+
"sourcesContent": ["import React, { useCallback, useEffect, useRef, useState } from 'react';\nimport { useFullscreen, useMedia, usePrevious, useToggle } from 'react-use';\nimport { HLSPlaybackState, HMSHLSPlayer, HMSHLSPlayerEvents } from '@100mslive/hls-player';\nimport screenfull from 'screenfull';\nimport {\n selectAppData,\n selectHLSState,\n selectPeerNameByID,\n selectPollByID,\n useHMSActions,\n useHMSStore,\n useHMSVanillaStore,\n} from '@100mslive/react-sdk';\nimport { ColoredHandIcon, ExpandIcon, PlayIcon, RadioIcon, ShrinkIcon } from '@100mslive/react-icons';\nimport { HlsStatsOverlay } from '../components/HlsStatsOverlay';\nimport { HMSVideoPlayer } from '../components/HMSVideo';\nimport { FullScreenButton } from '../components/HMSVideo/FullscreenButton';\nimport { HLSAutoplayBlockedPrompt } from '../components/HMSVideo/HLSAutoplayBlockedPrompt';\nimport { HLSCaptionSelector } from '../components/HMSVideo/HLSCaptionSelector';\nimport { HLSQualitySelector } from '../components/HMSVideo/HLSQualitySelector';\nimport { ToastManager } from '../components/Toast/ToastManager';\nimport { Button } from '../../Button';\nimport { IconButton } from '../../IconButton';\nimport { Box, Flex } from '../../Layout';\nimport { Loading } from '../../Loading';\nimport { Text } from '../../Text';\nimport { config, useTheme } from '../../Theme';\nimport { Tooltip } from '../../Tooltip';\nimport { usePollViewToggle } from '../components/AppData/useSidepane';\nimport { APP_DATA, EMOJI_REACTION_TYPE } from '../common/constants';\n\nlet hlsPlayer;\n\nconst HLSView = () => {\n const videoRef = useRef(null);\n const hlsViewRef = useRef(null);\n const hlsState = useHMSStore(selectHLSState);\n const enablHlsStats = useHMSStore(selectAppData(APP_DATA.hlsStats));\n const hmsActions = useHMSActions();\n const { themeType, theme } = useTheme();\n const [streamEnded, setStreamEnded] = useState(false);\n let [hlsStatsState, setHlsStatsState] = useState(null);\n const hlsUrl = hlsState.variants[0]?.url;\n const [availableLayers, setAvailableLayers] = useState([]);\n const [isVideoLive, setIsVideoLive] = useState(true);\n const [isUserSelectedAuto, setIsUserSelectedAuto] = useState(true);\n const [isCaptionEnabled, setIsCaptionEnabled] = useState(true);\n const [hasCaptions, setHasCaptions] = useState(false);\n const [currentSelectedQuality, setCurrentSelectedQuality] = useState(null);\n const [isHlsAutoplayBlocked, setIsHlsAutoplayBlocked] = useState(false);\n const [isPaused, setIsPaused] = useState(false);\n const isFullScreenSupported = screenfull.isEnabled;\n const [show, toggle] = useToggle(false);\n const [controlsVisible, setControlsVisible] = useState(true);\n const controlsRef = useRef();\n const controlsTimerRef = useRef();\n const [qualityDropDownOpen, setQualityDropDownOpen] = useState(false);\n const lastHlsUrl = usePrevious(hlsUrl);\n const togglePollView = usePollViewToggle();\n const vanillaStore = useHMSVanillaStore();\n\n const isMobile = useMedia(config.media.md);\n const isFullScreen = useFullscreen(hlsViewRef, show, {\n onClose: () => toggle(false),\n });\n const [showLoader, setShowLoader] = useState(false);\n // FIXME: move this logic to player controller in next release\n useEffect(() => {\n /**\n * @type {HTMLVideoElement} videoEl\n */\n const videoEl = videoRef.current;\n const showLoader = () => setShowLoader(true);\n const hideLoader = () => setShowLoader(false);\n videoEl?.addEventListener('playing', hideLoader);\n videoEl?.addEventListener('waiting', showLoader);\n return () => {\n videoEl?.removeEventListener('playing', hideLoader);\n videoEl?.removeEventListener('waiting', showLoader);\n };\n }, []);\n useEffect(() => {\n if (streamEnded && lastHlsUrl !== hlsUrl) {\n setStreamEnded(false);\n }\n }, [hlsUrl, streamEnded, lastHlsUrl]);\n\n useEffect(() => {\n const videoElem = videoRef.current;\n const setStreamEndedCallback = () => {\n setStreamEnded(true);\n // no point keeping the callback attached once the streaming is ended\n videoElem?.removeEventListener('ended', setStreamEndedCallback);\n };\n videoElem?.addEventListener('ended', setStreamEndedCallback);\n return () => {\n videoElem?.removeEventListener('ended', setStreamEndedCallback);\n };\n }, [hlsUrl]);\n\n /**\n * initialize HMSHLSPlayer and add event listeners.\n */\n useEffect(() => {\n let videoEl = videoRef.current;\n const manifestLoadedHandler = ({ layers }) => {\n setAvailableLayers(layers);\n setHasCaptions(hlsPlayer?.hasCaptions());\n };\n const layerUpdatedHandler = ({ layer }) => {\n setCurrentSelectedQuality(layer);\n };\n const metadataLoadedHandler = ({ payload, ...rest }) => {\n const parsePayload = str => {\n try {\n return JSON.parse(str);\n } catch (e) {\n return str;\n }\n };\n const duration = rest.duration;\n const parsedPayload = parsePayload(payload);\n // check if poll happened\n if (parsedPayload.startsWith('poll:')) {\n const pollId = parsedPayload.substr(parsedPayload.indexOf(':') + 1);\n const poll = vanillaStore.getState(selectPollByID(pollId));\n const pollStartedBy = vanillaStore.getState(selectPeerNameByID(poll.startedBy)) || 'Participant';\n // launch poll\n ToastManager.addToast({\n title: `${pollStartedBy} started a ${poll.type}: ${poll.title}`,\n action: (\n <Button\n onClick={() => togglePollView(pollId)}\n variant=\"standard\"\n css={{\n backgroundColor: '$surface_bright',\n fontWeight: '$semiBold',\n color: '$on_surface_high',\n p: '$xs $md',\n }}\n >\n {poll.type === 'quiz' ? 'Answer' : 'Vote'}\n </Button>\n ),\n });\n return;\n }\n switch (parsedPayload.type) {\n case EMOJI_REACTION_TYPE:\n window.showFlyingEmoji?.({ emojiId: parsedPayload?.emojiId, senderId: parsedPayload?.senderId });\n break;\n default: {\n const toast = {\n title: `Payload from timed Metadata ${parsedPayload}`,\n duration: duration || 3000,\n };\n console.debug('Added toast ', JSON.stringify(toast));\n ToastManager.addToast(toast);\n break;\n }\n }\n };\n const handleError = data => {\n console.error('[HLSView] error in hls', `${data}`);\n };\n const handleNoLongerLive = ({ isLive }) => {\n setIsVideoLive(isLive);\n };\n\n const playbackEventHandler = data => setIsPaused(data.state === HLSPlaybackState.paused);\n const captionEnabledEventHandler = isCaptionEnabled => {\n setIsCaptionEnabled(isCaptionEnabled);\n };\n\n const handleAutoplayBlock = data => setIsHlsAutoplayBlocked(!!data);\n if (videoEl && hlsUrl) {\n hlsPlayer = new HMSHLSPlayer(hlsUrl, videoEl);\n hlsPlayer.on(HMSHLSPlayerEvents.SEEK_POS_BEHIND_LIVE_EDGE, handleNoLongerLive);\n hlsPlayer.on(HMSHLSPlayerEvents.TIMED_METADATA_LOADED, metadataLoadedHandler);\n hlsPlayer.on(HMSHLSPlayerEvents.ERROR, handleError);\n hlsPlayer.on(HMSHLSPlayerEvents.PLAYBACK_STATE, playbackEventHandler);\n hlsPlayer.on(HMSHLSPlayerEvents.CAPTION_ENABLED, captionEnabledEventHandler);\n hlsPlayer.on(HMSHLSPlayerEvents.AUTOPLAY_BLOCKED, handleAutoplayBlock);\n\n hlsPlayer.on(HMSHLSPlayerEvents.MANIFEST_LOADED, manifestLoadedHandler);\n hlsPlayer.on(HMSHLSPlayerEvents.LAYER_UPDATED, layerUpdatedHandler);\n return () => {\n hlsPlayer.off(HMSHLSPlayerEvents.SEEK_POS_BEHIND_LIVE_EDGE, handleNoLongerLive);\n hlsPlayer.off(HMSHLSPlayerEvents.ERROR, handleError);\n hlsPlayer.off(HMSHLSPlayerEvents.TIMED_METADATA_LOADED, metadataLoadedHandler);\n hlsPlayer.off(HMSHLSPlayerEvents.PLAYBACK_STATE, playbackEventHandler);\n hlsPlayer.off(HMSHLSPlayerEvents.CAPTION_ENABLED, captionEnabledEventHandler);\n\n hlsPlayer.off(HMSHLSPlayerEvents.AUTOPLAY_BLOCKED, handleAutoplayBlock);\n hlsPlayer.off(HMSHLSPlayerEvents.MANIFEST_LOADED, manifestLoadedHandler);\n hlsPlayer.off(HMSHLSPlayerEvents.LAYER_UPDATED, layerUpdatedHandler);\n hlsPlayer.reset();\n hlsPlayer = null;\n };\n }\n }, [hlsUrl]);\n\n /**\n * initialize and subscribe to hlsState\n */\n useEffect(() => {\n const onHLSStats = state => setHlsStatsState(state);\n if (enablHlsStats) {\n hlsPlayer?.on(HMSHLSPlayerEvents.STATS, onHLSStats);\n } else {\n hlsPlayer?.off(HMSHLSPlayerEvents.STATS, onHLSStats);\n }\n return () => {\n hlsPlayer?.off(HMSHLSPlayerEvents.STATS, onHLSStats);\n };\n }, [enablHlsStats]);\n\n const unblockAutoPlay = async () => {\n try {\n await hlsPlayer.play();\n setIsHlsAutoplayBlocked(false);\n } catch (error) {\n console.error('Tried to unblock Autoplay failed with', error.message);\n }\n };\n\n const handleQuality = useCallback(\n quality => {\n if (hlsPlayer) {\n setIsUserSelectedAuto(quality.height.toString().toLowerCase() === 'auto');\n hlsPlayer.setLayer(quality);\n }\n },\n [availableLayers], //eslint-disable-line\n );\n\n const sfnOverlayClose = () => {\n hmsActions.setAppData(APP_DATA.hlsStats, !enablHlsStats);\n };\n\n useEffect(() => {\n if (controlsVisible && isFullScreen && !qualityDropDownOpen) {\n if (controlsTimerRef.current) {\n clearTimeout(controlsTimerRef.current);\n }\n controlsTimerRef.current = setTimeout(() => {\n setControlsVisible(false);\n }, 5000);\n }\n if (!isFullScreen && controlsTimerRef.current) {\n clearTimeout(controlsTimerRef.current);\n }\n return () => {\n if (controlsTimerRef.current) {\n clearTimeout(controlsTimerRef.current);\n }\n };\n }, [controlsVisible, isFullScreen, qualityDropDownOpen]);\n\n const onHoverHandler = useCallback(\n event => {\n if (event.type === 'mouseenter' || qualityDropDownOpen) {\n setControlsVisible(true);\n return;\n }\n if (event.type === 'mouseleave') {\n setControlsVisible(false);\n } else if (isFullScreen && !controlsVisible && event.type === 'mousemove') {\n setControlsVisible(true);\n if (controlsTimerRef.current) {\n clearTimeout(controlsTimerRef.current);\n }\n }\n },\n [controlsVisible, isFullScreen, qualityDropDownOpen],\n );\n\n return (\n <Flex\n key=\"hls-viewer\"\n id={`hls-viewer-${themeType}`}\n ref={hlsViewRef}\n css={{\n size: '100%',\n }}\n >\n {hlsStatsState?.url && enablHlsStats ? (\n <HlsStatsOverlay hlsStatsState={hlsStatsState} onClose={sfnOverlayClose} />\n ) : null}\n {hlsUrl && !streamEnded ? (\n <Flex\n id=\"hls-player-container\"\n align=\"center\"\n justify=\"center\"\n css={{\n width: '100%',\n margin: '0 auto',\n height: '100%',\n }}\n >\n <HLSAutoplayBlockedPrompt open={isHlsAutoplayBlocked} unblockAutoPlay={unblockAutoPlay} />\n {showLoader && (\n <Flex\n align=\"center\"\n justify=\"center\"\n css={{\n position: 'absolute',\n }}\n >\n <Loading width={72} height={72} />\n </Flex>\n )}\n <HMSVideoPlayer.Root\n ref={videoRef}\n onMouseEnter={onHoverHandler}\n onMouseMove={onHoverHandler}\n onMouseLeave={onHoverHandler}\n >\n {isMobile && isPaused && (\n <Box\n css={{\n position: 'absolute',\n top: '40%',\n left: '50%',\n transform: 'translateY(-40%) translateX(-50%)',\n padding: '$8 14px $8 18px',\n display: 'inline-flex',\n r: '50%',\n gap: '$1',\n bg: '$primary_default',\n zIndex: 21,\n }}\n >\n <IconButton onClick={async () => await hlsPlayer?.play()} data-testid=\"play_btn\">\n <PlayIcon width=\"60px\" height=\"60px\" />\n </IconButton>\n </Box>\n )}\n <Flex\n ref={controlsRef}\n direction=\"column\"\n justify=\"flex-end\"\n align=\"flex-start\"\n css={{\n position: 'absolute',\n bottom: '0',\n left: '0',\n background: `linear-gradient(180deg, ${theme.colors.background_dim.value}00 29.46%, ${theme.colors.background_dim.value}A3 100%);`,\n width: '100%',\n pt: '$8',\n flexShrink: 0,\n transition: 'visibility 0s 0.5s, opacity 0.5s linear',\n visibility: controlsVisible ? `` : `hidden`,\n opacity: controlsVisible ? `1` : '0',\n }}\n >\n {!isMobile && (\n <HMSVideoPlayer.Controls.Root\n css={{\n p: '$4 $8',\n }}\n >\n <HMSVideoPlayer.Controls.Left>\n <HMSVideoPlayer.PlayButton\n onClick={async () => {\n isPaused ? await hlsPlayer?.play() : hlsPlayer?.pause();\n }}\n isPaused={isPaused}\n />\n <HMSVideoPlayer.Duration hlsPlayer={hlsPlayer} />\n <HMSVideoPlayer.Volume hlsPlayer={hlsPlayer} />\n <IconButton\n variant=\"standard\"\n css={{ px: '$2' }}\n onClick={async () => {\n await hlsPlayer.seekToLivePosition();\n setIsVideoLive(true);\n }}\n key=\"jump-to-live_btn\"\n data-testid=\"jump-to-live_btn\"\n >\n <Tooltip title=\"Go to Live\" side=\"top\">\n <Flex justify=\"center\" gap={2} align=\"center\">\n <Box\n css={{\n height: '$4',\n width: '$4',\n background: isVideoLive ? '$alert_error_default' : '$on_primary_medium',\n r: '$1',\n }}\n />\n <Text\n variant={{\n '@sm': 'xs',\n }}\n css={{\n c: isVideoLive ? '$on_surface_high' : '$on_surface_medium',\n }}\n >\n {isVideoLive ? 'LIVE' : 'GO LIVE'}\n </Text>\n </Flex>\n </Tooltip>\n </IconButton>\n </HMSVideoPlayer.Controls.Left>\n\n <HMSVideoPlayer.Controls.Right>\n {hasCaptions && (\n <HLSCaptionSelector onClick={() => hlsPlayer?.toggleCaption()} isEnabled={isCaptionEnabled} />\n )}\n {availableLayers.length > 0 ? (\n <HLSQualitySelector\n layers={availableLayers}\n onOpen={setQualityDropDownOpen}\n open={qualityDropDownOpen}\n selection={currentSelectedQuality}\n onQualityChange={handleQuality}\n isAuto={isUserSelectedAuto}\n />\n ) : null}\n {isFullScreenSupported ? (\n <FullScreenButton\n isFullScreen={isFullScreen}\n onToggle={toggle}\n icon={isFullScreen ? <ShrinkIcon /> : <ExpandIcon />}\n />\n ) : null}\n </HMSVideoPlayer.Controls.Right>\n </HMSVideoPlayer.Controls.Root>\n )}\n </Flex>\n </HMSVideoPlayer.Root>\n </Flex>\n ) : (\n <Flex align=\"center\" justify=\"center\" direction=\"column\" css={{ size: '100%', px: '$10' }}>\n <Flex css={{ c: '$on_surface_high', r: '$round', bg: '$surface_default', p: '$2' }}>\n {streamEnded ? <ColoredHandIcon height={56} width={56} /> : <RadioIcon height={56} width={56} />}\n </Flex>\n <Text variant=\"h5\" css={{ c: '$on_surface_high', mt: '$10', mb: 0, textAlign: 'center' }}>\n {streamEnded ? 'Stream has ended' : 'Stream yet to start'}\n </Text>\n <Text variant=\"md\" css={{ textAlign: 'center', mt: '$4', c: '$on_surface_medium' }}>\n {streamEnded ? 'Have a nice day!' : 'Sit back and relax'}\n </Text>\n </Flex>\n )}\n </Flex>\n );\n};\n\nexport default HLSView;\n", "import React, { memo } from 'react';\nimport { CloseIcon } from '@100mslive/react-icons';\nimport { Flex } from '../../Layout';\nimport { Text } from '../../Text';\nimport IconButton from '../IconButton';\n\nexport function HlsStatsOverlay({ hlsStatsState, onClose }) {\n return (\n <Flex\n css={{\n position: 'absolute',\n width: '$80',\n marginLeft: '$8',\n padding: '$8 $8 $10',\n zIndex: 10,\n backgroundColor: '$surface_brighter',\n borderRadius: '$1',\n }}\n direction=\"column\"\n >\n <IconButton css={{ position: 'absolute', top: '$2', right: '$2' }} onClick={onClose}>\n <CloseIcon />\n </IconButton>\n <HlsStatsRow label=\"URL\">\n <Flex align=\"center\">\n <a\n style={{ cursor: 'pointer', textDecoration: 'underline' }}\n href={hlsStatsState?.url}\n target=\"_blank\"\n rel=\"noreferrer\"\n >\n Stream url\n </a>\n </Flex>\n </HlsStatsRow>\n <HlsStatsRow label=\"Video size\">\n {` ${hlsStatsState?.videoSize?.width}x${hlsStatsState?.videoSize?.height}`}\n </HlsStatsRow>\n <HlsStatsRow label=\"Buffer duration\">{hlsStatsState?.bufferedDuration?.toFixed(2)} </HlsStatsRow>\n <HlsStatsRow label=\"Connection speed\">\n {`${(hlsStatsState?.bandwidthEstimate / (1000 * 1000)).toFixed(2)} Mbps`}\n </HlsStatsRow>\n <HlsStatsRow label=\"Bitrate\">{`${(hlsStatsState?.bitrate / (1000 * 1000)).toFixed(2)} Mbps`}</HlsStatsRow>\n <HlsStatsRow label=\"distance from live\">\n {getDurationFromSeconds(hlsStatsState.distanceFromLive / 1000)}\n </HlsStatsRow>\n <HlsStatsRow label=\"Dropped frames\">{hlsStatsState?.droppedFrames}</HlsStatsRow>\n </Flex>\n );\n}\n\n/**\n * Extracted from HLS new Player PR.\n * TODO: remove this and use HMSVideoUtils.js\n * when that code is merged\n */\nexport function getDurationFromSeconds(timeInSeconds) {\n let time = Math.floor(timeInSeconds);\n const hours = Math.floor(time / 3600);\n time = time - hours * 3600;\n const minutes = Math.floor(time / 60);\n const seconds = Math.floor(time - minutes * 60);\n\n const prefixedMinutes = `${minutes < 10 ? '0' + minutes : minutes}`;\n const prefixedSeconds = `${seconds < 10 ? '0' + seconds : seconds}`;\n\n let videoTimeStr = `${prefixedMinutes}:${prefixedSeconds}`;\n if (hours) {\n const prefixedHours = `${hours < 10 ? '0' + hours : hours}`;\n videoTimeStr = `${prefixedHours}:${prefixedMinutes}:${prefixedSeconds}`;\n }\n return videoTimeStr;\n}\n\nconst HlsStatsRow = memo(({ label, children }) => {\n return (\n <Flex gap={4} justify=\"center\" css={{ width: '100%' }}>\n <Text\n css={{\n width: '50%',\n '@md': { fontSize: '$md' },\n '@sm': { fontSize: '$sm' },\n // textAlign: \"right\",\n }}\n >\n {label}\n </Text>\n <Text\n css={{\n '@md': { fontSize: '$md' },\n '@sm': { fontSize: '$sm' },\n width: '50%',\n overflowWrap: 'break-word',\n // textAlign: \"left\",\n }}\n >\n {children}\n </Text>\n </Flex>\n );\n});\n", "import { LeftControls, RightControls, VideoControls } from './Controls';\nimport { HMSVideo } from './HMSVideo';\nimport { PlayButton } from './PlayButton';\nimport { VideoProgress } from './VideoProgress';\nimport { VideoTime } from './VideoTime';\nimport { VolumeControl } from './VolumeControl';\n\nexport const HMSVideoPlayer = {\n Root: HMSVideo,\n PlayButton: PlayButton,\n Progress: VideoProgress,\n Duration: VideoTime,\n Volume: VolumeControl,\n Controls: {\n Root: VideoControls,\n Left: LeftControls,\n Right: RightControls,\n },\n};\n", "import { Flex, styled } from '../../../';\n\nexport const VideoControls = styled(Flex, {\n justifyContent: 'center',\n alignItems: 'center',\n alignSelf: 'stretch',\n width: '100%',\n gap: '$2',\n});\n\nexport const LeftControls = styled(Flex, {\n justifyContent: 'flex-start',\n alignItems: 'center',\n width: '100%',\n gap: '$4',\n});\nexport const RightControls = styled(Flex, {\n justifyContent: 'flex-end',\n alignItems: 'center',\n width: '100%',\n gap: '$4',\n});\n", "import React, { forwardRef } from 'react';\nimport { Flex } from '../../../';\n\nexport const HMSVideo = forwardRef(({ children, ...props }, videoRef) => {\n return (\n <Flex\n data-testid=\"hms-video\"\n css={{\n size: '100%',\n position: 'relative',\n '& video::cue': {\n color: 'white',\n // textShadow: '0px 0px 4px #000',\n whiteSpace: 'pre-line',\n fontSize: '$lg',\n fontStyle: 'normal',\n fontWeight: '$semiBold',\n lineHeight: '$sm',\n letterSpacing: '0.5px',\n },\n '& video::-webkit-media-text-track-display': {\n padding: '0 $4',\n },\n '& video::-webkit-media-text-track-container': {\n fontSize: '$space$10 !important',\n },\n }}\n direction=\"column\"\n {...props}\n >\n <video\n style={{\n flex: '1 1 0',\n margin: '0 auto',\n minHeight: '0',\n }}\n ref={videoRef}\n playsInline\n />\n {children}\n </Flex>\n );\n});\n", "import React from 'react';\nimport { PauseIcon, PlayIcon } from '@100mslive/react-icons';\nimport { IconButton, Tooltip } from '../../../';\n\nexport const PlayButton = ({ onClick, isPaused }) => {\n return (\n <Tooltip title={isPaused ? 'Play' : 'Pause'} side=\"top\">\n <IconButton onClick={onClick} data-testid=\"play_pause_btn\">\n {isPaused ? <PlayIcon width={20} height={20} /> : <PauseIcon width={20} height={20} />}\n </IconButton>\n </Tooltip>\n );\n};\n", "import React, { useEffect, useRef, useState } from 'react';\nimport { Box, Flex } from '../../../';\nimport { getPercentage } from './HMSVIdeoUtils';\n\nexport const VideoProgress = ({ onValueChange, hlsPlayer }) => {\n const [videoProgress, setVideoProgress] = useState(0);\n const [bufferProgress, setBufferProgress] = useState(0);\n const progressRootRef = useRef();\n\n useEffect(() => {\n const videoEl = hlsPlayer.getVideoElement();\n const timeupdateHandler = () => {\n const videoProgress = Math.floor(getPercentage(videoEl.currentTime, videoEl.duration));\n let bufferProgress = 0;\n if (videoEl.buffered.length > 0) {\n bufferProgress = Math.floor(getPercentage(videoEl.buffered?.end(0), videoEl.duration));\n }\n\n setVideoProgress(isNaN(videoProgress) ? 0 : videoProgress);\n setBufferProgress(isNaN(bufferProgress) ? 0 : bufferProgress);\n };\n if (videoEl) {\n videoEl.addEventListener('timeupdate', timeupdateHandler);\n }\n return function cleanup() {\n if (videoEl) {\n videoEl.removeEventListener('timeupdate', timeupdateHandler);\n }\n };\n }, [hlsPlayer]);\n\n const onProgressChangeHandler = e => {\n const userClickedX = e.clientX - progressRootRef.current.offsetLeft;\n const progressBarWidth = progressRootRef.current.offsetWidth;\n const progress = Math.floor(getPercentage(userClickedX, progressBarWidth));\n const videoEl = hlsPlayer.getVideoElement();\n const currentTime = (progress * videoEl.duration) / 100;\n\n if (onValueChange) {\n onValueChange(currentTime);\n }\n };\n\n return hlsPlayer.getVideoElement() ? (\n <Flex\n ref={progressRootRef}\n css={{ cursor: 'pointer', h: '$4', alignSelf: 'stretch' }}\n onClick={onProgressChangeHandler}\n >\n <Box\n id=\"video-actual\"\n css={{\n display: 'inline',\n width: `${videoProgress}%`,\n background: '$primary_default',\n }}\n />\n <Box\n id=\"video-buffer\"\n css={{\n width: `${bufferProgress - videoProgress}%`,\n background: '$on_surface_high',\n opacity: '25%',\n }}\n />\n <Box\n id=\"video-rest\"\n css={{\n width: `${100 - bufferProgress}%`,\n background: '$on_surface_high',\n opacity: '10%',\n }}\n />\n </Flex>\n ) : null;\n};\n", "export function getPercentage(a, b) {\n return (a / b) * 100;\n}\n\n/**\n *\n * @param {number} timeInSeconds - if given as floating point value, it is floored.\n * @returns a string representing timeInSeconds in HH:MM:SS format.\n * (e.g) getDurationFromSeconds(3910) returns \"1:05:10\"\n */\nexport function getDurationFromSeconds(timeInSeconds) {\n let time = Math.floor(timeInSeconds);\n const hours = Math.floor(time / 3600);\n time = time - hours * 3600;\n const minutes = Math.floor(time / 60);\n const seconds = Math.floor(time - minutes * 60);\n\n const prefixedMinutes = `${minutes < 10 ? `0${minutes}` : minutes}`;\n const prefixedSeconds = `${seconds < 10 ? `0${seconds}` : seconds}`;\n\n let videoTimeStr = `${prefixedMinutes}:${prefixedSeconds}`;\n if (hours) {\n const prefixedHours = `${hours < 10 ? `0${hours}` : hours}`;\n videoTimeStr = `${prefixedHours}:${prefixedMinutes}:${prefixedSeconds}`;\n }\n return videoTimeStr;\n}\n", "import React, { useEffect, useState } from 'react';\nimport { HMSHLSPlayerEvents } from '@100mslive/hls-player';\nimport { Text } from '../../../';\nimport { getDurationFromSeconds } from './HMSVIdeoUtils';\n\nexport const VideoTime = ({ hlsPlayer }) => {\n const [videoTime, setVideoTime] = useState('');\n\n useEffect(() => {\n const timeupdateHandler = currentTime => setVideoTime(getDurationFromSeconds(currentTime));\n if (hlsPlayer) {\n hlsPlayer.on(HMSHLSPlayerEvents.CURRENT_TIME, timeupdateHandler);\n }\n return function cleanup() {\n if (hlsPlayer) {\n hlsPlayer.off(HMSHLSPlayerEvents.CURRENT_TIME, timeupdateHandler);\n }\n };\n }, [hlsPlayer]);\n\n return hlsPlayer ? (\n <Text\n css={{\n minWidth: '$16',\n c: '$on_surface_medium',\n display: 'flex',\n justifyContent: 'center',\n }}\n >\n {videoTime}\n </Text>\n ) : null;\n};\n", "import React, { useState } from 'react';\nimport { VolumeOneIcon, VolumeTwoIcon, VolumeZeroIcon } from '@100mslive/react-icons';\nimport { Flex, Slider } from '../../../';\n\nexport const VolumeControl = ({ hlsPlayer }) => {\n const [volume, setVolume] = useState(hlsPlayer?.volume ?? 100);\n const [showSlider, setShowSlider] = useState(false);\n\n return (\n <Flex\n align=\"center\"\n css={{ color: '$on_surface_high' }}\n onMouseOver={event => {\n event.stopPropagation();\n setShowSlider(true);\n }}\n onMouseLeave={event => {\n event.stopPropagation();\n setShowSlider(false);\n }}\n >\n <VolumeIcon\n volume={volume}\n onClick={() => {\n if (volume > 0) {\n setVolume(0);\n hlsPlayer?.setVolume(0);\n } else {\n setVolume(100);\n hlsPlayer?.setVolume(100);\n }\n }}\n />\n <Slider\n css={{\n mx: '$4',\n w: '$20',\n cursor: 'pointer',\n '@sm': { w: '$14' },\n '@xs': { w: '$14' },\n opacity: showSlider ? '1' : '0',\n display: showSlider ? '' : 'none',\n transition: `all .2s ease .5s`,\n }}\n min={0}\n max={100}\n step={1}\n value={[volume]}\n onValueChange={volume => {\n hlsPlayer.setVolume(volume[0]);\n setVolume(volume[0]);\n }}\n thumbStyles={{ w: '$6', h: '$6' }}\n />\n </Flex>\n );\n};\n\nconst VolumeIcon = ({ volume, onClick }) => {\n if (volume === 0) {\n return <VolumeZeroIcon style={{ cursor: 'pointer', transition: 'color 0.3s' }} onClick={onClick} />;\n }\n return volume < 50 ? (\n <VolumeOneIcon style={{ cursor: 'pointer', transition: 'color 0.3s' }} onClick={onClick} />\n ) : (\n <VolumeTwoIcon style={{ cursor: 'pointer', transition: 'color 0.3s' }} onClick={onClick} />\n );\n};\n", "import React from 'react';\nimport { Flex, IconButton, Tooltip } from '../../../';\n\nexport const FullScreenButton = ({ isFullScreen, icon, onToggle }) => {\n return (\n <Tooltip title={`${isFullScreen ? 'Exit' : 'Go'} fullscreen`} side=\"top\">\n <IconButton\n variant=\"standard\"\n css={{ margin: '0px' }}\n onClick={onToggle}\n key=\"fullscreen_btn\"\n data-testid=\"fullscreen_btn\"\n >\n <Flex>{icon}</Flex>\n </IconButton>\n </Tooltip>\n );\n};\n", "import React from 'react';\nimport { Button, Dialog, Text } from '../../../';\nimport { DialogContent, DialogRow } from '../../primitives/DialogContent';\n\nexport function HLSAutoplayBlockedPrompt({ open, unblockAutoPlay }) {\n return (\n <Dialog.Root\n open={open}\n onOpenChange={value => {\n if (!value) {\n unblockAutoPlay();\n }\n }}\n >\n <DialogContent title=\"Attention\" closeable={false}>\n <DialogRow>\n <Text variant=\"md\">\n The browser wants us to get a confirmation for playing the HLS Stream. Please click \"play stream\" to\n proceed.\n </Text>\n </DialogRow>\n <DialogRow justify=\"end\">\n <Button\n variant=\"primary\"\n onClick={() => {\n unblockAutoPlay();\n }}\n >\n Play stream\n </Button>\n </DialogRow>\n </DialogContent>\n </Dialog.Root>\n );\n}\n", "import React from 'react';\nimport { ClosedCaptionIcon, OpenCaptionIcon } from '@100mslive/react-icons';\nimport { IconButton, Tooltip } from '../../../';\n\nexport function HLSCaptionSelector({ isEnabled, onClick }: { isEnabled: boolean; onClick: () => void }) {\n return (\n <Tooltip title=\"Subtitles/closed captions\" side=\"top\">\n <IconButton css={{ p: '$2' }} onClick={() => onClick()}>\n {isEnabled ? <ClosedCaptionIcon width=\"20\" height=\"20px\" /> : <OpenCaptionIcon width=\"20\" height=\"20px\" />}\n </IconButton>\n </Tooltip>\n );\n}\n", "import React from 'react';\nimport { CheckIcon, SettingsIcon } from '@100mslive/react-icons';\nimport { Box, Dropdown, Flex, Text, Tooltip } from '../../../';\n\nexport function HLSQualitySelector({ open, onOpen, layers, onQualityChange, selection, isAuto }) {\n return (\n <Dropdown.Root open={open} onOpenChange={value => onOpen(value)}>\n <Dropdown.Trigger asChild data-testid=\"quality_selector\">\n <Flex\n css={{\n color: '$on_primary_high',\n r: '$1',\n cursor: 'pointer',\n p: '$2',\n }}\n >\n <Tooltip title=\"Select Quality\" side=\"top\">\n <Flex align=\"center\">\n <Box\n css={{\n w: '$9',\n h: '$9',\n display: 'inline-flex',\n alignItems: 'center',\n c: '$on_surface_high',\n }}\n >\n <SettingsIcon />\n </Box>\n <Text\n variant={{\n '@md': 'sm',\n '@sm': 'xs',\n '@xs': 'tiny',\n }}\n css={{ display: 'flex', alignItems: 'center', ml: '$2', c: '$on_surface_medium' }}\n >\n {isAuto && (\n <>\n Auto\n <Box\n css={{\n mx: '$2',\n w: '$2',\n h: '$2',\n background: '$on_surface_medium',\n r: '$1',\n }}\n />\n </>\n )}\n {selection && Math.min(selection.width, selection.height)}p\n </Text>\n </Flex>\n </Tooltip>\n </Flex>\n </Dropdown.Trigger>\n {layers.length > 0 && (\n <Dropdown.Content\n sideOffset={5}\n align=\"end\"\n css={{\n height: 'auto',\n maxHeight: '$52',\n w: '$40',\n bg: '$surface_bright',\n py: '$4',\n gap: '$4',\n display: 'grid',\n }}\n >\n {layers.map(layer => {\n return (\n <Dropdown.Item\n onClick={() => onQualityChange(layer)}\n key={layer.width}\n css={{\n bg:\n !isAuto && layer.width === selection?.width && layer.height === selection?.height\n ? '$surface_default'\n : '$surface_bright',\n '&:hover': {\n bg: '$surface_brighter',\n },\n p: '$2 $4 $2 $8',\n h: '$12',\n gap: '$2',\n }}\n >\n <Text variant=\"caption\" css={{ fontWeight: '$semiBold' }}>\n {getQualityText(layer)}\n </Text>\n <Text variant=\"caption\" css={{ flex: '1 1 0', c: '$on_surface_low', pl: '$2' }}>\n {getBitrateText(layer)}\n </Text>\n {!isAuto && layer.width === selection?.width && layer.height === selection?.height && (\n <CheckIcon width=\"16px\" height=\"16px\" />\n )}\n </Dropdown.Item>\n );\n })}\n <Dropdown.Item\n onClick={() => onQualityChange({ height: 'auto' })}\n key=\"auto\"\n css={{\n bg: !isAuto ? '$surface_bright' : '$surface_default',\n '&:hover': {\n bg: '$surface_brighter',\n },\n p: '$2 $4 $2 $8',\n h: '$12',\n gap: '$2',\n }}\n >\n <Text variant=\"caption\" css={{ fontWeight: '$semiBold', flex: '1 1 0' }}>\n Auto\n </Text>\n {isAuto && <CheckIcon width=\"16px\" height=\"16px\" />}\n </Dropdown.Item>\n </Dropdown.Content>\n )}\n </Dropdown.Root>\n );\n}\n\nconst getQualityText = layer => `${Math.min(layer.height, layer.width)}p `;\nconst getBitrateText = layer => `(${(Number(layer.bitrate / 1000) / 1000).toFixed(2)} Mbps)`;\n"],
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA,OAAOA,WAAS,aAAa,aAAAC,YAAW,UAAAC,SAAQ,YAAAC,iBAAgB;AAChE,SAAS,eAAe,UAAU,aAAa,iBAAiB;AAChE,SAAS,kBAAkB,cAAc,sBAAAC,2BAA0B;AACnE,OAAO,gBAAgB;AACvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,iBAAiB,YAAY,YAAAC,WAAU,WAAW,kBAAkB;;;ACb7E;AAAA,OAAO,SAAS,YAAY;AAC5B,SAAS,iBAAiB;AAKnB,SAAS,gBAAgB,EAAE,eAAe,QAAQ,GAAG;AAN5D;AAOE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,KAAK;AAAA,QACH,UAAU;AAAA,QACV,OAAO;AAAA,QACP,YAAY;AAAA,QACZ,SAAS;AAAA,QACT,QAAQ;AAAA,QACR,iBAAiB;AAAA,QACjB,cAAc;AAAA,MAChB;AAAA,MACA,WAAU;AAAA;AAAA,IAEV,oCAAC,sBAAW,KAAK,EAAE,UAAU,YAAY,KAAK,MAAM,OAAO,KAAK,GAAG,SAAS,WAC1E,oCAAC,eAAU,CACb;AAAA,IACA,oCAAC,eAAY,OAAM,SACjB,oCAAC,QAAK,OAAM,YACV;AAAA,MAAC;AAAA;AAAA,QACC,OAAO,EAAE,QAA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A,gBACA,UAAU;AAAA,gBACV,MAAM,eAAe,gBAAAA,QAAA,cAAC,gBAAW,IAAK,gBAAAA,QAAA,cAAC,gBAAW;AAAA;AAAA,YACpD,IACE,IACN;AAAA,UACF;AAAA,QAEJ;AAAA,MACF;AAAA,IACF,IAEA,gBAAAA,QAAA,cAAC,QAAK,OAAM,UAAS,SAAQ,UAAS,WAAU,UAAS,KAAK,EAAE,MAAM,QAAQ,IAAI,MAAM,KACtF,gBAAAA,QAAA,cAAC,QAAK,KAAK,EAAE,GAAG,oBAAoB,GAAG,UAAU,IAAI,oBAAoB,GAAG,KAAK,KAC9E,cAAc,gBAAAA,QAAA,cAAC,mBAAgB,QAAQ,IAAI,OAAO,IAAI,IAAK,gBAAAA,QAAA,cAAC,aAAU,QAAQ,IAAI,OAAO,IAAI,CAChG,GACA,gBAAAA,QAAA,cAAC,QAAK,SAAQ,MAAK,KAAK,EAAE,GAAG,oBAAoB,IAAI,OAAO,IAAI,GAAG,WAAW,SAAS,KACpF,cAAc,qBAAqB,qBACtC,GACA,gBAAAA,QAAA,cAAC,QAAK,SAAQ,MAAK,KAAK,EAAE,WAAW,UAAU,IAAI,MAAM,GAAG,qBAAqB,KAC9E,cAAc,qBAAqB,oBACtC,CACF;AAAA,EAEJ;AAEJ;AAEA,IAAO,kBAAQ;",
|
6
|
+
"names": ["React", "useEffect", "useRef", "useState", "HMSHLSPlayerEvents", "PlayIcon", "React", "React", "React", "React", "React", "getDurationFromSeconds", "hlsPlayer", "videoProgress", "bufferProgress", "React", "React", "useEffect", "useState", "hlsPlayer", "useState", "useEffect", "getDurationFromSeconds", "React", "React", "useState", "hlsPlayer", "useState", "React", "volume", "React", "React", "React", "React", "React", "React", "React", "React", "useRef", "useState", "useEffect", "showLoader", "_a", "React", "isCaptionEnabled", "HMSHLSPlayerEvents", "PlayIcon"]
|
7
|
+
}
|
@@ -93,7 +93,8 @@ export declare enum SESSION_STORE_KEY {
|
|
93
93
|
SPOTLIGHT = "spotlight",
|
94
94
|
CHAT_PEER_BLACKLIST = "chatPeerBlacklist",
|
95
95
|
CHAT_MESSAGE_BLACKLIST = "chatMessageBlacklist",
|
96
|
-
CHAT_STATE = "chatState"
|
96
|
+
CHAT_STATE = "chatState",
|
97
|
+
SHARED_LEADERBOARDS = "sharedLeaderboards"
|
97
98
|
}
|
98
99
|
export declare enum INTERACTION_TYPE {
|
99
100
|
POLL = "Poll",
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
export declare const LeaderboardEntry: ({ position, score, questionCount, correctResponses, userName, maxPossibleScore, }: {
|
3
|
+
position: number;
|
4
|
+
score: number;
|
5
|
+
questionCount: number;
|
6
|
+
correctResponses: number;
|
7
|
+
userName: string;
|
8
|
+
maxPossibleScore: number;
|
9
|
+
}) => React.JSX.Element;
|