@100mslive/roomkit-react 0.1.4-alpha.1 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{HLSView-F2K5VSTS.js → HLSView-P57IRMAR.js} +7 -11
- package/dist/{HLSView-F2K5VSTS.js.map → HLSView-P57IRMAR.js.map} +1 -1
- package/dist/PinnedTrackView-4FYJEBTB.js +102 -0
- package/dist/PinnedTrackView-4FYJEBTB.js.map +7 -0
- package/dist/Popover/index.d.ts +1 -0
- package/dist/Prebuilt/App.d.ts +25 -0
- package/dist/Prebuilt/index.d.ts +1 -0
- package/dist/Prebuilt/provider/roomLayoutProvider/index.d.ts +1 -1
- package/dist/Sheet/Sheet.d.ts +3093 -0
- package/dist/Sheet/index.d.ts +1 -0
- package/dist/Theme/ThemeProvider.d.ts +4 -286
- package/dist/Theme/stitches.config.d.ts +1 -1
- package/dist/{VirtualBackground-S3XEPZ2T.js → VirtualBackground-GGCQJ5JM.js} +31 -7
- package/dist/VirtualBackground-GGCQJ5JM.js.map +7 -0
- package/dist/chunk-IVTWKQI3.js +827 -0
- package/dist/chunk-IVTWKQI3.js.map +7 -0
- package/dist/{chunk-42SWPN2C.js → chunk-OSM4QEQG.js} +3020 -2189
- package/dist/chunk-OSM4QEQG.js.map +7 -0
- package/dist/chunk-P5X32KOD.js +67 -0
- package/dist/chunk-P5X32KOD.js.map +7 -0
- package/dist/chunk-RVCZPPTL.js +1100 -0
- package/dist/chunk-RVCZPPTL.js.map +7 -0
- package/dist/{chunk-ESUJK7AT.js → conference-P6I6ESVF.js} +3136 -653
- package/dist/conference-P6I6ESVF.js.map +7 -0
- package/dist/index.cjs.js +15733 -15498
- package/dist/index.cjs.js.map +4 -4
- package/dist/index.js +4 -8
- package/dist/meta.cjs.json +3355 -3017
- package/dist/meta.esbuild.json +3534 -3329
- package/dist/utils/animations.d.ts +16 -0
- package/package.json +8 -10
- package/src/Button/Button.tsx +4 -4
- package/src/Dropdown/Dropdown.tsx +2 -2
- package/src/IconButton/IconButton.tsx +4 -2
- package/src/Pagination/StyledPagination.tsx +1 -0
- package/src/Popover/index.tsx +2 -1
- package/src/Prebuilt/{App.jsx → App.tsx} +95 -48
- package/src/Prebuilt/Prebuilt.stories.tsx +22 -8
- package/src/Prebuilt/common/constants.js +1 -2
- package/src/Prebuilt/common/hooks.js +8 -0
- package/src/Prebuilt/common/utils.js +15 -0
- package/src/Prebuilt/components/AppData/AppData.jsx +1 -2
- package/src/Prebuilt/components/AppData/useUISettings.js +0 -5
- package/src/Prebuilt/components/AudioVideoToggle.jsx +69 -26
- package/src/Prebuilt/components/AuthToken.jsx +3 -2
- package/src/Prebuilt/components/Chat/ChatSelector.jsx +1 -1
- package/src/Prebuilt/components/Connection/TileConnection.jsx +0 -1
- package/src/Prebuilt/components/EmojiReaction.jsx +23 -73
- package/src/Prebuilt/components/EndSessionContent.jsx +57 -0
- package/src/Prebuilt/components/EqualProminence.jsx +180 -0
- package/src/Prebuilt/components/ErrorBoundary.jsx +4 -10
- package/src/Prebuilt/components/Footer/EmojiCard.jsx +34 -0
- package/src/Prebuilt/components/Footer/Footer.jsx +73 -0
- package/src/Prebuilt/components/{Header → Footer}/ParticipantList.jsx +5 -5
- package/src/Prebuilt/components/Header/ConferencingHeader.jsx +27 -7
- package/src/Prebuilt/components/Header/HeaderComponents.jsx +16 -14
- package/src/Prebuilt/components/Header/StreamActions.jsx +101 -36
- package/src/Prebuilt/components/Header/StreamingHeader.jsx +1 -1
- package/src/Prebuilt/components/Header/common.jsx +164 -0
- package/src/Prebuilt/components/IconButtonWithOptions/IconButtonWithOptions.jsx +1 -2
- package/src/Prebuilt/components/LeaveCard.jsx +19 -0
- package/src/Prebuilt/components/LeaveRoom.jsx +35 -143
- package/src/Prebuilt/components/LeaveSessionContent.jsx +45 -0
- package/src/Prebuilt/components/MoreSettings/ActionTile.jsx +55 -0
- package/src/Prebuilt/components/MoreSettings/ChangeNameContent.jsx +96 -0
- package/src/Prebuilt/components/MoreSettings/ChangeNameModal.jsx +31 -54
- package/src/Prebuilt/components/MoreSettings/EmbedUrl.jsx +48 -73
- package/src/Prebuilt/components/MoreSettings/MoreSettings.jsx +5 -221
- package/src/Prebuilt/components/MoreSettings/MuteAllContent.jsx +61 -0
- package/src/Prebuilt/components/MoreSettings/MuteAllModal.jsx +32 -49
- package/src/Prebuilt/components/MoreSettings/SplitComponents/DesktopLeaveRoom.jsx +129 -0
- package/src/Prebuilt/components/MoreSettings/SplitComponents/DesktopOptions.jsx +219 -0
- package/src/Prebuilt/components/MoreSettings/SplitComponents/MwebLeaveRoom.jsx +100 -0
- package/src/Prebuilt/components/MoreSettings/SplitComponents/MwebOptions.jsx +259 -0
- package/src/Prebuilt/components/Notifications/Notifications.jsx +0 -2
- package/src/Prebuilt/components/Notifications/ReconnectNotifications.jsx +0 -4
- package/src/Prebuilt/components/PIP/PIPComponent.jsx +30 -26
- package/src/Prebuilt/components/PIP/PIPManager.js +13 -0
- package/src/Prebuilt/components/PIP/index.jsx +2 -7
- package/src/Prebuilt/components/Pagination.jsx +4 -4
- package/src/Prebuilt/components/Preview/PreviewContainer.jsx +5 -13
- package/src/Prebuilt/components/Preview/PreviewForm.jsx +9 -5
- package/src/Prebuilt/components/Preview/PreviewJoin.jsx +20 -27
- package/src/Prebuilt/components/RaiseHand.jsx +27 -0
- package/src/Prebuilt/components/ScreenShare.jsx +1 -1
- package/src/Prebuilt/components/ScreenshareDisplay.jsx +2 -2
- package/src/Prebuilt/components/ScreenshareTile.jsx +2 -2
- package/src/Prebuilt/components/Settings/DeviceSettings.jsx +2 -1
- package/src/Prebuilt/components/Settings/LayoutSettings.jsx +1 -24
- package/src/Prebuilt/components/Settings/SettingsModal.jsx +152 -17
- package/src/Prebuilt/components/ShareMenuIcon.jsx +1 -0
- package/src/Prebuilt/components/TileMenu/TileMenu.jsx +133 -0
- package/src/Prebuilt/components/TileMenu/TileMenuContent.jsx +313 -0
- package/src/Prebuilt/components/VideoList.jsx +5 -33
- package/src/Prebuilt/components/VideoTile.jsx +30 -8
- package/src/Prebuilt/components/conference.jsx +14 -1
- package/src/Prebuilt/components/init/Init.jsx +0 -27
- package/src/Prebuilt/components/init/initUtils.js +0 -23
- package/src/Prebuilt/components/pdfAnnotator/pdfFileOptions.jsx +2 -1
- package/src/Prebuilt/components/pdfAnnotator/pdfInfo.jsx +1 -1
- package/src/Prebuilt/components/pdfAnnotator/shareScreenOptions.jsx +19 -8
- package/src/Prebuilt/components/pdfAnnotator/uploadedFile.jsx +1 -0
- package/src/Prebuilt/images/pdf-share.png +0 -0
- package/src/Prebuilt/images/screen-share.png +0 -0
- package/src/Prebuilt/index.ts +1 -0
- package/src/Prebuilt/layouts/EmbedView.jsx +0 -1
- package/src/Prebuilt/layouts/InsetView.jsx +65 -24
- package/src/Prebuilt/layouts/PDFView.jsx +0 -1
- package/src/Prebuilt/layouts/SidePane.jsx +8 -7
- package/src/Prebuilt/layouts/mainView.jsx +22 -31
- package/src/Prebuilt/layouts/screenShareView.jsx +0 -2
- package/src/Prebuilt/plugins/VirtualBackground/VirtualBackground.jsx +25 -1
- package/src/Prebuilt/primitives/DialogContent.jsx +1 -1
- package/src/Prebuilt/provider/roomLayoutProvider/index.tsx +1 -1
- package/src/Sheet/Sheet.mdx +19 -0
- package/src/Sheet/Sheet.stories.tsx +103 -0
- package/src/Sheet/Sheet.tsx +118 -0
- package/src/Sheet/index.ts +1 -0
- package/src/Theme/ThemeProvider.tsx +10 -13
- package/src/Theme/base.config.ts +1 -1
- package/src/Theme/stitches.config.ts +1 -1
- package/src/TileMenu/StyledMenuTile.tsx +2 -2
- package/src/TileMenu/TileMenu.tsx +2 -0
- package/src/VideoTile/StyledVideoTile.tsx +5 -0
- package/src/utils/animations.ts +18 -0
- package/dist/ActiveSpeakerView-V6O4K3BV.js +0 -39
- package/dist/ActiveSpeakerView-V6O4K3BV.js.map +0 -7
- package/dist/PinnedTrackView-7YQG4QKC.js +0 -70
- package/dist/PinnedTrackView-7YQG4QKC.js.map +0 -7
- package/dist/VirtualBackground-S3XEPZ2T.js.map +0 -7
- package/dist/chunk-42SWPN2C.js.map +0 -7
- package/dist/chunk-4NEZLVVH.js +0 -811
- package/dist/chunk-4NEZLVVH.js.map +0 -7
- package/dist/chunk-4ZBEFSRC.js +0 -58
- package/dist/chunk-4ZBEFSRC.js.map +0 -7
- package/dist/chunk-ESUJK7AT.js.map +0 -7
- package/dist/chunk-R6PDR5WZ.js +0 -243
- package/dist/chunk-R6PDR5WZ.js.map +0 -7
- package/dist/conference-7QKOMJPP.js +0 -3697
- package/dist/conference-7QKOMJPP.js.map +0 -7
- package/dist/transcription-RJA4V6PC.js +0 -356
- package/dist/transcription-RJA4V6PC.js.map +0 -7
- package/src/Prebuilt/common/useSortedPeers.js +0 -28
- package/src/Prebuilt/components/BottomActionSheet/BottomActionSheet.jsx +0 -96
- package/src/Prebuilt/components/BottomActionSheet/BottomActionSheet.stories.tsx +0 -46
- package/src/Prebuilt/components/Footer/ConferencingFooter.jsx +0 -101
- package/src/Prebuilt/components/Footer/StreamingFooter.jsx +0 -71
- package/src/Prebuilt/components/Footer.jsx +0 -8
- package/src/Prebuilt/components/MoreSettings/ChangeSelfRole.jsx +0 -67
- package/src/Prebuilt/components/TileMenu.jsx +0 -268
- package/src/Prebuilt/index.d.ts +0 -20
- package/src/Prebuilt/index.js +0 -2
@@ -1,70 +0,0 @@
|
|
1
|
-
import {
|
2
|
-
GridSidePaneView,
|
3
|
-
VideoTile_default
|
4
|
-
} from "./chunk-ESUJK7AT.js";
|
5
|
-
import {
|
6
|
-
usePinnedTrack,
|
7
|
-
useTheme
|
8
|
-
} from "./chunk-42SWPN2C.js";
|
9
|
-
import "./chunk-4ZBEFSRC.js";
|
10
|
-
import {
|
11
|
-
Flex
|
12
|
-
} from "./chunk-R6PDR5WZ.js";
|
13
|
-
import {
|
14
|
-
init_define_process_env
|
15
|
-
} from "./chunk-4NEZLVVH.js";
|
16
|
-
|
17
|
-
// src/Prebuilt/layouts/PinnedTrackView.jsx
|
18
|
-
init_define_process_env();
|
19
|
-
import React from "react";
|
20
|
-
import { useMeasure } from "react-use";
|
21
|
-
import { selectPeers, selectVideoTrackByPeerID, useHMSStore } from "@100mslive/react-sdk";
|
22
|
-
var PinnedPeerView = () => {
|
23
|
-
const { aspectRatio } = useTheme();
|
24
|
-
const pinnedTrack = usePinnedTrack();
|
25
|
-
const peerVideoTrack = useHMSStore(selectVideoTrackByPeerID(pinnedTrack.peerId));
|
26
|
-
const pinnedVideoTrack = pinnedTrack && pinnedTrack.type === "audio" ? peerVideoTrack : pinnedTrack;
|
27
|
-
const [ref, { height, width }] = useMeasure();
|
28
|
-
const peers = (useHMSStore(selectPeers) || []).filter(
|
29
|
-
(peer) => peer.videoTrack || peer.audioTrack || peer.auxiliaryTracks.length > 0
|
30
|
-
);
|
31
|
-
if (peers.length === 0) {
|
32
|
-
return null;
|
33
|
-
}
|
34
|
-
const showSidePane = pinnedTrack && peers.length > 1;
|
35
|
-
let finalWidth = aspectRatio.width / aspectRatio.height * height;
|
36
|
-
let finalHeight = height;
|
37
|
-
if (finalWidth > width) {
|
38
|
-
finalWidth = width;
|
39
|
-
finalHeight = aspectRatio.height / aspectRatio.width * width;
|
40
|
-
}
|
41
|
-
return /* @__PURE__ */ React.createElement(Flex, { css: { size: "100%", "@lg": { flexDirection: "column" } } }, /* @__PURE__ */ React.createElement(
|
42
|
-
Flex,
|
43
|
-
{
|
44
|
-
css: {
|
45
|
-
flex: "1 1 0",
|
46
|
-
p: "$8",
|
47
|
-
minHeight: 0,
|
48
|
-
minWidth: 0,
|
49
|
-
justifyContent: "center",
|
50
|
-
alignItems: "center"
|
51
|
-
},
|
52
|
-
ref
|
53
|
-
},
|
54
|
-
/* @__PURE__ */ React.createElement(
|
55
|
-
VideoTile_default,
|
56
|
-
{
|
57
|
-
key: pinnedTrack.id,
|
58
|
-
trackId: pinnedVideoTrack == null ? void 0 : pinnedVideoTrack.id,
|
59
|
-
peerId: pinnedTrack.peerId,
|
60
|
-
height: finalHeight,
|
61
|
-
width: finalWidth
|
62
|
-
}
|
63
|
-
)
|
64
|
-
), showSidePane && /* @__PURE__ */ React.createElement(GridSidePaneView, { peers: peers.filter((peer) => peer.id !== pinnedTrack.peerId) }));
|
65
|
-
};
|
66
|
-
var PinnedTrackView_default = PinnedPeerView;
|
67
|
-
export {
|
68
|
-
PinnedTrackView_default as default
|
69
|
-
};
|
70
|
-
//# sourceMappingURL=PinnedTrackView-7YQG4QKC.js.map
|
@@ -1,7 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"version": 3,
|
3
|
-
"sources": ["../src/Prebuilt/layouts/PinnedTrackView.jsx"],
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { useMeasure } from 'react-use';\nimport { selectPeers, selectVideoTrackByPeerID, useHMSStore } from '@100mslive/react-sdk';\nimport { GridSidePaneView } from '../components/gridView';\nimport VideoTile from '../components/VideoTile';\nimport { Flex } from '../../Layout';\nimport { useTheme } from '../../Theme';\nimport { usePinnedTrack } from '../components/AppData/useUISettings';\n\nconst PinnedPeerView = () => {\n const { aspectRatio } = useTheme();\n // can be audio or video track, if tile with only audio track is pinned\n const pinnedTrack = usePinnedTrack();\n const peerVideoTrack = useHMSStore(selectVideoTrackByPeerID(pinnedTrack.peerId));\n const pinnedVideoTrack = pinnedTrack && pinnedTrack.type === 'audio' ? peerVideoTrack : pinnedTrack;\n const [ref, { height, width }] = useMeasure();\n const peers = (useHMSStore(selectPeers) || []).filter(\n peer => peer.videoTrack || peer.audioTrack || peer.auxiliaryTracks.length > 0,\n );\n if (peers.length === 0) {\n return null;\n }\n const showSidePane = pinnedTrack && peers.length > 1;\n\n let finalWidth = (aspectRatio.width / aspectRatio.height) * height;\n let finalHeight = height;\n\n if (finalWidth > width) {\n finalWidth = width;\n finalHeight = (aspectRatio.height / aspectRatio.width) * width;\n }\n\n return (\n <Flex css={{ size: '100%', '@lg': { flexDirection: 'column' } }}>\n <Flex\n css={{\n flex: '1 1 0',\n p: '$8',\n minHeight: 0,\n minWidth: 0,\n justifyContent: 'center',\n alignItems: 'center',\n }}\n ref={ref}\n >\n <VideoTile\n key={pinnedTrack.id}\n trackId={pinnedVideoTrack?.id}\n peerId={pinnedTrack.peerId}\n height={finalHeight}\n width={finalWidth}\n />\n </Flex>\n {showSidePane && <GridSidePaneView peers={peers.filter(peer => peer.id !== pinnedTrack.peerId)} />}\n </Flex>\n );\n};\n\nexport default PinnedPeerView;\n"],
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA,OAAO,WAAW;AAClB,SAAS,kBAAkB;AAC3B,SAAS,aAAa,0BAA0B,mBAAmB;AAOnE,IAAM,iBAAiB,MAAM;AAC3B,QAAM,EAAE,YAAY,IAAI,SAAS;AAEjC,QAAM,cAAc,eAAe;AACnC,QAAM,iBAAiB,YAAY,yBAAyB,YAAY,MAAM,CAAC;AAC/E,QAAM,mBAAmB,eAAe,YAAY,SAAS,UAAU,iBAAiB;AACxF,QAAM,CAAC,KAAK,EAAE,QAAQ,MAAM,CAAC,IAAI,WAAW;AAC5C,QAAM,SAAS,YAAY,WAAW,KAAK,CAAC,GAAG;AAAA,IAC7C,UAAQ,KAAK,cAAc,KAAK,cAAc,KAAK,gBAAgB,SAAS;AAAA,EAC9E;AACA,MAAI,MAAM,WAAW,GAAG;AACtB,WAAO;AAAA,EACT;AACA,QAAM,eAAe,eAAe,MAAM,SAAS;AAEnD,MAAI,aAAc,YAAY,QAAQ,YAAY,SAAU;AAC5D,MAAI,cAAc;AAElB,MAAI,aAAa,OAAO;AACtB,iBAAa;AACb,kBAAe,YAAY,SAAS,YAAY,QAAS;AAAA,EAC3D;AAEA,SACE,oCAAC,QAAK,KAAK,EAAE,MAAM,QAAQ,OAAO,EAAE,eAAe,SAAS,EAAE,KAC5D;AAAA,IAAC;AAAA;AAAA,MACC,KAAK;AAAA,QACH,MAAM;AAAA,QACN,GAAG;AAAA,QACH,WAAW;AAAA,QACX,UAAU;AAAA,QACV,gBAAgB;AAAA,QAChB,YAAY;AAAA,MACd;AAAA,MACA;AAAA;AAAA,IAEA;AAAA,MAAC;AAAA;AAAA,QACC,KAAK,YAAY;AAAA,QACjB,SAAS,qDAAkB;AAAA,QAC3B,QAAQ,YAAY;AAAA,QACpB,QAAQ;AAAA,QACR,OAAO;AAAA;AAAA,IACT;AAAA,EACF,GACC,gBAAgB,oCAAC,oBAAiB,OAAO,MAAM,OAAO,UAAQ,KAAK,OAAO,YAAY,MAAM,GAAG,CAClG;AAEJ;AAEA,IAAO,0BAAQ;",
|
6
|
-
"names": []
|
7
|
-
}
|
@@ -1,7 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"version": 3,
|
3
|
-
"sources": ["../src/Prebuilt/plugins/VirtualBackground/VirtualBackground.jsx", "../src/Prebuilt/plugins/VirtualBackground/vbutils.js"],
|
4
|
-
"sourcesContent": ["import React, { useEffect, useRef, useState } from 'react';\nimport { HMSVirtualBackgroundTypes } from '@100mslive/hms-virtual-background';\nimport {\n selectIsAllowedToPublish,\n selectIsLocalVideoPluginPresent,\n selectLocalPeerRole,\n selectLocalVideoTrackID,\n useHMSActions,\n useHMSStore,\n} from '@100mslive/react-sdk';\nimport { VirtualBackgroundIcon } from '@100mslive/react-icons';\nimport { Loading } from '../../../Loading';\nimport { Tooltip } from '../../../Tooltip';\nimport IconButton from '../../IconButton';\nimport { useIsFeatureEnabled } from '../../components/hooks/useFeatures';\nimport { getRandomVirtualBackground } from './vbutils';\nimport { FEATURE_LIST } from '../../common/constants';\n\nexport const VirtualBackground = () => {\n const pluginRef = useRef(null);\n const hmsActions = useHMSActions();\n const isAllowedToPublish = useHMSStore(selectIsAllowedToPublish);\n const role = useHMSStore(selectLocalPeerRole);\n const [isVBLoading, setIsVBLoading] = useState(false);\n const [isVBSupported, setIsVBSupported] = useState(false);\n const localPeerVideoTrackID = useHMSStore(selectLocalVideoTrackID);\n const isVBPresent = useHMSStore(selectIsLocalVideoPluginPresent('HMSVB'));\n const isFeatureEnabled = useIsFeatureEnabled(FEATURE_LIST.VIDEO_PLUGINS);\n\n async function createPlugin() {\n if (!pluginRef.current) {\n const { HMSVBPlugin } = await import('@100mslive/hms-virtual-background');\n pluginRef.current = new HMSVBPlugin(HMSVirtualBackgroundTypes.NONE, HMSVirtualBackgroundTypes.NONE);\n }\n }\n useEffect(() => {\n if (!localPeerVideoTrackID) {\n return;\n }\n createPlugin().then(() => {\n //check support of plugin\n const pluginSupport = hmsActions.validateVideoPluginSupport(pluginRef.current);\n setIsVBSupported(pluginSupport.isSupported);\n });\n }, [hmsActions, localPeerVideoTrackID]);\n\n async function addPlugin() {\n setIsVBLoading(true);\n try {\n await createPlugin();\n window.HMS.virtualBackground = pluginRef.current;\n const { background, backgroundType } = getRandomVirtualBackground();\n await pluginRef.current.setBackground(background, backgroundType);\n await hmsActions.addPluginToVideoTrack(pluginRef.current, Math.floor(role.publishParams.video.frameRate / 2));\n } catch (err) {\n console.error('add virtual background plugin failed', err);\n }\n setIsVBLoading(false);\n }\n\n async function removePlugin() {\n if (pluginRef.current) {\n await hmsActions.removePluginFromVideoTrack(pluginRef.current);\n pluginRef.current = null;\n }\n }\n\n if (!isAllowedToPublish.video || !isVBSupported || !isFeatureEnabled) {\n return null;\n }\n\n return (\n <Tooltip\n boxCss={{ zIndex: '100' }}\n title={isVBLoading ? 'Adding virtual background' : `Turn ${!isVBPresent ? 'on' : 'off'} virtual background`}\n >\n <IconButton\n active={!isVBPresent}\n disabled={isVBLoading}\n onClick={() => {\n !isVBPresent ? addPlugin() : removePlugin();\n }}\n data-testid=\"virtual_bg_btn\"\n >\n {isVBLoading ? <Loading /> : <VirtualBackgroundIcon />}\n </IconButton>\n </Tooltip>\n );\n};\n\nexport default VirtualBackground;\n", "/* eslint-disable no-case-declarations */\nimport { HMSVirtualBackgroundTypes } from '@100mslive/hms-virtual-background';\nexport function getRandomVirtualBackground() {\n const backgroundList = [\n {\n background: HMSVirtualBackgroundTypes.BLUR,\n backgroundType: HMSVirtualBackgroundTypes.BLUR,\n },\n ];\n\n const images = [\n 'https://www.100ms.live/images/vb-1.jpeg',\n 'https://www.100ms.live/images/vb-2.jpg',\n 'https://www.100ms.live/images/vb-3.png',\n 'https://d2qi07yyjujoxr.cloudfront.net/webapp/vb/hms1.png',\n 'https://d2qi07yyjujoxr.cloudfront.net/webapp/vb/hms2.png',\n 'https://d2qi07yyjujoxr.cloudfront.net/webapp/vb/hms3.png',\n 'https://d2qi07yyjujoxr.cloudfront.net/webapp/vb/hms4.png',\n ].map(url => ({\n background: url,\n backgroundType: HMSVirtualBackgroundTypes.IMAGE,\n }));\n\n backgroundList.push(...images);\n\n /* \n //TODO: update with a better quality gif.\n const gifList = [\n {\n background: \"https://www.100ms.live/images/vb-1.gif\",\n backgroundType: HMSVirtualBackgroundTypes.GIF,\n },\n ];\n backgroundList.push(...gifList); \n */\n\n const videoList = [\n 'https://www.100ms.live/images/video-1.mp4',\n 'https://www.100ms.live/images/video-2.mp4',\n 'https://www.100ms.live/images/video-5.mp4',\n 'https://www.100ms.live/images/video-7.mp4',\n 'https://www.100ms.live/images/video-8.mp4',\n ].map(url => ({\n background: url,\n backgroundType: HMSVirtualBackgroundTypes.VIDEO,\n }));\n backgroundList.push(...videoList);\n\n const randomIdx = Math.floor(Math.random() * backgroundList.length);\n const virtualBackground = backgroundList[randomIdx];\n switch (virtualBackground.backgroundType) {\n case HMSVirtualBackgroundTypes.IMAGE:\n const img = document.createElement('img');\n img.alt = 'VB';\n img.src = backgroundList[randomIdx].background;\n virtualBackground.background = img;\n return virtualBackground;\n case HMSVirtualBackgroundTypes.VIDEO:\n const videoEl = document.createElement('video');\n videoEl.src = backgroundList[randomIdx].background;\n virtualBackground.background = videoEl;\n return virtualBackground;\n default:\n return virtualBackground;\n }\n}\n"],
|
5
|
-
"mappings": ";;;;;;;;;;;;;AAAA;AAAA,OAAO,SAAS,WAAW,QAAQ,gBAAgB;AACnD,SAAS,6BAAAA,kCAAiC;AAC1C;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,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