@100mslive/roomkit-react 0.3.10-alpha.16 → 0.3.10-alpha.18
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{HLSView-WF5O5RAH.css → HLSView-LNCDKSKQ.css} +3 -3
- package/dist/{HLSView-WF5O5RAH.css.map → HLSView-LNCDKSKQ.css.map} +1 -1
- package/dist/{HLSView-GCQTTWZN.js → HLSView-SJJ2GAYJ.js} +18 -3
- package/dist/HLSView-SJJ2GAYJ.js.map +7 -0
- package/dist/Prebuilt/common/constants.d.ts +0 -2
- package/dist/Prebuilt/common/hooks.d.ts +8 -1
- package/dist/Prebuilt/components/Polls/Voting/StandardVoting.d.ts +4 -2
- package/dist/Prebuilt/components/Polls/Voting/TimedVoting.d.ts +4 -2
- package/dist/Prebuilt/layouts/WaitingView.d.ts +6 -0
- package/dist/{chunk-FFWLNZPI.js → chunk-FMGGXDNB.js} +901 -788
- package/dist/chunk-FMGGXDNB.js.map +7 -0
- package/dist/index.cjs.css +2 -2
- package/dist/index.cjs.css.map +1 -1
- package/dist/index.cjs.js +1063 -941
- package/dist/index.cjs.js.map +4 -4
- package/dist/index.css +2 -2
- package/dist/index.css.map +1 -1
- package/dist/index.js +1 -1
- package/dist/meta.cjs.json +138 -108
- package/dist/meta.esbuild.json +154 -123
- package/package.json +7 -7
- package/src/Prebuilt/common/constants.ts +0 -2
- package/src/Prebuilt/common/hooks.ts +34 -1
- package/src/Prebuilt/common/utils.js +11 -11
- package/src/Prebuilt/components/AppData/AppData.tsx +0 -2
- package/src/Prebuilt/components/AppData/useUISettings.js +0 -3
- package/src/Prebuilt/components/Chat/Chat.tsx +26 -6
- package/src/Prebuilt/components/Chat/ChatFooter.tsx +18 -2
- package/src/Prebuilt/components/Chat/ChatStates.tsx +1 -1
- package/src/Prebuilt/components/Footer/ChatToggle.tsx +5 -1
- package/src/Prebuilt/components/Footer/ParticipantList.tsx +4 -2
- package/src/Prebuilt/components/Footer/PollsToggle.tsx +1 -1
- package/src/Prebuilt/components/Polls/CreatePollQuiz/PollsQuizMenu.tsx +2 -15
- package/src/Prebuilt/components/Polls/Voting/LeaderboardSummary.tsx +71 -66
- package/src/Prebuilt/components/Polls/Voting/QuestionCard.jsx +39 -40
- package/src/Prebuilt/components/Polls/Voting/StandardVoting.tsx +12 -6
- package/src/Prebuilt/components/Polls/Voting/TimedVoting.tsx +21 -10
- package/src/Prebuilt/components/Polls/Voting/Voting.tsx +44 -2
- package/src/Prebuilt/components/VideoLayouts/EqualProminence.tsx +13 -17
- package/src/Prebuilt/layouts/HLSView.jsx +14 -11
- package/src/Prebuilt/layouts/VideoStreamingSection.tsx +44 -9
- package/src/Prebuilt/layouts/WaitingView.tsx +52 -0
- package/dist/HLSView-GCQTTWZN.js.map +0 -7
- package/dist/chunk-FFWLNZPI.js.map +0 -7
- package/src/Prebuilt/layouts/NonPublisherView.jsx +0 -51
- package/src/Prebuilt/layouts/WaitingView.jsx +0 -51
@@ -35,7 +35,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
35
35
|
var define_process_env_default;
|
36
36
|
var init_define_process_env = __esm({
|
37
37
|
"<define:process.env>"() {
|
38
|
-
define_process_env_default = { GITHUB_STATE: "/home/runner/work/_temp/_runner_file_commands/save_state_6bf9302c-fce8-49fc-b87b-e75aa85840dc", npm_package_devDependencies_ts_node: "^10.4.0", npm_package_devDependencies__types_node: "^16.11.17", npm_package_exports___index_css: "./dist/index.css", npm_package_exports___require: "./dist/index.cjs.js", STATS_TRP: "true", DEPLOYMENT_BASEPATH: "/opt/runner", DOTNET_NOLOGO: "1", npm_package_dependencies_screenfull: "^5.1.0", npm_package_dependencies_react_draggable: "^4.4.5", npm_package_dependencies__radix_ui_react_switch: "1.0.0", npm_package_dependencies__100mslive_hms_whiteboard: "0.0.0-alpha.10", USER: "runner", npm_package_devDependencies_jest: "26.6.0", npm_config_version_commit_hooks: "true", npm_config_user_agent: "yarn/1.22.22 npm/? node/v18.20.2 linux x64", npm_config_always_auth: "", NX_WORKSPACE_ROOT: "/home/runner/work/web-sdks/web-sdks", npm_package_scripts_babel: "npx storybook@latest babelrc", CI: "true", npm_package_devDependencies__size_limit_file: "^5.0.3", npm_config_bin_links: "true", npm_config_wrap_output: "", npm_package_dependencies__radix_ui_react_tabs: "1.0.0", npm_package_dependencies__100mslive_react_sdk: "0.10.10-alpha.16", RUNNER_ENVIRONMENT: "github-hosted", GITHUB_ENV: "/home/runner/work/_temp/_runner_file_commands/set_env_6bf9302c-fce8-49fc-b87b-e75aa85840dc", PIPX_HOME: "/opt/pipx", npm_node_execpath: "/opt/hostedtoolcache/node/18.20.2/x64/bin/node", npm_config_init_version: "1.0.0", npm_package_dependencies__emoji_mart_react: "^1.0.1", npm_package_dependencies__emoji_mart_data: "^1.0.6", npm_package_dependencies__100mslive_hms_virtual_background: "1.13.10-alpha.16", JAVA_HOME_8_X64: "/usr/lib/jvm/temurin-8-jdk-amd64", NODE_AUTH_TOKEN: "XXXXX-XXXXX-XXXXX-XXXXX", SHLVL: "1", npm_package_dependencies__radix_ui_react_tooltip: "1.0.6", npm_package_dependencies__radix_ui_react_popover: "1.0.6", npm_package_dependencies__100mslive_types_prebuilt: "0.12.8", npm_package_peerDependencies_react: ">=17.0.2 <19.0.0", npm_package_devDependencies__storybook_addon_links: "^7.0.27", npm_package_files_0: "dist", HOME: "/home/runner", npm_package_devDependencies__typescript_eslint_parser: "^5.4.0", npm_package_dependencies__radix_ui_react_dialog: "1.0.4", npm_package_devDependencies__types_react_window: "^1.8.5", npm_package_files_1: "src", npm_package_repository_directory: "packages/roomkit-react", RUNNER_TEMP: "/home/runner/work/_temp", GITHUB_EVENT_PATH: "/home/runner/work/_temp/_github_workflow/event.json", npm_package_scripts_controller: "cd packages/hls-controller && yarn start", npm_package_dependencies__stitches_react: "^1.2.8", JAVA_HOME_11_X64: "/usr/lib/jvm/temurin-11-jdk-amd64", PIPX_BIN_DIR: "/opt/pipx_bin", GITHUB_REPOSITORY_OWNER: "100mslive", npm_package_engines_node: ">=16", npm_package_devDependencies_typedoc_plugin_markdown: "^3.14.0", npm_config_init_license: "MIT", GRADLE_HOME: "/usr/share/gradle-8.7", ANDROID_NDK_LATEST_HOME: "/usr/local/lib/android/sdk/ndk/26.3.11579264", JAVA_HOME_21_X64: "/usr/lib/jvm/temurin-21-jdk-amd64", STATS_RDCL: "true", GITHUB_RETENTION_DAYS: "90", YARN_WRAP_OUTPUT: "false", npm_config_version_tag_prefix: "v", GITHUB_REPOSITORY_OWNER_ID: "73883131", POWERSHELL_DISTRIBUTION_CHANNEL: "GitHub-Actions-ubuntu22", AZURE_EXTENSION_DIR: "/opt/az/azcliextensions", GITHUB_HEAD_REF: "", npm_package_scripts_lint_fix: "yarn lint --fix", npm_config_userconfig: "/home/runner/work/_temp/.npmrc", npm_package_devDependencies__storybook_addon_a11y: "^7.0.27", SYSTEMD_EXEC_PID: "592", npm_package_scripts_postinstall: "husky install && lerna bootstrap", npm_package_devDependencies_husky: "^6.0.0", npm_package_dependencies_recordrtc: "^5.6.2", npm_package_dependencies_eventemitter2: "^6.4.9", npm_package_dependencies__radix_ui_react_label: "1.0.0", npm_package_dependencies__radix_ui_react_dropdown_menu: "2.0.5", npm_package_keywords_0: "100mslive", GITHUB_GRAPHQL_URL: "https://api.github.com/graphql", npm_package_description: "100ms Room Kit provides simple & easy to use UI components to build Live Streaming & Video Conferencing experiences in your apps.", npm_package_devDependencies_typescript: "~4.7.4", npm_package_devDependencies_typedoc: "^0.24.8", npm_package_devDependencies_babel_loader: "^8.2.5", npm_package_keywords_1: "react", GOROOT_1_20_X64: "/opt/hostedtoolcache/go/1.20.14/x64", NVM_DIR: "/home/runner/.nvm", npm_package_readmeFilename: "README.md", npm_package_devDependencies_react: "^18.1.0", npm_package_devDependencies__babel_preset_env: "^7.22.5", npm_package_keywords_2: "prebuilt", DOTNET_SKIP_FIRST_TIME_EXPERIENCE: "1", GOROOT_1_21_X64: "/opt/hostedtoolcache/go/1.21.10/x64", JAVA_HOME_17_X64: "/usr/lib/jvm/temurin-17-jdk-amd64", ImageVersion: "20240516.1.0", npm_package_devDependencies_prettier: "^2.4.1", npm_package_devDependencies_babel_jest: "^26.6.0", npm_package_scripts_dev: "node ../../scripts/dev", npm_package_keywords_3: "roomkit", RUNNER_OS: "Linux", GITHUB_API_URL: "https://api.github.com", GOROOT_1_22_X64: "/opt/hostedtoolcache/go/1.22.3/x64", SWIFT_PATH: "/usr/share/swift/usr/bin", FORCE_COLOR: "true", npm_package_dependencies__radix_ui_react_toast: "1.0.0", npm_package_dependencies__radix_ui_react_radio_group: "1.0.0", npm_package_dependencies__100mslive_hms_noise_cancellation: "0.0.1", npm_package_devDependencies__babel_preset_typescript: "^7.22.5", npm_package_exports___default: "./dist/index.js", RUNNER_USER: "runner", STATS_V3PS: "true", CHROMEWEBDRIVER: "/usr/local/share/chromedriver-linux64", JOURNAL_STREAM: "8:18099", GITHUB_WORKFLOW: "Publish Packages", _: "/usr/local/bin/yarn", npm_package_devDependencies_ts_jest: "26.5.6", npm_package_devDependencies_lerna: "^5.6.2", npm_package_devDependencies__types_jest: "^27.0.3", npm_package_devDependencies__commitlint_config_conventional: "^15.0.0", npm_package_private: "true", npm_package_dependencies__radix_ui_react_accordion: "1.0.0", npm_package_devDependencies__babel_preset_react: "^7.22.5", npm_package_module: "dist/index.js", npm_package_scripts_lint: "eslint -c .eslintrc --no-error-on-unmatched-pattern src --ext .js --ext .jsx --ext .ts --ext .tsx", npm_package_devDependencies__typescript_eslint_eslint_plugin: "^5.4.0", npm_config_registry: "https://registry.yarnpkg.com", npm_package_dependencies_react_window: "^1.8.7", npm_package_dependencies__100mslive_hls_player: "0.3.10-alpha.16", npm_package_devDependencies__types_lodash_merge: "^4.6.6", npm_package_devDependencies__storybook_cli: "^7.0.27", ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE: "/opt/actionarchivecache", STATS_D: "false", GITHUB_RUN_ID: "9125057107", STATS_VMFE: "true", npm_package_workspaces_0: "packages/*", npm_package_scripts_store: "cd packages/hms-video-store && yarn start", npm_package_devDependencies__babel_core: "^7.18.2", npm_package_dependencies_ts_pattern: "4.3.0", npm_package_devDependencies__storybook_addon_interactions: "^7.0.27", npm_package_devDependencies__storybook_addon_actions: "^7.0.27", GITHUB_REF_TYPE: "branch", BOOTSTRAP_HASKELL_NONINTERACTIVE: "1", GITHUB_WORKFLOW_SHA: "a59fc418ff4591c05259eb505d14722bfcd1aa85", GITHUB_BASE_REF: "", ImageOS: "ubuntu22", npm_package_workspaces_1: "examples/*", npm_package_scripts_start: 'concurrently "yarn dev" "yarn types"', npm_config_ignore_scripts: "", NX_TASK_HASH: "2a9cbdf41e33644c293a7ebff3f2c13d40a88a677ff956457c353788dea079b6", npm_package_exports___import: "./dist/index.js", STATS_BLT: "true", GITHUB_WORKFLOW_REF: "100mslive/web-sdks/.github/workflows/publish.yml@refs/heads/publish-alpha", PERFLOG_LOCATION_SETTING: "RUNNER_PERFLOG", GITHUB_ACTION_REPOSITORY: "", npm_package_scripts_prebuilt: "cd packages/roomkit-react && yarn start", npm_package_devDependencies_postcss_loader: "^6.2.1", npm_package_devDependencies_esbuild_loader: "^4.0.2", PATH: "/tmp/yarn--1715933548667-0.6423566383006052:/home/runner/work/web-sdks/web-sdks/packages/roomkit-react/node_modules/.bin:/home/runner/.config/yarn/link/node_modules/.bin:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/opt/hostedtoolcache/node/18.20.2/x64/libexec/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.2/x64/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.2/x64/bin/node_modules/npm/bin/node-gyp-bin:/tmp/yarn--1715933548447-0.7528891189447335:/home/runner/work/web-sdks/web-sdks/packages/roomkit-react/node_modules/.bin:/home/runner/.config/yarn/link/node_modules/.bin:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/opt/hostedtoolcache/node/18.20.2/x64/libexec/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.2/x64/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.2/x64/bin/node_modules/npm/bin/node-gyp-bin:/tmp/yarn--1715933522951-0.3597444289510985:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/home/runner/.config/yarn/link/node_modules/.bin:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/opt/hostedtoolcache/node/18.20.2/x64/libexec/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.2/x64/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.2/x64/bin/node_modules/npm/bin/node-gyp-bin:/tmp/yarn--1715933522766-0.7051953603800425:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/home/runner/.config/yarn/link/node_modules/.bin:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/opt/hostedtoolcache/node/18.20.2/x64/libexec/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.2/x64/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.2/x64/bin/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.2/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin", NODE: "/opt/hostedtoolcache/node/18.20.2/x64/bin/node", ANT_HOME: "/usr/share/ant", DOTNET_MULTILEVEL_LOOKUP: "0", RUNNER_TRACKING_ID: "github_a22def78-4bb2-4f81-8386-ef225240d25d", INVOCATION_ID: "8425a3d32ffe47e991d5b7b1330d5cf2", NPM_CONFIG_USERCONFIG: "/home/runner/work/_temp/.npmrc", RUNNER_TOOL_CACHE: "/opt/hostedtoolcache", npm_package_scripts_size: "size-limit", npm_package_devDependencies_size_limit: "^5.0.3", npm_package_name: "@100mslive/roomkit-react", npm_package_devDependencies__storybook_react_webpack5: "^7.0.27", npm_package_repository_type: "git", GITHUB_ACTION: "__run_3", GITHUB_RUN_NUMBER: "543", GITHUB_TRIGGERING_ACTOR: "github-actions[bot]", RUNNER_ARCH: "X64", XDG_RUNTIME_DIR: "/run/user/1001", AGENT_TOOLSDIRECTORY: "/opt/hostedtoolcache", npm_package_lint_staged____js_ts_jsx_tsx_: "eslint", npm_package_devDependencies_babel_plugin_istanbul: "^6.1.1", LERNA_PACKAGE_NAME: "@100mslive/roomkit-react", npm_package_dependencies__radix_ui_react_select: "1.0.0", npm_package_size_limit_0_limit: "20 KB", npm_package_devDependencies__commitlint_cli: "^15.0.0", LANG: "C.UTF-8", VCPKG_INSTALLATION_ROOT: "/usr/local/share/vcpkg", npm_package_size_limit_1_limit: "20 KB", npm_package_devDependencies_eslint_plugin_simple_import_sort: "^8.0.0", npm_package_devDependencies_eslint: "^8.9.0", npm_package_dependencies_react_intersection_observer: "^9.4.3", npm_package_devDependencies__types_mdx: "2.0.2", CONDA: "/usr/share/miniconda", RUNNER_NAME: "GitHub Actions 364", XDG_CONFIG_HOME: "/home/runner/.config", STATS_VMD: "true", GITHUB_REF_NAME: "publish-alpha", GITHUB_REPOSITORY: "100mslive/web-sdks", STATS_D_D: "false", npm_lifecycle_script: "rm -rf dist && node ../../scripts/build-webapp", npm_package_size_limit_2_limit: "400 KB", npm_package_resolutions_loader_utils: "^2.0.4", npm_package_devDependencies_dotenv: "^14.2.0", npm_package_dependencies__radix_ui_react_slider: "1.0.0", npm_package_scripts_types_build: "tsc -p tsconfig.json", npm_package_main: "dist/index.cjs.js", STATS_UE: "true", ANDROID_NDK_ROOT: "/usr/local/lib/android/sdk/ndk/25.2.9519653", GITHUB_ACTION_REF: "", DEBIAN_FRONTEND: "noninteractive", npm_package_size_limit_3_limit: "20 KB", npm_package_size_limit_0_path: "packages/hms-video-store/dist/index.cjs.js", npm_package_scripts_cypress_open: "cypress open", npm_package_scripts_lerna_publish: "lerna publish from-package --dist-tag $PUBLISH_FLAG --yes --no-verify-access", npm_package_scripts_test: "yarn build --no-private && lerna run test", npm_package_devDependencies_concurrently: "^6.4.0", npm_config_version_git_message: "v%s", npm_package_dependencies__radix_ui_react_checkbox: "1.0.0", npm_package_dependencies__100mslive_react_icons: "0.10.10-alpha.16", npm_package_scripts_types: "tsc -w", GITHUB_REPOSITORY_ID: "429826515", GITHUB_ACTIONS: "true", npm_lifecycle_event: "build:only", npm_package_version: "0.3.10-alpha.16", npm_package_size_limit_4_limit: "20 KB", npm_package_size_limit_1_path: "packages/hms-video-store/dist/index.js", npm_package_scripts_build_only: "rm -rf dist && node ../../scripts/build-webapp", npm_package_devDependencies__types_react: "^18.1.0", npm_package_sideEffects: "false", npm_package_repository_url: "https://github.com/100mslive/web-sdks.git", npm_package_source: "src/index.ts", GITHUB_REF_PROTECTED: "true", npm_config_argv: '{"remain":[],"cooked":["run","test"],"original":["test"]}', npm_package_size_limit_5_limit: "20 KB", npm_package_size_limit_2_path: "packages/roomkit-react/dist/index.cjs.js", npm_package_scripts_build: "yarn build:only && yarn types:build", npm_package_devDependencies_tslib: "^2.2.0", npm_package_devDependencies_nx: "^14.5.1", npm_package_devDependencies_lint_staged: "^12.0.3", NX_CLI_SET: "true", npm_package_dependencies_uuid: "^8.3.2", npm_package_dependencies_react_virtualized_auto_sizer: "^1.0.7", npm_package_dependencies_lodash_merge: "^4.6.2", npm_package_dependencies_emoji_mart: "^5.2.2", GITHUB_WORKSPACE: "/home/runner/work/web-sdks/web-sdks", ACCEPT_EULA: "Y", GITHUB_JOB: "publish_packages", RUNNER_PERFLOG: "/home/runner/perflog", npm_package_size_limit_6_limit: "150 KB", npm_package_size_limit_3_path: "packages/roomkit-react/dist/index.js", npm_package_devDependencies_cypress: "^9.5.2", GITHUB_SHA: "a59fc418ff4591c05259eb505d14722bfcd1aa85", GITHUB_RUN_ATTEMPT: "1", npm_package_size_limit_7_limit: "100 KB", npm_package_size_limit_4_path: "packages/hms-virtual-background/dist/index.cjs.js", npm_config_version_git_tag: "true", npm_config_version_git_sign: "", npm_package_dependencies_qrcode_react: "^3.1.0", GITHUB_REF: "refs/heads/publish-alpha", GITHUB_ACTOR: "github-actions[bot]", ANDROID_SDK_ROOT: "/usr/local/lib/android/sdk", npm_package_license: "MIT", npm_package_size_limit_5_path: "packages/hms-virtual-background/dist/index.js", npm_config_strict_ssl: "true", LEIN_HOME: "/usr/local/lib/lein", npm_package_size_limit_6_path: "packages/react-icons/dist/index.cjs.js", npm_package_scripts_format: "prettier -w src/**", npm_package_devDependencies_eslint_plugin_prettier: "^4.0.0", npm_package_devDependencies_eslint_config_react_app: "^7.0.0", NX_TASK_TARGET_PROJECT: "@100mslive/roomkit-react", GITHUB_PATH: "/home/runner/work/_temp/_runner_file_commands/add_path_6bf9302c-fce8-49fc-b87b-e75aa85840dc", JAVA_HOME: "/usr/lib/jvm/temurin-11-jdk-amd64", PWD: "/home/runner/work/web-sdks/web-sdks/packages/roomkit-react", GITHUB_ACTOR_ID: "41898282", RUNNER_WORKSPACE: "/home/runner/work/web-sdks", npm_execpath: "/usr/local/lib/node_modules/yarn/bin/yarn.js", npm_package_size_limit_7_path: "packages/react-icons/dist/index.js", npm_package_scripts_ybys: "yarn && yarn build --no-private && yarn storybook", npm_package_dependencies__radix_ui_react_progress: "1.0.0", HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS: "3650", STATS_TIS: "mining", GITHUB_EVENT_NAME: "workflow_dispatch", HOMEBREW_NO_AUTO_UPDATE: "1", ANDROID_HOME: "/usr/local/lib/android/sdk", GITHUB_SERVER_URL: "https://github.com", GECKOWEBDRIVER: "/usr/local/share/gecko_driver", LEIN_JAR: "/usr/local/lib/lein/self-installs/leiningen-2.11.2-standalone.jar", GHCUP_INSTALL_BASE_PREFIX: "/usr/local", GITHUB_OUTPUT: "/home/runner/work/_temp/_runner_file_commands/set_output_6bf9302c-fce8-49fc-b87b-e75aa85840dc", npm_package_scripts_prestart: "rm -rf dist && yarn types:build", npm_package_author_name: "100ms", EDGEWEBDRIVER: "/usr/local/share/edge_driver", STATS_EXT: "true", npm_package_scripts_build_storybook: "sb build", npm_package_devDependencies_postcss: "^8.4.5", npm_package_devDependencies_esbuild: "^0.18.13", npm_config_save_prefix: "^", npm_config_ignore_optional: "", npm_package_dependencies_worker_timers: "^7.0.40", npm_package_typings: "dist/index.d.ts", ANDROID_NDK: "/usr/local/lib/android/sdk/ndk/25.2.9519653", SGX_AESM_ADDR: "1", CHROME_BIN: "/usr/bin/google-chrome", npm_package_scripts_storybook: "sb dev -p 6006", npm_package_devDependencies_esbuild_plugin_postcss2: "0.1.1", npm_package_dependencies_react_swipeable: "^7.0.1", npm_package_devDependencies_babel_plugin_react_require: "3.1.3", npm_package_devDependencies__storybook_testing_library: "^0.2.0", npm_package_devDependencies__storybook_addon_essentials: "^7.0.27", SELENIUM_JAR_PATH: "/usr/share/java/selenium-server.jar", STATS_EXTP: "https://provjobdsettingscdn.blob.core.windows.net/settings/provjobdsettings-0.5.172+1/provjobd.data", npm_package_scripts_reactsdk: "cd packages/react-sdk && yarn start", npm_package_dependencies_react_use: "^17.4.0", npm_package_dependencies__radix_ui_react_collapsible: "1.0.0", npm_package_devDependencies_storybook_dark_mode: "^3.0.0", npm_package_devDependencies__storybook_react: "^7.0.27", INIT_CWD: "/home/runner/work/web-sdks/web-sdks", ANDROID_NDK_HOME: "/usr/local/lib/android/sdk/ndk/25.2.9519653", GITHUB_STEP_SUMMARY: "/home/runner/work/_temp/_runner_file_commands/step_summary_6bf9302c-fce8-49fc-b87b-e75aa85840dc" };
|
38
|
+
define_process_env_default = { GITHUB_STATE: "/home/runner/work/_temp/_runner_file_commands/save_state_0b23aefb-addf-4be1-8f27-daba6b80ee05", npm_package_devDependencies_ts_node: "^10.4.0", npm_package_devDependencies__types_node: "^16.11.17", npm_package_exports___index_css: "./dist/index.css", npm_package_exports___require: "./dist/index.cjs.js", STATS_TRP: "true", DEPLOYMENT_BASEPATH: "/opt/runner", DOTNET_NOLOGO: "1", npm_package_dependencies_screenfull: "^5.1.0", npm_package_dependencies_react_draggable: "^4.4.5", npm_package_dependencies__radix_ui_react_switch: "1.0.0", npm_package_dependencies__100mslive_hms_whiteboard: "0.0.0-alpha.12", USER: "runner", npm_package_devDependencies_jest: "26.6.0", npm_config_version_commit_hooks: "true", npm_config_user_agent: "yarn/1.22.22 npm/? node/v18.20.2 linux x64", npm_config_always_auth: "", NX_WORKSPACE_ROOT: "/home/runner/work/web-sdks/web-sdks", npm_package_scripts_babel: "npx storybook@latest babelrc", CI: "true", npm_package_devDependencies__size_limit_file: "^5.0.3", npm_config_bin_links: "true", npm_config_wrap_output: "", npm_package_dependencies__radix_ui_react_tabs: "1.0.0", npm_package_dependencies__100mslive_react_sdk: "0.10.10-alpha.18", RUNNER_ENVIRONMENT: "github-hosted", GITHUB_ENV: "/home/runner/work/_temp/_runner_file_commands/set_env_0b23aefb-addf-4be1-8f27-daba6b80ee05", PIPX_HOME: "/opt/pipx", npm_node_execpath: "/opt/hostedtoolcache/node/18.20.2/x64/bin/node", npm_config_init_version: "1.0.0", npm_package_dependencies__emoji_mart_react: "^1.0.1", npm_package_dependencies__emoji_mart_data: "^1.0.6", npm_package_dependencies__100mslive_hms_virtual_background: "1.13.10-alpha.18", JAVA_HOME_8_X64: "/usr/lib/jvm/temurin-8-jdk-amd64", NODE_AUTH_TOKEN: "XXXXX-XXXXX-XXXXX-XXXXX", SHLVL: "1", npm_package_dependencies__radix_ui_react_tooltip: "1.0.6", npm_package_dependencies__radix_ui_react_popover: "1.0.6", npm_package_dependencies__100mslive_types_prebuilt: "0.12.8", npm_package_peerDependencies_react: ">=17.0.2 <19.0.0", npm_package_devDependencies__storybook_addon_links: "^7.0.27", npm_package_files_0: "dist", HOME: "/home/runner", npm_package_devDependencies__typescript_eslint_parser: "^5.4.0", npm_package_dependencies__radix_ui_react_dialog: "1.0.4", npm_package_devDependencies__types_react_window: "^1.8.5", npm_package_files_1: "src", npm_package_repository_directory: "packages/roomkit-react", RUNNER_TEMP: "/home/runner/work/_temp", GITHUB_EVENT_PATH: "/home/runner/work/_temp/_github_workflow/event.json", npm_package_scripts_controller: "cd packages/hls-controller && yarn start", npm_package_dependencies__stitches_react: "^1.2.8", JAVA_HOME_11_X64: "/usr/lib/jvm/temurin-11-jdk-amd64", PIPX_BIN_DIR: "/opt/pipx_bin", GITHUB_REPOSITORY_OWNER: "100mslive", npm_package_engines_node: ">=16", npm_package_devDependencies_typedoc_plugin_markdown: "^3.14.0", npm_config_init_license: "MIT", GRADLE_HOME: "/usr/share/gradle-8.7", ANDROID_NDK_LATEST_HOME: "/usr/local/lib/android/sdk/ndk/26.3.11579264", JAVA_HOME_21_X64: "/usr/lib/jvm/temurin-21-jdk-amd64", STATS_RDCL: "true", GITHUB_RETENTION_DAYS: "90", YARN_WRAP_OUTPUT: "false", npm_config_version_tag_prefix: "v", GITHUB_REPOSITORY_OWNER_ID: "73883131", POWERSHELL_DISTRIBUTION_CHANNEL: "GitHub-Actions-ubuntu22", AZURE_EXTENSION_DIR: "/opt/az/azcliextensions", GITHUB_HEAD_REF: "", npm_package_scripts_lint_fix: "yarn lint --fix", npm_config_userconfig: "/home/runner/work/_temp/.npmrc", npm_package_devDependencies__storybook_addon_a11y: "^7.0.27", SYSTEMD_EXEC_PID: "586", npm_package_scripts_postinstall: "husky install && lerna bootstrap", npm_package_devDependencies_husky: "^6.0.0", npm_package_dependencies_recordrtc: "^5.6.2", npm_package_dependencies_eventemitter2: "^6.4.9", npm_package_dependencies__radix_ui_react_label: "1.0.0", npm_package_dependencies__radix_ui_react_dropdown_menu: "2.0.5", npm_package_keywords_0: "100mslive", GITHUB_GRAPHQL_URL: "https://api.github.com/graphql", npm_package_description: "100ms Room Kit provides simple & easy to use UI components to build Live Streaming & Video Conferencing experiences in your apps.", npm_package_devDependencies_typescript: "~4.7.4", npm_package_devDependencies_typedoc: "^0.24.8", npm_package_devDependencies_babel_loader: "^8.2.5", npm_package_keywords_1: "react", GOROOT_1_20_X64: "/opt/hostedtoolcache/go/1.20.14/x64", NVM_DIR: "/home/runner/.nvm", npm_package_readmeFilename: "README.md", npm_package_devDependencies_react: "^18.1.0", npm_package_devDependencies__babel_preset_env: "^7.22.5", npm_package_keywords_2: "prebuilt", DOTNET_SKIP_FIRST_TIME_EXPERIENCE: "1", GOROOT_1_21_X64: "/opt/hostedtoolcache/go/1.21.10/x64", JAVA_HOME_17_X64: "/usr/lib/jvm/temurin-17-jdk-amd64", ImageVersion: "20240516.1.0", npm_package_devDependencies_prettier: "^2.4.1", npm_package_devDependencies_babel_jest: "^26.6.0", npm_package_scripts_dev: "node ../../scripts/dev", npm_package_keywords_3: "roomkit", RUNNER_OS: "Linux", GITHUB_API_URL: "https://api.github.com", GOROOT_1_22_X64: "/opt/hostedtoolcache/go/1.22.3/x64", SWIFT_PATH: "/usr/share/swift/usr/bin", FORCE_COLOR: "true", npm_package_dependencies__radix_ui_react_toast: "1.0.0", npm_package_dependencies__radix_ui_react_radio_group: "1.0.0", npm_package_dependencies__100mslive_hms_noise_cancellation: "0.0.1", npm_package_devDependencies__babel_preset_typescript: "^7.22.5", npm_package_exports___default: "./dist/index.js", RUNNER_USER: "runner", STATS_V3PS: "true", CHROMEWEBDRIVER: "/usr/local/share/chromedriver-linux64", JOURNAL_STREAM: "8:19631", GITHUB_WORKFLOW: "Publish Packages", _: "/usr/local/bin/yarn", npm_package_devDependencies_ts_jest: "26.5.6", npm_package_devDependencies_lerna: "^5.6.2", npm_package_devDependencies__types_jest: "^27.0.3", npm_package_devDependencies__commitlint_config_conventional: "^15.0.0", npm_package_private: "true", npm_package_dependencies__radix_ui_react_accordion: "1.0.0", npm_package_devDependencies__babel_preset_react: "^7.22.5", npm_package_module: "dist/index.js", npm_package_scripts_lint: "eslint -c .eslintrc --no-error-on-unmatched-pattern src --ext .js --ext .jsx --ext .ts --ext .tsx", npm_package_devDependencies__typescript_eslint_eslint_plugin: "^5.4.0", npm_config_registry: "https://registry.yarnpkg.com", npm_package_dependencies_react_window: "^1.8.7", npm_package_dependencies__100mslive_hls_player: "0.3.10-alpha.18", npm_package_devDependencies__types_lodash_merge: "^4.6.6", npm_package_devDependencies__storybook_cli: "^7.0.27", ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE: "/opt/actionarchivecache", STATS_D: "false", GITHUB_RUN_ID: "9174165129", STATS_VMFE: "true", npm_package_workspaces_0: "packages/*", npm_package_scripts_store: "cd packages/hms-video-store && yarn start", npm_package_devDependencies__babel_core: "^7.18.2", npm_package_dependencies_ts_pattern: "4.3.0", npm_package_devDependencies__storybook_addon_interactions: "^7.0.27", npm_package_devDependencies__storybook_addon_actions: "^7.0.27", GITHUB_REF_TYPE: "branch", BOOTSTRAP_HASKELL_NONINTERACTIVE: "1", GITHUB_WORKFLOW_SHA: "9443f8d47837b1c8412b40c4e7569f13311ae46c", GITHUB_BASE_REF: "", ImageOS: "ubuntu22", npm_package_workspaces_1: "examples/*", npm_package_scripts_start: 'concurrently "yarn dev" "yarn types"', npm_config_ignore_scripts: "", NX_TASK_HASH: "b2cd651aab6ce919ab740f5e88e6ae2875141b5f60b2bc53eec4c32b28ce06a3", npm_package_exports___import: "./dist/index.js", GITHUB_WORKFLOW_REF: "100mslive/web-sdks/.github/workflows/publish.yml@refs/heads/publish-alpha", PERFLOG_LOCATION_SETTING: "RUNNER_PERFLOG", GITHUB_ACTION_REPOSITORY: "", npm_package_scripts_prebuilt: "cd packages/roomkit-react && yarn start", npm_package_devDependencies_postcss_loader: "^6.2.1", npm_package_devDependencies_esbuild_loader: "^4.0.2", PATH: "/tmp/yarn--1716292217757-0.573682426448924:/home/runner/work/web-sdks/web-sdks/packages/roomkit-react/node_modules/.bin:/home/runner/.config/yarn/link/node_modules/.bin:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/opt/hostedtoolcache/node/18.20.2/x64/libexec/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.2/x64/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.2/x64/bin/node_modules/npm/bin/node-gyp-bin:/tmp/yarn--1716292217554-0.9181538792073471:/home/runner/work/web-sdks/web-sdks/packages/roomkit-react/node_modules/.bin:/home/runner/.config/yarn/link/node_modules/.bin:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/opt/hostedtoolcache/node/18.20.2/x64/libexec/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.2/x64/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.2/x64/bin/node_modules/npm/bin/node-gyp-bin:/tmp/yarn--1716292191319-0.11113527056323247:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/home/runner/.config/yarn/link/node_modules/.bin:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/opt/hostedtoolcache/node/18.20.2/x64/libexec/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.2/x64/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.2/x64/bin/node_modules/npm/bin/node-gyp-bin:/tmp/yarn--1716292191136-0.37191335937210535:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/home/runner/.config/yarn/link/node_modules/.bin:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/opt/hostedtoolcache/node/18.20.2/x64/libexec/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.2/x64/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.2/x64/bin/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.2/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin", NODE: "/opt/hostedtoolcache/node/18.20.2/x64/bin/node", ANT_HOME: "/usr/share/ant", DOTNET_MULTILEVEL_LOOKUP: "0", RUNNER_TRACKING_ID: "github_08f52606-b814-47d8-b1c6-adc7e054fb1c", INVOCATION_ID: "ed11cdcd5efc4816911d2b6443072be6", NPM_CONFIG_USERCONFIG: "/home/runner/work/_temp/.npmrc", RUNNER_TOOL_CACHE: "/opt/hostedtoolcache", npm_package_scripts_size: "size-limit", npm_package_devDependencies_size_limit: "^5.0.3", npm_package_name: "@100mslive/roomkit-react", npm_package_devDependencies__storybook_react_webpack5: "^7.0.27", npm_package_repository_type: "git", GITHUB_ACTION: "__run_3", GITHUB_RUN_NUMBER: "546", GITHUB_TRIGGERING_ACTOR: "github-actions[bot]", RUNNER_ARCH: "X64", XDG_RUNTIME_DIR: "/run/user/1001", AGENT_TOOLSDIRECTORY: "/opt/hostedtoolcache", npm_package_lint_staged____js_ts_jsx_tsx_: "eslint", npm_package_devDependencies_babel_plugin_istanbul: "^6.1.1", LERNA_PACKAGE_NAME: "@100mslive/roomkit-react", npm_package_dependencies__radix_ui_react_select: "1.0.0", npm_package_size_limit_0_limit: "20 KB", npm_package_devDependencies__commitlint_cli: "^15.0.0", LANG: "C.UTF-8", VCPKG_INSTALLATION_ROOT: "/usr/local/share/vcpkg", npm_package_size_limit_1_limit: "20 KB", npm_package_devDependencies_eslint_plugin_simple_import_sort: "^8.0.0", npm_package_devDependencies_eslint: "^8.9.0", npm_package_dependencies_react_intersection_observer: "^9.4.3", npm_package_devDependencies__types_mdx: "2.0.2", CONDA: "/usr/share/miniconda", RUNNER_NAME: "GitHub Actions 193", XDG_CONFIG_HOME: "/home/runner/.config", STATS_VMD: "true", GITHUB_REF_NAME: "publish-alpha", GITHUB_REPOSITORY: "100mslive/web-sdks", STATS_D_D: "false", npm_lifecycle_script: "rm -rf dist && node ../../scripts/build-webapp", npm_package_size_limit_2_limit: "400 KB", npm_package_resolutions_loader_utils: "^2.0.4", npm_package_devDependencies_dotenv: "^14.2.0", npm_package_dependencies__radix_ui_react_slider: "1.0.0", npm_package_scripts_types_build: "tsc -p tsconfig.json", npm_package_main: "dist/index.cjs.js", STATS_UE: "true", ANDROID_NDK_ROOT: "/usr/local/lib/android/sdk/ndk/25.2.9519653", GITHUB_ACTION_REF: "", DEBIAN_FRONTEND: "noninteractive", npm_package_size_limit_3_limit: "20 KB", npm_package_size_limit_0_path: "packages/hms-video-store/dist/index.cjs.js", npm_package_scripts_cypress_open: "cypress open", npm_package_scripts_lerna_publish: "lerna publish from-package --dist-tag $PUBLISH_FLAG --yes --no-verify-access", npm_package_scripts_test: "yarn build --no-private && lerna run test", npm_package_devDependencies_concurrently: "^6.4.0", npm_config_version_git_message: "v%s", npm_package_dependencies__radix_ui_react_checkbox: "1.0.0", npm_package_dependencies__100mslive_react_icons: "0.10.10-alpha.18", npm_package_scripts_types: "tsc -w", GITHUB_REPOSITORY_ID: "429826515", GITHUB_ACTIONS: "true", npm_lifecycle_event: "build:only", npm_package_version: "0.3.10-alpha.18", npm_package_size_limit_4_limit: "20 KB", npm_package_size_limit_1_path: "packages/hms-video-store/dist/index.js", npm_package_scripts_build_only: "rm -rf dist && node ../../scripts/build-webapp", npm_package_devDependencies__types_react: "^18.1.0", npm_package_sideEffects: "false", npm_package_repository_url: "https://github.com/100mslive/web-sdks.git", npm_package_source: "src/index.ts", GITHUB_REF_PROTECTED: "true", npm_config_argv: '{"remain":[],"cooked":["run","test"],"original":["test"]}', npm_package_size_limit_5_limit: "20 KB", npm_package_size_limit_2_path: "packages/roomkit-react/dist/index.cjs.js", npm_package_scripts_build: "yarn build:only && yarn types:build", npm_package_devDependencies_tslib: "^2.2.0", npm_package_devDependencies_nx: "^14.5.1", npm_package_devDependencies_lint_staged: "^12.0.3", NX_CLI_SET: "true", npm_package_dependencies_uuid: "^8.3.2", npm_package_dependencies_react_virtualized_auto_sizer: "^1.0.7", npm_package_dependencies_lodash_merge: "^4.6.2", npm_package_dependencies_emoji_mart: "^5.2.2", GITHUB_WORKSPACE: "/home/runner/work/web-sdks/web-sdks", ACCEPT_EULA: "Y", GITHUB_JOB: "publish_packages", RUNNER_PERFLOG: "/home/runner/perflog", npm_package_size_limit_6_limit: "150 KB", npm_package_size_limit_3_path: "packages/roomkit-react/dist/index.js", npm_package_devDependencies_cypress: "^9.5.2", GITHUB_SHA: "9443f8d47837b1c8412b40c4e7569f13311ae46c", GITHUB_RUN_ATTEMPT: "1", npm_package_size_limit_7_limit: "100 KB", npm_package_size_limit_4_path: "packages/hms-virtual-background/dist/index.cjs.js", npm_config_version_git_tag: "true", npm_config_version_git_sign: "", npm_package_dependencies_qrcode_react: "^3.1.0", GITHUB_REF: "refs/heads/publish-alpha", GITHUB_ACTOR: "github-actions[bot]", ANDROID_SDK_ROOT: "/usr/local/lib/android/sdk", npm_package_license: "MIT", npm_package_size_limit_5_path: "packages/hms-virtual-background/dist/index.js", npm_config_strict_ssl: "true", LEIN_HOME: "/usr/local/lib/lein", npm_package_size_limit_6_path: "packages/react-icons/dist/index.cjs.js", npm_package_scripts_format: "prettier -w src/**", npm_package_devDependencies_eslint_plugin_prettier: "^4.0.0", npm_package_devDependencies_eslint_config_react_app: "^7.0.0", NX_TASK_TARGET_PROJECT: "@100mslive/roomkit-react", GITHUB_PATH: "/home/runner/work/_temp/_runner_file_commands/add_path_0b23aefb-addf-4be1-8f27-daba6b80ee05", JAVA_HOME: "/usr/lib/jvm/temurin-11-jdk-amd64", PWD: "/home/runner/work/web-sdks/web-sdks/packages/roomkit-react", GITHUB_ACTOR_ID: "41898282", RUNNER_WORKSPACE: "/home/runner/work/web-sdks", npm_execpath: "/usr/local/lib/node_modules/yarn/bin/yarn.js", npm_package_size_limit_7_path: "packages/react-icons/dist/index.js", npm_package_scripts_ybys: "yarn && yarn build --no-private && yarn storybook", npm_package_dependencies__radix_ui_react_progress: "1.0.0", HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS: "3650", STATS_TIS: "mining", GITHUB_EVENT_NAME: "workflow_dispatch", HOMEBREW_NO_AUTO_UPDATE: "1", ANDROID_HOME: "/usr/local/lib/android/sdk", GITHUB_SERVER_URL: "https://github.com", GECKOWEBDRIVER: "/usr/local/share/gecko_driver", LEIN_JAR: "/usr/local/lib/lein/self-installs/leiningen-2.11.2-standalone.jar", GHCUP_INSTALL_BASE_PREFIX: "/usr/local", GITHUB_OUTPUT: "/home/runner/work/_temp/_runner_file_commands/set_output_0b23aefb-addf-4be1-8f27-daba6b80ee05", npm_package_scripts_prestart: "rm -rf dist && yarn types:build", npm_package_author_name: "100ms", EDGEWEBDRIVER: "/usr/local/share/edge_driver", STATS_EXT: "true", npm_package_scripts_build_storybook: "sb build", npm_package_devDependencies_postcss: "^8.4.5", npm_package_devDependencies_esbuild: "^0.18.13", npm_config_save_prefix: "^", npm_config_ignore_optional: "", npm_package_dependencies_worker_timers: "^7.0.40", npm_package_typings: "dist/index.d.ts", ANDROID_NDK: "/usr/local/lib/android/sdk/ndk/25.2.9519653", SGX_AESM_ADDR: "1", CHROME_BIN: "/usr/bin/google-chrome", npm_package_scripts_storybook: "sb dev -p 6006", npm_package_devDependencies_esbuild_plugin_postcss2: "0.1.1", npm_package_dependencies_react_swipeable: "^7.0.1", npm_package_devDependencies_babel_plugin_react_require: "3.1.3", npm_package_devDependencies__storybook_testing_library: "^0.2.0", npm_package_devDependencies__storybook_addon_essentials: "^7.0.27", SELENIUM_JAR_PATH: "/usr/share/java/selenium-server.jar", STATS_EXTP: "https://provjobdsettingscdn.blob.core.windows.net/settings/provjobdsettings-0.5.172+1/provjobd.data", npm_package_scripts_reactsdk: "cd packages/react-sdk && yarn start", npm_package_dependencies_react_use: "^17.4.0", npm_package_dependencies__radix_ui_react_collapsible: "1.0.0", npm_package_devDependencies_storybook_dark_mode: "^3.0.0", npm_package_devDependencies__storybook_react: "^7.0.27", INIT_CWD: "/home/runner/work/web-sdks/web-sdks", ANDROID_NDK_HOME: "/usr/local/lib/android/sdk/ndk/25.2.9519653", GITHUB_STEP_SUMMARY: "/home/runner/work/_temp/_runner_file_commands/step_summary_0b23aefb-addf-4be1-8f27-daba6b80ee05" };
|
39
39
|
}
|
40
40
|
});
|
41
41
|
|
@@ -5557,15 +5557,15 @@ var require_ua_parser = __commonJS({
|
|
5557
5557
|
}
|
5558
5558
|
};
|
5559
5559
|
var rgxMapper = function(ua, arrays) {
|
5560
|
-
var i = 0,
|
5560
|
+
var i = 0, j2, k2, p, q2, matches, match16;
|
5561
5561
|
while (i < arrays.length && !matches) {
|
5562
5562
|
var regex = arrays[i], props = arrays[i + 1];
|
5563
|
-
|
5564
|
-
while (
|
5565
|
-
if (!regex[
|
5563
|
+
j2 = k2 = 0;
|
5564
|
+
while (j2 < regex.length && !matches) {
|
5565
|
+
if (!regex[j2]) {
|
5566
5566
|
break;
|
5567
5567
|
}
|
5568
|
-
matches = regex[
|
5568
|
+
matches = regex[j2++].exec(ua);
|
5569
5569
|
if (!!matches) {
|
5570
5570
|
for (p = 0; p < props.length; p++) {
|
5571
5571
|
match16 = matches[++k2];
|
@@ -5597,8 +5597,8 @@ var require_ua_parser = __commonJS({
|
|
5597
5597
|
}, strMapper = function(str, map) {
|
5598
5598
|
for (var i in map) {
|
5599
5599
|
if (typeof map[i] === OBJ_TYPE && map[i].length > 0) {
|
5600
|
-
for (var
|
5601
|
-
if (has(map[i][
|
5600
|
+
for (var j2 = 0; j2 < map[i].length; j2++) {
|
5601
|
+
if (has(map[i][j2], str)) {
|
5602
5602
|
return i === UNKNOWN ? undefined2 : i;
|
5603
5603
|
}
|
5604
5604
|
}
|
@@ -7622,8 +7622,8 @@ var require_sdp = __commonJS({
|
|
7622
7622
|
const parsed = {};
|
7623
7623
|
let kv;
|
7624
7624
|
const parts = line.substring(line.indexOf(" ") + 1).split(";");
|
7625
|
-
for (let
|
7626
|
-
kv = parts[
|
7625
|
+
for (let j2 = 0; j2 < parts.length; j2++) {
|
7626
|
+
kv = parts[j2].trim().split("=");
|
7627
7627
|
parsed[kv[0].trim()] = kv[1];
|
7628
7628
|
}
|
7629
7629
|
return parsed;
|
@@ -8603,8 +8603,8 @@ var require_parser = __commonJS({
|
|
8603
8603
|
media.push({ rtp: [], fmtp: [] });
|
8604
8604
|
location = media[media.length - 1];
|
8605
8605
|
}
|
8606
|
-
for (var
|
8607
|
-
var obj = grammar[type][
|
8606
|
+
for (var j2 = 0; j2 < (grammar[type] || []).length; j2 += 1) {
|
8607
|
+
var obj = grammar[type][j2];
|
8608
8608
|
if (obj.reg.test(content)) {
|
8609
8609
|
return parseReg(obj, location, content);
|
8610
8610
|
}
|
@@ -9048,7 +9048,6 @@ var defaultThemeMap = {
|
|
9048
9048
|
// src/Prebuilt/common/constants.ts
|
9049
9049
|
init_define_process_env();
|
9050
9050
|
import { parsedUserAgent } from "@100mslive/react-sdk";
|
9051
|
-
var DEFAULT_WAITING_VIEWER_ROLE = "waiting-room";
|
9052
9051
|
var QUERY_PARAM_PREVIEW_AS_ROLE = "preview_as_role";
|
9053
9052
|
var UI_MODE_GRID = "grid";
|
9054
9053
|
var MAX_TOASTS = 5;
|
@@ -9072,7 +9071,6 @@ var APP_DATA = {
|
|
9072
9071
|
appConfig: "appConfig",
|
9073
9072
|
sidePane: "sidePane",
|
9074
9073
|
hlsStats: "hlsStats",
|
9075
|
-
waitingViewerRole: "waitingViewerRole",
|
9076
9074
|
subscribedNotifications: "subscribedNotifications",
|
9077
9075
|
logo: "logo",
|
9078
9076
|
hlsStarted: "hlsStarted",
|
@@ -11853,14 +11851,14 @@ var Collapsible = {
|
|
11853
11851
|
|
11854
11852
|
// src/Prebuilt/App.tsx
|
11855
11853
|
init_define_process_env();
|
11856
|
-
import React179, { useEffect as
|
11854
|
+
import React179, { useEffect as useEffect74, useRef as useRef30 } from "react";
|
11857
11855
|
import { match as match15 } from "ts-pattern";
|
11858
11856
|
import {
|
11859
11857
|
HMSReactiveStore,
|
11860
11858
|
HMSRoomProvider,
|
11861
11859
|
selectIsConnectedToRoom as selectIsConnectedToRoom13,
|
11862
11860
|
useHMSActions as useHMSActions56,
|
11863
|
-
useHMSStore as
|
11861
|
+
useHMSStore as useHMSStore97
|
11864
11862
|
} from "@100mslive/react-sdk";
|
11865
11863
|
|
11866
11864
|
// src/Prebuilt/components/AppData/AppData.tsx
|
@@ -11986,9 +11984,6 @@ var useSetUiSettings = (uiSettingKey) => {
|
|
11986
11984
|
});
|
11987
11985
|
return [value, setValue];
|
11988
11986
|
};
|
11989
|
-
var useWaitingViewerRole = () => {
|
11990
|
-
return useHMSStore2(selectAppData(APP_DATA.waitingViewerRole));
|
11991
|
-
};
|
11992
11987
|
var useAuthToken = () => {
|
11993
11988
|
return useHMSStore2(selectAppData(APP_DATA.authToken));
|
11994
11989
|
};
|
@@ -12416,18 +12411,19 @@ var isMobileUserAgent = /Mobi|Android|iPhone/i.test(navigator.userAgent);
|
|
12416
12411
|
var getPeerResponses = (questions, peerid, userid) => {
|
12417
12412
|
return questions.map(
|
12418
12413
|
(question) => question.responses?.filter(
|
12419
|
-
(response) =>
|
12414
|
+
(response) => response && (response.peer?.peerid === peerid || response.peer?.userid === userid) && !response.skipped
|
12420
12415
|
)
|
12421
12416
|
);
|
12422
12417
|
};
|
12423
|
-
var
|
12424
|
-
|
12425
|
-
|
12426
|
-
|
12427
|
-
|
12418
|
+
var getIndexToShow = (responses) => {
|
12419
|
+
let lastAttemptedIndex = 0;
|
12420
|
+
Object.keys(responses).forEach((key) => {
|
12421
|
+
const keyNum = parseInt(key);
|
12422
|
+
if (keyNum > lastAttemptedIndex && responses[key]) {
|
12423
|
+
lastAttemptedIndex = keyNum;
|
12428
12424
|
}
|
12429
|
-
}
|
12430
|
-
return
|
12425
|
+
});
|
12426
|
+
return lastAttemptedIndex + 1;
|
12431
12427
|
};
|
12432
12428
|
|
12433
12429
|
// src/Prebuilt/provider/roomLayoutProvider/hooks/useRoomLayoutScreen.ts
|
@@ -12600,7 +12596,6 @@ var initialAppData = {
|
|
12600
12596
|
[APP_DATA.hlsStarted]: false,
|
12601
12597
|
[APP_DATA.rtmpStarted]: false,
|
12602
12598
|
[APP_DATA.recordingStarted]: false,
|
12603
|
-
[APP_DATA.waitingViewerRole]: DEFAULT_WAITING_VIEWER_ROLE,
|
12604
12599
|
[APP_DATA.dropdownList]: [],
|
12605
12600
|
[APP_DATA.authToken]: "",
|
12606
12601
|
[APP_DATA.minimiseInset]: false,
|
@@ -12830,7 +12825,7 @@ var AuthToken_default = AuthToken;
|
|
12830
12825
|
|
12831
12826
|
// src/Prebuilt/components/ConferenceScreen.tsx
|
12832
12827
|
init_define_process_env();
|
12833
|
-
import React157, { useEffect as
|
12828
|
+
import React157, { useEffect as useEffect55, useRef as useRef28, useState as useState67 } from "react";
|
12834
12829
|
import { v4 as uuid3 } from "uuid";
|
12835
12830
|
import {
|
12836
12831
|
HMSRoomState as HMSRoomState7,
|
@@ -12838,7 +12833,7 @@ import {
|
|
12838
12833
|
selectIsConnectedToRoom as selectIsConnectedToRoom10,
|
12839
12834
|
selectRoomState as selectRoomState7,
|
12840
12835
|
useHMSActions as useHMSActions48,
|
12841
|
-
useHMSStore as
|
12836
|
+
useHMSStore as useHMSStore86
|
12842
12837
|
} from "@100mslive/react-sdk";
|
12843
12838
|
|
12844
12839
|
// src/Prebuilt/components/Footer/Footer.tsx
|
@@ -14019,18 +14014,22 @@ var useDropdownList = ({ name, open }) => {
|
|
14019
14014
|
|
14020
14015
|
// src/Prebuilt/common/hooks.ts
|
14021
14016
|
init_define_process_env();
|
14022
|
-
import { useCallback as useCallback8, useEffect as useEffect12, useRef as useRef10, useState as useState11 } from "react";
|
14017
|
+
import { useCallback as useCallback8, useEffect as useEffect12, useMemo as useMemo5, useRef as useRef10, useState as useState11 } from "react";
|
14023
14018
|
import { useMedia as useMedia3 } from "react-use";
|
14024
14019
|
import { JoinForm_JoinBtnType as JoinForm_JoinBtnType2 } from "@100mslive/types-prebuilt/elements/join_form";
|
14025
14020
|
import {
|
14026
14021
|
parsedUserAgent as parsedUserAgent2,
|
14027
14022
|
selectAvailableRoleNames,
|
14023
|
+
selectIsAllowedToPublish,
|
14028
14024
|
selectIsConnectedToRoom,
|
14025
|
+
selectLocalPeerRole,
|
14029
14026
|
selectPeerCount as selectPeerCount2,
|
14030
14027
|
selectPeerMetadata,
|
14031
14028
|
selectPeers,
|
14029
|
+
selectPeersByRoles,
|
14032
14030
|
selectRecordingState,
|
14033
14031
|
selectRemotePeers,
|
14032
|
+
selectRolesMap,
|
14034
14033
|
useHMSActions as useHMSActions8,
|
14035
14034
|
useHMSStore as useHMSStore10,
|
14036
14035
|
useHMSVanillaStore as useHMSVanillaStore4
|
@@ -14171,6 +14170,27 @@ function getResolution(recordingResolution) {
|
|
14171
14170
|
}
|
14172
14171
|
return resolution;
|
14173
14172
|
}
|
14173
|
+
function useWaitingRoomInfo() {
|
14174
|
+
const localPeerRole = useHMSStore10(selectLocalPeerRole);
|
14175
|
+
const { video, audio, screen } = useHMSStore10(selectIsAllowedToPublish);
|
14176
|
+
const roles = useHMSStore10(selectRolesMap);
|
14177
|
+
const peersByRoles = useHMSStore10(selectPeersByRoles(localPeerRole?.subscribeParams.subscribeToRoles || []));
|
14178
|
+
const isNotAllowedToPublish = video && audio && screen;
|
14179
|
+
const isScreenOnlyPublishParams = screen;
|
14180
|
+
const hasSubscribedRolePublishing = useMemo5(() => {
|
14181
|
+
return peersByRoles.some((peer) => {
|
14182
|
+
if (peer.roleName && roles[peer.roleName] && !peer.isLocal) {
|
14183
|
+
return !!roles[peer.roleName].publishParams?.allowed.length;
|
14184
|
+
}
|
14185
|
+
return false;
|
14186
|
+
});
|
14187
|
+
}, [peersByRoles, roles]);
|
14188
|
+
return {
|
14189
|
+
isNotAllowedToPublish,
|
14190
|
+
isScreenOnlyPublishParams,
|
14191
|
+
hasSubscribedRolePublishing
|
14192
|
+
};
|
14193
|
+
}
|
14174
14194
|
|
14175
14195
|
// src/Prebuilt/components/EmojiReaction.jsx
|
14176
14196
|
init({ data });
|
@@ -14229,7 +14249,7 @@ import {
|
|
14229
14249
|
selectIsConnectedToRoom as selectIsConnectedToRoom5,
|
14230
14250
|
selectPeersByCondition,
|
14231
14251
|
selectPermissions as selectPermissions4,
|
14232
|
-
selectRolesMap,
|
14252
|
+
selectRolesMap as selectRolesMap2,
|
14233
14253
|
useHMSActions as useHMSActions9,
|
14234
14254
|
useHMSStore as useHMSStore14
|
14235
14255
|
} from "@100mslive/react-sdk";
|
@@ -14573,7 +14593,7 @@ var LeaveRoom = ({
|
|
14573
14593
|
const isConnected = useHMSStore14(selectIsConnectedToRoom5);
|
14574
14594
|
const permissions = useHMSStore14(selectPermissions4);
|
14575
14595
|
const isMobile = useMedia5(config.media.md);
|
14576
|
-
const rolesMap = useHMSStore14(
|
14596
|
+
const rolesMap = useHMSStore14(selectRolesMap2);
|
14577
14597
|
const streamingPermissionRoles = Object.keys(rolesMap).filter((roleName) => {
|
14578
14598
|
const roleObj = rolesMap[roleName];
|
14579
14599
|
return roleObj.permissions.hlsStreaming;
|
@@ -15571,7 +15591,7 @@ var StartRecording_default = StartRecording;
|
|
15571
15591
|
|
15572
15592
|
// src/Prebuilt/components/StatsForNerds.jsx
|
15573
15593
|
init_define_process_env();
|
15574
|
-
import React48, { useEffect as useEffect14, useMemo as
|
15594
|
+
import React48, { useEffect as useEffect14, useMemo as useMemo6, useRef as useRef13, useState as useState19 } from "react";
|
15575
15595
|
import { match as match3, P as P2 } from "ts-pattern";
|
15576
15596
|
import {
|
15577
15597
|
selectHMSStats as selectHMSStats3,
|
@@ -15583,7 +15603,7 @@ import {
|
|
15583
15603
|
} from "@100mslive/react-sdk";
|
15584
15604
|
var StatsForNerds = ({ onOpenChange }) => {
|
15585
15605
|
const tracksWithLabels = useTracksWithLabel();
|
15586
|
-
const statsOptions =
|
15606
|
+
const statsOptions = useMemo6(
|
15587
15607
|
() => [{ id: "local-peer", label: "Local Peer Stats" }, ...tracksWithLabels],
|
15588
15608
|
[tracksWithLabels]
|
15589
15609
|
);
|
@@ -15655,7 +15675,7 @@ var useTracksWithLabel = () => {
|
|
15655
15675
|
const tracksMap = useHMSStore17(selectTracksMap2);
|
15656
15676
|
const peersMap = useHMSStore17(selectPeersMap);
|
15657
15677
|
const localPeerID = useHMSStore17(selectLocalPeerID2);
|
15658
|
-
const tracksWithLabels =
|
15678
|
+
const tracksWithLabels = useMemo6(
|
15659
15679
|
() => Object.values(tracksMap).reduce((res, track) => {
|
15660
15680
|
const peerName = peersMap[track.peerId]?.name;
|
15661
15681
|
const isLocalTrack = track.peerId === localPeerID;
|
@@ -18418,7 +18438,7 @@ import { v4 as to } from "uuid";
|
|
18418
18438
|
import { v4 as ao } from "uuid";
|
18419
18439
|
import { v4 as lo } from "uuid";
|
18420
18440
|
import { EventEmitter2 as uo } from "eventemitter2";
|
18421
|
-
var
|
18441
|
+
var wt = __toESM(require_lib());
|
18422
18442
|
import { EventEmitter2 as Uo } from "eventemitter2";
|
18423
18443
|
import { v4 as Fo } from "uuid";
|
18424
18444
|
import { EventEmitter2 as Go } from "eventemitter2";
|
@@ -18427,7 +18447,7 @@ import { v4 as $o } from "uuid";
|
|
18427
18447
|
import { v4 as jo } from "uuid";
|
18428
18448
|
var Ca = Object.defineProperty;
|
18429
18449
|
var La = Object.defineProperties;
|
18430
|
-
var
|
18450
|
+
var Da = Object.getOwnPropertyDescriptors;
|
18431
18451
|
var Ft = Object.getOwnPropertySymbols;
|
18432
18452
|
var Kr = Object.prototype.hasOwnProperty;
|
18433
18453
|
var qr = Object.prototype.propertyIsEnumerable;
|
@@ -18440,7 +18460,7 @@ var S = (a2, e) => {
|
|
18440
18460
|
qr.call(e, t) && $r(a2, t, e[t]);
|
18441
18461
|
return a2;
|
18442
18462
|
};
|
18443
|
-
var M = (a2, e) => La(a2,
|
18463
|
+
var M = (a2, e) => La(a2, Da(e));
|
18444
18464
|
var Zi = (a2, e) => {
|
18445
18465
|
var t = {};
|
18446
18466
|
for (var i in a2)
|
@@ -18452,14 +18472,14 @@ var Zi = (a2, e) => {
|
|
18452
18472
|
};
|
18453
18473
|
var Na = (a2, e) => () => (e || a2((e = { exports: {} }).exports, e), e.exports);
|
18454
18474
|
var nr = Na((kc, $a) => {
|
18455
|
-
$a.exports = { version: "0.12.10-alpha.
|
18475
|
+
$a.exports = { version: "0.12.10-alpha.18", license: "MIT", repository: { type: "git", url: "https://github.com/100mslive/web-sdks.git", directory: "packages/hms-video-store" }, main: "dist/index.cjs.js", module: "dist/index.js", typings: "dist/index.d.ts", files: ["dist", "src"], engines: { node: ">=12" }, exports: { ".": { require: "./dist/index.cjs.js", import: "./dist/index.js", default: "./dist/index.js" } }, sideEffects: false, scripts: { prestart: "rm -rf dist && yarn types:build", start: 'concurrently "yarn dev" "yarn types"', dev: "node ../../scripts/dev", "build:only": "node ../../scripts/build", build: "yarn build:only && yarn types:build", types: "tsc -w", "types:build": "tsc -p tsconfig.json", format: "prettier --write src/**/*.ts", test: "jest --maxWorkers=1", "test:watch": "jest --watch", "test:coverage": "jest --coverage", lint: "eslint -c ../../.eslintrc .", "lint:fix": "yarn lint --fix", prepare: "yarn build", size: "size-limit", analyze: "size-limit --why", docs: "rm -rf ./docs && typedoc && rm -f ./docs/README.md && mkdir ./docs/home &&mv ./docs/modules.md ./docs/home/content.md && node ../../scripts/docs-store && npx prettier --write './docs/**/*'" }, name: "@100mslive/hms-video-store", author: "100ms", dependencies: { eventemitter2: "^6.4.9", immer: "^9.0.6", "lodash.isequal": "^4.5.0", reselect: "4.0.0", "sdp-transform": "^2.14.1", "ua-parser-js": "^1.0.1", uuid: "^8.3.2", "webrtc-adapter": "^8.0.0", zustand: "3.5.7" }, devDependencies: { "@types/dom-screen-wake-lock": "^1.0.1", "@types/lodash.isequal": "^4.5.8", "@types/sdp-transform": "^2.4.4", "@types/ua-parser-js": "^0.7.36", "@types/uuid": "^8.3.0", "jest-canvas-mock": "^2.3.1", "jsdom-worker": "^0.3.0", tslib: "^2.2.0" }, description: "@100mslive Core SDK which abstracts the complexities of webRTC while providing a reactive store for data management with a unidirectional data flow", keywords: ["video", "webrtc", "conferencing", "100ms"] };
|
18456
18476
|
});
|
18457
18477
|
var er = ((n) => (n.Disconnected = "Disconnected", n.Preview = "Preview", n.Connecting = "Connecting", n.Connected = "Connected", n.Reconnecting = "Reconnecting", n.Disconnecting = "Disconnecting", n.Failed = "Failed", n))(er || {});
|
18458
18478
|
var Oa = ((e) => (e.CHAT = "chat", e))(Oa || {});
|
18459
18479
|
var jr = ((t) => (t.INFO = "info", t.ERROR = "error", t))(jr || {});
|
18460
|
-
var tr = ((
|
18480
|
+
var tr = ((D) => (D.PEER_JOINED = "PEER_JOINED", D.PEER_LEFT = "PEER_LEFT", D.PEER_LIST = "PEER_LIST", D.NEW_MESSAGE = "NEW_MESSAGE", D.ERROR = "ERROR", D.RECONNECTING = "RECONNECTING", D.RECONNECTED = "RECONNECTED", D.TRACK_ADDED = "TRACK_ADDED", D.TRACK_REMOVED = "TRACK_REMOVED", D.TRACK_MUTED = "TRACK_MUTED", D.TRACK_UNMUTED = "TRACK_UNMUTED", D.TRACK_DEGRADED = "TRACK_DEGRADED", D.TRACK_RESTORED = "TRACK_RESTORED", D.TRACK_DESCRIPTION_CHANGED = "TRACK_DESCRIPTION_CHANGED", D.ROLE_UPDATED = "ROLE_UPDATED", D.CHANGE_TRACK_STATE_REQUEST = "CHANGE_TRACK_STATE_REQUEST", D.CHANGE_MULTI_TRACK_STATE_REQUEST = "CHANGE_MULTI_TRACK_STATE_REQUEST", D.ROOM_ENDED = "ROOM_ENDED", D.REMOVED_FROM_ROOM = "REMOVED_FROM_ROOM", D.DEVICE_CHANGE_UPDATE = "DEVICE_CHANGE_UPDATE", D.PLAYLIST_TRACK_ENDED = "PLAYLIST_TRACK_ENDED", D.NAME_UPDATED = "NAME_UPDATED", D.METADATA_UPDATED = "METADATA_UPDATED", D.POLL_CREATED = "POLL_CREATED", D.POLL_STARTED = "POLL_STARTED", D.POLL_STOPPED = "POLL_STOPPED", D.POLL_VOTES_UPDATED = "POLL_VOTES_UPDATED", D.POLLS_LIST = "POLLS_LIST", D.HAND_RAISE_CHANGED = "HAND_RAISE_CHANGED", D))(tr || {});
|
18461
18481
|
var Jr = ((t) => (t.audio = "audio", t.video = "video", t))(Jr || {});
|
18462
|
-
function
|
18482
|
+
function Ce(a2, e) {
|
18463
18483
|
let t, i;
|
18464
18484
|
if (e)
|
18465
18485
|
for (let r of e.auxiliaryTracks) {
|
@@ -18565,9 +18585,9 @@ d.level = Ua ? 7 : 0;
|
|
18565
18585
|
var pe = new import_ua_parser_js.UAParser();
|
18566
18586
|
var N = typeof window != "undefined";
|
18567
18587
|
var Xr;
|
18568
|
-
var
|
18569
|
-
var
|
18570
|
-
var xn =
|
18588
|
+
var Le = typeof window == "undefined" && !((Xr = pe.getBrowser().name) != null && Xr.toLowerCase().includes("electron"));
|
18589
|
+
var Ba = () => !Le;
|
18590
|
+
var xn = Ba();
|
18571
18591
|
var Zr;
|
18572
18592
|
var es;
|
18573
18593
|
var is = ((es = (Zr = pe.getBrowser()) == null ? void 0 : Zr.name) == null ? void 0 : es.toLowerCase()) === "firefox";
|
@@ -18579,7 +18599,7 @@ function Fa() {
|
|
18579
18599
|
}
|
18580
18600
|
return "CUSTOM";
|
18581
18601
|
}
|
18582
|
-
var
|
18602
|
+
var Be = Fa();
|
18583
18603
|
var y = { WebSocketConnectionErrors: { FAILED_TO_CONNECT: 1e3, WEBSOCKET_CONNECTION_LOST: 1003, ABNORMAL_CLOSE: 1006 }, APIErrors: { SERVER_ERRORS: 2e3, INIT_CONFIG_NOT_AVAILABLE: 2002, ENDPOINT_UNREACHABLE: 2003, INVALID_TOKEN_FORMAT: 2004 }, TracksErrors: { GENERIC_TRACK: 3e3, CANT_ACCESS_CAPTURE_DEVICE: 3001, DEVICE_NOT_AVAILABLE: 3002, DEVICE_IN_USE: 3003, DEVICE_LOST_MIDWAY: 3004, NOTHING_TO_RETURN: 3005, INVALID_VIDEO_SETTINGS: 3006, CODEC_CHANGE_NOT_PERMITTED: 3007, AUTOPLAY_ERROR: 3008, OVER_CONSTRAINED: 3009, NO_AUDIO_DETECTED: 3010, SYSTEM_DENIED_PERMISSION: 3011, CURRENT_TAB_NOT_SHARED: 3012, AUDIO_PLAYBACK_ERROR: 3013, SELECTED_DEVICE_MISSING: 3014 }, WebrtcErrors: { CREATE_OFFER_FAILED: 4001, CREATE_ANSWER_FAILED: 4002, SET_LOCAL_DESCRIPTION_FAILED: 4003, SET_REMOTE_DESCRIPTION_FAILED: 4004, ICE_FAILURE: 4005, ICE_DISCONNECTED: 4006, STATS_FAILED: 4007 }, WebsocketMethodErrors: { SERVER_ERRORS: 5e3, ALREADY_JOINED: 5001, CANNOT_JOIN_PREVIEW_IN_PROGRESS: 5002 }, GenericErrors: { NOT_CONNECTED: 6e3, SIGNALLING: 6001, UNKNOWN: 6002, NOT_READY: 6003, JSON_PARSING_FAILED: 6004, TRACK_METADATA_MISSING: 6005, RTC_TRACK_MISSING: 6006, PEER_METADATA_MISSING: 6007, INVALID_ROLE: 6008, PREVIEW_IN_PROGRESS: 6009, MISSING_MEDIADEVICES: 6010, MISSING_RTCPEERCONNECTION: 6011, LOCAL_STORAGE_ACCESS_DENIED: 6012, VALIDATION_FAILED: 6013 }, PlaylistErrors: { NO_ENTRY_TO_PLAY: 8001, NO_ENTRY_IS_PLAYING: 8002 } };
|
18584
18604
|
var f = class a extends Error {
|
18585
18605
|
constructor(t, i, r, s, o, n = false) {
|
@@ -18786,79 +18806,79 @@ function re(a2) {
|
|
18786
18806
|
}
|
18787
18807
|
var ns = nr().version;
|
18788
18808
|
function at(a2 = "prod", e) {
|
18789
|
-
let t = "web", i =
|
18790
|
-
if (
|
18791
|
-
return cs({ os: "web_nodejs", os_version: process.version, sdk: t, sdk_version: ns, env: i, domain:
|
18809
|
+
let t = "web", i = Be !== "LOCAL" && a2 === "prod" ? "prod" : "debug";
|
18810
|
+
if (Le)
|
18811
|
+
return cs({ os: "web_nodejs", os_version: process.version, sdk: t, sdk_version: ns, env: i, domain: Be, is_prebuilt: !!(e != null && e.isPrebuilt), framework: "node", framework_version: process.version, framework_sdk_version: e == null ? void 0 : e.sdkVersion });
|
18792
18812
|
let r = pe.getOS(), s = pe.getDevice(), o = pe.getBrowser(), n = cr(`web_${r.name}`), l = r.version || "", u = cr(`${o.name}_${o.version}`), p = u;
|
18793
|
-
return s.type && (p = `${cr(`${s.vendor}_${s.type}`)}/${u}`), cs({ os: n, os_version: l, sdk: t, sdk_version: ns, device_model: p, env: i, domain:
|
18813
|
+
return s.type && (p = `${cr(`${s.vendor}_${s.type}`)}/${u}`), cs({ os: n, os_version: l, sdk: t, sdk_version: ns, device_model: p, env: i, domain: Be, is_prebuilt: !!(e != null && e.isPrebuilt), framework: e == null ? void 0 : e.type, framework_version: e == null ? void 0 : e.version, framework_sdk_version: e == null ? void 0 : e.sdkVersion });
|
18794
18814
|
}
|
18795
18815
|
function cr(a2) {
|
18796
18816
|
return a2.replace(/ /g, "_");
|
18797
18817
|
}
|
18798
18818
|
var cs = (a2, e = ",") => Object.keys(a2).filter((t) => re(a2[t])).map((t) => `${t}:${a2[t]}`).join(e);
|
18799
|
-
var
|
18819
|
+
var C = class {
|
18800
18820
|
constructor({ name: e, level: t, properties: i, includesPII: r, timestamp: s }) {
|
18801
18821
|
this.metadata = { peer: {}, userAgent: at() };
|
18802
18822
|
this.name = e, this.level = t, this.includesPII = r || false, this.properties = i || {}, this.timestamp = s || (/* @__PURE__ */ new Date()).getTime(), this.event_id = Ka(), this.device_id = as();
|
18803
18823
|
}
|
18804
18824
|
toSignalParams() {
|
18805
|
-
return { name: this.name, info: M(S({}, this.properties), { timestamp: this.timestamp, domain:
|
18825
|
+
return { name: this.name, info: M(S({}, this.properties), { timestamp: this.timestamp, domain: Be }), timestamp: (/* @__PURE__ */ new Date()).getTime() };
|
18806
18826
|
}
|
18807
18827
|
};
|
18808
18828
|
var k = class {
|
18809
18829
|
static connect(e, t, i = /* @__PURE__ */ new Date(), r = /* @__PURE__ */ new Date(), s) {
|
18810
18830
|
let o = this.eventNameFor("connect", e === void 0), n = e ? 2 : 1, l = this.getPropertiesWithError(M(S({}, t), { [this.KEY_REQUESTED_AT]: i == null ? void 0 : i.getTime(), [this.KEY_RESPONDED_AT]: r == null ? void 0 : r.getTime(), endpoint: s }), e);
|
18811
|
-
return new
|
18831
|
+
return new C({ name: o, level: n, properties: l });
|
18812
18832
|
}
|
18813
18833
|
static disconnect(e, t) {
|
18814
18834
|
let i = "disconnected", r = e ? 2 : 1, s = this.getPropertiesWithError(t, e);
|
18815
|
-
return new
|
18835
|
+
return new C({ name: i, level: r, properties: s });
|
18816
18836
|
}
|
18817
18837
|
static preview(i) {
|
18818
18838
|
var r = i, { error: e } = r, t = Zi(r, ["error"]);
|
18819
18839
|
let s = this.eventNameFor("preview", e === void 0), o = e ? 2 : 1, n = this.getPropertiesWithError(t, e);
|
18820
|
-
return new
|
18840
|
+
return new C({ name: s, level: o, properties: n });
|
18821
18841
|
}
|
18822
18842
|
static join(i) {
|
18823
18843
|
var r = i, { error: e } = r, t = Zi(r, ["error"]);
|
18824
18844
|
let s = this.eventNameFor("join", e === void 0), o = e ? 2 : 1, n = this.getPropertiesWithError(M(S({}, t), { is_preview_called: !!t.is_preview_called }), e);
|
18825
|
-
return new
|
18845
|
+
return new C({ name: s, level: o, properties: n });
|
18826
18846
|
}
|
18827
18847
|
static publish({ devices: e, settings: t, error: i }) {
|
18828
18848
|
let r = this.eventNameFor("publish", i === void 0), s = i ? 2 : 1, o = this.getPropertiesWithError({ devices: e, audio: t == null ? void 0 : t.audio, video: t == null ? void 0 : t.video }, i);
|
18829
|
-
return new
|
18849
|
+
return new C({ name: r, level: s, properties: o });
|
18830
18850
|
}
|
18831
18851
|
static hlsPlayerError(e) {
|
18832
|
-
return new
|
18852
|
+
return new C({ name: "hlsPlayerError", level: 2, properties: this.getErrorProperties(e) });
|
18833
18853
|
}
|
18834
18854
|
static subscribeFail(e) {
|
18835
18855
|
let t = this.eventNameFor("subscribe", false), i = 2, r = this.getErrorProperties(e);
|
18836
|
-
return new
|
18856
|
+
return new C({ name: t, level: i, properties: r });
|
18837
18857
|
}
|
18838
18858
|
static leave() {
|
18839
|
-
return new
|
18859
|
+
return new C({ name: "leave", level: 1 });
|
18840
18860
|
}
|
18841
18861
|
static autoplayError() {
|
18842
|
-
return new
|
18862
|
+
return new C({ name: "autoplayError", level: 2 });
|
18843
18863
|
}
|
18844
18864
|
static audioPlaybackError(e) {
|
18845
|
-
return new
|
18865
|
+
return new C({ name: "audioPlaybackError", level: 2, properties: this.getErrorProperties(e) });
|
18846
18866
|
}
|
18847
18867
|
static deviceChange({ isUserSelection: e, selection: t, type: i, devices: r, error: s }) {
|
18848
18868
|
let o = this.eventNameFor(s ? "publish" : `device.${i}`, s === void 0), n = s ? 2 : 1, l = this.getPropertiesWithError({ selection: t, devices: r, isUserSelection: e }, s);
|
18849
|
-
return new
|
18869
|
+
return new C({ name: o, level: n, properties: l });
|
18850
18870
|
}
|
18851
18871
|
static performance(e) {
|
18852
18872
|
let t = "perf.stats", i = 1, r = e.toAnalyticsProperties();
|
18853
|
-
return new
|
18873
|
+
return new C({ name: t, level: i, properties: r });
|
18854
18874
|
}
|
18855
18875
|
static rtcStats(e) {
|
18856
18876
|
let t = "rtc.stats", i = 1, r = e.toAnalyticsProperties();
|
18857
|
-
return new
|
18877
|
+
return new C({ name: t, level: i, properties: r });
|
18858
18878
|
}
|
18859
18879
|
static rtcStatsFailed(e) {
|
18860
18880
|
let t = "rtc.stats.failed", i = 2;
|
18861
|
-
return new
|
18881
|
+
return new C({ name: t, level: i, properties: this.getErrorProperties(e) });
|
18862
18882
|
}
|
18863
18883
|
static degradationStats(e, t) {
|
18864
18884
|
let i = "video.degradation.stats", r = 1, s = { degradedAt: e.degradedAt, trackId: e.trackId };
|
@@ -18866,23 +18886,23 @@ var k = class {
|
|
18866
18886
|
let o = /* @__PURE__ */ new Date(), n = o.valueOf() - e.degradedAt.valueOf();
|
18867
18887
|
s = M(S({}, s), { duration: n, restoredAt: o });
|
18868
18888
|
}
|
18869
|
-
return new
|
18889
|
+
return new C({ name: i, level: r, properties: s });
|
18870
18890
|
}
|
18871
18891
|
static audioDetectionFail(e, t) {
|
18872
18892
|
let i = this.getPropertiesWithError({ device: t }, e), r = 2, s = "audiopresence.failed";
|
18873
|
-
return new
|
18893
|
+
return new C({ name: s, level: r, properties: i });
|
18874
18894
|
}
|
18875
18895
|
static previewNetworkQuality(e) {
|
18876
|
-
return new
|
18896
|
+
return new C({ name: "perf.networkquality.preview", level: e.error ? 2 : 1, properties: e });
|
18877
18897
|
}
|
18878
18898
|
static publishStats(e) {
|
18879
|
-
return new
|
18899
|
+
return new C({ name: "publisher.stats", level: 1, properties: e });
|
18880
18900
|
}
|
18881
18901
|
static subscribeStats(e) {
|
18882
|
-
return new
|
18902
|
+
return new C({ name: "subscriber.stats", level: 1, properties: e });
|
18883
18903
|
}
|
18884
18904
|
static getKrispUsage(e) {
|
18885
|
-
return new
|
18905
|
+
return new C({ name: "krisp.usage", level: 1, properties: { duration: e } });
|
18886
18906
|
}
|
18887
18907
|
static eventNameFor(e, t) {
|
18888
18908
|
return `${e}.${t ? "success" : "failed"}`;
|
@@ -18947,7 +18967,7 @@ var pr = ((t) => (t.SIP = "sip", t.REGULAR = "regular", t))(pr || {});
|
|
18947
18967
|
var ms = ((n) => (n.NONE = "none", n.INITIALISED = "initialised", n.STARTED = "started", n.PAUSED = "paused", n.RESUMED = "resumed", n.STOPPED = "stopped", n.FAILED = "failed", n))(ms || {});
|
18948
18968
|
var Ss = ((t) => (t.DVR = "dvr", t.NO_DVR = "no-dvr", t))(Ss || {});
|
18949
18969
|
var gs = ((i) => (i.REGULAR = "regular", i.SCREEN = "screen", i.COMPOSITE = "composite", i))(gs || {});
|
18950
|
-
var Ts = ((
|
18970
|
+
var Ts = ((r) => (r.INITIALISED = "initialised", r.STARTED = "started", r.STOPPED = "stopped", r.FAILED = "failed", r))(Ts || {});
|
18951
18971
|
var fs = ((e) => (e.CAPTION = "caption", e))(fs || {});
|
18952
18972
|
var vs = ((i) => (i.videoInput = "videoInput", i.audioInput = "audioInput", i.audioOutput = "audioOutput", i))(vs || {});
|
18953
18973
|
var hr = class {
|
@@ -18977,7 +18997,7 @@ var hr = class {
|
|
18977
18997
|
return e || d.w(this.TAG, "IntersectionObserver is not supported, fallback will be used instead"), e;
|
18978
18998
|
}
|
18979
18999
|
};
|
18980
|
-
var
|
19000
|
+
var Ps = new hr();
|
18981
19001
|
var mr = class {
|
18982
19002
|
constructor() {
|
18983
19003
|
this.TAG = "[HMSResizeObserverWrapper]";
|
@@ -19005,7 +19025,7 @@ var mr = class {
|
|
19005
19025
|
return e || d.w(this.TAG, "Resize Observer is not supported"), e;
|
19006
19026
|
}
|
19007
19027
|
};
|
19008
|
-
var
|
19028
|
+
var Es = new mr();
|
19009
19029
|
var Sr = ((t) => (t.TRANSFORM = "TRANSFORM", t.ANALYZE = "ANALYZE", t))(Sr || {});
|
19010
19030
|
var gr = ((t) => (t["2D"] = "2d", t.WEBGL = "webgl", t.WEBGL2 = "webgl2", t))(gr || {});
|
19011
19031
|
var Is = "https://event.100ms.live/v2/client/report";
|
@@ -19014,34 +19034,34 @@ var ut = Math.pow(2, 31) - 1;
|
|
19014
19034
|
var Qe = class {
|
19015
19035
|
};
|
19016
19036
|
Qe.makePeerId = () => lo();
|
19017
|
-
var
|
19037
|
+
var V = (a2) => a2.room;
|
19018
19038
|
var po = (a2) => a2.errors;
|
19019
19039
|
var Eh = createSelector(po, (a2) => a2.length === 0 ? null : a2.at(-1));
|
19020
|
-
var
|
19040
|
+
var Ah = createSelector(V, (a2) => a2.id);
|
19021
19041
|
var G = (a2) => a2.peers;
|
19022
19042
|
var ai = (a2) => a2.messages.byID;
|
19023
19043
|
var xs = (a2) => a2.messages.allIDs;
|
19024
|
-
var
|
19044
|
+
var w = (a2) => a2.tracks;
|
19025
19045
|
var br = (a2) => a2.appData;
|
19026
19046
|
var ho = (a2) => a2.speakers;
|
19027
|
-
var
|
19028
|
-
var
|
19047
|
+
var He = createSelector([V], (a2) => a2 && a2.isConnected);
|
19048
|
+
var Rh = createSelector([He, V], (a2, e) => a2 ? e.peerCount !== void 0 ? e.peerCount || 1 : e.peers.length : Math.max(e.peerCount !== void 0 ? e.peerCount : e.peers.length - 1, 0));
|
19029
19049
|
var mo = (a2) => a2.hideLocalPeer;
|
19030
|
-
var le = createSelector([
|
19031
|
-
var So = createSelector(
|
19032
|
-
var z = createSelector(
|
19033
|
-
var
|
19034
|
-
var
|
19035
|
-
var
|
19050
|
+
var le = createSelector([V, G, mo], (a2, e, t) => t ? a2.peers.filter((i) => a2.localPeer !== i).map((i) => e[i]) : a2.peers.map((i) => e[i]));
|
19051
|
+
var So = createSelector(w, (a2) => Object.values(a2));
|
19052
|
+
var z = createSelector(V, G, (a2, e) => e[a2.localPeer]);
|
19053
|
+
var fe = createSelector(V, (a2) => a2.localPeer);
|
19054
|
+
var Hh = createSelector(z, (a2) => a2 == null ? void 0 : a2.name);
|
19055
|
+
var Ch = createSelector(z, (a2) => a2 == null ? void 0 : a2.roleName);
|
19036
19056
|
var te = createSelector(z, (a2) => a2 == null ? void 0 : a2.audioTrack);
|
19037
|
-
var
|
19057
|
+
var j = createSelector(z, (a2) => a2 == null ? void 0 : a2.videoTrack);
|
19038
19058
|
var go = createSelector(z, (a2) => a2 == null ? void 0 : a2.auxiliaryTracks);
|
19039
|
-
var
|
19059
|
+
var Vs = createSelector([te, j, go], (a2, e, t) => {
|
19040
19060
|
let i = t ? [...t] : [];
|
19041
19061
|
return a2 && i.unshift(a2), e && i.unshift(e), i;
|
19042
19062
|
});
|
19043
|
-
var
|
19044
|
-
var
|
19063
|
+
var Lh = createSelector(le, (a2) => a2.filter((e) => !e.isLocal));
|
19064
|
+
var Dh = createSelector(G, ho, (a2, e) => {
|
19045
19065
|
let t = Object.entries(e).sort((i, r) => {
|
19046
19066
|
var n, l;
|
19047
19067
|
let s = ((n = i[1]) == null ? void 0 : n.audioLevel) || 0;
|
@@ -19054,53 +19074,53 @@ var Lh = createSelector(G, ho, (a2, e) => {
|
|
19054
19074
|
}
|
19055
19075
|
return null;
|
19056
19076
|
});
|
19057
|
-
var Rr = createSelector(z,
|
19058
|
-
let { video: t, audio: i } =
|
19077
|
+
var Rr = createSelector(z, w, (a2, e) => {
|
19078
|
+
let { video: t, audio: i } = Ce(e, a2);
|
19059
19079
|
return !!(t || i);
|
19060
19080
|
});
|
19061
|
-
var To = createSelector(G,
|
19081
|
+
var To = createSelector(G, w, (a2, e) => {
|
19062
19082
|
let t;
|
19063
19083
|
for (let i in a2) {
|
19064
|
-
let r = a2[i], { video: s, audio: o } =
|
19084
|
+
let r = a2[i], { video: s, audio: o } = Ce(e, r);
|
19065
19085
|
if (s)
|
19066
19086
|
return r;
|
19067
19087
|
o && !t && (t = r);
|
19068
19088
|
}
|
19069
19089
|
return t;
|
19070
19090
|
});
|
19071
|
-
var
|
19072
|
-
var
|
19091
|
+
var _h = createSelector(To, (a2) => !!a2);
|
19092
|
+
var Nh = createSelector(G, w, (a2, e) => {
|
19073
19093
|
for (let t in a2) {
|
19074
|
-
let i = a2[t], { audio: r, video: s } =
|
19094
|
+
let i = a2[t], { audio: r, video: s } = Ce(e, i);
|
19075
19095
|
if (!s && r)
|
19076
19096
|
return i;
|
19077
19097
|
}
|
19078
19098
|
});
|
19079
|
-
var
|
19099
|
+
var Oh = createSelector(G, w, (a2, e) => {
|
19080
19100
|
let t = [], i = [];
|
19081
19101
|
for (let r in a2) {
|
19082
|
-
let s = a2[r], { video: o, audio: n } =
|
19102
|
+
let s = a2[r], { video: o, audio: n } = Ce(e, s);
|
19083
19103
|
o ? t.push(s) : n && i.push(s);
|
19084
19104
|
}
|
19085
19105
|
return t.concat(i);
|
19086
19106
|
});
|
19087
|
-
var
|
19107
|
+
var xh = createSelector(G, w, (a2, e) => {
|
19088
19108
|
for (let t in e) {
|
19089
19109
|
let i = e[t];
|
19090
19110
|
if (rt(i) && it(i) && i.peerId)
|
19091
19111
|
return a2[i.peerId];
|
19092
19112
|
}
|
19093
19113
|
});
|
19094
|
-
var
|
19114
|
+
var Uh = createSelector(G, w, (a2, e) => {
|
19095
19115
|
for (let t in e) {
|
19096
19116
|
let i = e[t];
|
19097
19117
|
if ($t(i) && i.peerId)
|
19098
19118
|
return a2[i.peerId];
|
19099
19119
|
}
|
19100
19120
|
});
|
19101
|
-
var
|
19121
|
+
var Vh = createSelector(So, (a2) => a2.filter(Qr));
|
19102
19122
|
var Bh = createSelector(xs, (a2) => a2.length);
|
19103
|
-
var
|
19123
|
+
var Fh = createSelector(ai, (a2) => Object.values(a2).filter((e) => !e.read).length);
|
19104
19124
|
var St = createSelector(xs, ai, (a2, e) => {
|
19105
19125
|
let t = [];
|
19106
19126
|
return a2.forEach((i) => {
|
@@ -19111,36 +19131,36 @@ var fo = createSelector(St, (a2) => a2.filter((e) => {
|
|
19111
19131
|
var t;
|
19112
19132
|
return !e.recipientPeer && !(e.recipientRoles && ((t = e.recipientRoles) == null ? void 0 : t.length) > 0);
|
19113
19133
|
}));
|
19114
|
-
var
|
19115
|
-
var Y = createSelector([
|
19134
|
+
var Gh = createSelector(fo, (a2) => a2.filter((e) => !e.read).length);
|
19135
|
+
var Y = createSelector([V], (a2) => a2 && a2.roomState);
|
19116
19136
|
var Fs = createSelector(Y, (a2) => a2 === "Preview");
|
19117
|
-
var
|
19118
|
-
var
|
19137
|
+
var Wh = createSelector(V, (a2) => a2.roomState !== "Disconnected");
|
19138
|
+
var $h = createSelector(V, (a2) => !a2.transcriptions || a2.transcriptions.length <= 0 ? false : a2.transcriptions.some((e) => e.mode === "caption" && e.state === "started"));
|
19119
19139
|
var ue = (a2) => a2.roles;
|
19120
|
-
var
|
19140
|
+
var Kh = createSelector([ue], (a2) => Object.keys(a2));
|
19121
19141
|
var oi = createSelector([z, ue], (a2, e) => a2 != null && a2.roleName ? e[a2.roleName] : null);
|
19122
19142
|
var vo = (a2) => {
|
19123
19143
|
var e;
|
19124
19144
|
return (e = a2.preview) == null ? void 0 : e.asRole;
|
19125
19145
|
};
|
19126
19146
|
var Gs = createSelector([vo, ue], (a2, e) => a2 ? e[a2] : null);
|
19127
|
-
var
|
19147
|
+
var qh = createSelector([oi], (a2) => {
|
19128
19148
|
var e;
|
19129
19149
|
return (e = a2 == null ? void 0 : a2.subscribeParams) != null && e.subscribeToRoles ? a2.subscribeParams.subscribeToRoles.length > 0 : false;
|
19130
19150
|
});
|
19131
19151
|
var Ws = createSelector(oi, (a2) => a2 == null ? void 0 : a2.permissions);
|
19132
|
-
var
|
19133
|
-
var
|
19134
|
-
var
|
19135
|
-
var
|
19136
|
-
var
|
19137
|
-
var
|
19138
|
-
var
|
19139
|
-
var
|
19152
|
+
var jh = createSelector(V, (a2) => a2.recording);
|
19153
|
+
var Jh = createSelector(V, (a2) => a2.rtmp);
|
19154
|
+
var Qh = createSelector(V, (a2) => a2.hls);
|
19155
|
+
var zh = createSelector(V, (a2) => a2.sessionId);
|
19156
|
+
var Yh = createSelector(V, (a2) => a2.startedAt);
|
19157
|
+
var Xh = createSelector(V, (a2) => !!a2.isLargeRoom);
|
19158
|
+
var Zh = createSelector(V, (a2) => !!a2.isEffectsEnabled);
|
19159
|
+
var em = createSelector(V, (a2) => a2.effectsKey);
|
19140
19160
|
var $s = (a2) => a2.polls;
|
19141
|
-
var
|
19161
|
+
var sm = createSelector(le, (a2) => a2.filter((e) => e.isHandRaised));
|
19142
19162
|
var Mo = (a2) => a2.whiteboards;
|
19143
|
-
var
|
19163
|
+
var am = createSelector(Mo, (a2) => Object.values(a2)[0]);
|
19144
19164
|
var qs = (a2 = "audio") => (e) => e.playlist[a2].list;
|
19145
19165
|
var Hr = (a2 = "audio") => (e) => e.playlist[a2].selection;
|
19146
19166
|
var js = (a2 = "audio") => (e) => e.playlist[a2].progress;
|
@@ -19158,7 +19178,7 @@ function b(a2) {
|
|
19158
19178
|
return (e) => (t) => a2(t, e);
|
19159
19179
|
}
|
19160
19180
|
var gt = "HMS-Store:";
|
19161
|
-
var
|
19181
|
+
var P3 = class {
|
19162
19182
|
static v(e, ...t) {
|
19163
19183
|
this.log(0, e, ...t);
|
19164
19184
|
}
|
@@ -19223,57 +19243,57 @@ var E = class {
|
|
19223
19243
|
}
|
19224
19244
|
}
|
19225
19245
|
};
|
19226
|
-
|
19246
|
+
P3.level = 0;
|
19227
19247
|
var Cr = (a2, e) => e;
|
19228
19248
|
var Tt = (a2, e) => e;
|
19229
19249
|
var ta = (a2, e) => e;
|
19230
19250
|
var yo = (a2, e) => e;
|
19231
19251
|
var ko = (a2, e) => e;
|
19232
19252
|
var W = createSelector([G, Cr], (a2, e) => e ? a2[e] : null);
|
19233
|
-
var Lr = createSelector([
|
19234
|
-
var
|
19253
|
+
var Lr = createSelector([w, Tt], (a2, e) => e ? a2[e] : null);
|
19254
|
+
var Po = createSelector([w, Tt], (a2, e) => {
|
19235
19255
|
if (!e)
|
19236
19256
|
return null;
|
19237
19257
|
let t = a2[e];
|
19238
19258
|
return (t == null ? void 0 : t.type) === "video" ? t : null;
|
19239
19259
|
});
|
19240
|
-
var
|
19260
|
+
var Eo = createSelector([w, Tt], (a2, e) => {
|
19241
19261
|
if (!e)
|
19242
19262
|
return null;
|
19243
19263
|
let t = a2[e];
|
19244
19264
|
return (t == null ? void 0 : t.type) === "audio" ? t : null;
|
19245
19265
|
});
|
19246
|
-
var Ao = createSelector([
|
19266
|
+
var Ao = createSelector([w, Tt], (a2, e) => {
|
19247
19267
|
if (!e)
|
19248
19268
|
return null;
|
19249
19269
|
let t = a2[e];
|
19250
19270
|
return (t == null ? void 0 : t.type) === "audio" && (t == null ? void 0 : t.source) === "screen" ? t : null;
|
19251
19271
|
});
|
19252
|
-
var bo = createSelector([
|
19272
|
+
var bo = createSelector([w, Tt], (a2, e) => {
|
19253
19273
|
if (!e)
|
19254
19274
|
return null;
|
19255
19275
|
let t = a2[e];
|
19256
19276
|
return (t == null ? void 0 : t.type) === "video" && (t == null ? void 0 : t.source) === "screen" ? t : null;
|
19257
19277
|
});
|
19258
19278
|
var Io = createSelector([$s, ko], (a2, e) => e ? a2[e] : null);
|
19259
|
-
var
|
19260
|
-
var
|
19279
|
+
var J = b(W);
|
19280
|
+
var gm = b(createSelector([br, yo], (a2, e) => {
|
19261
19281
|
if (a2)
|
19262
19282
|
return e ? a2[e] : a2;
|
19263
19283
|
}));
|
19264
|
-
function
|
19284
|
+
function Tm(a2) {
|
19265
19285
|
return (e) => {
|
19266
19286
|
if (e.sessionStore)
|
19267
19287
|
return a2 ? e.sessionStore[a2] : e.sessionStore;
|
19268
19288
|
};
|
19269
19289
|
}
|
19270
|
-
var
|
19271
|
-
var
|
19290
|
+
var vm = b(createSelector(W, (a2) => a2 == null ? void 0 : a2.name));
|
19291
|
+
var Mm = b(createSelector(W, (a2) => a2 == null ? void 0 : a2.type));
|
19272
19292
|
var ni = b(Lr);
|
19273
|
-
var ia = b(
|
19274
|
-
var
|
19275
|
-
var
|
19276
|
-
var
|
19293
|
+
var ia = b(Po);
|
19294
|
+
var ym = b(Eo);
|
19295
|
+
var km = b(Ao);
|
19296
|
+
var Pm = b(bo);
|
19277
19297
|
var Ro = b((a2, e) => {
|
19278
19298
|
let t = W(a2, e);
|
19279
19299
|
if (t && t.videoTrack && t.videoTrack !== "")
|
@@ -19284,56 +19304,56 @@ var Ho = b((a2, e) => {
|
|
19284
19304
|
if (t && t.audioTrack && t.audioTrack !== "")
|
19285
19305
|
return a2.tracks[t.audioTrack];
|
19286
19306
|
});
|
19287
|
-
var
|
19307
|
+
var Am = b((a2, e) => {
|
19288
19308
|
let t = W(a2, e);
|
19289
19309
|
return (t == null ? void 0 : t.auxiliaryTracks.map((i) => a2.tracks[i])) || [];
|
19290
19310
|
});
|
19291
19311
|
var ra = (a2, e) => e ? a2.speakers[e] : null;
|
19292
|
-
var
|
19312
|
+
var bm = b(createSelector(ra, (a2) => (a2 == null ? void 0 : a2.audioLevel) || 0));
|
19293
19313
|
var Co = (a2, e) => {
|
19294
19314
|
let t = Ho(e)(a2);
|
19295
19315
|
return ra(a2, t == null ? void 0 : t.id);
|
19296
19316
|
};
|
19297
|
-
var
|
19298
|
-
var
|
19317
|
+
var Im = b(createSelector(Co, (a2) => (a2 == null ? void 0 : a2.audioLevel) || 0));
|
19318
|
+
var Rm = b((a2, e) => {
|
19299
19319
|
if (e)
|
19300
19320
|
return a2.connectionQualities[e];
|
19301
19321
|
});
|
19302
|
-
var
|
19322
|
+
var Hm = b((a2, e) => {
|
19303
19323
|
let t = W(a2, e);
|
19304
19324
|
if (t) {
|
19305
19325
|
let i = t == null ? void 0 : t.auxiliaryTracks.find((r) => tt(a2.tracks[r]));
|
19306
19326
|
return i ? a2.tracks[i] : void 0;
|
19307
19327
|
}
|
19308
19328
|
});
|
19309
|
-
var
|
19329
|
+
var Cm = b(createSelector(w, W, (a2, e) => {
|
19310
19330
|
let t = e == null ? void 0 : e.auxiliaryTracks.find((i) => {
|
19311
19331
|
let r = a2[i];
|
19312
19332
|
return rt(r) && it(r);
|
19313
19333
|
});
|
19314
19334
|
return t ? a2[t] : void 0;
|
19315
19335
|
}));
|
19316
|
-
var
|
19336
|
+
var Lm = b(createSelector(w, W, (a2, e) => {
|
19317
19337
|
let t = e == null ? void 0 : e.auxiliaryTracks.find((i) => {
|
19318
19338
|
let r = a2[i];
|
19319
19339
|
return rt(r) && tt(r);
|
19320
19340
|
});
|
19321
19341
|
return t ? a2[t] : void 0;
|
19322
19342
|
}));
|
19323
|
-
var
|
19343
|
+
var Dm = b(createSelector(w, W, (a2, e) => {
|
19324
19344
|
let t = e == null ? void 0 : e.auxiliaryTracks.find((i) => {
|
19325
19345
|
let r = a2[i];
|
19326
19346
|
return $t(r) && tt(r);
|
19327
19347
|
});
|
19328
19348
|
return t ? a2[t] : void 0;
|
19329
19349
|
}));
|
19330
|
-
var sa = b(createSelector(
|
19350
|
+
var sa = b(createSelector(w, W, (a2, e) => Ce(a2, e)));
|
19331
19351
|
var aa = (a2) => createSelector(sa(a2), (e) => e.audio);
|
19332
|
-
var
|
19352
|
+
var _m = b((a2, e) => {
|
19333
19353
|
let t = W(a2, e);
|
19334
19354
|
return Ue(a2, t == null ? void 0 : t.audioTrack);
|
19335
19355
|
});
|
19336
|
-
var
|
19356
|
+
var Nm = b((a2, e) => {
|
19337
19357
|
let t = W(a2, e);
|
19338
19358
|
return Ue(a2, t == null ? void 0 : t.videoTrack);
|
19339
19359
|
});
|
@@ -19341,11 +19361,11 @@ var oa = b((a2, e) => {
|
|
19341
19361
|
if (e && a2.tracks[e])
|
19342
19362
|
return a2.tracks[e].volume === 0;
|
19343
19363
|
});
|
19344
|
-
var
|
19364
|
+
var Om = b((a2, e) => {
|
19345
19365
|
let t = W(a2, e);
|
19346
19366
|
return oa(t == null ? void 0 : t.audioTrack)(a2);
|
19347
19367
|
});
|
19348
|
-
var
|
19368
|
+
var xm = b((a2, e) => {
|
19349
19369
|
let t = aa(e)(a2);
|
19350
19370
|
return oa(t == null ? void 0 : t.id)(a2);
|
19351
19371
|
});
|
@@ -19353,17 +19373,17 @@ var na = b((a2, e) => {
|
|
19353
19373
|
let t = Lr(a2, e);
|
19354
19374
|
if (t) {
|
19355
19375
|
if (t.type !== "audio") {
|
19356
|
-
|
19376
|
+
P3.w("Please pass audio track here");
|
19357
19377
|
return;
|
19358
19378
|
}
|
19359
19379
|
return t.volume;
|
19360
19380
|
}
|
19361
19381
|
});
|
19362
|
-
var
|
19382
|
+
var Um = b((a2, e) => {
|
19363
19383
|
let t = W(a2, e);
|
19364
19384
|
return na(t == null ? void 0 : t.audioTrack)(a2);
|
19365
19385
|
});
|
19366
|
-
var
|
19386
|
+
var Vm = b((a2, e) => {
|
19367
19387
|
let t = aa(e)(a2);
|
19368
19388
|
return na(t == null ? void 0 : t.id)(a2);
|
19369
19389
|
});
|
@@ -19371,13 +19391,13 @@ var Bm = b((a2, e) => {
|
|
19371
19391
|
let t = Lr(a2, e);
|
19372
19392
|
if (t) {
|
19373
19393
|
if (t.type !== "video") {
|
19374
|
-
|
19394
|
+
P3.w("Please pass video track here");
|
19375
19395
|
return;
|
19376
19396
|
}
|
19377
19397
|
return t.layer;
|
19378
19398
|
}
|
19379
19399
|
});
|
19380
|
-
var ca = createSelector([St,
|
19400
|
+
var ca = createSelector([St, fe, Cr], (a2, e, t) => {
|
19381
19401
|
if (t)
|
19382
19402
|
return a2.filter((i) => {
|
19383
19403
|
var r;
|
@@ -19395,27 +19415,27 @@ var Lo = createSelector(St, (a2) => a2.filter((e) => {
|
|
19395
19415
|
var t;
|
19396
19416
|
return !e.recipientPeer && !((t = e.recipientRoles) != null && t.length);
|
19397
19417
|
}));
|
19398
|
-
var
|
19399
|
-
var
|
19400
|
-
var
|
19401
|
-
var
|
19402
|
-
var
|
19403
|
-
var Wm = b(wo);
|
19418
|
+
var Do = createSelector([da, ta], (a2) => a2 ? a2.filter((e) => !e.read).length : 0);
|
19419
|
+
var wo = createSelector([ca, Cr], (a2) => a2 ? a2.filter((e) => !e.read).length : 0);
|
19420
|
+
var Fm = createSelector(Lo, (a2) => a2.filter((e) => !e.read).length);
|
19421
|
+
var Gm = b(ca);
|
19422
|
+
var Wm = b(da);
|
19404
19423
|
var $m = b(Do);
|
19424
|
+
var Km = b(wo);
|
19405
19425
|
var la = b(Io);
|
19406
|
-
var
|
19426
|
+
var iS = createSelector([G, w], (a2, e) => Object.values(a2).map((i) => {
|
19407
19427
|
var r;
|
19408
19428
|
return { peer: i, isAudioEnabled: i.audioTrack ? (r = e[i.audioTrack]) == null ? void 0 : r.enabled : false };
|
19409
19429
|
}));
|
19410
19430
|
var _o = (a2) => a2.roleChangeRequests[0] || null;
|
19411
|
-
var
|
19412
|
-
var
|
19413
|
-
var
|
19414
|
-
var Oo = createSelector([
|
19431
|
+
var rS = createSelector([_o, G, ue], (a2, e, t) => a2 ? { requestedBy: a2.requestedBy ? e[a2.requestedBy] : void 0, role: t[a2.roleName], token: a2.token } : null);
|
19432
|
+
var sS = createSelector([oi], (a2) => st(a2));
|
19433
|
+
var aS = createSelector([Gs], (a2) => st(a2));
|
19434
|
+
var Oo = createSelector([j, w], (a2, e) => {
|
19415
19435
|
let t = null;
|
19416
19436
|
return a2 && (t = e[a2]), (t == null ? void 0 : t.plugins) || [];
|
19417
19437
|
});
|
19418
|
-
var xo = createSelector([te,
|
19438
|
+
var xo = createSelector([te, w], (a2, e) => {
|
19419
19439
|
let t = null;
|
19420
19440
|
return a2 && (t = e[a2]), (t == null ? void 0 : t.plugins) || [];
|
19421
19441
|
});
|
@@ -19464,9 +19484,9 @@ var Or = class {
|
|
19464
19484
|
i > -1 && (t.splice(i, 1), this.failedEvents.set(t));
|
19465
19485
|
}
|
19466
19486
|
};
|
19467
|
-
var
|
19487
|
+
var Me = new Or();
|
19468
19488
|
var $ = ((s) => (s[s.ConnectFailed = 0] = "ConnectFailed", s[s.SignalDisconnect = 1] = "SignalDisconnect", s[s.JoinWSMessageFailed = 2] = "JoinWSMessageFailed", s[s.PublishIceConnectionFailed = 3] = "PublishIceConnectionFailed", s[s.SubscribeIceConnectionFailed = 4] = "SubscribeIceConnectionFailed", s))($ || {});
|
19469
|
-
var
|
19489
|
+
var Bi = ((n) => (n.Disconnected = "Disconnected", n.Connecting = "Connecting", n.Joined = "Joined", n.Preview = "Preview", n.Failed = "Failed", n.Reconnecting = "Reconnecting", n.Leaving = "Leaving", n))(Bi || {});
|
19470
19490
|
var Qi = ((t) => (t[t.Publish = 0] = "Publish", t[t.Subscribe = 1] = "Subscribe", t))(Qi || {});
|
19471
19491
|
var sn = (a2) => a2.localPeer.id;
|
19472
19492
|
var an = (a2) => a2.localPeer.audioTrack;
|
@@ -19476,36 +19496,36 @@ var Ra = (a2, e) => e;
|
|
19476
19496
|
var cn = (a2) => a2.remoteTrackStats;
|
19477
19497
|
var Ha = (a2) => a2.peerStats;
|
19478
19498
|
var Fr = (a2) => a2.localTrackStats;
|
19479
|
-
var
|
19480
|
-
var dn = createSelector(
|
19499
|
+
var ke = createSelector([Ha, sn], (a2, e) => a2[e]);
|
19500
|
+
var dn = createSelector(ke, (a2) => {
|
19481
19501
|
var e;
|
19482
19502
|
return (e = a2 == null ? void 0 : a2.subscribe) == null ? void 0 : e.packetsLost;
|
19483
19503
|
});
|
19484
|
-
var ln = createSelector(
|
19504
|
+
var ln = createSelector(ke, (a2) => {
|
19485
19505
|
var e;
|
19486
19506
|
return (e = a2 == null ? void 0 : a2.subscribe) == null ? void 0 : e.jitter;
|
19487
19507
|
});
|
19488
|
-
var un = createSelector(
|
19508
|
+
var un = createSelector(ke, (a2) => {
|
19489
19509
|
var e;
|
19490
19510
|
return (e = a2 == null ? void 0 : a2.publish) == null ? void 0 : e.bitrate;
|
19491
19511
|
});
|
19492
|
-
var pn = createSelector(
|
19512
|
+
var pn = createSelector(ke, (a2) => {
|
19493
19513
|
var e;
|
19494
19514
|
return (e = a2 == null ? void 0 : a2.subscribe) == null ? void 0 : e.bitrate;
|
19495
19515
|
});
|
19496
|
-
var hn = createSelector(
|
19516
|
+
var hn = createSelector(ke, (a2) => {
|
19497
19517
|
var e;
|
19498
19518
|
return (e = a2 == null ? void 0 : a2.publish) == null ? void 0 : e.availableOutgoingBitrate;
|
19499
19519
|
});
|
19500
|
-
var mn = createSelector(
|
19520
|
+
var mn = createSelector(ke, (a2) => {
|
19501
19521
|
var e;
|
19502
19522
|
return (e = a2 == null ? void 0 : a2.subscribe) == null ? void 0 : e.availableIncomingBitrate;
|
19503
19523
|
});
|
19504
|
-
var Sn = createSelector(
|
19524
|
+
var Sn = createSelector(ke, (a2) => {
|
19505
19525
|
var e;
|
19506
19526
|
return (e = a2 == null ? void 0 : a2.publish) == null ? void 0 : e.bytesSent;
|
19507
19527
|
});
|
19508
|
-
var gn = createSelector(
|
19528
|
+
var gn = createSelector(ke, (a2) => {
|
19509
19529
|
var e;
|
19510
19530
|
return (e = a2 == null ? void 0 : a2.subscribe) == null ? void 0 : e.bytesReceived;
|
19511
19531
|
});
|
@@ -19519,11 +19539,11 @@ var yn = createSelector([Fr, an], (a2, e) => {
|
|
19519
19539
|
return e ? (t = a2[e]) == null ? void 0 : t[0] : void 0;
|
19520
19540
|
});
|
19521
19541
|
var kn = b(createSelector(Gr, (a2) => a2 == null ? void 0 : a2[0]));
|
19522
|
-
var
|
19542
|
+
var Pn = createSelector([Fr, on], (a2, e) => {
|
19523
19543
|
var t;
|
19524
19544
|
return e ? (t = a2[e]) == null ? void 0 : t[0] : void 0;
|
19525
19545
|
});
|
19526
|
-
var
|
19546
|
+
var En = b(createSelector(Gr, (a2) => a2));
|
19527
19547
|
|
19528
19548
|
// src/Prebuilt/components/Header/StreamActions.tsx
|
19529
19549
|
import {
|
@@ -20126,7 +20146,7 @@ init_define_process_env();
|
|
20126
20146
|
import { useEffect as useEffect17, useState as useState27 } from "react";
|
20127
20147
|
import { HMSNotificationTypes, useHMSNotifications, useHMSStore as useHMSStore28 } from "@100mslive/react-sdk";
|
20128
20148
|
var useUnreadPollQuizPresent = () => {
|
20129
|
-
const localPeerID = useHMSStore28(
|
20149
|
+
const localPeerID = useHMSStore28(fe);
|
20130
20150
|
const notification = useHMSNotifications(HMSNotificationTypes.POLL_STARTED);
|
20131
20151
|
const [unreadPollQuiz, setUnreadPollQuiz] = useState27(false);
|
20132
20152
|
useEffect17(() => {
|
@@ -20429,7 +20449,7 @@ var RaiseHand = ({ css: css2 }) => {
|
|
20429
20449
|
// src/Prebuilt/components/ScreenShareToggle.jsx
|
20430
20450
|
init_define_process_env();
|
20431
20451
|
import React68, { Fragment as Fragment8 } from "react";
|
20432
|
-
import { selectIsAllowedToPublish, useAwayNotifications, useHMSStore as useHMSStore30, useScreenShare as useScreenShare3 } from "@100mslive/react-sdk";
|
20452
|
+
import { selectIsAllowedToPublish as selectIsAllowedToPublish2, useAwayNotifications, useHMSStore as useHMSStore30, useScreenShare as useScreenShare3 } from "@100mslive/react-sdk";
|
20433
20453
|
import { ShareScreenIcon as ShareScreenIcon2 } from "@100mslive/react-icons";
|
20434
20454
|
|
20435
20455
|
// src/Prebuilt/components/pdfAnnotator/shareScreenOptions.jsx
|
@@ -20889,7 +20909,7 @@ function ShareScreenOptions() {
|
|
20889
20909
|
|
20890
20910
|
// src/Prebuilt/components/ScreenShareToggle.jsx
|
20891
20911
|
var ScreenshareToggle = ({ css: css2 = {} }) => {
|
20892
|
-
const isAllowedToPublish = useHMSStore30(
|
20912
|
+
const isAllowedToPublish = useHMSStore30(selectIsAllowedToPublish2);
|
20893
20913
|
const isAudioOnly = useUISettings(UI_SETTINGS.isAudioOnly);
|
20894
20914
|
const { amIScreenSharing, screenShareVideoTrackId: video, toggleScreenShare } = useScreenShare3();
|
20895
20915
|
const { requestPermission } = useAwayNotifications();
|
@@ -20947,7 +20967,15 @@ var ChatToggle = ({ onClick }) => {
|
|
20947
20967
|
position: "relative"
|
20948
20968
|
}
|
20949
20969
|
},
|
20950
|
-
/* @__PURE__ */ React70.createElement(Tooltip, { key: "chat", title: `${isChatOpen ? "Close" : "Open"} chat` }, /* @__PURE__ */ React70.createElement(
|
20970
|
+
/* @__PURE__ */ React70.createElement(Tooltip, { key: "chat", title: `${isChatOpen ? "Close" : "Open"} chat` }, /* @__PURE__ */ React70.createElement(
|
20971
|
+
IconButton_default,
|
20972
|
+
{
|
20973
|
+
onClick: () => onClick ? onClick() : toggleChat(),
|
20974
|
+
css: { bg: isChatOpen ? "$surface_brighter" : "" },
|
20975
|
+
"data-testid": "chat_btn"
|
20976
|
+
},
|
20977
|
+
/* @__PURE__ */ React70.createElement(ChatIcon, null)
|
20978
|
+
)),
|
20951
20979
|
countUnreadMessages > 0 && /* @__PURE__ */ React70.createElement(
|
20952
20980
|
Flex,
|
20953
20981
|
{
|
@@ -21294,7 +21322,7 @@ var RoleOptions = ({ roleName, peerList }) => {
|
|
21294
21322
|
|
21295
21323
|
// src/Prebuilt/components/hooks/useGroupOnStageActions.tsx
|
21296
21324
|
init_define_process_env();
|
21297
|
-
import { match as match7, P as
|
21325
|
+
import { match as match7, P as P4 } from "ts-pattern";
|
21298
21326
|
import { selectPermissions as selectPermissions11, useHMSActions as useHMSActions25, useHMSStore as useHMSStore36 } from "@100mslive/react-sdk";
|
21299
21327
|
var useGroupOnStageActions = ({ peers }) => {
|
21300
21328
|
const hmsActions = useHMSActions25();
|
@@ -21310,9 +21338,9 @@ var useGroupOnStageActions = ({ peers }) => {
|
|
21310
21338
|
const offStageRolePeers = peers.filter(
|
21311
21339
|
(peer) => match7({ on_stage_role, bring_to_stage_label, roleName: peer.roleName }).with(
|
21312
21340
|
{
|
21313
|
-
on_stage_role:
|
21314
|
-
bring_to_stage_label:
|
21315
|
-
roleName:
|
21341
|
+
on_stage_role: P4.when((role) => !!role),
|
21342
|
+
bring_to_stage_label: P4.when((label) => !!label),
|
21343
|
+
roleName: P4.when((role) => !!role && off_stage_roles.includes(role))
|
21316
21344
|
},
|
21317
21345
|
() => true
|
21318
21346
|
).otherwise(() => false)
|
@@ -21593,7 +21621,7 @@ var ParticipantList = ({
|
|
21593
21621
|
var ParticipantCount = () => {
|
21594
21622
|
const peerCount = useHMSStore40(selectPeerCount4);
|
21595
21623
|
const toggleSidepane = useSidepaneToggle(SIDE_PANE_OPTIONS.PARTICIPANTS);
|
21596
|
-
const
|
21624
|
+
const isPeerListOpen = useIsSidepaneTypeOpen(SIDE_PANE_OPTIONS.PARTICIPANTS);
|
21597
21625
|
if (peerCount === 0) {
|
21598
21626
|
return null;
|
21599
21627
|
}
|
@@ -21603,14 +21631,14 @@ var ParticipantCount = () => {
|
|
21603
21631
|
css: {
|
21604
21632
|
w: "auto",
|
21605
21633
|
p: "$4",
|
21606
|
-
h: "auto"
|
21634
|
+
h: "auto",
|
21635
|
+
bg: isPeerListOpen ? "$surface_brighter" : ""
|
21607
21636
|
},
|
21608
21637
|
onClick: () => {
|
21609
21638
|
if (peerCount > 0) {
|
21610
21639
|
toggleSidepane();
|
21611
21640
|
}
|
21612
21641
|
},
|
21613
|
-
active: !isParticipantsOpen,
|
21614
21642
|
"data-testid": "participant_list"
|
21615
21643
|
},
|
21616
21644
|
/* @__PURE__ */ React75.createElement(PeopleIcon2, null),
|
@@ -21880,7 +21908,7 @@ var PollsToggle = () => {
|
|
21880
21908
|
togglePollView();
|
21881
21909
|
setUnreadPollQuiz(false);
|
21882
21910
|
},
|
21883
|
-
|
21911
|
+
css: { bg: isPollsOpen ? "$surface_brighter" : "" },
|
21884
21912
|
"data-testid": "polls_btn"
|
21885
21913
|
},
|
21886
21914
|
unreadPollQuiz ? /* @__PURE__ */ React76.createElement(QuizActiveIcon2, null) : /* @__PURE__ */ React76.createElement(QuizIcon2, null)
|
@@ -22038,7 +22066,7 @@ function HLSFailureModal() {
|
|
22038
22066
|
|
22039
22067
|
// src/Prebuilt/components/RoleChangeRequest/RoleChangeRequestModal.tsx
|
22040
22068
|
init_define_process_env();
|
22041
|
-
import React134, { useEffect as
|
22069
|
+
import React134, { useEffect as useEffect39 } from "react";
|
22042
22070
|
import {
|
22043
22071
|
selectIsInPreview,
|
22044
22072
|
selectLocalPeerName as selectLocalPeerName4,
|
@@ -22046,12 +22074,12 @@ import {
|
|
22046
22074
|
selectRoleChangeRequest,
|
22047
22075
|
useCustomEvent as useCustomEvent3,
|
22048
22076
|
useHMSActions as useHMSActions44,
|
22049
|
-
useHMSStore as
|
22077
|
+
useHMSStore as useHMSStore72
|
22050
22078
|
} from "@100mslive/react-sdk";
|
22051
22079
|
|
22052
22080
|
// src/Prebuilt/components/Preview/PreviewJoin.tsx
|
22053
22081
|
init_define_process_env();
|
22054
|
-
import React132, { Fragment as Fragment12, useCallback as useCallback32, useEffect as
|
22082
|
+
import React132, { Fragment as Fragment12, useCallback as useCallback32, useEffect as useEffect38, useMemo as useMemo14, useState as useState57 } from "react";
|
22055
22083
|
import { useMeasure as useMeasure4, useMedia as useMedia25 } from "react-use";
|
22056
22084
|
import {
|
22057
22085
|
HMSRoomState as HMSRoomState5,
|
@@ -22061,7 +22089,7 @@ import {
|
|
22061
22089
|
selectRoomState as selectRoomState5,
|
22062
22090
|
selectVideoTrackByID as selectVideoTrackByID5,
|
22063
22091
|
useAVToggle as useAVToggle3,
|
22064
|
-
useHMSStore as
|
22092
|
+
useHMSStore as useHMSStore71,
|
22065
22093
|
useParticipants as useParticipants2,
|
22066
22094
|
usePreviewJoin,
|
22067
22095
|
useRecordingStreaming as useRecordingStreaming11
|
@@ -22070,10 +22098,10 @@ import { MicOffIcon as MicOffIcon7, SettingsIcon as SettingsIcon6 } from "@100ms
|
|
22070
22098
|
|
22071
22099
|
// src/Prebuilt/layouts/SidePane.tsx
|
22072
22100
|
init_define_process_env();
|
22073
|
-
import React128, { useEffect as
|
22101
|
+
import React128, { useEffect as useEffect37 } from "react";
|
22074
22102
|
import { useMedia as useMedia23 } from "react-use";
|
22075
22103
|
import { match as match11 } from "ts-pattern";
|
22076
|
-
import { selectAppData as selectAppData8, selectVideoTrackByPeerID as selectVideoTrackByPeerID4, useHMSStore as
|
22104
|
+
import { selectAppData as selectAppData8, selectVideoTrackByPeerID as selectVideoTrackByPeerID4, useHMSStore as useHMSStore70 } from "@100mslive/react-sdk";
|
22077
22105
|
|
22078
22106
|
// src/Prebuilt/components/Polls/Polls.tsx
|
22079
22107
|
init_define_process_env();
|
@@ -22081,7 +22109,7 @@ import React101 from "react";
|
|
22081
22109
|
|
22082
22110
|
// src/Prebuilt/components/Polls/CreatePollQuiz/PollsQuizMenu.tsx
|
22083
22111
|
init_define_process_env();
|
22084
|
-
import React82, { useEffect as useEffect22, useMemo as
|
22112
|
+
import React82, { useEffect as useEffect22, useMemo as useMemo7, useRef as useRef17, useState as useState35 } from "react";
|
22085
22113
|
import {
|
22086
22114
|
selectLocalPeerRoleName,
|
22087
22115
|
selectPermissions as selectPermissions15,
|
@@ -22254,7 +22282,7 @@ var AddMenu = () => {
|
|
22254
22282
|
[POLL_STATE.view]: POLL_VIEWS.CREATE_QUESTIONS
|
22255
22283
|
});
|
22256
22284
|
};
|
22257
|
-
const validateTitle =
|
22285
|
+
const validateTitle = useMemo7(() => {
|
22258
22286
|
if (!isValidTextInput(title)) {
|
22259
22287
|
if (title) {
|
22260
22288
|
setTitleError("The title should have between 2-100 characters");
|
@@ -22319,8 +22347,8 @@ var AddMenu = () => {
|
|
22319
22347
|
var PrevMenu = () => {
|
22320
22348
|
const hmsActions = useHMSActions28();
|
22321
22349
|
const polls = useHMSStore44(selectPolls2);
|
22322
|
-
const sortedPolls =
|
22323
|
-
() => polls?.sort((a2, b2) => (b2
|
22350
|
+
const sortedPolls = useMemo7(
|
22351
|
+
() => polls?.sort((a2, b2) => (b2?.createdAt?.getTime?.() || 0) - (a2?.createdAt?.getTime?.() || 0))?.sort((a2, b2) => (b2?.state === "started" ? 1 : 0) - (a2?.state === "started" ? 1 : 0)),
|
22324
22352
|
[polls]
|
22325
22353
|
);
|
22326
22354
|
const permissions = useHMSStore44(selectPermissions15);
|
@@ -22360,7 +22388,7 @@ var InteractionCard = ({ id, title, status }) => {
|
|
22360
22388
|
|
22361
22389
|
// src/Prebuilt/components/Polls/CreateQuestions/CreateQuestions.jsx
|
22362
22390
|
init_define_process_env();
|
22363
|
-
import React92, { useMemo as
|
22391
|
+
import React92, { useMemo as useMemo9, useState as useState37 } from "react";
|
22364
22392
|
import { v4 as uuid2 } from "uuid";
|
22365
22393
|
import { selectPollByID, useHMSActions as useHMSActions29, useHMSStore as useHMSStore45, useRecordingStreaming as useRecordingStreaming9 } from "@100mslive/react-sdk";
|
22366
22394
|
import { AddCircleIcon as AddCircleIcon2 } from "@100mslive/react-icons";
|
@@ -22865,7 +22893,7 @@ var isValidQuestion = ({
|
|
22865
22893
|
|
22866
22894
|
// src/Prebuilt/components/Polls/CreateQuestions/SavedQuestion.tsx
|
22867
22895
|
init_define_process_env();
|
22868
|
-
import React91, { useMemo as
|
22896
|
+
import React91, { useMemo as useMemo8 } from "react";
|
22869
22897
|
import { CheckCircleIcon as CheckCircleIcon3 } from "@100mslive/react-icons";
|
22870
22898
|
var SavedQuestion = ({
|
22871
22899
|
question,
|
@@ -22873,7 +22901,7 @@ var SavedQuestion = ({
|
|
22873
22901
|
length,
|
22874
22902
|
convertToDraft
|
22875
22903
|
}) => {
|
22876
|
-
const answerArray =
|
22904
|
+
const answerArray = useMemo8(() => {
|
22877
22905
|
const updatedAnswerArray = [];
|
22878
22906
|
const { option, options } = question?.answer ?? {};
|
22879
22907
|
if (option) {
|
@@ -22903,7 +22931,7 @@ function CreateQuestions() {
|
|
22903
22931
|
const [questions, setQuestions] = useState37(
|
22904
22932
|
interaction.questions?.length ? getEditableFormat(interaction.questions) : [{ draftID: uuid2() }]
|
22905
22933
|
);
|
22906
|
-
const isValidPoll =
|
22934
|
+
const isValidPoll = useMemo9(() => questions.length > 0 && questions.every(isValidQuestion), [questions]);
|
22907
22935
|
const launchPoll = async () => {
|
22908
22936
|
await actions.interactivityCenter.startPoll(id);
|
22909
22937
|
await sendTimedMetadata(id);
|
@@ -23167,7 +23195,7 @@ var LeaderboardSummary = ({ pollID }) => {
|
|
23167
23195
|
if (!quiz || !quizLeaderboard)
|
23168
23196
|
return /* @__PURE__ */ React96.createElement(Flex, { align: "center", justify: "center", css: { size: "100%" } }, /* @__PURE__ */ React96.createElement(Loading, null));
|
23169
23197
|
const questionCount = quiz.questions?.length || 0;
|
23170
|
-
return /* @__PURE__ */ React96.createElement(Flex, { direction: "column", css: { size: "100%" } }, /* @__PURE__ */ React96.createElement(Flex, { justify: "between", align: "center", css: { pb: "$6", borderBottom: "1px solid $border_bright", mb: "$8" } }, /* @__PURE__ */ React96.createElement(Flex, { align: "center", css: { gap: "$4" } }, /* @__PURE__ */ React96.createElement(
|
23198
|
+
return /* @__PURE__ */ React96.createElement(Container3, { rounded: true }, /* @__PURE__ */ React96.createElement(Flex, { direction: "column", css: { size: "100%", p: "$8" } }, /* @__PURE__ */ React96.createElement(Flex, { justify: "between", align: "center", css: { pb: "$6", borderBottom: "1px solid $border_bright", mb: "$8" } }, /* @__PURE__ */ React96.createElement(Flex, { align: "center", css: { gap: "$4" } }, /* @__PURE__ */ React96.createElement(
|
23171
23199
|
Flex,
|
23172
23200
|
{
|
23173
23201
|
css: { color: "$on_surface_medium", "&:hover": { color: "$on_surface_high", cursor: "pointer" } },
|
@@ -23181,7 +23209,7 @@ var LeaderboardSummary = ({ pollID }) => {
|
|
23181
23209
|
onClick: toggleSidepane
|
23182
23210
|
},
|
23183
23211
|
/* @__PURE__ */ React96.createElement(CrossIcon16, null)
|
23184
|
-
)), !viewAllEntries ? /* @__PURE__ */ React96.createElement(PeerParticipationSummary, { quiz }) : null, /* @__PURE__ */ React96.createElement(Text, { variant: "sm", css: { fontWeight: "$semiBold", mt: "$4" } }, "Leaderboard"), /* @__PURE__ */ React96.createElement(Text, { variant: "xs", css: { color: "$on_surface_medium" } }, "Based on score and time taken to cast the correct answer"), /* @__PURE__ */ React96.createElement(
|
23212
|
+
)), /* @__PURE__ */ React96.createElement(Box, { css: { overflowY: "auto", mr: "-$4", pr: "$4" } }, !viewAllEntries ? /* @__PURE__ */ React96.createElement(PeerParticipationSummary, { quiz }) : null, /* @__PURE__ */ React96.createElement(Text, { variant: "sm", css: { fontWeight: "$semiBold", mt: "$4" } }, "Leaderboard"), /* @__PURE__ */ React96.createElement(Text, { variant: "xs", css: { color: "$on_surface_medium" } }, "Based on score and time taken to cast the correct answer"), /* @__PURE__ */ React96.createElement(
|
23185
23213
|
Box,
|
23186
23214
|
{
|
23187
23215
|
css: {
|
@@ -23226,18 +23254,19 @@ var LeaderboardSummary = ({ pollID }) => {
|
|
23226
23254
|
" ",
|
23227
23255
|
/* @__PURE__ */ React96.createElement(ChevronRightIcon3, null)
|
23228
23256
|
) : null
|
23229
|
-
));
|
23257
|
+
))));
|
23230
23258
|
};
|
23231
23259
|
|
23232
23260
|
// src/Prebuilt/components/Polls/Voting/Voting.tsx
|
23233
23261
|
init_define_process_env();
|
23234
|
-
import React100 from "react";
|
23262
|
+
import React100, { useEffect as useEffect26, useRef as useRef20, useState as useState42 } from "react";
|
23235
23263
|
import {
|
23264
|
+
selectLocalPeerID as selectLocalPeerID9,
|
23236
23265
|
selectPeerNameByID,
|
23237
23266
|
selectPermissions as selectPermissions16,
|
23238
23267
|
selectPollByID as selectPollByID4,
|
23239
23268
|
useHMSActions as useHMSActions32,
|
23240
|
-
useHMSStore as
|
23269
|
+
useHMSStore as useHMSStore50
|
23241
23270
|
} from "@100mslive/react-sdk";
|
23242
23271
|
import { ChevronLeftIcon as ChevronLeftIcon5, CrossIcon as CrossIcon17 } from "@100mslive/react-icons";
|
23243
23272
|
|
@@ -23247,7 +23276,7 @@ import React98 from "react";
|
|
23247
23276
|
|
23248
23277
|
// src/Prebuilt/components/Polls/Voting/QuestionCard.jsx
|
23249
23278
|
init_define_process_env();
|
23250
|
-
import React97, { useCallback as useCallback22, useMemo as
|
23279
|
+
import React97, { useCallback as useCallback22, useEffect as useEffect24, useMemo as useMemo10, useRef as useRef19, useState as useState40 } from "react";
|
23251
23280
|
import { match as match8 } from "ts-pattern";
|
23252
23281
|
import { selectLocalPeer, selectLocalPeerRoleName as selectLocalPeerRoleName2, useHMSActions as useHMSActions31, useHMSStore as useHMSStore49 } from "@100mslive/react-sdk";
|
23253
23282
|
import { CheckCircleIcon as CheckCircleIcon5, ChevronDownIcon as ChevronDownIcon5, CrossCircleIcon } from "@100mslive/react-icons";
|
@@ -23263,29 +23292,30 @@ var QuestionCard2 = ({
|
|
23263
23292
|
text,
|
23264
23293
|
options = [],
|
23265
23294
|
answer,
|
23266
|
-
|
23267
|
-
|
23295
|
+
localPeerResponse,
|
23296
|
+
updateSavedResponses,
|
23268
23297
|
rolesThatCanViewResponses
|
23269
23298
|
}) => {
|
23270
23299
|
const actions = useHMSActions31();
|
23271
23300
|
const localPeer = useHMSStore49(selectLocalPeer);
|
23272
|
-
const localPeerResponse = responses?.find(
|
23273
|
-
(response) => response.peer?.peerid === localPeer?.id || response.peer?.userid === localPeer?.customerUserId
|
23274
|
-
);
|
23275
23301
|
const isLocalPeerCreator = localPeer?.id === startedBy;
|
23276
23302
|
const localPeerRoleName = useHMSStore49(selectLocalPeerRoleName2);
|
23277
23303
|
const roleCanViewResponse = !rolesThatCanViewResponses || rolesThatCanViewResponses.length === 0 || rolesThatCanViewResponses.includes(localPeerRoleName || "");
|
23278
|
-
const
|
23304
|
+
const [localPeerChoice, setLocalPeerChoice] = useState40(localPeerResponse);
|
23305
|
+
useEffect24(() => {
|
23306
|
+
setLocalPeerChoice(localPeerResponse);
|
23307
|
+
}, [localPeerResponse]);
|
23308
|
+
const showVoteCount = roleCanViewResponse && (localPeerChoice || isLocalPeerCreator && pollState === "stopped") && !isQuiz;
|
23279
23309
|
const isLive = pollState === "started";
|
23280
23310
|
const pollEnded = pollState === "stopped";
|
23281
|
-
const canRespond = isLive && !
|
23311
|
+
const canRespond = isLive && !localPeerChoice;
|
23282
23312
|
const startTime = useRef19(Date.now());
|
23283
|
-
const isCorrectAnswer = checkCorrectAnswer(answer,
|
23313
|
+
const isCorrectAnswer = checkCorrectAnswer(answer, localPeerChoice, type);
|
23284
23314
|
const [singleOptionAnswer, setSingleOptionAnswer] = useState40();
|
23285
23315
|
const [multipleOptionAnswer, setMultipleOptionAnswer] = useState40(/* @__PURE__ */ new Set());
|
23286
23316
|
const [showOptions, setShowOptions] = useState40(true);
|
23287
|
-
const respondedToQuiz = isQuiz &&
|
23288
|
-
const isValidVote =
|
23317
|
+
const respondedToQuiz = isQuiz && localPeerChoice && !localPeerChoice.skipped;
|
23318
|
+
const isValidVote = useMemo10(() => {
|
23289
23319
|
if (type === "single-choice" /* SINGLE_CHOICE */) {
|
23290
23320
|
return singleOptionAnswer !== void 0;
|
23291
23321
|
} else if (type === "multiple-choice" /* MULTIPLE_CHOICE */) {
|
@@ -23296,16 +23326,28 @@ var QuestionCard2 = ({
|
|
23296
23326
|
if (!isValidVote) {
|
23297
23327
|
return;
|
23298
23328
|
}
|
23299
|
-
|
23300
|
-
|
23301
|
-
|
23302
|
-
|
23303
|
-
|
23304
|
-
|
23305
|
-
|
23306
|
-
|
23329
|
+
const submittedResponse = {
|
23330
|
+
questionIndex: index,
|
23331
|
+
option: singleOptionAnswer,
|
23332
|
+
options: Array.from(multipleOptionAnswer),
|
23333
|
+
duration: Date.now() - startTime.current
|
23334
|
+
};
|
23335
|
+
await actions.interactivityCenter.addResponsesToPoll(pollID, [submittedResponse]);
|
23336
|
+
updateSavedResponses((prev) => {
|
23337
|
+
const prevCopy = { ...prev };
|
23338
|
+
prevCopy[index] = { option: singleOptionAnswer, options: Array.from(multipleOptionAnswer) };
|
23339
|
+
return prevCopy;
|
23340
|
+
});
|
23307
23341
|
startTime.current = Date.now();
|
23308
|
-
}, [
|
23342
|
+
}, [
|
23343
|
+
isValidVote,
|
23344
|
+
index,
|
23345
|
+
singleOptionAnswer,
|
23346
|
+
multipleOptionAnswer,
|
23347
|
+
actions.interactivityCenter,
|
23348
|
+
pollID,
|
23349
|
+
updateSavedResponses
|
23350
|
+
]);
|
23309
23351
|
return /* @__PURE__ */ React97.createElement(
|
23310
23352
|
Box,
|
23311
23353
|
{
|
@@ -23375,7 +23417,7 @@ var QuestionCard2 = ({
|
|
23375
23417
|
setAnswer: setSingleOptionAnswer,
|
23376
23418
|
totalResponses: result?.totalResponses,
|
23377
23419
|
showVoteCount,
|
23378
|
-
localPeerResponse,
|
23420
|
+
localPeerResponse: localPeerChoice,
|
23379
23421
|
isStopped: pollState === "stopped"
|
23380
23422
|
}
|
23381
23423
|
) : null,
|
@@ -23391,42 +23433,24 @@ var QuestionCard2 = ({
|
|
23391
23433
|
setSelectedOptions: setMultipleOptionAnswer,
|
23392
23434
|
totalResponses: result?.totalResponses,
|
23393
23435
|
showVoteCount,
|
23394
|
-
localPeerResponse,
|
23436
|
+
localPeerResponse: localPeerChoice,
|
23395
23437
|
isStopped: pollState === "stopped"
|
23396
23438
|
}
|
23397
23439
|
) : null
|
23398
23440
|
),
|
23399
|
-
isLive && /* @__PURE__ */ React97.createElement(
|
23400
|
-
QuestionActions,
|
23401
|
-
{
|
23402
|
-
isValidVote,
|
23403
|
-
onVote: handleVote,
|
23404
|
-
response: localPeerResponse,
|
23405
|
-
isQuiz,
|
23406
|
-
incrementIndex: () => {
|
23407
|
-
setCurrentIndex((curr) => Math.min(totalQuestions, curr + 1));
|
23408
|
-
}
|
23409
|
-
}
|
23410
|
-
)
|
23441
|
+
isLive && /* @__PURE__ */ React97.createElement(QuestionActions, { isValidVote, onVote: handleVote, response: localPeerChoice, isQuiz })
|
23411
23442
|
);
|
23412
23443
|
};
|
23413
|
-
var QuestionActions = ({ isValidVote, response, isQuiz, onVote
|
23414
|
-
return /* @__PURE__ */ React97.createElement(Flex, { align: "center", justify: "end", css: { gap: "$4", w: "100%" } }, response ? /* @__PURE__ */ React97.createElement(Text, { css: { fontWeight: "$semiBold", color: "$on_surface_medium" } }, response.skipped ? "Skipped" : null, isQuiz && !response.skipped ? "Answered" : null, !isQuiz && !response.skipped ? "Voted" : null) : /* @__PURE__ */ React97.createElement(
|
23415
|
-
Button,
|
23416
|
-
{
|
23417
|
-
css: { p: "$xs $10", fontWeight: "$semiBold" },
|
23418
|
-
disabled: !isValidVote,
|
23419
|
-
onClick: () => {
|
23420
|
-
onVote();
|
23421
|
-
incrementIndex();
|
23422
|
-
}
|
23423
|
-
},
|
23424
|
-
isQuiz ? "Answer" : "Vote"
|
23425
|
-
));
|
23444
|
+
var QuestionActions = ({ isValidVote, response, isQuiz, onVote }) => {
|
23445
|
+
return /* @__PURE__ */ React97.createElement(Flex, { align: "center", justify: "end", css: { gap: "$4", w: "100%" } }, response ? /* @__PURE__ */ React97.createElement(Text, { css: { fontWeight: "$semiBold", color: "$on_surface_medium" } }, response.skipped ? "Skipped" : null, isQuiz && !response.skipped ? "Answered" : null, !isQuiz && !response.skipped ? "Voted" : null) : /* @__PURE__ */ React97.createElement(Button, { css: { p: "$xs $10", fontWeight: "$semiBold" }, disabled: !isValidVote, onClick: onVote }, isQuiz ? "Answer" : "Vote"));
|
23426
23446
|
};
|
23427
23447
|
|
23428
23448
|
// src/Prebuilt/components/Polls/Voting/StandardVoting.tsx
|
23429
|
-
var StandardView = ({
|
23449
|
+
var StandardView = ({
|
23450
|
+
poll,
|
23451
|
+
localPeerResponses,
|
23452
|
+
updateSavedResponses
|
23453
|
+
}) => {
|
23430
23454
|
if (!poll?.questions) {
|
23431
23455
|
return null;
|
23432
23456
|
}
|
@@ -23446,11 +23470,9 @@ var StandardView = ({ poll }) => {
|
|
23446
23470
|
result: question.result,
|
23447
23471
|
totalQuestions: poll.questions?.length || 0,
|
23448
23472
|
options: question.options,
|
23449
|
-
|
23473
|
+
localPeerResponse: localPeerResponses?.[question.index],
|
23450
23474
|
answer: question.answer,
|
23451
|
-
|
23452
|
-
return;
|
23453
|
-
},
|
23475
|
+
updateSavedResponses,
|
23454
23476
|
rolesThatCanViewResponses: poll.rolesThatCanViewResponses
|
23455
23477
|
}
|
23456
23478
|
)));
|
@@ -23458,14 +23480,18 @@ var StandardView = ({ poll }) => {
|
|
23458
23480
|
|
23459
23481
|
// src/Prebuilt/components/Polls/Voting/TimedVoting.tsx
|
23460
23482
|
init_define_process_env();
|
23461
|
-
import React99, { useState as useState41 } from "react";
|
23462
|
-
|
23463
|
-
|
23464
|
-
|
23465
|
-
|
23466
|
-
|
23483
|
+
import React99, { useEffect as useEffect25, useState as useState41 } from "react";
|
23484
|
+
var TimedView = ({
|
23485
|
+
poll,
|
23486
|
+
localPeerResponses,
|
23487
|
+
updateSavedResponses
|
23488
|
+
}) => {
|
23489
|
+
const [currentIndex, setCurrentIndex] = useState41(getIndexToShow(localPeerResponses));
|
23467
23490
|
const activeQuestion = poll.questions?.find((question) => question.index === currentIndex);
|
23468
|
-
const attemptedAll = poll.questions?.length
|
23491
|
+
const attemptedAll = (poll.questions?.length || 0) < currentIndex;
|
23492
|
+
useEffect25(() => {
|
23493
|
+
setCurrentIndex(getIndexToShow(localPeerResponses));
|
23494
|
+
}, [localPeerResponses]);
|
23469
23495
|
if (!activeQuestion && !attemptedAll || !poll.questions?.length) {
|
23470
23496
|
return null;
|
23471
23497
|
}
|
@@ -23484,10 +23510,10 @@ var TimedView = ({ poll }) => {
|
|
23484
23510
|
result: question?.result,
|
23485
23511
|
totalQuestions: poll.questions?.length || 0,
|
23486
23512
|
options: question.options,
|
23487
|
-
|
23513
|
+
localPeerResponse: localPeerResponses?.[question.index],
|
23488
23514
|
answer: question.answer,
|
23489
|
-
|
23490
|
-
|
23515
|
+
rolesThatCanViewResponses: poll.rolesThatCanViewResponses,
|
23516
|
+
updateSavedResponses
|
23491
23517
|
}
|
23492
23518
|
) : null;
|
23493
23519
|
}));
|
@@ -23496,12 +23522,42 @@ var TimedView = ({ poll }) => {
|
|
23496
23522
|
// src/Prebuilt/components/Polls/Voting/Voting.tsx
|
23497
23523
|
var Voting = ({ id, toggleVoting }) => {
|
23498
23524
|
const actions = useHMSActions32();
|
23499
|
-
const poll =
|
23500
|
-
const pollCreatorName =
|
23501
|
-
const permissions =
|
23525
|
+
const poll = useHMSStore50(selectPollByID4(id));
|
23526
|
+
const pollCreatorName = useHMSStore50(selectPeerNameByID(poll?.createdBy));
|
23527
|
+
const permissions = useHMSStore50(selectPermissions16);
|
23502
23528
|
const canEndActivity = !!permissions?.pollWrite;
|
23503
23529
|
const { setPollView } = usePollViewState();
|
23504
23530
|
const showSingleView = poll?.type === "quiz" && poll.state === "started";
|
23531
|
+
const fetchedInitialResponses = useRef20(false);
|
23532
|
+
const [savedResponses, setSavedResponses] = useState42({});
|
23533
|
+
const localPeerId = useHMSStore50(selectLocalPeerID9);
|
23534
|
+
useEffect26(() => {
|
23535
|
+
fetchedInitialResponses.current = false;
|
23536
|
+
setSavedResponses({});
|
23537
|
+
}, [id, setSavedResponses]);
|
23538
|
+
useEffect26(() => {
|
23539
|
+
const getResponses = async () => {
|
23540
|
+
if (poll && actions.interactivityCenter && !fetchedInitialResponses.current) {
|
23541
|
+
await actions.interactivityCenter.getPollResponses(poll, true);
|
23542
|
+
fetchedInitialResponses.current = true;
|
23543
|
+
}
|
23544
|
+
};
|
23545
|
+
getResponses();
|
23546
|
+
}, [poll, actions.interactivityCenter]);
|
23547
|
+
useEffect26(() => {
|
23548
|
+
if (poll?.questions) {
|
23549
|
+
const localPeerResponses = getPeerResponses(poll.questions, localPeerId);
|
23550
|
+
localPeerResponses?.forEach((response) => {
|
23551
|
+
if (response) {
|
23552
|
+
setSavedResponses((prev) => {
|
23553
|
+
const prevCopy = { ...prev };
|
23554
|
+
prevCopy[response[0]?.questionIndex] = { option: response[0]?.option, options: response[0]?.options };
|
23555
|
+
return prevCopy;
|
23556
|
+
});
|
23557
|
+
}
|
23558
|
+
});
|
23559
|
+
}
|
23560
|
+
}, [localPeerId, poll?.questions, id]);
|
23505
23561
|
if (!poll) {
|
23506
23562
|
return null;
|
23507
23563
|
}
|
@@ -23542,7 +23598,7 @@ var Voting = ({ id, toggleVoting }) => {
|
|
23542
23598
|
},
|
23543
23599
|
/* @__PURE__ */ React100.createElement(CrossIcon17, { onClick: toggleVoting })
|
23544
23600
|
)
|
23545
|
-
), /* @__PURE__ */ React100.createElement(Flex, { direction: "column", css: { p: "$8 $10", flex: "1 1 0", overflowY: "auto" } }, poll.state === "started" ? /* @__PURE__ */ React100.createElement(Text, { css: { color: "$on_surface_medium", fontWeight: "$semiBold" } }, pollCreatorName || "Participant", " started a ", poll.type) : null, showSingleView ? /* @__PURE__ */ React100.createElement(TimedView, { poll }) : /* @__PURE__ */ React100.createElement(StandardView, { poll })), /* @__PURE__ */ React100.createElement(
|
23601
|
+
), /* @__PURE__ */ React100.createElement(Flex, { direction: "column", css: { p: "$8 $10", flex: "1 1 0", overflowY: "auto" } }, poll.state === "started" ? /* @__PURE__ */ React100.createElement(Text, { css: { color: "$on_surface_medium", fontWeight: "$semiBold" } }, pollCreatorName || "Participant", " started a ", poll.type) : null, showSingleView ? /* @__PURE__ */ React100.createElement(TimedView, { poll, localPeerResponses: savedResponses, updateSavedResponses: setSavedResponses }) : /* @__PURE__ */ React100.createElement(StandardView, { poll, localPeerResponses: savedResponses, updateSavedResponses: setSavedResponses })), /* @__PURE__ */ React100.createElement(
|
23546
23602
|
Flex,
|
23547
23603
|
{
|
23548
23604
|
css: { w: "100%", justifyContent: "end", alignItems: "center", p: "$8", borderTop: "1px solid $border_bright" }
|
@@ -23585,11 +23641,11 @@ import { CrossIcon as CrossIcon18 } from "@100mslive/react-icons";
|
|
23585
23641
|
|
23586
23642
|
// src/Prebuilt/components/Header/HeaderComponents.jsx
|
23587
23643
|
init_define_process_env();
|
23588
|
-
import React102, { useEffect as
|
23589
|
-
import { selectDominantSpeaker, useHMSStore as
|
23644
|
+
import React102, { useEffect as useEffect27, useState as useState43 } from "react";
|
23645
|
+
import { selectDominantSpeaker, useHMSStore as useHMSStore51 } from "@100mslive/react-sdk";
|
23590
23646
|
import { VolumeOneIcon } from "@100mslive/react-icons";
|
23591
23647
|
var SpeakerTag = () => {
|
23592
|
-
const dominantSpeaker =
|
23648
|
+
const dominantSpeaker = useHMSStore51(selectDominantSpeaker);
|
23593
23649
|
return dominantSpeaker && dominantSpeaker.name && /* @__PURE__ */ React102.createElement(
|
23594
23650
|
Flex,
|
23595
23651
|
{
|
@@ -23613,8 +23669,8 @@ var LogoImg = styled("img", {
|
|
23613
23669
|
var Logo = () => {
|
23614
23670
|
const roomLayout = useRoomLayout();
|
23615
23671
|
const logo = roomLayout?.logo?.url;
|
23616
|
-
const [hideImage, setHideImage] =
|
23617
|
-
|
23672
|
+
const [hideImage, setHideImage] = useState43(false);
|
23673
|
+
useEffect27(() => {
|
23618
23674
|
if (hideImage) {
|
23619
23675
|
setHideImage(false);
|
23620
23676
|
}
|
@@ -23638,10 +23694,10 @@ import React104 from "react";
|
|
23638
23694
|
|
23639
23695
|
// src/Prebuilt/components/RoomDetails/Duration.tsx
|
23640
23696
|
init_define_process_env();
|
23641
|
-
import React103, { useEffect as
|
23697
|
+
import React103, { useEffect as useEffect28, useState as useState44 } from "react";
|
23642
23698
|
var Duration = ({ timestamp }) => {
|
23643
|
-
const [elapsedTime, setElapsedTime] =
|
23644
|
-
|
23699
|
+
const [elapsedTime, setElapsedTime] = useState44(getFormattedTime(Date.now() - timestamp.getTime(), false));
|
23700
|
+
useEffect28(() => {
|
23645
23701
|
const timerAdded = setInterval(() => {
|
23646
23702
|
setElapsedTime(getFormattedTime(Date.now() - timestamp.getTime(), false));
|
23647
23703
|
}, 1e3);
|
@@ -23683,23 +23739,23 @@ var ShowRoomDetailHeader = () => {
|
|
23683
23739
|
|
23684
23740
|
// src/Prebuilt/components/SidePaneTabs.tsx
|
23685
23741
|
init_define_process_env();
|
23686
|
-
import React120, { useEffect as
|
23742
|
+
import React120, { useEffect as useEffect35, useState as useState53 } from "react";
|
23687
23743
|
import { useMedia as useMedia19 } from "react-use";
|
23688
23744
|
import { match as match10 } from "ts-pattern";
|
23689
|
-
import { selectPeerCount as selectPeerCount5, useHMSStore as
|
23745
|
+
import { selectPeerCount as selectPeerCount5, useHMSStore as useHMSStore64 } from "@100mslive/react-sdk";
|
23690
23746
|
import { CrossIcon as CrossIcon22 } from "@100mslive/react-icons";
|
23691
23747
|
|
23692
23748
|
// src/Prebuilt/components/Chat/Chat.tsx
|
23693
23749
|
init_define_process_env();
|
23694
|
-
import React117, { useCallback as useCallback30, useRef as
|
23750
|
+
import React117, { useCallback as useCallback30, useRef as useRef24 } from "react";
|
23695
23751
|
import { useMedia as useMedia18 } from "react-use";
|
23696
23752
|
import { match as match9 } from "ts-pattern";
|
23697
|
-
import { selectHMSMessagesCount, useHMSActions as useHMSActions40, useHMSStore as
|
23753
|
+
import { selectHMSMessagesCount, useHMSActions as useHMSActions40, useHMSStore as useHMSStore61, useHMSVanillaStore as useHMSVanillaStore10 } from "@100mslive/react-sdk";
|
23698
23754
|
import { ChevronDownIcon as ChevronDownIcon8 } from "@100mslive/react-icons";
|
23699
23755
|
|
23700
23756
|
// src/Prebuilt/components/Chat/ChatBody.tsx
|
23701
23757
|
init_define_process_env();
|
23702
|
-
import React109, { Fragment as Fragment10, useCallback as useCallback26, useEffect as
|
23758
|
+
import React109, { Fragment as Fragment10, useCallback as useCallback26, useEffect as useEffect30, useLayoutEffect, useMemo as useMemo11, useRef as useRef21, useState as useState47 } from "react";
|
23703
23759
|
import { useMedia as useMedia13 } from "react-use";
|
23704
23760
|
import AutoSizer from "react-virtualized-auto-sizer";
|
23705
23761
|
import { VariableSizeList } from "react-window";
|
@@ -23712,15 +23768,15 @@ import {
|
|
23712
23768
|
selectSessionStore as selectSessionStore5,
|
23713
23769
|
selectUnreadHMSMessagesCount as selectUnreadHMSMessagesCount2,
|
23714
23770
|
useHMSActions as useHMSActions36,
|
23715
|
-
useHMSStore as
|
23771
|
+
useHMSStore as useHMSStore55,
|
23716
23772
|
useHMSVanillaStore as useHMSVanillaStore9
|
23717
23773
|
} from "@100mslive/react-sdk";
|
23718
23774
|
import { SolidPinIcon } from "@100mslive/react-icons";
|
23719
23775
|
|
23720
23776
|
// src/Prebuilt/components/Chat/ChatActions.tsx
|
23721
23777
|
init_define_process_env();
|
23722
|
-
import React107, { useCallback as useCallback25, useState as
|
23723
|
-
import { selectLocalPeerName as selectLocalPeerName2, selectPermissions as selectPermissions17, useHMSActions as useHMSActions35, useHMSStore as
|
23778
|
+
import React107, { useCallback as useCallback25, useState as useState45 } from "react";
|
23779
|
+
import { selectLocalPeerName as selectLocalPeerName2, selectPermissions as selectPermissions17, useHMSActions as useHMSActions35, useHMSStore as useHMSStore53 } from "@100mslive/react-sdk";
|
23724
23780
|
import {
|
23725
23781
|
CopyIcon as CopyIcon2,
|
23726
23782
|
CrossCircleIcon as CrossCircleIcon2,
|
@@ -23748,10 +23804,10 @@ var MwebChatOption = ({
|
|
23748
23804
|
// src/Prebuilt/components/hooks/useChatBlacklist.ts
|
23749
23805
|
init_define_process_env();
|
23750
23806
|
import { useCallback as useCallback23 } from "react";
|
23751
|
-
import { selectLocalPeer as selectLocalPeer2, selectSessionStore as selectSessionStore2, useHMSActions as useHMSActions33, useHMSStore as
|
23807
|
+
import { selectLocalPeer as selectLocalPeer2, selectSessionStore as selectSessionStore2, useHMSActions as useHMSActions33, useHMSStore as useHMSStore52 } from "@100mslive/react-sdk";
|
23752
23808
|
var useChatBlacklist = (sessionStoreKey) => {
|
23753
23809
|
const hmsActions = useHMSActions33();
|
23754
|
-
const blacklistedIDs =
|
23810
|
+
const blacklistedIDs = useHMSStore52(selectSessionStore2(sessionStoreKey));
|
23755
23811
|
const blacklistItem = useCallback23(
|
23756
23812
|
async (blacklistID) => {
|
23757
23813
|
await hmsActions.sessionStore.set(sessionStoreKey, [...blacklistedIDs || [], blacklistID]).catch((err) => ToastManager.addToast({ title: err.description }));
|
@@ -23761,8 +23817,8 @@ var useChatBlacklist = (sessionStoreKey) => {
|
|
23761
23817
|
return { blacklistItem, blacklistedIDs };
|
23762
23818
|
};
|
23763
23819
|
var useIsPeerBlacklisted = ({ local = false, peerCustomerUserId = "" }) => {
|
23764
|
-
const localPeer =
|
23765
|
-
const blacklistedPeerIDs =
|
23820
|
+
const localPeer = useHMSStore52(selectLocalPeer2);
|
23821
|
+
const blacklistedPeerIDs = useHMSStore52(selectSessionStore2("chatPeerBlacklist" /* CHAT_PEER_BLACKLIST */)) || [];
|
23766
23822
|
return blacklistedPeerIDs?.includes(local ? localPeer?.customerUserId : peerCustomerUserId);
|
23767
23823
|
};
|
23768
23824
|
|
@@ -23842,11 +23898,11 @@ var ChatActions = ({
|
|
23842
23898
|
const { elements } = useRoomLayoutConferencingScreen();
|
23843
23899
|
const { can_hide_message = false, can_block_user = false } = elements?.chat?.real_time_controls || {};
|
23844
23900
|
const { roles_whitelist = [] } = elements?.chat || {};
|
23845
|
-
const [open, setOpen] =
|
23901
|
+
const [open, setOpen] = useState45(false);
|
23846
23902
|
const actions = useHMSActions35();
|
23847
|
-
const canRemoveOthers =
|
23903
|
+
const canRemoveOthers = useHMSStore53(selectPermissions17)?.removeOthers;
|
23848
23904
|
const { blacklistItem: blacklistPeer } = useChatBlacklist("chatPeerBlacklist" /* CHAT_PEER_BLACKLIST */);
|
23849
|
-
const localPeerName =
|
23905
|
+
const localPeerName = useHMSStore53(selectLocalPeerName2);
|
23850
23906
|
const { setPinnedMessages, unpinBlacklistedMessages } = usePinnedMessages();
|
23851
23907
|
const { blacklistItem: blacklistMessage, blacklistedIDs: blacklistedMessageIDs } = useChatBlacklist(
|
23852
23908
|
"chatMessageBlacklist" /* CHAT_MESSAGE_BLACKLIST */
|
@@ -24067,12 +24123,12 @@ var EmptyChat = () => {
|
|
24067
24123
|
|
24068
24124
|
// src/Prebuilt/components/hooks/usePinnedBy.tsx
|
24069
24125
|
init_define_process_env();
|
24070
|
-
import { useEffect as
|
24071
|
-
import { selectSessionStore as selectSessionStore4, useHMSStore as
|
24126
|
+
import { useEffect as useEffect29, useState as useState46 } from "react";
|
24127
|
+
import { selectSessionStore as selectSessionStore4, useHMSStore as useHMSStore54 } from "@100mslive/react-sdk";
|
24072
24128
|
var usePinnedBy = (messageId) => {
|
24073
|
-
const pinnedMessages =
|
24074
|
-
const [pinnedBy, setPinnedBy] =
|
24075
|
-
|
24129
|
+
const pinnedMessages = useHMSStore54(selectSessionStore4("pinnedMessages" /* PINNED_MESSAGES */));
|
24130
|
+
const [pinnedBy, setPinnedBy] = useState46("");
|
24131
|
+
useEffect29(() => {
|
24076
24132
|
let match16 = "";
|
24077
24133
|
pinnedMessages?.forEach((pinnedMessage) => {
|
24078
24134
|
if (pinnedMessage.id === messageId) {
|
@@ -24151,8 +24207,8 @@ var MessageType = ({
|
|
24151
24207
|
hasCurrentUserSent,
|
24152
24208
|
receiver
|
24153
24209
|
}) => {
|
24154
|
-
const peerName =
|
24155
|
-
const localPeerRoleName =
|
24210
|
+
const peerName = useHMSStore55(selectPeerNameByID3(receiver));
|
24211
|
+
const localPeerRoleName = useHMSStore55(selectLocalPeerRoleName3);
|
24156
24212
|
if (receiver) {
|
24157
24213
|
return /* @__PURE__ */ React109.createElement(MessageTypeContainer, { left: hasCurrentUserSent ? `${peerName ? `to ${peerName}` : ""}` : "to You", right: "(DM)" });
|
24158
24214
|
}
|
@@ -24195,18 +24251,18 @@ var SenderName = styled(Text, {
|
|
24195
24251
|
var ChatMessage = React109.memo(
|
24196
24252
|
({ index, style = {}, message }) => {
|
24197
24253
|
const { elements } = useRoomLayoutConferencingScreen();
|
24198
|
-
const rowRef =
|
24254
|
+
const rowRef = useRef21(null);
|
24199
24255
|
const isMobile = useMedia13(config.media.md);
|
24200
24256
|
const isPrivateChatEnabled = !!elements?.chat?.private_chat_enabled;
|
24201
24257
|
const isOverlay = elements?.chat?.is_overlay && isMobile;
|
24202
|
-
const localPeerId =
|
24258
|
+
const localPeerId = useHMSStore55(selectLocalPeerID10);
|
24203
24259
|
const [selectedRole, setRoleSelector] = useSetSubscribedChatSelector(CHAT_SELECTOR.ROLE);
|
24204
24260
|
const [selectedPeer, setPeerSelector] = useSetSubscribedChatSelector(CHAT_SELECTOR.PEER);
|
24205
24261
|
const messageType = getMessageType({
|
24206
24262
|
roles: message.recipientRoles,
|
24207
24263
|
receiver: message.recipientPeer
|
24208
24264
|
});
|
24209
|
-
const [openSheet, setOpenSheetBare] =
|
24265
|
+
const [openSheet, setOpenSheetBare] = useState47(false);
|
24210
24266
|
const showPinAction = !!elements?.chat?.allow_pinning_messages;
|
24211
24267
|
const showReply = message.sender !== selectedPeer.id && message.sender !== localPeerId && isPrivateChatEnabled;
|
24212
24268
|
useLayoutEffect(() => {
|
@@ -24367,7 +24423,7 @@ var VirtualizedChatMessages = React109.forwardRef(({ messages, scrollToBottom },
|
|
24367
24423
|
const itemKey2 = useCallback26((index, data3) => {
|
24368
24424
|
return data3[index].id;
|
24369
24425
|
}, []);
|
24370
|
-
|
24426
|
+
useEffect30(() => {
|
24371
24427
|
requestAnimationFrame(() => scrollToBottom(1));
|
24372
24428
|
}, [scrollToBottom]);
|
24373
24429
|
return /* @__PURE__ */ React109.createElement(
|
@@ -24418,15 +24474,15 @@ var VirtualizedChatMessages = React109.forwardRef(({ messages, scrollToBottom },
|
|
24418
24474
|
});
|
24419
24475
|
var ChatBody = React109.forwardRef(
|
24420
24476
|
({ scrollToBottom }, listRef) => {
|
24421
|
-
const messages =
|
24422
|
-
const blacklistedMessageIDs =
|
24423
|
-
const filteredMessages =
|
24477
|
+
const messages = useHMSStore55(selectHMSMessages);
|
24478
|
+
const blacklistedMessageIDs = useHMSStore55(selectSessionStore5("chatMessageBlacklist" /* CHAT_MESSAGE_BLACKLIST */));
|
24479
|
+
const filteredMessages = useMemo11(() => {
|
24424
24480
|
const blacklistedMessageIDSet = new Set(blacklistedMessageIDs || []);
|
24425
24481
|
return messages?.filter((message) => message.type === "chat" && !blacklistedMessageIDSet.has(message.id)) || [];
|
24426
24482
|
}, [blacklistedMessageIDs, messages]);
|
24427
24483
|
const vanillaStore = useHMSVanillaStore9();
|
24428
|
-
const rerenderOnFirstMount =
|
24429
|
-
|
24484
|
+
const rerenderOnFirstMount = useRef21(false);
|
24485
|
+
useEffect30(() => {
|
24430
24486
|
const unsubscribe = vanillaStore.subscribe(() => {
|
24431
24487
|
if (!listRef.current) {
|
24432
24488
|
return;
|
@@ -24438,7 +24494,7 @@ var ChatBody = React109.forwardRef(
|
|
24438
24494
|
}, selectUnreadHMSMessagesCount2);
|
24439
24495
|
return unsubscribe;
|
24440
24496
|
}, [vanillaStore, listRef, scrollToBottom]);
|
24441
|
-
|
24497
|
+
useEffect30(() => {
|
24442
24498
|
if (filteredMessages.length > 0 && listRef?.current && !rerenderOnFirstMount.current) {
|
24443
24499
|
rerenderOnFirstMount.current = true;
|
24444
24500
|
listRef.current.resetAfterIndex(0);
|
@@ -24453,7 +24509,7 @@ var PinnedBy = ({
|
|
24453
24509
|
rowRef
|
24454
24510
|
}) => {
|
24455
24511
|
const pinnedBy = usePinnedBy(messageId);
|
24456
|
-
const localPeerName =
|
24512
|
+
const localPeerName = useHMSStore55(selectLocalPeerName3);
|
24457
24513
|
useLayoutEffect(() => {
|
24458
24514
|
if (rowRef?.current) {
|
24459
24515
|
if (pinnedBy) {
|
@@ -24472,22 +24528,22 @@ var PinnedBy = ({
|
|
24472
24528
|
|
24473
24529
|
// src/Prebuilt/components/Chat/ChatFooter.tsx
|
24474
24530
|
init_define_process_env();
|
24475
|
-
import React112, { useCallback as useCallback28, useEffect as
|
24531
|
+
import React112, { useCallback as useCallback28, useEffect as useEffect32, useRef as useRef23, useState as useState50 } from "react";
|
24476
24532
|
import { useMedia as useMedia16 } from "react-use";
|
24477
24533
|
import data2 from "@emoji-mart/data";
|
24478
24534
|
import Picker from "@emoji-mart/react";
|
24479
|
-
import { selectLocalPeer as selectLocalPeer3, useHMSActions as useHMSActions38, useHMSStore as
|
24535
|
+
import { selectLocalPeer as selectLocalPeer3, useHMSActions as useHMSActions38, useHMSStore as useHMSStore58 } from "@100mslive/react-sdk";
|
24480
24536
|
import { EmojiIcon as EmojiIcon3, PauseCircleIcon as PauseCircleIcon2, SendIcon, VerticalMenuIcon as VerticalMenuIcon7 } from "@100mslive/react-icons";
|
24481
24537
|
|
24482
24538
|
// src/Prebuilt/components/Chat/ChatSelectorContainer.tsx
|
24483
24539
|
init_define_process_env();
|
24484
|
-
import React111, { useState as
|
24540
|
+
import React111, { useState as useState49 } from "react";
|
24485
24541
|
import { useMedia as useMedia15 } from "react-use";
|
24486
24542
|
import { ChevronDownIcon as ChevronDownIcon6, ChevronUpIcon as ChevronUpIcon5, CrossIcon as CrossIcon20, GroupIcon, PersonIcon as PersonIcon2 } from "@100mslive/react-icons";
|
24487
24543
|
|
24488
24544
|
// src/Prebuilt/components/Chat/ChatSelector.tsx
|
24489
24545
|
init_define_process_env();
|
24490
|
-
import React110, { useMemo as
|
24546
|
+
import React110, { useMemo as useMemo12, useState as useState48 } from "react";
|
24491
24547
|
import { useMedia as useMedia14 } from "react-use";
|
24492
24548
|
import {
|
24493
24549
|
HMSPeerType as HMSPeerType3,
|
@@ -24495,7 +24551,7 @@ import {
|
|
24495
24551
|
selectMessagesUnreadCountByRole,
|
24496
24552
|
selectRemotePeers as selectRemotePeers2,
|
24497
24553
|
selectUnreadHMSMessagesCount as selectUnreadHMSMessagesCount3,
|
24498
|
-
useHMSStore as
|
24554
|
+
useHMSStore as useHMSStore56
|
24499
24555
|
} from "@100mslive/react-sdk";
|
24500
24556
|
import { CheckIcon as CheckIcon6, PeopleIcon as PeopleIcon3 } from "@100mslive/react-icons";
|
24501
24557
|
var ChatDotIcon = () => {
|
@@ -24542,7 +24598,7 @@ var SelectorHeader = React110.memo(
|
|
24542
24598
|
}
|
24543
24599
|
);
|
24544
24600
|
var Everyone = React110.memo(({ active }) => {
|
24545
|
-
const unreadCount =
|
24601
|
+
const unreadCount = useHMSStore56(selectUnreadHMSMessagesCount3);
|
24546
24602
|
const [, setPeerSelector] = useSetSubscribedChatSelector(CHAT_SELECTOR.PEER);
|
24547
24603
|
const [, setRoleSelector] = useSetSubscribedChatSelector(CHAT_SELECTOR.ROLE);
|
24548
24604
|
return /* @__PURE__ */ React110.createElement(
|
@@ -24560,7 +24616,7 @@ var Everyone = React110.memo(({ active }) => {
|
|
24560
24616
|
);
|
24561
24617
|
});
|
24562
24618
|
var RoleItem = React110.memo(({ role, active }) => {
|
24563
|
-
const unreadCount =
|
24619
|
+
const unreadCount = useHMSStore56(selectMessagesUnreadCountByRole(role));
|
24564
24620
|
const [, setPeerSelector] = useSetSubscribedChatSelector(CHAT_SELECTOR.PEER);
|
24565
24621
|
const [, setRoleSelector] = useSetSubscribedChatSelector(CHAT_SELECTOR.ROLE);
|
24566
24622
|
return /* @__PURE__ */ React110.createElement(
|
@@ -24577,7 +24633,7 @@ var RoleItem = React110.memo(({ role, active }) => {
|
|
24577
24633
|
);
|
24578
24634
|
});
|
24579
24635
|
var PeerItem = ({ peerId, name, active }) => {
|
24580
|
-
const unreadCount =
|
24636
|
+
const unreadCount = useHMSStore56(selectMessagesUnreadCountByPeerID(peerId));
|
24581
24637
|
const [, setPeerSelector] = useSetSubscribedChatSelector(CHAT_SELECTOR.PEER);
|
24582
24638
|
const [, setRoleSelector] = useSetSubscribedChatSelector(CHAT_SELECTOR.ROLE);
|
24583
24639
|
return /* @__PURE__ */ React110.createElement(
|
@@ -24601,14 +24657,14 @@ var VirtualizedSelectItemList = ({
|
|
24601
24657
|
isPublicChatEnabled
|
24602
24658
|
}) => {
|
24603
24659
|
const roles = useFilteredRoles();
|
24604
|
-
const filteredPeers =
|
24660
|
+
const filteredPeers = useMemo12(
|
24605
24661
|
() => peers.filter(
|
24606
24662
|
// search should be empty or search phrase should be included in name
|
24607
24663
|
(peer) => (!searchValue || peer.name.toLowerCase().includes(searchValue.toLowerCase())) && peer.type !== HMSPeerType3.SIP
|
24608
24664
|
),
|
24609
24665
|
[peers, searchValue]
|
24610
24666
|
);
|
24611
|
-
const listItems =
|
24667
|
+
const listItems = useMemo12(() => {
|
24612
24668
|
let selectItems = [];
|
24613
24669
|
if (isPublicChatEnabled && !searchValue) {
|
24614
24670
|
selectItems = [/* @__PURE__ */ React110.createElement(Everyone, { active: !selectedRole && !selectedPeerId })];
|
@@ -24635,8 +24691,8 @@ var VirtualizedSelectItemList = ({
|
|
24635
24691
|
};
|
24636
24692
|
var ChatSelector = ({ role, peerId }) => {
|
24637
24693
|
const { elements } = useRoomLayoutConferencingScreen();
|
24638
|
-
const peers =
|
24639
|
-
const [search, setSearch] =
|
24694
|
+
const peers = useHMSStore56(selectRemotePeers2);
|
24695
|
+
const [search, setSearch] = useState48("");
|
24640
24696
|
const isPrivateChatEnabled = !!elements?.chat?.private_chat_enabled;
|
24641
24697
|
const isPublicChatEnabled = !!elements?.chat?.public_chat_enabled;
|
24642
24698
|
return /* @__PURE__ */ React110.createElement(React110.Fragment, null, peers.length > 0 && isPrivateChatEnabled && /* @__PURE__ */ React110.createElement(Box, { css: { px: "$4" } }, /* @__PURE__ */ React110.createElement(ParticipantSearch, { onSearch: setSearch, placeholder: "Search for participants" })), /* @__PURE__ */ React110.createElement(
|
@@ -24653,7 +24709,7 @@ var ChatSelector = ({ role, peerId }) => {
|
|
24653
24709
|
|
24654
24710
|
// src/Prebuilt/components/Chat/ChatSelectorContainer.tsx
|
24655
24711
|
var ChatSelectorContainer = () => {
|
24656
|
-
const [open, setOpen] =
|
24712
|
+
const [open, setOpen] = useState49(false);
|
24657
24713
|
const isMobile = useMedia15(config.media.md);
|
24658
24714
|
const { elements } = useRoomLayoutConferencingScreen();
|
24659
24715
|
const isPrivateChatEnabled = !!elements?.chat?.private_chat_enabled;
|
@@ -24772,10 +24828,10 @@ var ChatSelectorContainer = () => {
|
|
24772
24828
|
// src/Prebuilt/components/AppData/useChatState.js
|
24773
24829
|
init_define_process_env();
|
24774
24830
|
import { useCallback as useCallback27 } from "react";
|
24775
|
-
import { selectAppData as selectAppData7, useHMSActions as useHMSActions37, useHMSStore as
|
24831
|
+
import { selectAppData as selectAppData7, useHMSActions as useHMSActions37, useHMSStore as useHMSStore57 } from "@100mslive/react-sdk";
|
24776
24832
|
var useChatDraftMessage = () => {
|
24777
24833
|
const hmsActions = useHMSActions37();
|
24778
|
-
let chatDraftMessage =
|
24834
|
+
let chatDraftMessage = useHMSStore57(selectAppData7(APP_DATA.chatDraft));
|
24779
24835
|
if (chatDraftMessage === void 0 || chatDraftMessage === null) {
|
24780
24836
|
chatDraftMessage = "";
|
24781
24837
|
}
|
@@ -24790,10 +24846,10 @@ var useChatDraftMessage = () => {
|
|
24790
24846
|
|
24791
24847
|
// src/Prebuilt/components/Chat/useEmojiPickerStyles.js
|
24792
24848
|
init_define_process_env();
|
24793
|
-
import { useEffect as
|
24849
|
+
import { useEffect as useEffect31, useRef as useRef22 } from "react";
|
24794
24850
|
var useEmojiPickerStyles = (showing) => {
|
24795
|
-
const ref =
|
24796
|
-
|
24851
|
+
const ref = useRef22(null);
|
24852
|
+
useEffect31(() => {
|
24797
24853
|
if (showing) {
|
24798
24854
|
setTimeout(() => {
|
24799
24855
|
const root = ref.current?.querySelector("em-emoji-picker")?.shadowRoot;
|
@@ -24840,7 +24896,7 @@ var TextArea2 = styled("textarea", {
|
|
24840
24896
|
}
|
24841
24897
|
});
|
24842
24898
|
function EmojiPicker({ onSelect }) {
|
24843
|
-
const [showEmoji, setShowEmoji] =
|
24899
|
+
const [showEmoji, setShowEmoji] = useState50(false);
|
24844
24900
|
const ref = useEmojiPickerStyles(showEmoji);
|
24845
24901
|
return /* @__PURE__ */ React112.createElement(Popover2.Root, { open: showEmoji, onOpenChange: setShowEmoji }, /* @__PURE__ */ React112.createElement(Popover2.Trigger, { asChild: true, css: { appearance: "none" } }, /* @__PURE__ */ React112.createElement(IconButton, { as: "div" }, /* @__PURE__ */ React112.createElement(EmojiIcon3, null))), /* @__PURE__ */ React112.createElement(Popover2.Portal, null, /* @__PURE__ */ React112.createElement(
|
24846
24902
|
Popover2.Content,
|
@@ -24867,12 +24923,12 @@ function EmojiPicker({ onSelect }) {
|
|
24867
24923
|
}
|
24868
24924
|
var ChatFooter = ({ onSend, children }) => {
|
24869
24925
|
const hmsActions = useHMSActions38();
|
24870
|
-
const inputRef =
|
24926
|
+
const inputRef = useRef23(null);
|
24871
24927
|
const [draftMessage, setDraftMessage] = useChatDraftMessage();
|
24872
24928
|
const isMobile = useMedia16(config.media.md);
|
24873
24929
|
const { elements, screenType } = useRoomLayoutConferencingScreen();
|
24874
24930
|
const message_placeholder = elements?.chat?.message_placeholder || "Send a message";
|
24875
|
-
const localPeer =
|
24931
|
+
const localPeer = useHMSStore58(selectLocalPeer3);
|
24876
24932
|
const isOverlayChat = elements?.chat?.is_overlay;
|
24877
24933
|
const canDisableChat = !!elements?.chat?.real_time_controls?.can_disable_chat;
|
24878
24934
|
const selectedPeer = useSubscribeChatSelector(CHAT_SELECTOR.PEER);
|
@@ -24882,7 +24938,7 @@ var ChatFooter = ({ onSend, children }) => {
|
|
24882
24938
|
const isLocalPeerBlacklisted = useIsPeerBlacklisted({ local: true });
|
24883
24939
|
const isMwebHLSStream = useMobileHLSStream();
|
24884
24940
|
const isLandscapeHLSStream = useLandscapeHLSStream();
|
24885
|
-
|
24941
|
+
useEffect32(() => {
|
24886
24942
|
if (!selectedPeer.id && !selectedRole && !["Everyone", ""].includes(defaultSelection)) {
|
24887
24943
|
setRoleSelector(defaultSelection);
|
24888
24944
|
} else {
|
@@ -24891,6 +24947,16 @@ var ChatFooter = ({ onSend, children }) => {
|
|
24891
24947
|
}
|
24892
24948
|
}
|
24893
24949
|
}, [defaultSelection, selectedPeer, selectedRole, setRoleSelector, isMobile, isLandscapeHLSStream, elements?.chat]);
|
24950
|
+
const resetInputHeight = useCallback28(() => {
|
24951
|
+
if (inputRef.current) {
|
24952
|
+
inputRef.current.style.height = `${Math.max(32, inputRef.current.value ? inputRef.current.scrollHeight : 0)}px`;
|
24953
|
+
}
|
24954
|
+
}, []);
|
24955
|
+
const updateInputHeight = useCallback28(() => {
|
24956
|
+
if (inputRef.current) {
|
24957
|
+
inputRef.current.style.height = `${Math.max(32, Math.min(inputRef.current.scrollHeight, 24 * 4))}px`;
|
24958
|
+
}
|
24959
|
+
}, []);
|
24894
24960
|
const sendMessage = useCallback28(async () => {
|
24895
24961
|
const message = inputRef?.current?.value;
|
24896
24962
|
if (!message || !message.trim().length) {
|
@@ -24905,6 +24971,7 @@ var ChatFooter = ({ onSend, children }) => {
|
|
24905
24971
|
await hmsActions.sendBroadcastMessage(message);
|
24906
24972
|
}
|
24907
24973
|
inputRef.current.value = "";
|
24974
|
+
resetInputHeight();
|
24908
24975
|
setTimeout(() => {
|
24909
24976
|
onSend(1);
|
24910
24977
|
}, 0);
|
@@ -24915,13 +24982,14 @@ var ChatFooter = ({ onSend, children }) => {
|
|
24915
24982
|
});
|
24916
24983
|
}
|
24917
24984
|
}, [selectedRole, selectedPeer, hmsActions, onSend]);
|
24918
|
-
|
24985
|
+
useEffect32(() => {
|
24919
24986
|
const messageElement = inputRef.current;
|
24920
24987
|
if (messageElement) {
|
24921
24988
|
messageElement.value = draftMessage;
|
24989
|
+
updateInputHeight();
|
24922
24990
|
}
|
24923
24991
|
}, [draftMessage]);
|
24924
|
-
|
24992
|
+
useEffect32(() => {
|
24925
24993
|
const messageElement = inputRef.current;
|
24926
24994
|
return () => {
|
24927
24995
|
setDraftMessage(messageElement?.value || "");
|
@@ -24963,11 +25031,10 @@ var ChatFooter = ({ onSend, children }) => {
|
|
24963
25031
|
)))) : null), selection && /* @__PURE__ */ React112.createElement(Flex, { align: "center", css: { gap: "$4", w: "100%" } }, /* @__PURE__ */ React112.createElement(
|
24964
25032
|
Flex,
|
24965
25033
|
{
|
24966
|
-
align: "
|
25034
|
+
align: "end",
|
24967
25035
|
css: {
|
24968
25036
|
bg: isOverlayChat && isMobile ? "$surface_dim" : "$surface_default",
|
24969
25037
|
minHeight: "$16",
|
24970
|
-
maxHeight: "$24",
|
24971
25038
|
position: "relative",
|
24972
25039
|
py: "$6",
|
24973
25040
|
pl: "$8",
|
@@ -25006,6 +25073,8 @@ var ChatFooter = ({ onSend, children }) => {
|
|
25006
25073
|
},
|
25007
25074
|
autoComplete: "off",
|
25008
25075
|
"aria-autocomplete": "none",
|
25076
|
+
onChange: updateInputHeight,
|
25077
|
+
onBlur: resetInputHeight,
|
25009
25078
|
onPaste: (e) => e.stopPropagation(),
|
25010
25079
|
onCut: (e) => e.stopPropagation(),
|
25011
25080
|
onCopy: (e) => e.stopPropagation()
|
@@ -25052,13 +25121,13 @@ var ChatFooter = ({ onSend, children }) => {
|
|
25052
25121
|
// src/Prebuilt/components/Chat/ChatStates.tsx
|
25053
25122
|
init_define_process_env();
|
25054
25123
|
import React113, { useCallback as useCallback29 } from "react";
|
25055
|
-
import { selectLocalPeer as selectLocalPeer4, selectSessionStore as selectSessionStore6, useHMSActions as useHMSActions39, useHMSStore as
|
25124
|
+
import { selectLocalPeer as selectLocalPeer4, selectSessionStore as selectSessionStore6, useHMSActions as useHMSActions39, useHMSStore as useHMSStore59 } from "@100mslive/react-sdk";
|
25056
25125
|
var ChatPaused = () => {
|
25057
25126
|
const hmsActions = useHMSActions39();
|
25058
25127
|
const { elements } = useRoomLayoutConferencingScreen();
|
25059
25128
|
const can_disable_chat = !!elements?.chat?.real_time_controls?.can_disable_chat;
|
25060
|
-
const { enabled: isChatEnabled = true, updatedBy: chatStateUpdatedBy = "" } =
|
25061
|
-
const localPeer =
|
25129
|
+
const { enabled: isChatEnabled = true, updatedBy: chatStateUpdatedBy = "" } = useHMSStore59(selectSessionStore6("chatState" /* CHAT_STATE */)) || {};
|
25130
|
+
const localPeer = useHMSStore59(selectLocalPeer4);
|
25062
25131
|
const unPauseChat = useCallback29(
|
25063
25132
|
async () => await hmsActions.sessionStore.set("chatState" /* CHAT_STATE */, {
|
25064
25133
|
enabled: true,
|
@@ -25072,7 +25141,7 @@ var ChatPaused = () => {
|
|
25072
25141
|
{
|
25073
25142
|
align: "center",
|
25074
25143
|
justify: "between",
|
25075
|
-
css: { borderRadius: "$1", bg: "$surface_default", p: "$
|
25144
|
+
css: { borderRadius: "$1", bg: "$surface_default", p: "$2 $4 $2 $8", w: "100%" }
|
25076
25145
|
},
|
25077
25146
|
/* @__PURE__ */ React113.createElement(Box, null, /* @__PURE__ */ React113.createElement(Text, { variant: "sm", css: { fontWeight: "$semiBold", color: "$on_surface_high" } }, "Chat paused"), /* @__PURE__ */ React113.createElement(
|
25078
25147
|
Text,
|
@@ -25104,10 +25173,10 @@ var ChatBlocked = () => {
|
|
25104
25173
|
|
25105
25174
|
// src/Prebuilt/components/Chat/PinnedMessage.tsx
|
25106
25175
|
init_define_process_env();
|
25107
|
-
import React116, { useEffect as
|
25176
|
+
import React116, { useEffect as useEffect33, useState as useState51 } from "react";
|
25108
25177
|
import { useSwipeable } from "react-swipeable";
|
25109
25178
|
import { useMedia as useMedia17 } from "react-use";
|
25110
|
-
import { selectSessionStore as selectSessionStore7, useHMSStore as
|
25179
|
+
import { selectSessionStore as selectSessionStore7, useHMSStore as useHMSStore60 } from "@100mslive/react-sdk";
|
25111
25180
|
import { PinIcon as PinIcon2, UnpinIcon } from "@100mslive/react-icons";
|
25112
25181
|
|
25113
25182
|
// src/Prebuilt/components/Chat/ArrowNavigation.tsx
|
@@ -25163,13 +25232,13 @@ var StickIndicator = ({ total, index }) => {
|
|
25163
25232
|
// src/Prebuilt/components/Chat/PinnedMessage.tsx
|
25164
25233
|
var PINNED_MESSAGE_LENGTH = 75;
|
25165
25234
|
var PinnedMessage = () => {
|
25166
|
-
const pinnedMessages =
|
25167
|
-
const [pinnedMessageIndex, setPinnedMessageIndex] =
|
25235
|
+
const pinnedMessages = useHMSStore60(selectSessionStore7("pinnedMessages" /* PINNED_MESSAGES */));
|
25236
|
+
const [pinnedMessageIndex, setPinnedMessageIndex] = useState51(0);
|
25168
25237
|
const { removePinnedMessage } = usePinnedMessages();
|
25169
25238
|
const isMobile = useMedia17(config.media.md);
|
25170
25239
|
const { elements } = useRoomLayoutConferencingScreen();
|
25171
25240
|
const canUnpinMessage = !!elements?.chat?.allow_pinning_messages;
|
25172
|
-
const [hideOverflow, setHideOverflow] =
|
25241
|
+
const [hideOverflow, setHideOverflow] = useState51(true);
|
25173
25242
|
const currentPinnedMessage = pinnedMessages?.[pinnedMessageIndex]?.text || "";
|
25174
25243
|
const canOverflow = currentPinnedMessage.length > PINNED_MESSAGE_LENGTH;
|
25175
25244
|
const showPreviousPinnedMessage = () => {
|
@@ -25186,7 +25255,7 @@ var PinnedMessage = () => {
|
|
25186
25255
|
onSwipedUp: () => showNextPinnedMessage(),
|
25187
25256
|
onSwipedDown: () => showPreviousPinnedMessage()
|
25188
25257
|
});
|
25189
|
-
|
25258
|
+
useEffect33(() => {
|
25190
25259
|
const count = pinnedMessages?.length || 1;
|
25191
25260
|
if (pinnedMessageIndex >= count) {
|
25192
25261
|
setPinnedMessageIndex(count - 1);
|
@@ -25277,15 +25346,16 @@ var PinnedMessage = () => {
|
|
25277
25346
|
|
25278
25347
|
// src/Prebuilt/components/Chat/Chat.tsx
|
25279
25348
|
var Chat = () => {
|
25280
|
-
const { elements } = useRoomLayoutConferencingScreen();
|
25281
|
-
const listRef =
|
25349
|
+
const { elements, screenType } = useRoomLayoutConferencingScreen();
|
25350
|
+
const listRef = useRef24(null);
|
25282
25351
|
const hmsActions = useHMSActions40();
|
25283
25352
|
const vanillaStore = useHMSVanillaStore10();
|
25284
|
-
const { enabled: isChatEnabled = true } =
|
25353
|
+
const { enabled: isChatEnabled = true } = useHMSStore61(Tm("chatState" /* CHAT_STATE */)) || {};
|
25285
25354
|
const isMobile = useMedia18(config.media.md);
|
25286
25355
|
const isMobileHLSStream = useMobileHLSStream();
|
25287
25356
|
const isLandscapeStream = useLandscapeHLSStream();
|
25288
25357
|
useSidepaneResetOnLayoutUpdate("chat", SIDE_PANE_OPTIONS.CHAT);
|
25358
|
+
const isLocalPeerBlacklisted = useIsPeerBlacklisted({ local: true });
|
25289
25359
|
const scrollToBottom = useCallback30(
|
25290
25360
|
(unreadCount = 0) => {
|
25291
25361
|
if (listRef.current && listRef.current.scrollToItem && unreadCount > 0) {
|
@@ -25312,16 +25382,15 @@ var Chat = () => {
|
|
25312
25382
|
},
|
25313
25383
|
isMobile && elements?.chat?.is_overlay && !streaming ? null : /* @__PURE__ */ React117.createElement(PinnedMessage, null),
|
25314
25384
|
/* @__PURE__ */ React117.createElement(ChatBody, { ref: listRef, scrollToBottom }),
|
25315
|
-
/* @__PURE__ */ React117.createElement(ChatPaused, null),
|
25316
|
-
/* @__PURE__ */ React117.createElement(ChatBlocked, null),
|
25385
|
+
/* @__PURE__ */ React117.createElement(Flex, { align: "center", css: { w: "100%", gap: "$2" } }, /* @__PURE__ */ React117.createElement(ChatPaused, null), /* @__PURE__ */ React117.createElement(ChatBlocked, null), streaming && (!isChatEnabled || isLocalPeerBlacklisted) && /* @__PURE__ */ React117.createElement(React117.Fragment, null, /* @__PURE__ */ React117.createElement(RaiseHand, { css: { bg: "$surface_default" } }), /* @__PURE__ */ React117.createElement(MoreSettings, { elements, screenType }))),
|
25317
25386
|
isMobile && elements?.chat?.is_overlay && !streaming ? /* @__PURE__ */ React117.createElement(PinnedMessage, null) : null,
|
25318
25387
|
isChatEnabled ? /* @__PURE__ */ React117.createElement(ChatFooter, { onSend: scrollToBottom }, /* @__PURE__ */ React117.createElement(NewMessageIndicator, { scrollToBottom, listRef })) : null,
|
25319
|
-
|
25388
|
+
streaming && /* @__PURE__ */ React117.createElement(
|
25320
25389
|
Box,
|
25321
25390
|
{
|
25322
25391
|
css: {
|
25323
25392
|
position: "absolute",
|
25324
|
-
...match9({ isLandscapeStream, isMobileHLSStream, isChatEnabled }).with(
|
25393
|
+
...match9({ isLandscapeStream, isMobileHLSStream, isChatEnabled, isLocalPeerBlacklisted }).with(
|
25325
25394
|
{
|
25326
25395
|
isLandscapeStream: true,
|
25327
25396
|
isChatEnabled: true
|
@@ -25342,13 +25411,21 @@ var Chat = () => {
|
|
25342
25411
|
).with(
|
25343
25412
|
{
|
25344
25413
|
isMobileHLSStream: true,
|
25345
|
-
isChatEnabled: true
|
25414
|
+
isChatEnabled: true,
|
25415
|
+
isLocalPeerBlacklisted: false
|
25346
25416
|
},
|
25347
25417
|
() => ({ bottom: "$17", right: "$8" })
|
25348
25418
|
).with(
|
25349
25419
|
{
|
25350
25420
|
isLandscapeStream: false,
|
25351
|
-
isChatEnabled: true
|
25421
|
+
isChatEnabled: true,
|
25422
|
+
isLocalPeerBlacklisted: true
|
25423
|
+
},
|
25424
|
+
() => ({ bottom: "$18", right: "$8" })
|
25425
|
+
).with(
|
25426
|
+
{
|
25427
|
+
isMobileHLSStream: true,
|
25428
|
+
isLocalPeerBlacklisted: true
|
25352
25429
|
},
|
25353
25430
|
() => ({ bottom: "$20", right: "$8" })
|
25354
25431
|
).otherwise(() => ({}))
|
@@ -25362,7 +25439,7 @@ var NewMessageIndicator = ({
|
|
25362
25439
|
scrollToBottom,
|
25363
25440
|
listRef
|
25364
25441
|
}) => {
|
25365
|
-
const unreadCount =
|
25442
|
+
const unreadCount = useHMSStore61(Fh);
|
25366
25443
|
if (!unreadCount || !listRef.current) {
|
25367
25444
|
return null;
|
25368
25445
|
}
|
@@ -25408,11 +25485,11 @@ var NewMessageIndicator = ({
|
|
25408
25485
|
|
25409
25486
|
// src/Prebuilt/components/Footer/PaginatedParticipants.tsx
|
25410
25487
|
init_define_process_env();
|
25411
|
-
import React118, { useEffect as
|
25488
|
+
import React118, { useEffect as useEffect34, useState as useState52 } from "react";
|
25412
25489
|
import { useInView } from "react-intersection-observer";
|
25413
25490
|
import { useMeasure as useMeasure2 } from "react-use";
|
25414
25491
|
import { VariableSizeList as VariableSizeList2 } from "react-window";
|
25415
|
-
import { selectIsConnectedToRoom as selectIsConnectedToRoom8, useHMSStore as
|
25492
|
+
import { selectIsConnectedToRoom as selectIsConnectedToRoom8, useHMSStore as useHMSStore62, usePaginatedParticipants as usePaginatedParticipants2 } from "@100mslive/react-sdk";
|
25416
25493
|
import { ChevronLeftIcon as ChevronLeftIcon6, CrossIcon as CrossIcon21 } from "@100mslive/react-icons";
|
25417
25494
|
var LoadMoreParticipants = ({
|
25418
25495
|
hasNext,
|
@@ -25420,8 +25497,8 @@ var LoadMoreParticipants = ({
|
|
25420
25497
|
style
|
25421
25498
|
}) => {
|
25422
25499
|
const { ref, inView } = useInView();
|
25423
|
-
const [inProgress, setInProgress] =
|
25424
|
-
|
25500
|
+
const [inProgress, setInProgress] = useState52(false);
|
25501
|
+
useEffect34(() => {
|
25425
25502
|
if (hasNext && inView && !inProgress) {
|
25426
25503
|
setInProgress(true);
|
25427
25504
|
loadMore().catch(console.error).finally(() => setInProgress(false));
|
@@ -25451,13 +25528,13 @@ var VirtualizedParticipantItem2 = React118.memo(
|
|
25451
25528
|
);
|
25452
25529
|
var PaginatedParticipants = ({ roleName, onBack }) => {
|
25453
25530
|
const { peers, total, hasNext, loadPeers, loadMorePeers } = usePaginatedParticipants2({ role: roleName, limit: 20 });
|
25454
|
-
const [search, setSearch] =
|
25531
|
+
const [search, setSearch] = useState52("");
|
25455
25532
|
const filteredPeers = peers.filter((p) => p.name?.toLowerCase().includes(search?.toLowerCase()));
|
25456
|
-
const isConnected =
|
25533
|
+
const isConnected = useHMSStore62(selectIsConnectedToRoom8);
|
25457
25534
|
const [ref, { width }] = useMeasure2();
|
25458
25535
|
const height = ROW_HEIGHT * (filteredPeers.length + 1);
|
25459
25536
|
const resetSidePane = useSidepaneReset();
|
25460
|
-
|
25537
|
+
useEffect34(() => {
|
25461
25538
|
loadPeers();
|
25462
25539
|
}, []);
|
25463
25540
|
return /* @__PURE__ */ React118.createElement(Flex, { ref, direction: "column", css: { size: "100%", gap: "$4" } }, /* @__PURE__ */ React118.createElement(Flex, { align: "center" }, /* @__PURE__ */ React118.createElement(Flex, { align: "center", css: { flex: "1 1 0", cursor: "pointer" }, onClick: onBack }, /* @__PURE__ */ React118.createElement(ChevronLeftIcon6, null), /* @__PURE__ */ React118.createElement(Text, { variant: "lg", css: { flex: "1 1 0" } }, "Participants")), /* @__PURE__ */ React118.createElement(
|
@@ -25487,14 +25564,14 @@ var PaginatedParticipants = ({ roleName, onBack }) => {
|
|
25487
25564
|
// src/Prebuilt/components/ChatSettings.tsx
|
25488
25565
|
init_define_process_env();
|
25489
25566
|
import React119 from "react";
|
25490
|
-
import { selectLocalPeer as selectLocalPeer5, selectSessionStore as selectSessionStore8, useHMSActions as useHMSActions41, useHMSStore as
|
25567
|
+
import { selectLocalPeer as selectLocalPeer5, selectSessionStore as selectSessionStore8, useHMSActions as useHMSActions41, useHMSStore as useHMSStore63 } from "@100mslive/react-sdk";
|
25491
25568
|
import { PauseCircleIcon as PauseCircleIcon3, SettingsIcon as SettingsIcon5 } from "@100mslive/react-icons";
|
25492
25569
|
var ChatSettings = () => {
|
25493
25570
|
const hmsActions = useHMSActions41();
|
25494
|
-
const localPeer =
|
25571
|
+
const localPeer = useHMSStore63(selectLocalPeer5);
|
25495
25572
|
const { elements } = useRoomLayoutConferencingScreen();
|
25496
25573
|
const canPauseChat = !!elements?.chat?.real_time_controls?.can_disable_chat;
|
25497
|
-
const { enabled: isChatEnabled = true } =
|
25574
|
+
const { enabled: isChatEnabled = true } = useHMSStore63(selectSessionStore8("chatState" /* CHAT_STATE */)) || {};
|
25498
25575
|
const showPause = canPauseChat && isChatEnabled;
|
25499
25576
|
if (!showPause) {
|
25500
25577
|
return null;
|
@@ -25559,9 +25636,9 @@ var SidePaneTabs = React120.memo(({ active = SIDE_PANE_OPTIONS.CHAT, hideTab = f
|
|
25559
25636
|
const toggleChat = useSidepaneToggle(SIDE_PANE_OPTIONS.CHAT);
|
25560
25637
|
const toggleParticipants = useSidepaneToggle(SIDE_PANE_OPTIONS.PARTICIPANTS);
|
25561
25638
|
const resetSidePane = useSidepaneReset();
|
25562
|
-
const [activeTab, setActiveTab] =
|
25563
|
-
const [activeRole, setActiveRole] =
|
25564
|
-
const peerCount =
|
25639
|
+
const [activeTab, setActiveTab] = useState53(active);
|
25640
|
+
const [activeRole, setActiveRole] = useState53("");
|
25641
|
+
const peerCount = useHMSStore64(selectPeerCount5);
|
25565
25642
|
const { elements, screenType } = useRoomLayoutConferencingScreen();
|
25566
25643
|
const chat_title = elements?.chat?.chat_title || "Chat";
|
25567
25644
|
const showChat = !!elements?.chat;
|
@@ -25572,7 +25649,7 @@ var SidePaneTabs = React120.memo(({ active = SIDE_PANE_OPTIONS.CHAT, hideTab = f
|
|
25572
25649
|
const { off_stage_roles = [] } = elements?.on_stage_exp || {};
|
25573
25650
|
const isChatOpen = useIsSidepaneTypeOpen(SIDE_PANE_OPTIONS.CHAT);
|
25574
25651
|
const showChatSettings = showChat && isChatOpen && (!isMobile || !isOverlayChat);
|
25575
|
-
|
25652
|
+
useEffect35(() => {
|
25576
25653
|
match10({ activeTab, showChat, showParticipants }).with({ activeTab: SIDE_PANE_OPTIONS.CHAT, showChat: false, showParticipants: true }, () => {
|
25577
25654
|
setActiveTab(SIDE_PANE_OPTIONS.PARTICIPANTS);
|
25578
25655
|
}).with({ activeTab: SIDE_PANE_OPTIONS.PARTICIPANTS, showChat: true, showParticipants: false }, () => {
|
@@ -25581,7 +25658,7 @@ var SidePaneTabs = React120.memo(({ active = SIDE_PANE_OPTIONS.CHAT, hideTab = f
|
|
25581
25658
|
resetSidePane();
|
25582
25659
|
});
|
25583
25660
|
}, [showChat, activeTab, showParticipants, resetSidePane]);
|
25584
|
-
|
25661
|
+
useEffect35(() => {
|
25585
25662
|
setActiveTab(active);
|
25586
25663
|
}, [active]);
|
25587
25664
|
if (activeRole) {
|
@@ -25680,7 +25757,7 @@ var SidePaneTabs = React120.memo(({ active = SIDE_PANE_OPTIONS.CHAT, hideTab = f
|
|
25680
25757
|
|
25681
25758
|
// src/Prebuilt/components/VideoTile.tsx
|
25682
25759
|
init_define_process_env();
|
25683
|
-
import React124, { useCallback as useCallback31, useMemo as
|
25760
|
+
import React124, { useCallback as useCallback31, useMemo as useMemo13, useState as useState55 } from "react";
|
25684
25761
|
import { useMeasure as useMeasure3 } from "react-use";
|
25685
25762
|
import {
|
25686
25763
|
selectAudioTrackByPeerID as selectAudioTrackByPeerID2,
|
@@ -25691,7 +25768,7 @@ import {
|
|
25691
25768
|
selectPeerNameByID as selectPeerNameByID4,
|
25692
25769
|
selectVideoTrackByID as selectVideoTrackByID3,
|
25693
25770
|
selectVideoTrackByPeerID as selectVideoTrackByPeerID3,
|
25694
|
-
useHMSStore as
|
25771
|
+
useHMSStore as useHMSStore68
|
25695
25772
|
} from "@100mslive/react-sdk";
|
25696
25773
|
import { BrbTileIcon, HandIcon as HandIcon5, MicOffIcon as MicOffIcon6 } from "@100mslive/react-icons";
|
25697
25774
|
|
@@ -25703,7 +25780,7 @@ import {
|
|
25703
25780
|
selectPeerTypeByID as selectPeerTypeByID2,
|
25704
25781
|
selectScreenShareByPeerID,
|
25705
25782
|
selectSessionStore as selectSessionStore9,
|
25706
|
-
useHMSStore as
|
25783
|
+
useHMSStore as useHMSStore65
|
25707
25784
|
} from "@100mslive/react-sdk";
|
25708
25785
|
import { CallIcon as CallIcon2, PinIcon as PinIcon3, ShareScreenIcon as ShareScreenIcon3, SpotlightIcon } from "@100mslive/react-icons";
|
25709
25786
|
var TileConnection = ({
|
@@ -25713,9 +25790,9 @@ var TileConnection = ({
|
|
25713
25790
|
width,
|
25714
25791
|
pinned
|
25715
25792
|
}) => {
|
25716
|
-
const spotlighted =
|
25717
|
-
const isPeerScreenSharing = !!
|
25718
|
-
const peerType =
|
25793
|
+
const spotlighted = useHMSStore65(selectSessionStore9("spotlight" /* SPOTLIGHT */)) === peerId;
|
25794
|
+
const isPeerScreenSharing = !!useHMSStore65(selectScreenShareByPeerID(peerId));
|
25795
|
+
const peerType = useHMSStore65(selectPeerTypeByID2(peerId));
|
25719
25796
|
return /* @__PURE__ */ React121.createElement(Wrapper2, null, !hideLabel ? /* @__PURE__ */ React121.createElement(React121.Fragment, null, name ? /* @__PURE__ */ React121.createElement(Flex, { align: "center" }, peerType === HMSPeerType4.SIP && /* @__PURE__ */ React121.createElement(IconWrapper, null, /* @__PURE__ */ React121.createElement(CallIcon2, { width: "15", height: "15" })), isPeerScreenSharing && /* @__PURE__ */ React121.createElement(IconWrapper, null, /* @__PURE__ */ React121.createElement(ShareScreenIcon3, { width: "15", height: "15" })), pinned && /* @__PURE__ */ React121.createElement(IconWrapper, null, /* @__PURE__ */ React121.createElement(PinIcon3, { width: "15", height: "15" })), spotlighted && /* @__PURE__ */ React121.createElement(IconWrapper, null, /* @__PURE__ */ React121.createElement(SpotlightIcon, { width: "15", height: "15" })), /* @__PURE__ */ React121.createElement(
|
25720
25797
|
Text,
|
25721
25798
|
{
|
@@ -25749,7 +25826,7 @@ var TileConnection_default = TileConnection;
|
|
25749
25826
|
|
25750
25827
|
// src/Prebuilt/components/TileMenu/TileMenu.tsx
|
25751
25828
|
init_define_process_env();
|
25752
|
-
import React123, { useState as
|
25829
|
+
import React123, { useState as useState54 } from "react";
|
25753
25830
|
import { useMedia as useMedia21 } from "react-use";
|
25754
25831
|
import {
|
25755
25832
|
selectLocalPeerID as selectLocalPeerID11,
|
@@ -25757,7 +25834,7 @@ import {
|
|
25757
25834
|
selectPermissions as selectPermissions19,
|
25758
25835
|
selectTrackByID as selectTrackByID3,
|
25759
25836
|
selectVideoTrackByPeerID as selectVideoTrackByPeerID2,
|
25760
|
-
useHMSStore as
|
25837
|
+
useHMSStore as useHMSStore67,
|
25761
25838
|
useRemoteAVToggle as useRemoteAVToggle2
|
25762
25839
|
} from "@100mslive/react-sdk";
|
25763
25840
|
import { CrossIcon as CrossIcon23, VerticalMenuIcon as VerticalMenuIcon8 } from "@100mslive/react-icons";
|
@@ -25773,7 +25850,7 @@ import {
|
|
25773
25850
|
selectTrackByID as selectTrackByID2,
|
25774
25851
|
useCustomEvent as useCustomEvent2,
|
25775
25852
|
useHMSActions as useHMSActions42,
|
25776
|
-
useHMSStore as
|
25853
|
+
useHMSStore as useHMSStore66,
|
25777
25854
|
useRemoteAVToggle
|
25778
25855
|
} from "@100mslive/react-sdk";
|
25779
25856
|
import {
|
@@ -25811,7 +25888,7 @@ var SpotlightActions = ({
|
|
25811
25888
|
}
|
25812
25889
|
}) => {
|
25813
25890
|
const hmsActions = useHMSActions42();
|
25814
|
-
const spotlightPeerId =
|
25891
|
+
const spotlightPeerId = useHMSStore66(selectSessionStore10("spotlight" /* SPOTLIGHT */));
|
25815
25892
|
const isTileSpotlighted = spotlightPeerId === peerId;
|
25816
25893
|
const dragClassName = getDragClassName();
|
25817
25894
|
const setSpotlightPeerId = (peerIdToSpotlight) => hmsActions.sessionStore.set("spotlight" /* SPOTLIGHT */, peerIdToSpotlight).catch((err) => ToastManager.addToast({ title: err.description }));
|
@@ -25858,7 +25935,7 @@ var MinimiseInset = () => {
|
|
25858
25935
|
return /* @__PURE__ */ React122.createElement(React122.Fragment, null, /* @__PURE__ */ React122.createElement(StyledMenuTile.ItemButton, { className: dragClassName, css: spacingCSS, onClick: () => setMinimised(!minimised) }, /* @__PURE__ */ React122.createElement(ShrinkIcon, { height: 20, width: 20 }), /* @__PURE__ */ React122.createElement("span", null, minimised ? "Show" : "Minimise", " your video")));
|
25859
25936
|
};
|
25860
25937
|
var SimulcastLayers = ({ trackId }) => {
|
25861
|
-
const track =
|
25938
|
+
const track = useHMSStore66(selectTrackByID2(trackId));
|
25862
25939
|
const actions = useHMSActions42();
|
25863
25940
|
const bg = useDropdownSelection();
|
25864
25941
|
if (!track?.layerDefinitions?.length || track.degraded || !track.enabled) {
|
@@ -25946,11 +26023,11 @@ var TileMenuContent = ({
|
|
25946
26023
|
}) => {
|
25947
26024
|
const actions = useHMSActions42();
|
25948
26025
|
const dragClassName = getDragClassName();
|
25949
|
-
const permissions =
|
26026
|
+
const permissions = useHMSStore66(selectPermissions18);
|
25950
26027
|
const canChangeRole = !!permissions?.changeRole;
|
25951
26028
|
const removeOthers = !!permissions?.removeOthers;
|
25952
26029
|
const { userName } = useHMSPrebuiltContext();
|
25953
|
-
const roles =
|
26030
|
+
const roles = useHMSStore66(selectAvailableRoleNames6);
|
25954
26031
|
const { isAudioEnabled, isVideoEnabled, setVolume, toggleAudio, toggleVideo, volume } = useRemoteAVToggle(
|
25955
26032
|
audioTrackID,
|
25956
26033
|
videoTrackID
|
@@ -26058,21 +26135,21 @@ var TileMenu = ({
|
|
26058
26135
|
canMinimise,
|
26059
26136
|
enableSpotlightingPeer = true
|
26060
26137
|
}) => {
|
26061
|
-
const [open, setOpen] =
|
26138
|
+
const [open, setOpen] = useState54(false);
|
26062
26139
|
const { theme: theme2 } = useTheme();
|
26063
|
-
const localPeerID =
|
26140
|
+
const localPeerID = useHMSStore67(selectLocalPeerID11);
|
26064
26141
|
const isLocal = localPeerID === peerID;
|
26065
|
-
const { removeOthers } =
|
26142
|
+
const { removeOthers } = useHMSStore67(selectPermissions19) || {};
|
26066
26143
|
const { setVolume, toggleAudio, toggleVideo } = useRemoteAVToggle2(audioTrackID, videoTrackID);
|
26067
26144
|
const showSpotlight = enableSpotlightingPeer;
|
26068
|
-
const isPrimaryVideoTrack =
|
26145
|
+
const isPrimaryVideoTrack = useHMSStore67(selectVideoTrackByPeerID2(peerID))?.id === videoTrackID;
|
26069
26146
|
const showPinAction = !!(audioTrackID || videoTrackID && isPrimaryVideoTrack);
|
26070
|
-
const track =
|
26147
|
+
const track = useHMSStore67(selectTrackByID3(videoTrackID));
|
26071
26148
|
const hideSimulcastLayers = !track?.layerDefinitions?.length || track.degraded || !track.enabled;
|
26072
26149
|
const isMobile = useMedia21(config.media.md);
|
26073
|
-
const peer =
|
26074
|
-
const [showNameChangeModal, setShowNameChangeModal] =
|
26075
|
-
const [showRoleChangeModal, setShowRoleChangeModal] =
|
26150
|
+
const peer = useHMSStore67(selectPeerByID2(peerID));
|
26151
|
+
const [showNameChangeModal, setShowNameChangeModal] = useState54(false);
|
26152
|
+
const [showRoleChangeModal, setShowRoleChangeModal] = useState54(false);
|
26076
26153
|
useDropdownList({ open, name: "TileMenu" });
|
26077
26154
|
const dragClassName = getDragClassName();
|
26078
26155
|
if (!(removeOthers || toggleAudio || toggleVideo || setVolume || showPinAction) && hideSimulcastLayers) {
|
@@ -26150,9 +26227,9 @@ var getVideoTileLabel = ({ peerName, isLocal, track }) => {
|
|
26150
26227
|
|
26151
26228
|
// src/Prebuilt/components/VideoTile.tsx
|
26152
26229
|
var PeerMetadata = ({ peerId, size }) => {
|
26153
|
-
const metaData =
|
26230
|
+
const metaData = useHMSStore68(selectPeerMetadata4(peerId));
|
26154
26231
|
const isBRB = metaData?.isBRBOn || false;
|
26155
|
-
const isHandRaised =
|
26232
|
+
const isHandRaised = useHMSStore68(selectHasPeerHandRaised3(peerId));
|
26156
26233
|
return /* @__PURE__ */ React124.createElement(React124.Fragment, null, isHandRaised ? /* @__PURE__ */ React124.createElement(StyledVideoTile.AttributeBox, { size, "data-testid": "raiseHand_icon_onTile" }, /* @__PURE__ */ React124.createElement(HandIcon5, { width: 24, height: 24 })) : null, isBRB ? /* @__PURE__ */ React124.createElement(StyledVideoTile.AttributeBox, { size, "data-testid": "brb_icon_onTile" }, /* @__PURE__ */ React124.createElement(BrbTileIcon, { width: 22, height: 22 })) : null);
|
26157
26234
|
};
|
26158
26235
|
var Tile = ({
|
@@ -26172,16 +26249,16 @@ var Tile = ({
|
|
26172
26249
|
hideMetadataOnTile = false
|
26173
26250
|
}) => {
|
26174
26251
|
const trackSelector = trackId ? selectVideoTrackByID3(trackId) : selectVideoTrackByPeerID3(peerId);
|
26175
|
-
const track =
|
26176
|
-
const peerName =
|
26177
|
-
const audioTrack =
|
26178
|
-
const localPeerID =
|
26252
|
+
const track = useHMSStore68(trackSelector);
|
26253
|
+
const peerName = useHMSStore68(selectPeerNameByID4(peerId));
|
26254
|
+
const audioTrack = useHMSStore68(selectAudioTrackByPeerID2(peerId));
|
26255
|
+
const localPeerID = useHMSStore68(selectLocalPeerID12);
|
26179
26256
|
const isAudioOnly = useUISettings(UI_SETTINGS.isAudioOnly);
|
26180
26257
|
const mirrorLocalVideo = useUISettings(UI_SETTINGS.mirrorLocalVideo);
|
26181
26258
|
const showStatsOnTiles = useUISettings(UI_SETTINGS.showStatsOnTiles);
|
26182
|
-
const isAudioMuted = !
|
26259
|
+
const isAudioMuted = !useHMSStore68(selectIsPeerAudioEnabled2(peerId));
|
26183
26260
|
const isVideoMuted = !track?.enabled;
|
26184
|
-
const [isMouseHovered, setIsMouseHovered] =
|
26261
|
+
const [isMouseHovered, setIsMouseHovered] = useState55(false);
|
26185
26262
|
const isVideoDegraded = track?.degraded;
|
26186
26263
|
const isLocal = localPeerID === peerId;
|
26187
26264
|
const [pinnedTrackId] = useSetAppDataByKey(APP_DATA.pinnedTrackId);
|
@@ -26200,7 +26277,7 @@ var Tile = ({
|
|
26200
26277
|
}, []);
|
26201
26278
|
const [ref, { width: calculatedWidth, height: calculatedHeight }] = useMeasure3();
|
26202
26279
|
const isTileBigEnoughToShowStats = calculatedHeight >= 180 && calculatedWidth >= 180;
|
26203
|
-
const [avatarSize, attribBoxSize] =
|
26280
|
+
const [avatarSize, attribBoxSize] = useMemo13(
|
26204
26281
|
() => calculateAvatarAndAttribBoxSize(calculatedWidth, calculatedHeight),
|
26205
26282
|
[calculatedWidth, calculatedHeight]
|
26206
26283
|
);
|
@@ -26268,7 +26345,7 @@ var VideoTile_default = VideoTile;
|
|
26268
26345
|
|
26269
26346
|
// src/Prebuilt/components/VirtualBackground/VBPicker.tsx
|
26270
26347
|
init_define_process_env();
|
26271
|
-
import React127, { useEffect as
|
26348
|
+
import React127, { useEffect as useEffect36, useState as useState56 } from "react";
|
26272
26349
|
import { useMedia as useMedia22 } from "react-use";
|
26273
26350
|
import { HMSVirtualBackgroundTypes as HMSVirtualBackgroundTypes3 } from "@100mslive/hms-virtual-background";
|
26274
26351
|
import {
|
@@ -26280,7 +26357,7 @@ import {
|
|
26280
26357
|
selectRoomState as selectRoomState4,
|
26281
26358
|
selectVideoTrackByID as selectVideoTrackByID4,
|
26282
26359
|
useHMSActions as useHMSActions43,
|
26283
|
-
useHMSStore as
|
26360
|
+
useHMSStore as useHMSStore69
|
26284
26361
|
} from "@100mslive/react-sdk";
|
26285
26362
|
import { BlurPersonHighIcon, CrossCircleIcon as CrossCircleIcon3, CrossIcon as CrossIcon24 } from "@100mslive/react-icons";
|
26286
26363
|
|
@@ -26460,25 +26537,25 @@ var iconDims = { height: "40px", width: "40px" };
|
|
26460
26537
|
var VBPicker = ({ backgroundMedia = [] }) => {
|
26461
26538
|
const toggleVB = useSidepaneToggle(SIDE_PANE_OPTIONS.VB);
|
26462
26539
|
const hmsActions = useHMSActions43();
|
26463
|
-
const localPeer =
|
26464
|
-
const role =
|
26465
|
-
const isVideoOn =
|
26540
|
+
const localPeer = useHMSStore69(selectLocalPeer6);
|
26541
|
+
const role = useHMSStore69(oi);
|
26542
|
+
const isVideoOn = useHMSStore69(selectIsLocalVideoEnabled6);
|
26466
26543
|
const mirrorLocalVideo = useUISettings(UI_SETTINGS.mirrorLocalVideo);
|
26467
26544
|
const trackSelector = selectVideoTrackByID4(localPeer?.videoTrack);
|
26468
|
-
const track =
|
26469
|
-
const [blurAmount, setBlurAmount] =
|
26470
|
-
const roomState =
|
26471
|
-
const isLargeRoom =
|
26472
|
-
const isEffectsEnabled =
|
26473
|
-
const effectsKey =
|
26545
|
+
const track = useHMSStore69(trackSelector);
|
26546
|
+
const [blurAmount, setBlurAmount] = useState56(VBHandler.getBlurAmount() || 0.5);
|
26547
|
+
const roomState = useHMSStore69(selectRoomState4);
|
26548
|
+
const isLargeRoom = useHMSStore69(selectIsLargeRoom3);
|
26549
|
+
const isEffectsEnabled = useHMSStore69(Zh);
|
26550
|
+
const effectsKey = useHMSStore69(em);
|
26474
26551
|
const isMobile = useMedia22(config.media.md);
|
26475
26552
|
const [loadingEffects, setLoadingEffects] = useSetAppDataByKey(APP_DATA.loadingEffects);
|
26476
|
-
const isPluginAdded =
|
26477
|
-
const background =
|
26553
|
+
const isPluginAdded = useHMSStore69(selectIsLocalVideoPluginPresent(VBHandler?.getName() || ""));
|
26554
|
+
const background = useHMSStore69(gm(APP_DATA.background));
|
26478
26555
|
const mediaList = backgroundMedia.length ? backgroundMedia.map((media) => media.url || "") : defaultMedia2;
|
26479
26556
|
const inPreview = roomState === HMSRoomState4.Preview;
|
26480
26557
|
const showVideoTile = isVideoOn && isLargeRoom && !inPreview;
|
26481
|
-
|
26558
|
+
useEffect36(() => {
|
26482
26559
|
if (!track?.id) {
|
26483
26560
|
return;
|
26484
26561
|
}
|
@@ -26524,7 +26601,7 @@ var VBPicker = ({ backgroundMedia = [] }) => {
|
|
26524
26601
|
blurAmount,
|
26525
26602
|
setLoadingEffects
|
26526
26603
|
]);
|
26527
|
-
|
26604
|
+
useEffect36(() => {
|
26528
26605
|
if (!isVideoOn) {
|
26529
26606
|
toggleVB();
|
26530
26607
|
}
|
@@ -26717,9 +26794,9 @@ var SidePane = ({
|
|
26717
26794
|
hideControls = false
|
26718
26795
|
}) => {
|
26719
26796
|
const isMobile = useMedia23(config.media.md);
|
26720
|
-
const sidepane =
|
26721
|
-
const activeScreensharePeerId =
|
26722
|
-
const trackId =
|
26797
|
+
const sidepane = useHMSStore70(selectAppData8(APP_DATA.sidePane));
|
26798
|
+
const activeScreensharePeerId = useHMSStore70(selectAppData8(APP_DATA.activeScreensharePeerId));
|
26799
|
+
const trackId = useHMSStore70(selectVideoTrackByPeerID4(activeScreensharePeerId))?.id;
|
26723
26800
|
const { elements } = useRoomLayoutConferencingScreen();
|
26724
26801
|
const { elements: preview_elements } = useRoomLayoutPreviewScreen();
|
26725
26802
|
const layoutMode = useUISettings(UI_SETTINGS.layoutMode);
|
@@ -26758,7 +26835,7 @@ var SidePane = ({
|
|
26758
26835
|
return null;
|
26759
26836
|
});
|
26760
26837
|
const resetSidePane = useSidepaneReset();
|
26761
|
-
|
26838
|
+
useEffect37(() => {
|
26762
26839
|
return () => {
|
26763
26840
|
resetSidePane();
|
26764
26841
|
};
|
@@ -26916,8 +26993,8 @@ var getParticipantChipContent = (peerCount = 0) => {
|
|
26916
26993
|
return `${formattedNum} other${parseInt(formattedNum) === 1 ? "" : "s"} in the session`;
|
26917
26994
|
};
|
26918
26995
|
var useLocalTileAspectRatio = () => {
|
26919
|
-
const localPeer =
|
26920
|
-
const videoTrack =
|
26996
|
+
const localPeer = useHMSStore71(selectLocalPeer7);
|
26997
|
+
const videoTrack = useHMSStore71(selectVideoTrackByID5(localPeer?.videoTrack));
|
26921
26998
|
const isMobile = useMedia25(config.media.md);
|
26922
26999
|
let aspectRatio = 0;
|
26923
27000
|
if (videoTrack?.width && videoTrack?.height) {
|
@@ -26938,12 +27015,12 @@ var PreviewJoin = ({
|
|
26938
27015
|
);
|
26939
27016
|
const { isStreamingOn } = useRecordingStreaming11();
|
26940
27017
|
const authToken = useAuthToken();
|
26941
|
-
const [name, setName] =
|
27018
|
+
const [name, setName] = useState57(initialName || previewPreference.name);
|
26942
27019
|
const { toggleAudio, toggleVideo } = useAVToggle3();
|
26943
|
-
const [previewError, setPreviewError] =
|
27020
|
+
const [previewError, setPreviewError] = useState57(false);
|
26944
27021
|
const { endpoints } = useHMSPrebuiltContext();
|
26945
27022
|
const { peerCount } = useParticipants2();
|
26946
|
-
const loadingEffects =
|
27023
|
+
const loadingEffects = useHMSStore71(selectAppData9(APP_DATA.loadingEffects));
|
26947
27024
|
const { enableJoin, preview, join } = usePreviewJoin({
|
26948
27025
|
name,
|
26949
27026
|
token: authToken,
|
@@ -26961,7 +27038,7 @@ var PreviewJoin = ({
|
|
26961
27038
|
},
|
26962
27039
|
asRole
|
26963
27040
|
});
|
26964
|
-
const roomState =
|
27041
|
+
const roomState = useHMSStore71(selectRoomState5);
|
26965
27042
|
const savePreferenceAndJoin = useCallback32(() => {
|
26966
27043
|
setPreviewPreference({
|
26967
27044
|
name
|
@@ -26971,7 +27048,7 @@ var PreviewJoin = ({
|
|
26971
27048
|
const { elements = {} } = useRoomLayoutPreviewScreen();
|
26972
27049
|
const { preview_header: previewHeader = {}, virtual_background } = elements || {};
|
26973
27050
|
const aspectRatio = useLocalTileAspectRatio();
|
26974
|
-
|
27051
|
+
useEffect38(() => {
|
26975
27052
|
if (authToken) {
|
26976
27053
|
if (skipPreview) {
|
26977
27054
|
savePreferenceAndJoin();
|
@@ -26980,7 +27057,7 @@ var PreviewJoin = ({
|
|
26980
27057
|
}
|
26981
27058
|
}
|
26982
27059
|
}, [authToken, skipPreview]);
|
26983
|
-
|
27060
|
+
useEffect38(() => {
|
26984
27061
|
if (initialName) {
|
26985
27062
|
setName(initialName);
|
26986
27063
|
}
|
@@ -27027,16 +27104,16 @@ var Container4 = styled("div", {
|
|
27027
27104
|
px: "$10"
|
27028
27105
|
});
|
27029
27106
|
var PreviewTile = ({ name, error }) => {
|
27030
|
-
const localPeer =
|
27107
|
+
const localPeer = useHMSStore71(selectLocalPeer7);
|
27031
27108
|
const { isLocalAudioEnabled, toggleAudio } = useAVToggle3();
|
27032
|
-
const isVideoOn =
|
27109
|
+
const isVideoOn = useHMSStore71(selectIsLocalVideoEnabled7);
|
27033
27110
|
const mirrorLocalVideo = useUISettings(UI_SETTINGS.mirrorLocalVideo);
|
27034
27111
|
const trackSelector = selectVideoTrackByID5(localPeer?.videoTrack);
|
27035
|
-
const track =
|
27112
|
+
const track = useHMSStore71(trackSelector);
|
27036
27113
|
const showMuteIcon = !isLocalAudioEnabled || !toggleAudio;
|
27037
27114
|
const aspectRatio = useLocalTileAspectRatio();
|
27038
27115
|
const [ref, { width: calculatedWidth, height: calculatedHeight }] = useMeasure4();
|
27039
|
-
const [avatarSize, attribBoxSize] =
|
27116
|
+
const [avatarSize, attribBoxSize] = useMemo14(
|
27040
27117
|
() => calculateAvatarAndAttribBoxSize(calculatedWidth, calculatedHeight),
|
27041
27118
|
[calculatedWidth, calculatedHeight]
|
27042
27119
|
);
|
@@ -27088,7 +27165,7 @@ var PreviewControls = ({ hideSettings, vbEnabled }) => {
|
|
27088
27165
|
);
|
27089
27166
|
};
|
27090
27167
|
var PreviewSettings = React132.memo(() => {
|
27091
|
-
const [open, setOpen] =
|
27168
|
+
const [open, setOpen] = useState57(false);
|
27092
27169
|
return /* @__PURE__ */ React132.createElement(Fragment12, null, /* @__PURE__ */ React132.createElement(IconButton_default, { "data-testid": "preview_setting_btn", css: { flexShrink: 0 }, onClick: () => setOpen((value) => !value) }, /* @__PURE__ */ React132.createElement(SettingsIcon6, null)), open && /* @__PURE__ */ React132.createElement(SettingsModal_default, { open, onOpenChange: setOpen }));
|
27093
27170
|
});
|
27094
27171
|
var PreviewJoin_default = PreviewJoin;
|
@@ -27122,14 +27199,14 @@ var RequestActions = ({
|
|
27122
27199
|
var RoleChangeRequestModal = () => {
|
27123
27200
|
const hmsActions = useHMSActions44();
|
27124
27201
|
const { updateMetaData } = useMyMetadata();
|
27125
|
-
const isPreview =
|
27126
|
-
const currentRole =
|
27127
|
-
const roleChangeRequest =
|
27128
|
-
const name =
|
27202
|
+
const isPreview = useHMSStore72(selectIsInPreview);
|
27203
|
+
const currentRole = useHMSStore72(selectLocalPeerRoleName4);
|
27204
|
+
const roleChangeRequest = useHMSStore72(selectRoleChangeRequest);
|
27205
|
+
const name = useHMSStore72(selectLocalPeerName4);
|
27129
27206
|
const { sendEvent } = useCustomEvent3({ type: ROLE_CHANGE_DECLINED });
|
27130
27207
|
const { elements = {} } = useRoomLayoutPreviewScreen();
|
27131
27208
|
const { virtual_background } = elements || {};
|
27132
|
-
|
27209
|
+
useEffect39(() => {
|
27133
27210
|
if (!roleChangeRequest?.role) {
|
27134
27211
|
return;
|
27135
27212
|
}
|
@@ -27192,47 +27269,110 @@ var RoleChangeRequestModal = () => {
|
|
27192
27269
|
|
27193
27270
|
// src/Prebuilt/layouts/VideoStreamingSection.tsx
|
27194
27271
|
init_define_process_env();
|
27195
|
-
import React153, { Suspense, useEffect as
|
27272
|
+
import React153, { Suspense, useEffect as useEffect53 } from "react";
|
27196
27273
|
import { match as match12 } from "ts-pattern";
|
27197
|
-
import {
|
27274
|
+
import {
|
27275
|
+
selectIsConnectedToRoom as selectIsConnectedToRoom9,
|
27276
|
+
selectIsLocalScreenShared as selectIsLocalScreenShared2,
|
27277
|
+
selectLocalPeerRoleName as selectLocalPeerRoleName6,
|
27278
|
+
useHMSActions as useHMSActions46,
|
27279
|
+
useHMSStore as useHMSStore83
|
27280
|
+
} from "@100mslive/react-sdk";
|
27281
|
+
import { PeopleAddIcon as PeopleAddIcon3, ShareScreenIcon as ShareScreenIcon6 } from "@100mslive/react-icons";
|
27198
27282
|
|
27199
27283
|
// src/Prebuilt/components/VideoLayouts/GridLayout.tsx
|
27200
27284
|
init_define_process_env();
|
27201
|
-
import
|
27285
|
+
import React149, { useEffect as useEffect48, useMemo as useMemo19, useState as useState65 } from "react";
|
27202
27286
|
import {
|
27203
27287
|
selectLocalPeerID as selectLocalPeerID14,
|
27204
27288
|
selectLocalPeerRoleName as selectLocalPeerRoleName5,
|
27205
27289
|
selectPeers as selectPeers3,
|
27206
27290
|
selectPeerScreenSharing as selectPeerScreenSharing2,
|
27207
27291
|
selectWhiteboard as selectWhiteboard2,
|
27208
|
-
useHMSStore as
|
27292
|
+
useHMSStore as useHMSStore79,
|
27209
27293
|
useHMSVanillaStore as useHMSVanillaStore12
|
27210
27294
|
} from "@100mslive/react-sdk";
|
27211
27295
|
|
27212
27296
|
// src/Prebuilt/components/VideoLayouts/EqualProminence.tsx
|
27213
27297
|
init_define_process_env();
|
27214
|
-
import
|
27298
|
+
import React140, { useEffect as useEffect43, useState as useState59 } from "react";
|
27215
27299
|
import { useMedia as useMedia29 } from "react-use";
|
27216
|
-
import {
|
27300
|
+
import { PeopleAddIcon as PeopleAddIcon2 } from "@100mslive/react-icons";
|
27301
|
+
|
27302
|
+
// src/Prebuilt/layouts/WaitingView.tsx
|
27303
|
+
init_define_process_env();
|
27304
|
+
import React135 from "react";
|
27305
|
+
var WaitingView = React135.memo(
|
27306
|
+
({ icon, title, subtitle }) => {
|
27307
|
+
return /* @__PURE__ */ React135.createElement(
|
27308
|
+
Flex,
|
27309
|
+
{
|
27310
|
+
align: "center",
|
27311
|
+
direction: "column",
|
27312
|
+
css: {
|
27313
|
+
textAlign: "center",
|
27314
|
+
margin: "auto",
|
27315
|
+
h: "100%",
|
27316
|
+
justifyContent: "center",
|
27317
|
+
gap: "$8"
|
27318
|
+
}
|
27319
|
+
},
|
27320
|
+
/* @__PURE__ */ React135.createElement(
|
27321
|
+
Box,
|
27322
|
+
{
|
27323
|
+
css: {
|
27324
|
+
backgroundColor: "$surface_default",
|
27325
|
+
display: "flex",
|
27326
|
+
alignItems: "center",
|
27327
|
+
gap: "$4",
|
27328
|
+
size: "$20",
|
27329
|
+
r: "$round",
|
27330
|
+
justifyContent: "center"
|
27331
|
+
}
|
27332
|
+
},
|
27333
|
+
icon
|
27334
|
+
),
|
27335
|
+
/* @__PURE__ */ React135.createElement(
|
27336
|
+
Flex,
|
27337
|
+
{
|
27338
|
+
direction: "column",
|
27339
|
+
css: {
|
27340
|
+
p: "$1",
|
27341
|
+
gap: "$4"
|
27342
|
+
}
|
27343
|
+
},
|
27344
|
+
/* @__PURE__ */ React135.createElement(Text, { variant: "h4", css: { "@md": { fontSize: "$md", color: "$on_surface_high" } } }, title),
|
27345
|
+
/* @__PURE__ */ React135.createElement(
|
27346
|
+
Text,
|
27347
|
+
{
|
27348
|
+
variant: "body1",
|
27349
|
+
css: { fontWeight: "$regular", color: "$on_surface_medium", "@md": { fontSize: "$sm" } }
|
27350
|
+
},
|
27351
|
+
subtitle
|
27352
|
+
)
|
27353
|
+
)
|
27354
|
+
);
|
27355
|
+
}
|
27356
|
+
);
|
27217
27357
|
|
27218
27358
|
// src/Prebuilt/components/InsetTile.tsx
|
27219
27359
|
init_define_process_env();
|
27220
|
-
import
|
27360
|
+
import React137, { useEffect as useEffect40, useRef as useRef25 } from "react";
|
27221
27361
|
import Draggable from "react-draggable";
|
27222
27362
|
import { useMedia as useMedia27 } from "react-use";
|
27223
27363
|
import {
|
27224
|
-
selectIsAllowedToPublish as
|
27364
|
+
selectIsAllowedToPublish as selectIsAllowedToPublish3,
|
27225
27365
|
selectLocalPeer as selectLocalPeer8,
|
27226
27366
|
selectPeerByID as selectPeerByID3,
|
27227
27367
|
selectVideoTrackByID as selectVideoTrackByID6,
|
27228
|
-
useHMSStore as
|
27368
|
+
useHMSStore as useHMSStore73
|
27229
27369
|
} from "@100mslive/react-sdk";
|
27230
27370
|
import { ExpandIcon as ExpandIcon2 } from "@100mslive/react-icons";
|
27231
27371
|
|
27232
27372
|
// src/Prebuilt/components/hooks/useVideoTileLayout.ts
|
27233
27373
|
init_define_process_env();
|
27234
|
-
import
|
27235
|
-
var VideoTileContext =
|
27374
|
+
import React136, { useContext as useContext3 } from "react";
|
27375
|
+
var VideoTileContext = React136.createContext({
|
27236
27376
|
enableSpotlightingPeer: true,
|
27237
27377
|
hideParticipantNameOnTile: false,
|
27238
27378
|
roundedVideoTile: true,
|
@@ -27248,14 +27388,14 @@ var useVideoTileContext = () => {
|
|
27248
27388
|
|
27249
27389
|
// src/Prebuilt/components/InsetTile.tsx
|
27250
27390
|
var MinimisedTile = ({ setMinimised }) => {
|
27251
|
-
return /* @__PURE__ */
|
27391
|
+
return /* @__PURE__ */ React137.createElement(Flex, { align: "center", css: { gap: "$6", r: "$1", bg: "$surface_default", p: "$4", color: "$on_surface_high" } }, /* @__PURE__ */ React137.createElement(AudioVideoToggle, { hideOptions: true }), /* @__PURE__ */ React137.createElement(Text, null, "You"), /* @__PURE__ */ React137.createElement(
|
27252
27392
|
IconButton_default,
|
27253
27393
|
{
|
27254
27394
|
className: "__cancel-drag-event",
|
27255
27395
|
onClick: () => setMinimised(false),
|
27256
27396
|
css: { bg: "transparent", border: "transparent" }
|
27257
27397
|
},
|
27258
|
-
/* @__PURE__ */
|
27398
|
+
/* @__PURE__ */ React137.createElement(ExpandIcon2, null)
|
27259
27399
|
));
|
27260
27400
|
};
|
27261
27401
|
var insetHeightPx = 180;
|
@@ -27266,10 +27406,10 @@ var InsetTile = ({ peerId }) => {
|
|
27266
27406
|
const isMobile = useMedia27(config.media.md);
|
27267
27407
|
const isLandscape = useMedia27(config.media.ls);
|
27268
27408
|
const selector = peerId ? selectPeerByID3(peerId) : selectLocalPeer8;
|
27269
|
-
const peer =
|
27409
|
+
const peer = useHMSStore73(selector);
|
27270
27410
|
const [minimised, setMinimised] = useSetAppDataByKey(APP_DATA.minimiseInset);
|
27271
|
-
const videoTrack =
|
27272
|
-
const isAllowedToPublish =
|
27411
|
+
const videoTrack = useHMSStore73(selectVideoTrackByID6(peer?.videoTrack));
|
27412
|
+
const isAllowedToPublish = useHMSStore73(selectIsAllowedToPublish3);
|
27273
27413
|
const videoTileProps = useVideoTileContext();
|
27274
27414
|
let aspectRatio = isMobile ? defaultMobileAspectRatio : desktopAspectRatio;
|
27275
27415
|
if (videoTrack?.width && videoTrack?.height && !isMobile) {
|
@@ -27281,8 +27421,8 @@ var InsetTile = ({ peerId }) => {
|
|
27281
27421
|
width = 240;
|
27282
27422
|
height = width / aspectRatio;
|
27283
27423
|
}
|
27284
|
-
const nodeRef =
|
27285
|
-
|
27424
|
+
const nodeRef = useRef25(null);
|
27425
|
+
useEffect40(() => {
|
27286
27426
|
const node = nodeRef.current;
|
27287
27427
|
if (!node || !window.ResizeObserver) {
|
27288
27428
|
return;
|
@@ -27303,7 +27443,7 @@ var InsetTile = ({ peerId }) => {
|
|
27303
27443
|
if (!isAllowedToPublish.video && !isAllowedToPublish.audio) {
|
27304
27444
|
return null;
|
27305
27445
|
}
|
27306
|
-
return /* @__PURE__ */
|
27446
|
+
return /* @__PURE__ */ React137.createElement(Draggable, { bounds: "parent", nodeRef, cancel: ".__cancel-drag-event" }, /* @__PURE__ */ React137.createElement(
|
27307
27447
|
Box,
|
27308
27448
|
{
|
27309
27449
|
ref: nodeRef,
|
@@ -27320,7 +27460,7 @@ var InsetTile = ({ peerId }) => {
|
|
27320
27460
|
} : {}
|
27321
27461
|
}
|
27322
27462
|
},
|
27323
|
-
minimised ? /* @__PURE__ */
|
27463
|
+
minimised ? /* @__PURE__ */ React137.createElement(MinimisedTile, { setMinimised }) : /* @__PURE__ */ React137.createElement(
|
27324
27464
|
VideoTile_default,
|
27325
27465
|
{
|
27326
27466
|
peerId: peer?.id,
|
@@ -27343,7 +27483,7 @@ var InsetTile = ({ peerId }) => {
|
|
27343
27483
|
|
27344
27484
|
// src/Prebuilt/components/Pagination.tsx
|
27345
27485
|
init_define_process_env();
|
27346
|
-
import
|
27486
|
+
import React138, { useEffect as useEffect41 } from "react";
|
27347
27487
|
import { ChevronLeftIcon as ChevronLeftIcon7, ChevronRightIcon as ChevronRightIcon4 } from "@100mslive/react-icons";
|
27348
27488
|
var Pagination = ({
|
27349
27489
|
page,
|
@@ -27360,7 +27500,7 @@ var Pagination = ({
|
|
27360
27500
|
e.stopPropagation();
|
27361
27501
|
onPageChange(Math.max(page - 1, 0));
|
27362
27502
|
};
|
27363
|
-
|
27503
|
+
useEffect41(() => {
|
27364
27504
|
if (page >= numPages) {
|
27365
27505
|
onPageChange(Math.max(0, numPages - 1));
|
27366
27506
|
}
|
@@ -27368,7 +27508,7 @@ var Pagination = ({
|
|
27368
27508
|
if (numPages <= 1) {
|
27369
27509
|
return null;
|
27370
27510
|
}
|
27371
|
-
return /* @__PURE__ */
|
27511
|
+
return /* @__PURE__ */ React138.createElement(StyledPagination.Root, { css: { flexShrink: 0 } }, /* @__PURE__ */ React138.createElement(StyledPagination.Chevron, { disabled: disableLeft, onClick: prevPage }, /* @__PURE__ */ React138.createElement(ChevronLeftIcon7, { width: 16, height: 16, style: { cursor: disableLeft ? "not-allowed" : "pointer" } })), numPages <= 5 ? /* @__PURE__ */ React138.createElement(StyledPagination.Dots, null, [...Array(numPages)].map((_, i) => /* @__PURE__ */ React138.createElement(
|
27372
27512
|
StyledPagination.Dot,
|
27373
27513
|
{
|
27374
27514
|
key: i,
|
@@ -27378,16 +27518,16 @@ var Pagination = ({
|
|
27378
27518
|
onPageChange(i);
|
27379
27519
|
}
|
27380
27520
|
}
|
27381
|
-
))) : null, /* @__PURE__ */
|
27521
|
+
))) : null, /* @__PURE__ */ React138.createElement(StyledPagination.Chevron, { disabled: disableRight, onClick: nextPage }, /* @__PURE__ */ React138.createElement(ChevronRightIcon4, { width: 16, height: 16, style: { cursor: disableRight ? "not-allowed" : "pointer" } })));
|
27382
27522
|
};
|
27383
27523
|
|
27384
27524
|
// src/Prebuilt/components/VideoLayouts/Grid.tsx
|
27385
27525
|
init_define_process_env();
|
27386
|
-
import
|
27387
|
-
var Grid =
|
27526
|
+
import React139 from "react";
|
27527
|
+
var Grid = React139.forwardRef(
|
27388
27528
|
({ tiles, edgeToEdge }, ref) => {
|
27389
27529
|
const videoTileProps = useVideoTileContext();
|
27390
|
-
return /* @__PURE__ */
|
27530
|
+
return /* @__PURE__ */ React139.createElement(
|
27391
27531
|
Box,
|
27392
27532
|
{
|
27393
27533
|
ref,
|
@@ -27404,7 +27544,7 @@ var Grid = React138.forwardRef(
|
|
27404
27544
|
}
|
27405
27545
|
},
|
27406
27546
|
tiles?.map((tile) => {
|
27407
|
-
return /* @__PURE__ */
|
27547
|
+
return /* @__PURE__ */ React139.createElement(
|
27408
27548
|
VideoTile_default,
|
27409
27549
|
{
|
27410
27550
|
key: tile.track?.id || tile.peer?.id,
|
@@ -27424,7 +27564,7 @@ var Grid = React138.forwardRef(
|
|
27424
27564
|
|
27425
27565
|
// src/Prebuilt/components/hooks/useTileLayout.tsx
|
27426
27566
|
init_define_process_env();
|
27427
|
-
import { useEffect as
|
27567
|
+
import { useEffect as useEffect42, useMemo as useMemo15, useState as useState58 } from "react";
|
27428
27568
|
import { useMeasure as useMeasure5, useMedia as useMedia28 } from "react-use";
|
27429
27569
|
import {
|
27430
27570
|
getPeersWithTiles,
|
@@ -27435,12 +27575,12 @@ var aspectRatioConfig = { default: [1 / 1, 4 / 3, 16 / 9], mobile: [1 / 1, 3 / 4
|
|
27435
27575
|
var usePagesWithTiles = ({ peers, maxTileCount }) => {
|
27436
27576
|
const vanillaStore = useHMSVanillaStore11();
|
27437
27577
|
const tracksMap = vanillaStore.getState(selectTracksMap4);
|
27438
|
-
const peersWithTiles =
|
27578
|
+
const peersWithTiles = useMemo15(
|
27439
27579
|
() => getPeersWithTiles(peers, tracksMap, () => false),
|
27440
27580
|
[peers, tracksMap]
|
27441
27581
|
);
|
27442
27582
|
const noOfPages = Math.ceil(peersWithTiles.length / maxTileCount);
|
27443
|
-
const pagesList =
|
27583
|
+
const pagesList = useMemo15(() => {
|
27444
27584
|
let sliceStart = 0;
|
27445
27585
|
let remaining = peersWithTiles.length;
|
27446
27586
|
const list = [];
|
@@ -27462,8 +27602,8 @@ var useTileLayout = ({
|
|
27462
27602
|
const vanillaStore = useHMSVanillaStore11();
|
27463
27603
|
const [ref, { width, height }] = useMeasure5();
|
27464
27604
|
const isMobile = useMedia28(config.media.lg);
|
27465
|
-
const [pagesWithTiles, setPagesWithTiles] =
|
27466
|
-
|
27605
|
+
const [pagesWithTiles, setPagesWithTiles] = useState58([]);
|
27606
|
+
useEffect42(() => {
|
27467
27607
|
if (width === 0 || height === 0) {
|
27468
27608
|
return;
|
27469
27609
|
}
|
@@ -27478,7 +27618,7 @@ var useTileLayout = ({
|
|
27478
27618
|
const matrix = new Array(maxRows).fill(null).map((_, i) => {
|
27479
27619
|
const numCols = Math.min(maxCols, noOfTilesInPage - i * maxCols);
|
27480
27620
|
const rowElements = [];
|
27481
|
-
for (let
|
27621
|
+
for (let j2 = 0; j2 < numCols; j2++) {
|
27482
27622
|
if (index < page.length) {
|
27483
27623
|
rowElements.push(page[index++]);
|
27484
27624
|
}
|
@@ -27507,10 +27647,10 @@ var useTileLayout = ({
|
|
27507
27647
|
tileHeight = maxRowHeight;
|
27508
27648
|
const calcWidths = aspectRatios.map((aR) => tileHeight * aR);
|
27509
27649
|
tileWidth = 0;
|
27510
|
-
for (const
|
27511
|
-
if (
|
27512
|
-
if (tileWidth <
|
27513
|
-
tileWidth =
|
27650
|
+
for (const w2 of calcWidths) {
|
27651
|
+
if (w2 < width) {
|
27652
|
+
if (tileWidth < w2) {
|
27653
|
+
tileWidth = w2;
|
27514
27654
|
}
|
27515
27655
|
}
|
27516
27656
|
}
|
@@ -27529,37 +27669,26 @@ var useTileLayout = ({
|
|
27529
27669
|
|
27530
27670
|
// src/Prebuilt/components/VideoLayouts/EqualProminence.tsx
|
27531
27671
|
function EqualProminence({ isInsetEnabled = false, peers, onPageChange, onPageSize, edgeToEdge }) {
|
27532
|
-
const localPeer = useHMSStore75(selectLocalPeer9);
|
27533
27672
|
const isMobile = useMedia29(config.media.md);
|
27534
27673
|
let maxTileCount = useUISettings(UI_SETTINGS.maxTileCount);
|
27535
27674
|
maxTileCount = isMobile ? Math.min(maxTileCount, 6) : maxTileCount;
|
27536
|
-
|
27675
|
+
const pageList = usePagesWithTiles({
|
27537
27676
|
peers,
|
27538
27677
|
maxTileCount
|
27539
27678
|
});
|
27540
|
-
const inputPeers = useMemo15(() => {
|
27541
|
-
if (pageList.length === 0) {
|
27542
|
-
return localPeer ? [localPeer] : [];
|
27543
|
-
}
|
27544
|
-
return peers;
|
27545
|
-
}, [pageList.length, peers, localPeer]);
|
27546
|
-
pageList = usePagesWithTiles({
|
27547
|
-
peers: inputPeers,
|
27548
|
-
maxTileCount
|
27549
|
-
});
|
27550
27679
|
const { ref, pagesWithTiles } = useTileLayout({
|
27551
27680
|
pageList,
|
27552
27681
|
maxTileCount,
|
27553
27682
|
edgeToEdge
|
27554
27683
|
});
|
27555
|
-
const [page, setPage] =
|
27684
|
+
const [page, setPage] = useState59(0);
|
27556
27685
|
const pageSize = pagesWithTiles[0]?.length || 0;
|
27557
|
-
|
27686
|
+
useEffect43(() => {
|
27558
27687
|
if (pageSize > 0) {
|
27559
27688
|
onPageSize?.(pageSize);
|
27560
27689
|
}
|
27561
27690
|
}, [pageSize, onPageSize]);
|
27562
|
-
return /* @__PURE__ */
|
27691
|
+
return /* @__PURE__ */ React140.createElement(Flex, { direction: "column", css: { flex: "1 1 0", h: "100%", position: "relative", minWidth: 0 } }, /* @__PURE__ */ React140.createElement(Grid, { tiles: pagesWithTiles[page], ref, edgeToEdge }), !edgeToEdge && /* @__PURE__ */ React140.createElement(
|
27563
27692
|
Pagination,
|
27564
27693
|
{
|
27565
27694
|
page,
|
@@ -27569,30 +27698,37 @@ function EqualProminence({ isInsetEnabled = false, peers, onPageChange, onPageSi
|
|
27569
27698
|
},
|
27570
27699
|
numPages: pagesWithTiles.length
|
27571
27700
|
}
|
27572
|
-
),
|
27701
|
+
), pageList.length === 0 ? /* @__PURE__ */ React140.createElement(
|
27702
|
+
WaitingView,
|
27703
|
+
{
|
27704
|
+
title: "Waiting for Host to join",
|
27705
|
+
subtitle: "Sit back and relax till others join",
|
27706
|
+
icon: /* @__PURE__ */ React140.createElement(PeopleAddIcon2, { width: "56px", height: "56px", style: { color: "white" } })
|
27707
|
+
}
|
27708
|
+
) : null, isInsetEnabled && /* @__PURE__ */ React140.createElement(InsetTile, null));
|
27573
27709
|
}
|
27574
27710
|
|
27575
27711
|
// src/Prebuilt/components/VideoLayouts/RoleProminence.tsx
|
27576
27712
|
init_define_process_env();
|
27577
|
-
import
|
27713
|
+
import React143, { useEffect as useEffect45, useState as useState61 } from "react";
|
27578
27714
|
import { useMedia as useMedia31 } from "react-use";
|
27579
|
-
import { selectLocalPeer as
|
27715
|
+
import { selectLocalPeer as selectLocalPeer9, useHMSStore as useHMSStore75 } from "@100mslive/react-sdk";
|
27580
27716
|
|
27581
27717
|
// src/Prebuilt/components/SecondaryTiles.tsx
|
27582
27718
|
init_define_process_env();
|
27583
|
-
import
|
27719
|
+
import React142, { useEffect as useEffect44, useRef as useRef26, useState as useState60 } from "react";
|
27584
27720
|
import { useMedia as useMedia30 } from "react-use";
|
27585
|
-
import { selectAppData as selectAppData10, selectSessionStore as selectSessionStore11, selectTrackByID as selectTrackByID4, useHMSStore as
|
27721
|
+
import { selectAppData as selectAppData10, selectSessionStore as selectSessionStore11, selectTrackByID as selectTrackByID4, useHMSStore as useHMSStore74 } from "@100mslive/react-sdk";
|
27586
27722
|
|
27587
27723
|
// src/Prebuilt/components/VideoLayouts/ProminenceLayout.tsx
|
27588
27724
|
init_define_process_env();
|
27589
|
-
import
|
27725
|
+
import React141 from "react";
|
27590
27726
|
var Root26 = ({
|
27591
27727
|
children,
|
27592
27728
|
edgeToEdge,
|
27593
27729
|
hasSidebar
|
27594
27730
|
}) => {
|
27595
|
-
return /* @__PURE__ */
|
27731
|
+
return /* @__PURE__ */ React141.createElement(
|
27596
27732
|
Flex,
|
27597
27733
|
{
|
27598
27734
|
direction: hasSidebar ? "row" : "column",
|
@@ -27602,7 +27738,7 @@ var Root26 = ({
|
|
27602
27738
|
);
|
27603
27739
|
};
|
27604
27740
|
var ProminentSection = ({ children, css: css2 = {} }) => {
|
27605
|
-
return /* @__PURE__ */
|
27741
|
+
return /* @__PURE__ */ React141.createElement(Flex, { direction: "column", css: { flex: "1 1 0", gap: "$2", minHeight: 0, ...css2 } }, children);
|
27606
27742
|
};
|
27607
27743
|
var SecondarySection = ({
|
27608
27744
|
tiles,
|
@@ -27620,10 +27756,10 @@ var SecondarySection = ({
|
|
27620
27756
|
maxHeight: "100%",
|
27621
27757
|
width: 240
|
27622
27758
|
} : {
|
27623
|
-
gridTemplateRows:
|
27759
|
+
gridTemplateRows: React141.Children.count(children) > 0 ? "136px auto" : "154px",
|
27624
27760
|
gridTemplateColumns: `repeat(${tiles.length}, minmax(0, 1fr))`
|
27625
27761
|
};
|
27626
|
-
return /* @__PURE__ */
|
27762
|
+
return /* @__PURE__ */ React141.createElement(
|
27627
27763
|
Box,
|
27628
27764
|
{
|
27629
27765
|
css: {
|
@@ -27636,7 +27772,7 @@ var SecondarySection = ({
|
|
27636
27772
|
}
|
27637
27773
|
},
|
27638
27774
|
tiles.map((tile) => {
|
27639
|
-
return /* @__PURE__ */
|
27775
|
+
return /* @__PURE__ */ React141.createElement(
|
27640
27776
|
VideoTile_default,
|
27641
27777
|
{
|
27642
27778
|
key: tile.track?.id || tile.peer?.id,
|
@@ -27654,7 +27790,7 @@ var SecondarySection = ({
|
|
27654
27790
|
}
|
27655
27791
|
);
|
27656
27792
|
}),
|
27657
|
-
children && /* @__PURE__ */
|
27793
|
+
children && /* @__PURE__ */ React141.createElement(Box, { css: { gridColumn: hasSidebar ? 1 : `1/span ${tiles.length}` } }, children)
|
27658
27794
|
);
|
27659
27795
|
};
|
27660
27796
|
var ProminenceLayout = {
|
@@ -27667,12 +27803,12 @@ var ProminenceLayout = {
|
|
27667
27803
|
var SecondaryTiles = ({ peers, onPageChange, onPageSize, edgeToEdge, hasSidebar }) => {
|
27668
27804
|
const isMobile = useMedia30(config.media.md);
|
27669
27805
|
const maxTileCount = isMobile ? 2 : 4;
|
27670
|
-
const [page, setPage] =
|
27671
|
-
const pinnedTrackId =
|
27672
|
-
const spotlightPeerId =
|
27673
|
-
const activeScreensharePeerId =
|
27674
|
-
const pinnedPeer =
|
27675
|
-
const pageChangedAfterPinning =
|
27806
|
+
const [page, setPage] = useState60(0);
|
27807
|
+
const pinnedTrackId = useHMSStore74(selectAppData10(APP_DATA.pinnedTrackId));
|
27808
|
+
const spotlightPeerId = useHMSStore74(selectSessionStore11("spotlight" /* SPOTLIGHT */));
|
27809
|
+
const activeScreensharePeerId = useHMSStore74(selectAppData10(APP_DATA.activeScreensharePeerId));
|
27810
|
+
const pinnedPeer = useHMSStore74(selectTrackByID4(pinnedTrackId))?.peerId;
|
27811
|
+
const pageChangedAfterPinning = useRef26(false);
|
27676
27812
|
const pagesWithTiles = usePagesWithTiles({
|
27677
27813
|
peers: spotlightPeerId || pinnedPeer ? [...peers].sort((p1, p2) => {
|
27678
27814
|
if (activeScreensharePeerId === p1.id) {
|
@@ -27693,17 +27829,17 @@ var SecondaryTiles = ({ peers, onPageChange, onPageSize, edgeToEdge, hasSidebar
|
|
27693
27829
|
maxTileCount
|
27694
27830
|
});
|
27695
27831
|
const pageSize = pagesWithTiles[0]?.length || 0;
|
27696
|
-
|
27832
|
+
useEffect44(() => {
|
27697
27833
|
if (peers.length > 0 && !pagesWithTiles[page]?.length) {
|
27698
27834
|
setPage(Math.max(0, page - 1));
|
27699
27835
|
}
|
27700
27836
|
}, [peers, page, pagesWithTiles]);
|
27701
|
-
|
27837
|
+
useEffect44(() => {
|
27702
27838
|
if (pageSize > 0) {
|
27703
27839
|
onPageSize?.(pageSize);
|
27704
27840
|
}
|
27705
27841
|
}, [pageSize, onPageSize]);
|
27706
|
-
|
27842
|
+
useEffect44(() => {
|
27707
27843
|
if ((pinnedPeer || spotlightPeerId) && page !== 0 && !pageChangedAfterPinning.current) {
|
27708
27844
|
setPage(0);
|
27709
27845
|
pageChangedAfterPinning.current = true;
|
@@ -27711,7 +27847,7 @@ var SecondaryTiles = ({ peers, onPageChange, onPageSize, edgeToEdge, hasSidebar
|
|
27711
27847
|
pageChangedAfterPinning.current = false;
|
27712
27848
|
}
|
27713
27849
|
}, [pinnedPeer, spotlightPeerId, page]);
|
27714
|
-
return /* @__PURE__ */
|
27850
|
+
return /* @__PURE__ */ React142.createElement(ProminenceLayout.SecondarySection, { tiles: pagesWithTiles[page], edgeToEdge, hasSidebar }, !edgeToEdge && /* @__PURE__ */ React142.createElement(
|
27715
27851
|
Pagination,
|
27716
27852
|
{
|
27717
27853
|
page,
|
@@ -27769,7 +27905,7 @@ function RoleProminence({
|
|
27769
27905
|
edgeToEdge
|
27770
27906
|
}) {
|
27771
27907
|
const { prominentPeers, secondaryPeers } = useRoleProminencePeers(prominentRoles, peers, isInsetEnabled);
|
27772
|
-
const localPeer =
|
27908
|
+
const localPeer = useHMSStore75(selectLocalPeer9);
|
27773
27909
|
const layoutMode = useUISettings(UI_SETTINGS.layoutMode);
|
27774
27910
|
const isMobile = useMedia31(config.media.md);
|
27775
27911
|
let maxTileCount = useUISettings(UI_SETTINGS.maxTileCount);
|
@@ -27782,14 +27918,14 @@ function RoleProminence({
|
|
27782
27918
|
pageList,
|
27783
27919
|
maxTileCount
|
27784
27920
|
});
|
27785
|
-
const [page, setPage] =
|
27921
|
+
const [page, setPage] = useState61(0);
|
27786
27922
|
const pageSize = pagesWithTiles[0]?.length || 0;
|
27787
|
-
|
27923
|
+
useEffect45(() => {
|
27788
27924
|
if (pageSize > 0) {
|
27789
27925
|
onPageSize?.(pageSize);
|
27790
27926
|
}
|
27791
27927
|
}, [pageSize, onPageSize]);
|
27792
|
-
return /* @__PURE__ */
|
27928
|
+
return /* @__PURE__ */ React143.createElement(ProminenceLayout.Root, { hasSidebar: layoutMode === LayoutMode.SIDEBAR }, /* @__PURE__ */ React143.createElement(ProminenceLayout.ProminentSection, null, /* @__PURE__ */ React143.createElement(Grid, { ref, tiles: pagesWithTiles[page] })), !edgeToEdge && /* @__PURE__ */ React143.createElement(
|
27793
27929
|
Pagination,
|
27794
27930
|
{
|
27795
27931
|
page,
|
@@ -27799,7 +27935,7 @@ function RoleProminence({
|
|
27799
27935
|
},
|
27800
27936
|
numPages: pagesWithTiles.length
|
27801
27937
|
}
|
27802
|
-
), /* @__PURE__ */
|
27938
|
+
), /* @__PURE__ */ React143.createElement(
|
27803
27939
|
SecondaryTiles,
|
27804
27940
|
{
|
27805
27941
|
peers: layoutMode === LayoutMode.SPOTLIGHT ? [] : secondaryPeers,
|
@@ -27807,18 +27943,18 @@ function RoleProminence({
|
|
27807
27943
|
edgeToEdge,
|
27808
27944
|
hasSidebar: layoutMode === LayoutMode.SIDEBAR
|
27809
27945
|
}
|
27810
|
-
), isInsetEnabled && localPeer && prominentPeers.length > 0 && !prominentPeers.includes(localPeer) && /* @__PURE__ */
|
27946
|
+
), isInsetEnabled && localPeer && prominentPeers.length > 0 && !prominentPeers.includes(localPeer) && /* @__PURE__ */ React143.createElement(InsetTile, null));
|
27811
27947
|
}
|
27812
27948
|
|
27813
27949
|
// src/Prebuilt/components/VideoLayouts/ScreenshareLayout.tsx
|
27814
27950
|
init_define_process_env();
|
27815
|
-
import
|
27951
|
+
import React147, { useEffect as useEffect46, useMemo as useMemo17, useState as useState64 } from "react";
|
27816
27952
|
import { useMedia as useMedia33 } from "react-use";
|
27817
|
-
import { selectPeersScreenSharing, useHMSStore as
|
27953
|
+
import { selectPeersScreenSharing, useHMSStore as useHMSStore77 } from "@100mslive/react-sdk";
|
27818
27954
|
|
27819
27955
|
// src/Prebuilt/components/ScreenshareTile.tsx
|
27820
27956
|
init_define_process_env();
|
27821
|
-
import
|
27957
|
+
import React146, { useRef as useRef27, useState as useState63 } from "react";
|
27822
27958
|
import { useFullscreen as useFullscreen2, useMedia as useMedia32 } from "react-use";
|
27823
27959
|
import screenfull2 from "screenfull";
|
27824
27960
|
import {
|
@@ -27826,16 +27962,16 @@ import {
|
|
27826
27962
|
selectPeerByID as selectPeerByID4,
|
27827
27963
|
selectScreenShareAudioByPeerID as selectScreenShareAudioByPeerID2,
|
27828
27964
|
selectScreenShareByPeerID as selectScreenShareByPeerID2,
|
27829
|
-
useHMSStore as
|
27965
|
+
useHMSStore as useHMSStore76
|
27830
27966
|
} from "@100mslive/react-sdk";
|
27831
27967
|
import { ExpandIcon as ExpandIcon3, ShrinkIcon as ShrinkIcon2 } from "@100mslive/react-icons";
|
27832
27968
|
|
27833
27969
|
// src/Prebuilt/components/LayoutModeSelector.tsx
|
27834
27970
|
init_define_process_env();
|
27835
|
-
import
|
27971
|
+
import React144, { useCallback as useCallback33, useState as useState62 } from "react";
|
27836
27972
|
import { CheckIcon as CheckIcon7, ChevronDownIcon as ChevronDownIcon9, ChevronUpIcon as ChevronUpIcon7 } from "@100mslive/react-icons";
|
27837
27973
|
var LayoutModeSelector = () => {
|
27838
|
-
const [open, setOpen] =
|
27974
|
+
const [open, setOpen] = useState62(false);
|
27839
27975
|
const [layoutMode, setLayoutMode] = useSetUiSettings(UI_SETTINGS.layoutMode);
|
27840
27976
|
const updateLayoutMode = useCallback33(
|
27841
27977
|
(value) => {
|
@@ -27844,7 +27980,7 @@ var LayoutModeSelector = () => {
|
|
27844
27980
|
},
|
27845
27981
|
[setLayoutMode, setOpen]
|
27846
27982
|
);
|
27847
|
-
return /* @__PURE__ */
|
27983
|
+
return /* @__PURE__ */ React144.createElement(Popover2.Root, { open, onOpenChange: setOpen }, /* @__PURE__ */ React144.createElement(Popover2.Trigger, { asChild: true }, /* @__PURE__ */ React144.createElement(
|
27848
27984
|
Flex,
|
27849
27985
|
{
|
27850
27986
|
align: "center",
|
@@ -27856,7 +27992,7 @@ var LayoutModeSelector = () => {
|
|
27856
27992
|
height: "100%"
|
27857
27993
|
}
|
27858
27994
|
},
|
27859
|
-
/* @__PURE__ */
|
27995
|
+
/* @__PURE__ */ React144.createElement(
|
27860
27996
|
Flex,
|
27861
27997
|
{
|
27862
27998
|
align: "center",
|
@@ -27871,9 +28007,9 @@ var LayoutModeSelector = () => {
|
|
27871
28007
|
},
|
27872
28008
|
LayoutModeIconMapping[layoutMode]
|
27873
28009
|
),
|
27874
|
-
/* @__PURE__ */
|
27875
|
-
open ? /* @__PURE__ */
|
27876
|
-
)), /* @__PURE__ */
|
28010
|
+
/* @__PURE__ */ React144.createElement(Text, { variant: "caption", css: { color: "inherit", lineHeight: "$sm" } }, layoutMode),
|
28011
|
+
open ? /* @__PURE__ */ React144.createElement(ChevronUpIcon7, { width: 16, height: 16 }) : /* @__PURE__ */ React144.createElement(ChevronDownIcon9, { width: 16, height: 16 })
|
28012
|
+
)), /* @__PURE__ */ React144.createElement(
|
27877
28013
|
Popover2.Content,
|
27878
28014
|
{
|
27879
28015
|
css: {
|
@@ -27893,7 +28029,7 @@ var LayoutModeSelector = () => {
|
|
27893
28029
|
},
|
27894
28030
|
Object.keys(LayoutMode).map((key) => {
|
27895
28031
|
const value = LayoutMode[key];
|
27896
|
-
return /* @__PURE__ */
|
28032
|
+
return /* @__PURE__ */ React144.createElement(
|
27897
28033
|
Flex,
|
27898
28034
|
{
|
27899
28035
|
key,
|
@@ -27912,7 +28048,7 @@ var LayoutModeSelector = () => {
|
|
27912
28048
|
}
|
27913
28049
|
}
|
27914
28050
|
},
|
27915
|
-
/* @__PURE__ */
|
28051
|
+
/* @__PURE__ */ React144.createElement(
|
27916
28052
|
Flex,
|
27917
28053
|
{
|
27918
28054
|
align: "center",
|
@@ -27927,8 +28063,8 @@ var LayoutModeSelector = () => {
|
|
27927
28063
|
},
|
27928
28064
|
LayoutModeIconMapping[value]
|
27929
28065
|
),
|
27930
|
-
/* @__PURE__ */
|
27931
|
-
value === layoutMode ? /* @__PURE__ */
|
28066
|
+
/* @__PURE__ */ React144.createElement(Text, { variant: "caption", css: { lineHeight: "$sm" } }, value),
|
28067
|
+
value === layoutMode ? /* @__PURE__ */ React144.createElement(CheckIcon7, { width: 20, height: 20, style: { marginLeft: "auto" } }) : null
|
27932
28068
|
);
|
27933
28069
|
})
|
27934
28070
|
));
|
@@ -27936,12 +28072,12 @@ var LayoutModeSelector = () => {
|
|
27936
28072
|
|
27937
28073
|
// src/Prebuilt/components/ScreenshareDisplay.tsx
|
27938
28074
|
init_define_process_env();
|
27939
|
-
import
|
28075
|
+
import React145 from "react";
|
27940
28076
|
import { useHMSActions as useHMSActions45 } from "@100mslive/react-sdk";
|
27941
28077
|
import { CrossIcon as CrossIcon25, ShareScreenIcon as ShareScreenIcon5 } from "@100mslive/react-icons";
|
27942
28078
|
var ScreenshareDisplay = () => {
|
27943
28079
|
const hmsActions = useHMSActions45();
|
27944
|
-
return /* @__PURE__ */
|
28080
|
+
return /* @__PURE__ */ React145.createElement(
|
27945
28081
|
Flex,
|
27946
28082
|
{
|
27947
28083
|
direction: "column",
|
@@ -27953,9 +28089,9 @@ var ScreenshareDisplay = () => {
|
|
27953
28089
|
color: "$on_surface_high"
|
27954
28090
|
}
|
27955
28091
|
},
|
27956
|
-
/* @__PURE__ */
|
27957
|
-
/* @__PURE__ */
|
27958
|
-
/* @__PURE__ */
|
28092
|
+
/* @__PURE__ */ React145.createElement(ShareScreenIcon5, { width: 48, height: 48 }),
|
28093
|
+
/* @__PURE__ */ React145.createElement(Text, { variant: "h5", css: { m: "$8 0" } }, "You are sharing your screen"),
|
28094
|
+
/* @__PURE__ */ React145.createElement(
|
27959
28095
|
Button,
|
27960
28096
|
{
|
27961
28097
|
variant: "danger",
|
@@ -27965,7 +28101,7 @@ var ScreenshareDisplay = () => {
|
|
27965
28101
|
},
|
27966
28102
|
"data-testid": "stop_screen_share_btn"
|
27967
28103
|
},
|
27968
|
-
/* @__PURE__ */
|
28104
|
+
/* @__PURE__ */ React145.createElement(CrossIcon25, { width: 18, height: 18 }),
|
27969
28105
|
"\xA0 Stop screen share"
|
27970
28106
|
)
|
27971
28107
|
);
|
@@ -27981,23 +28117,23 @@ var labelStyles = {
|
|
27981
28117
|
flexShrink: 0
|
27982
28118
|
};
|
27983
28119
|
var Tile2 = ({ peerId, width = "100%", height = "100%" }) => {
|
27984
|
-
const isLocal =
|
27985
|
-
const track =
|
28120
|
+
const isLocal = useHMSStore76(selectLocalPeerID13) === peerId;
|
28121
|
+
const track = useHMSStore76(selectScreenShareByPeerID2(peerId));
|
27986
28122
|
const { theme: theme2 } = useTheme();
|
27987
|
-
const peer =
|
28123
|
+
const peer = useHMSStore76(selectPeerByID4(peerId));
|
27988
28124
|
const isAudioOnly = useUISettings(UI_SETTINGS.isAudioOnly);
|
27989
|
-
const [isMouseHovered, setIsMouseHovered] =
|
28125
|
+
const [isMouseHovered, setIsMouseHovered] = useState63(false);
|
27990
28126
|
const isMobile = useMedia32(config.media.md);
|
27991
28127
|
const showStatsOnTiles = useUISettings(UI_SETTINGS.showStatsOnTiles);
|
27992
|
-
const fullscreenRef =
|
27993
|
-
const [fullscreen, setFullscreen] =
|
28128
|
+
const fullscreenRef = useRef27(null);
|
28129
|
+
const [fullscreen, setFullscreen] = useState63(false);
|
27994
28130
|
const isFullscreen = useFullscreen2(fullscreenRef, fullscreen, {
|
27995
28131
|
onClose: () => setFullscreen(false)
|
27996
28132
|
});
|
27997
28133
|
const isFullScreenSupported = screenfull2.isEnabled;
|
27998
|
-
const audioTrack =
|
28134
|
+
const audioTrack = useHMSStore76(selectScreenShareAudioByPeerID2(peer?.id));
|
27999
28135
|
if (isLocal && track?.displaySurface && !["browser", "window", "application"].includes(track.displaySurface)) {
|
28000
|
-
return /* @__PURE__ */
|
28136
|
+
return /* @__PURE__ */ React146.createElement(ScreenshareDisplay, null);
|
28001
28137
|
}
|
28002
28138
|
if (!peer) {
|
28003
28139
|
return null;
|
@@ -28007,7 +28143,7 @@ var Tile2 = ({ peerId, width = "100%", height = "100%" }) => {
|
|
28007
28143
|
isLocal: false,
|
28008
28144
|
track
|
28009
28145
|
});
|
28010
|
-
return /* @__PURE__ */
|
28146
|
+
return /* @__PURE__ */ React146.createElement(
|
28011
28147
|
StyledVideoTile.Root,
|
28012
28148
|
{
|
28013
28149
|
css: {
|
@@ -28018,7 +28154,7 @@ var Tile2 = ({ peerId, width = "100%", height = "100%" }) => {
|
|
28018
28154
|
},
|
28019
28155
|
"data-testid": "screenshare_tile"
|
28020
28156
|
},
|
28021
|
-
/* @__PURE__ */
|
28157
|
+
/* @__PURE__ */ React146.createElement(
|
28022
28158
|
StyledVideoTile.Container,
|
28023
28159
|
{
|
28024
28160
|
transparentBg: true,
|
@@ -28029,16 +28165,16 @@ var Tile2 = ({ peerId, width = "100%", height = "100%" }) => {
|
|
28029
28165
|
setIsMouseHovered(false);
|
28030
28166
|
}
|
28031
28167
|
},
|
28032
|
-
showStatsOnTiles ? /* @__PURE__ */
|
28033
|
-
isFullScreenSupported && isMouseHovered ? /* @__PURE__ */
|
28168
|
+
showStatsOnTiles ? /* @__PURE__ */ React146.createElement(VideoTileStats, { audioTrackID: audioTrack?.id, videoTrackID: track?.id, peerID: peerId, isLocal }) : null,
|
28169
|
+
isFullScreenSupported && isMouseHovered ? /* @__PURE__ */ React146.createElement(
|
28034
28170
|
StyledVideoTile.FullScreenButton,
|
28035
28171
|
{
|
28036
28172
|
css: { bg: `${theme2.colors.background_dim.value}A3` },
|
28037
28173
|
onClick: () => setFullscreen(!fullscreen)
|
28038
28174
|
},
|
28039
|
-
isFullscreen ? /* @__PURE__ */
|
28175
|
+
isFullscreen ? /* @__PURE__ */ React146.createElement(ShrinkIcon2, null) : /* @__PURE__ */ React146.createElement(ExpandIcon3, null)
|
28040
28176
|
) : null,
|
28041
|
-
!isMobile && isMouseHovered && !isFullscreen && /* @__PURE__ */
|
28177
|
+
!isMobile && isMouseHovered && !isFullscreen && /* @__PURE__ */ React146.createElement(
|
28042
28178
|
Box,
|
28043
28179
|
{
|
28044
28180
|
css: {
|
@@ -28051,11 +28187,11 @@ var Tile2 = ({ peerId, width = "100%", height = "100%" }) => {
|
|
28051
28187
|
bg: `${theme2.colors.background_dim.value}A3`
|
28052
28188
|
}
|
28053
28189
|
},
|
28054
|
-
/* @__PURE__ */
|
28190
|
+
/* @__PURE__ */ React146.createElement(LayoutModeSelector, null)
|
28055
28191
|
),
|
28056
|
-
track ? /* @__PURE__ */
|
28057
|
-
/* @__PURE__ */
|
28058
|
-
isMouseHovered && !peer.isLocal ? /* @__PURE__ */
|
28192
|
+
track ? /* @__PURE__ */ React146.createElement(Video, { screenShare: true, mirror: false, attach: !isAudioOnly, trackId: track.id, css: { minHeight: 0 } }) : null,
|
28193
|
+
/* @__PURE__ */ React146.createElement(StyledVideoTile.Info, { css: labelStyles }, label),
|
28194
|
+
isMouseHovered && !peer.isLocal ? /* @__PURE__ */ React146.createElement(
|
28059
28195
|
TileMenu_default,
|
28060
28196
|
{
|
28061
28197
|
isScreenshare: true,
|
@@ -28068,14 +28204,14 @@ var Tile2 = ({ peerId, width = "100%", height = "100%" }) => {
|
|
28068
28204
|
)
|
28069
28205
|
);
|
28070
28206
|
};
|
28071
|
-
var ScreenshareTile =
|
28207
|
+
var ScreenshareTile = React146.memo(Tile2);
|
28072
28208
|
var ScreenshareTile_default = ScreenshareTile;
|
28073
28209
|
|
28074
28210
|
// src/Prebuilt/components/VideoLayouts/ScreenshareLayout.tsx
|
28075
28211
|
var ScreenshareLayout = ({ peers, onPageChange, onPageSize, edgeToEdge }) => {
|
28076
|
-
const peersSharing =
|
28212
|
+
const peersSharing = useHMSStore77(selectPeersScreenSharing);
|
28077
28213
|
const [, setActiveScreenSharePeer] = useSetAppDataByKey(APP_DATA.activeScreensharePeerId);
|
28078
|
-
const [page, setPage] =
|
28214
|
+
const [page, setPage] = useState64(0);
|
28079
28215
|
const [layoutMode, setLayoutMode] = useSetUiSettings(UI_SETTINGS.layoutMode);
|
28080
28216
|
const activeSharePeer = peersSharing[page];
|
28081
28217
|
const isMobile = useMedia33(config.media.md);
|
@@ -28089,7 +28225,7 @@ var ScreenshareLayout = ({ peers, onPageChange, onPageSize, edgeToEdge }) => {
|
|
28089
28225
|
}
|
28090
28226
|
return peers.filter((p) => p.id !== activeSharePeer?.id);
|
28091
28227
|
}, [activeSharePeer, peers, isMobile, layoutMode]);
|
28092
|
-
|
28228
|
+
useEffect46(() => {
|
28093
28229
|
if (isMobile) {
|
28094
28230
|
setLayoutMode(LayoutMode.GALLERY);
|
28095
28231
|
return;
|
@@ -28102,13 +28238,13 @@ var ScreenshareLayout = ({ peers, onPageChange, onPageSize, edgeToEdge }) => {
|
|
28102
28238
|
setLayoutMode(LayoutMode.GALLERY);
|
28103
28239
|
};
|
28104
28240
|
}, [isMobile]);
|
28105
|
-
|
28241
|
+
useEffect46(() => {
|
28106
28242
|
setActiveScreenSharePeer(isMobile ? "" : activeSharePeer?.id);
|
28107
28243
|
return () => {
|
28108
28244
|
setActiveScreenSharePeer("");
|
28109
28245
|
};
|
28110
28246
|
}, [activeSharePeer?.id, isMobile, setActiveScreenSharePeer]);
|
28111
|
-
return /* @__PURE__ */
|
28247
|
+
return /* @__PURE__ */ React147.createElement(ProminenceLayout.Root, { edgeToEdge, hasSidebar }, /* @__PURE__ */ React147.createElement(ProminenceLayout.ProminentSection, null, /* @__PURE__ */ React147.createElement(ScreenshareTile_default, { peerId: peersSharing[page]?.id }), !edgeToEdge && /* @__PURE__ */ React147.createElement(Pagination, { page, onPageChange: setPage, numPages: peersSharing.length })), /* @__PURE__ */ React147.createElement(
|
28112
28248
|
SecondaryTiles,
|
28113
28249
|
{
|
28114
28250
|
peers: secondaryPeers,
|
@@ -28117,19 +28253,19 @@ var ScreenshareLayout = ({ peers, onPageChange, onPageSize, edgeToEdge }) => {
|
|
28117
28253
|
edgeToEdge,
|
28118
28254
|
hasSidebar
|
28119
28255
|
}
|
28120
|
-
), layoutMode === LayoutMode.SPOTLIGHT && activeSharePeer && /* @__PURE__ */
|
28256
|
+
), layoutMode === LayoutMode.SPOTLIGHT && activeSharePeer && /* @__PURE__ */ React147.createElement(InsetTile, { peerId: activeSharePeer?.id }));
|
28121
28257
|
};
|
28122
28258
|
|
28123
28259
|
// src/Prebuilt/components/VideoLayouts/WhiteboardLayout.tsx
|
28124
28260
|
init_define_process_env();
|
28125
|
-
import
|
28261
|
+
import React148, { useEffect as useEffect47, useMemo as useMemo18 } from "react";
|
28126
28262
|
import { useMedia as useMedia34 } from "react-use";
|
28127
28263
|
import { Whiteboard } from "@100mslive/hms-whiteboard";
|
28128
|
-
import { selectPeerByCondition, selectWhiteboard, useHMSStore as
|
28264
|
+
import { selectPeerByCondition, selectWhiteboard, useHMSStore as useHMSStore78, useWhiteboard as useWhiteboard2 } from "@100mslive/react-sdk";
|
28129
28265
|
var WhiteboardEmbed = () => {
|
28130
28266
|
const isMobile = useMedia34(config.media.md);
|
28131
28267
|
const { token, endpoint, zoomToContent } = useWhiteboard2(isMobile);
|
28132
|
-
return /* @__PURE__ */
|
28268
|
+
return /* @__PURE__ */ React148.createElement(
|
28133
28269
|
Box,
|
28134
28270
|
{
|
28135
28271
|
css: {
|
@@ -28142,12 +28278,12 @@ var WhiteboardEmbed = () => {
|
|
28142
28278
|
}
|
28143
28279
|
}
|
28144
28280
|
},
|
28145
|
-
/* @__PURE__ */
|
28281
|
+
/* @__PURE__ */ React148.createElement(Box, { css: { size: "100%" } }, /* @__PURE__ */ React148.createElement(Whiteboard, { token, endpoint: `https://${endpoint}`, zoomToContent }))
|
28146
28282
|
);
|
28147
28283
|
};
|
28148
28284
|
var WhiteboardLayout = ({ peers, onPageChange, onPageSize, edgeToEdge }) => {
|
28149
|
-
const whiteboard =
|
28150
|
-
const whiteboardOwner =
|
28285
|
+
const whiteboard = useHMSStore78(selectWhiteboard);
|
28286
|
+
const whiteboardOwner = useHMSStore78(selectPeerByCondition((peer) => peer.customerUserId === whiteboard?.owner));
|
28151
28287
|
const [layoutMode, setLayoutMode] = useSetUiSettings(UI_SETTINGS.layoutMode);
|
28152
28288
|
const isMobile = useMedia34(config.media.md);
|
28153
28289
|
const hasSidebar = !isMobile && layoutMode === LayoutMode.SIDEBAR;
|
@@ -28160,7 +28296,7 @@ var WhiteboardLayout = ({ peers, onPageChange, onPageSize, edgeToEdge }) => {
|
|
28160
28296
|
}
|
28161
28297
|
return peers.filter((p) => p.id !== whiteboardOwner?.id);
|
28162
28298
|
}, [whiteboardOwner, peers, isMobile, layoutMode]);
|
28163
|
-
|
28299
|
+
useEffect47(() => {
|
28164
28300
|
if (isMobile) {
|
28165
28301
|
setLayoutMode(LayoutMode.GALLERY);
|
28166
28302
|
return;
|
@@ -28173,7 +28309,7 @@ var WhiteboardLayout = ({ peers, onPageChange, onPageSize, edgeToEdge }) => {
|
|
28173
28309
|
setLayoutMode(LayoutMode.GALLERY);
|
28174
28310
|
};
|
28175
28311
|
}, [isMobile]);
|
28176
|
-
return /* @__PURE__ */
|
28312
|
+
return /* @__PURE__ */ React148.createElement(ProminenceLayout.Root, { edgeToEdge, hasSidebar }, /* @__PURE__ */ React148.createElement(ProminenceLayout.ProminentSection, null, /* @__PURE__ */ React148.createElement(WhiteboardEmbed, null)), /* @__PURE__ */ React148.createElement(
|
28177
28313
|
SecondaryTiles,
|
28178
28314
|
{
|
28179
28315
|
peers: secondaryPeers,
|
@@ -28182,7 +28318,7 @@ var WhiteboardLayout = ({ peers, onPageChange, onPageSize, edgeToEdge }) => {
|
|
28182
28318
|
edgeToEdge,
|
28183
28319
|
hasSidebar
|
28184
28320
|
}
|
28185
|
-
), layoutMode === LayoutMode.SPOTLIGHT && whiteboardOwner && /* @__PURE__ */
|
28321
|
+
), layoutMode === LayoutMode.SPOTLIGHT && whiteboardOwner && /* @__PURE__ */ React148.createElement(InsetTile, { peerId: whiteboardOwner?.id }));
|
28186
28322
|
};
|
28187
28323
|
|
28188
28324
|
// src/Prebuilt/common/PeersSorter.ts
|
@@ -28290,12 +28426,12 @@ var GridLayout = ({
|
|
28290
28426
|
edge_to_edge = false,
|
28291
28427
|
hide_metadata_on_tile = false
|
28292
28428
|
}) => {
|
28293
|
-
const peerSharing =
|
28294
|
-
const whiteboard =
|
28429
|
+
const peerSharing = useHMSStore79(selectPeerScreenSharing2);
|
28430
|
+
const whiteboard = useHMSStore79(selectWhiteboard2);
|
28295
28431
|
const pinnedTrack = usePinnedTrack();
|
28296
|
-
const peers =
|
28297
|
-
const localPeerRole =
|
28298
|
-
const localPeerID =
|
28432
|
+
const peers = useHMSStore79(selectPeers3);
|
28433
|
+
const localPeerRole = useHMSStore79(selectLocalPeerRoleName5);
|
28434
|
+
const localPeerID = useHMSStore79(selectLocalPeerID14);
|
28299
28435
|
const [activeScreensharePeerId] = useSetAppDataByKey(APP_DATA.activeScreensharePeerId);
|
28300
28436
|
const isRoleProminence = prominentRoles.length && peers.some(
|
28301
28437
|
(peer) => peer.roleName && prominentRoles.includes(peer.roleName) && (peer.videoTrack || peer.audioTrack)
|
@@ -28324,10 +28460,10 @@ var GridLayout = ({
|
|
28324
28460
|
pinnedTrack
|
28325
28461
|
]);
|
28326
28462
|
const vanillaStore = useHMSVanillaStore12();
|
28327
|
-
const [sortedPeers, setSortedPeers] =
|
28463
|
+
const [sortedPeers, setSortedPeers] = useState65(updatedPeers);
|
28328
28464
|
const peersSorter = useMemo19(() => new PeersSorter_default(vanillaStore), [vanillaStore]);
|
28329
|
-
const [pageSize, setPageSize] =
|
28330
|
-
const [mainPage, setMainPage] =
|
28465
|
+
const [pageSize, setPageSize] = useState65(0);
|
28466
|
+
const [mainPage, setMainPage] = useState65(0);
|
28331
28467
|
const tileLayout = {
|
28332
28468
|
enableSpotlightingPeer: enable_spotlighting_peer,
|
28333
28469
|
hideParticipantNameOnTile: hide_participant_name_on_tile,
|
@@ -28336,7 +28472,7 @@ var GridLayout = ({
|
|
28336
28472
|
hideMetadataOnTile: hide_metadata_on_tile,
|
28337
28473
|
objectFit: video_object_fit
|
28338
28474
|
};
|
28339
|
-
|
28475
|
+
useEffect48(() => {
|
28340
28476
|
if (mainPage !== 0) {
|
28341
28477
|
return;
|
28342
28478
|
}
|
@@ -28347,7 +28483,7 @@ var GridLayout = ({
|
|
28347
28483
|
peersSorter.onUpdate(setSortedPeers);
|
28348
28484
|
}, [mainPage, peersSorter, updatedPeers, pageSize]);
|
28349
28485
|
if (peerSharing) {
|
28350
|
-
return /* @__PURE__ */
|
28486
|
+
return /* @__PURE__ */ React149.createElement(VideoTileContext.Provider, { value: tileLayout }, /* @__PURE__ */ React149.createElement(
|
28351
28487
|
ScreenshareLayout,
|
28352
28488
|
{
|
28353
28489
|
peers: sortedPeers,
|
@@ -28357,7 +28493,7 @@ var GridLayout = ({
|
|
28357
28493
|
}
|
28358
28494
|
));
|
28359
28495
|
} else if (whiteboard?.open) {
|
28360
|
-
return /* @__PURE__ */
|
28496
|
+
return /* @__PURE__ */ React149.createElement(VideoTileContext.Provider, { value: tileLayout }, /* @__PURE__ */ React149.createElement(
|
28361
28497
|
WhiteboardLayout,
|
28362
28498
|
{
|
28363
28499
|
peers: sortedPeers,
|
@@ -28367,7 +28503,7 @@ var GridLayout = ({
|
|
28367
28503
|
}
|
28368
28504
|
));
|
28369
28505
|
} else if (isRoleProminence) {
|
28370
|
-
return /* @__PURE__ */
|
28506
|
+
return /* @__PURE__ */ React149.createElement(VideoTileContext.Provider, { value: tileLayout }, /* @__PURE__ */ React149.createElement(
|
28371
28507
|
RoleProminence,
|
28372
28508
|
{
|
28373
28509
|
peers: sortedPeers,
|
@@ -28379,7 +28515,7 @@ var GridLayout = ({
|
|
28379
28515
|
}
|
28380
28516
|
));
|
28381
28517
|
}
|
28382
|
-
return /* @__PURE__ */
|
28518
|
+
return /* @__PURE__ */ React149.createElement(VideoTileContext.Provider, { value: tileLayout }, /* @__PURE__ */ React149.createElement(
|
28383
28519
|
EqualProminence,
|
28384
28520
|
{
|
28385
28521
|
peers: sortedPeers,
|
@@ -28393,32 +28529,32 @@ var GridLayout = ({
|
|
28393
28529
|
|
28394
28530
|
// src/Prebuilt/layouts/EmbedView.jsx
|
28395
28531
|
init_define_process_env();
|
28396
|
-
import
|
28397
|
-
import { selectAppData as selectAppData11, selectPeers as selectPeers4, selectPeerScreenSharing as selectPeerScreenSharing3, useEmbedShare, useHMSStore as
|
28532
|
+
import React150, { useEffect as useEffect49, useMemo as useMemo20 } from "react";
|
28533
|
+
import { selectAppData as selectAppData11, selectPeers as selectPeers4, selectPeerScreenSharing as selectPeerScreenSharing3, useEmbedShare, useHMSStore as useHMSStore80 } from "@100mslive/react-sdk";
|
28398
28534
|
var EmbedView = () => {
|
28399
|
-
return /* @__PURE__ */
|
28535
|
+
return /* @__PURE__ */ React150.createElement(EmbedScreenShareView, null, /* @__PURE__ */ React150.createElement(EmbedComponent, null));
|
28400
28536
|
};
|
28401
28537
|
var EmbedScreenShareView = ({ children }) => {
|
28402
|
-
const peers =
|
28403
|
-
const peerPresenting =
|
28538
|
+
const peers = useHMSStore80(selectPeers4);
|
28539
|
+
const peerPresenting = useHMSStore80(selectPeerScreenSharing3);
|
28404
28540
|
const [, setActiveScreenSharePeer] = useSetAppDataByKey(APP_DATA.activeScreensharePeerId);
|
28405
28541
|
const smallTilePeers = useMemo20(() => {
|
28406
28542
|
const smallTilePeers2 = peers.filter((peer) => peer.id !== peerPresenting?.id);
|
28407
28543
|
return smallTilePeers2;
|
28408
28544
|
}, [peers, peerPresenting]);
|
28409
|
-
|
28545
|
+
useEffect49(() => {
|
28410
28546
|
setActiveScreenSharePeer(peerPresenting?.id);
|
28411
28547
|
return () => {
|
28412
28548
|
setActiveScreenSharePeer("");
|
28413
28549
|
};
|
28414
28550
|
}, [peerPresenting?.id, setActiveScreenSharePeer]);
|
28415
|
-
return /* @__PURE__ */
|
28551
|
+
return /* @__PURE__ */ React150.createElement(ProminenceLayout.Root, null, /* @__PURE__ */ React150.createElement(ProminenceLayout.ProminentSection, null, children), /* @__PURE__ */ React150.createElement(SecondaryTiles, { peers: smallTilePeers }));
|
28416
28552
|
};
|
28417
28553
|
var EmbedComponent = () => {
|
28418
|
-
const embedConfig =
|
28554
|
+
const embedConfig = useHMSStore80(selectAppData11(APP_DATA.embedConfig));
|
28419
28555
|
const resetConfig = useResetEmbedConfig();
|
28420
28556
|
const { iframeRef, startEmbedShare, isEmbedShareInProgress } = useEmbedShare(resetConfig);
|
28421
|
-
|
28557
|
+
useEffect49(() => {
|
28422
28558
|
(async () => {
|
28423
28559
|
if (embedConfig && !isEmbedShareInProgress) {
|
28424
28560
|
try {
|
@@ -28433,7 +28569,7 @@ var EmbedComponent = () => {
|
|
28433
28569
|
}
|
28434
28570
|
})();
|
28435
28571
|
}, [isEmbedShareInProgress, embedConfig, startEmbedShare, resetConfig]);
|
28436
|
-
return /* @__PURE__ */
|
28572
|
+
return /* @__PURE__ */ React150.createElement(
|
28437
28573
|
Box,
|
28438
28574
|
{
|
28439
28575
|
css: {
|
@@ -28446,7 +28582,7 @@ var EmbedComponent = () => {
|
|
28446
28582
|
}
|
28447
28583
|
}
|
28448
28584
|
},
|
28449
|
-
/* @__PURE__ */
|
28585
|
+
/* @__PURE__ */ React150.createElement(
|
28450
28586
|
"iframe",
|
28451
28587
|
{
|
28452
28588
|
title: "Embed View",
|
@@ -28466,18 +28602,18 @@ var EmbedComponent = () => {
|
|
28466
28602
|
|
28467
28603
|
// src/Prebuilt/layouts/PDFView.jsx
|
28468
28604
|
init_define_process_env();
|
28469
|
-
import
|
28605
|
+
import React151, { useEffect as useEffect50 } from "react";
|
28470
28606
|
import { usePDFShare } from "@100mslive/react-sdk";
|
28471
28607
|
var PDFView = () => {
|
28472
28608
|
const pdfConfig = usePDFConfig();
|
28473
28609
|
const resetConfig = useResetPDFConfig();
|
28474
28610
|
const { iframeRef, startPDFShare, isPDFShareInProgress } = usePDFShare(resetConfig);
|
28475
|
-
|
28611
|
+
useEffect50(() => {
|
28476
28612
|
return () => {
|
28477
28613
|
resetConfig();
|
28478
28614
|
};
|
28479
28615
|
}, []);
|
28480
|
-
|
28616
|
+
useEffect50(() => {
|
28481
28617
|
(async () => {
|
28482
28618
|
try {
|
28483
28619
|
if (!isPDFShareInProgress && pdfConfig) {
|
@@ -28492,7 +28628,7 @@ var PDFView = () => {
|
|
28492
28628
|
}
|
28493
28629
|
})();
|
28494
28630
|
}, [isPDFShareInProgress, pdfConfig, resetConfig, startPDFShare]);
|
28495
|
-
return /* @__PURE__ */
|
28631
|
+
return /* @__PURE__ */ React151.createElement(EmbedScreenShareView, null, /* @__PURE__ */ React151.createElement(
|
28496
28632
|
Box,
|
28497
28633
|
{
|
28498
28634
|
css: {
|
@@ -28505,7 +28641,7 @@ var PDFView = () => {
|
|
28505
28641
|
}
|
28506
28642
|
}
|
28507
28643
|
},
|
28508
|
-
/* @__PURE__ */
|
28644
|
+
/* @__PURE__ */ React151.createElement(
|
28509
28645
|
"iframe",
|
28510
28646
|
{
|
28511
28647
|
title: "Embed View",
|
@@ -28523,62 +28659,11 @@ var PDFView = () => {
|
|
28523
28659
|
));
|
28524
28660
|
};
|
28525
28661
|
|
28526
|
-
// src/Prebuilt/layouts/WaitingView.jsx
|
28527
|
-
init_define_process_env();
|
28528
|
-
import React151 from "react";
|
28529
|
-
import { ColoredTimeIcon } from "@100mslive/react-icons";
|
28530
|
-
var WaitingView = React151.memo(() => {
|
28531
|
-
return /* @__PURE__ */ React151.createElement(
|
28532
|
-
Box,
|
28533
|
-
{
|
28534
|
-
css: {
|
28535
|
-
overflow: "hidden",
|
28536
|
-
w: "96%",
|
28537
|
-
maxWidth: "96%",
|
28538
|
-
h: "100%",
|
28539
|
-
m: "auto",
|
28540
|
-
background: "$surface_default",
|
28541
|
-
borderRadius: "$3"
|
28542
|
-
},
|
28543
|
-
"data-testid": "waiting_view"
|
28544
|
-
},
|
28545
|
-
/* @__PURE__ */ React151.createElement(
|
28546
|
-
Flex,
|
28547
|
-
{
|
28548
|
-
align: "center",
|
28549
|
-
direction: "column",
|
28550
|
-
css: {
|
28551
|
-
w: "$96",
|
28552
|
-
textAlign: "center",
|
28553
|
-
margin: "auto",
|
28554
|
-
h: "100%",
|
28555
|
-
justifyContent: "center",
|
28556
|
-
gap: "$8"
|
28557
|
-
}
|
28558
|
-
},
|
28559
|
-
/* @__PURE__ */ React151.createElement(ColoredTimeIcon, { width: "80px", height: "80px" }),
|
28560
|
-
/* @__PURE__ */ React151.createElement(
|
28561
|
-
Flex,
|
28562
|
-
{
|
28563
|
-
direction: "column",
|
28564
|
-
css: {
|
28565
|
-
w: "$80",
|
28566
|
-
p: "$1",
|
28567
|
-
gap: "$4"
|
28568
|
-
}
|
28569
|
-
},
|
28570
|
-
/* @__PURE__ */ React151.createElement(Text, { color: "white", variant: "h6", css: { "@md": { fontSize: "$md" } } }, "Please wait"),
|
28571
|
-
/* @__PURE__ */ React151.createElement(Text, { color: "$on_surface_medium", css: { mt: "$4", "@md": { fontSize: "$sm" } } }, "Sit back and relax till others let you join.")
|
28572
|
-
)
|
28573
|
-
)
|
28574
|
-
);
|
28575
|
-
});
|
28576
|
-
|
28577
28662
|
// src/Prebuilt/plugins/CaptionsViewer.tsx
|
28578
28663
|
init_define_process_env();
|
28579
|
-
import React152, { useEffect as
|
28664
|
+
import React152, { useEffect as useEffect51, useState as useState66 } from "react";
|
28580
28665
|
import { useMedia as useMedia35 } from "react-use";
|
28581
|
-
import { selectPeerNameByID as selectPeerNameByID5, useHMSStore as
|
28666
|
+
import { selectPeerNameByID as selectPeerNameByID5, useHMSStore as useHMSStore81, useTranscript } from "@100mslive/react-sdk";
|
28582
28667
|
var SimpleQueue = class {
|
28583
28668
|
constructor(capacity = 3, MAX_STORAGE_TIME = 5e3) {
|
28584
28669
|
this.capacity = capacity;
|
@@ -28708,7 +28793,7 @@ var CaptionMaintainerQueue = class {
|
|
28708
28793
|
}
|
28709
28794
|
};
|
28710
28795
|
var TranscriptView = ({ peer_id, data: data3 }) => {
|
28711
|
-
const peerName =
|
28796
|
+
const peerName = useHMSStore81(selectPeerNameByID5(peer_id)) || "Participant";
|
28712
28797
|
data3 = data3.trim();
|
28713
28798
|
if (!data3)
|
28714
28799
|
return null;
|
@@ -28729,10 +28814,10 @@ var CaptionsViewer = () => {
|
|
28729
28814
|
const isMobile = useMedia35(config.media.md);
|
28730
28815
|
const isChatOpen = useIsSidepaneTypeOpen(SIDE_PANE_OPTIONS.CHAT);
|
28731
28816
|
const showCaptionAtTop = elements?.chat?.is_overlay && isChatOpen && isMobile;
|
28732
|
-
const [captionQueue] =
|
28733
|
-
const [currentData, setCurrentData] =
|
28817
|
+
const [captionQueue] = useState66(new CaptionMaintainerQueue());
|
28818
|
+
const [currentData, setCurrentData] = useState66([]);
|
28734
28819
|
const isCaptionEnabled = useIsCaptionEnabled();
|
28735
|
-
|
28820
|
+
useEffect51(() => {
|
28736
28821
|
const timeInterval = setInterval(() => {
|
28737
28822
|
if (!captionQueue) {
|
28738
28823
|
return;
|
@@ -28786,12 +28871,12 @@ var CaptionsViewer = () => {
|
|
28786
28871
|
|
28787
28872
|
// src/Prebuilt/components/hooks/useCloseScreenshareWhiteboard.tsx
|
28788
28873
|
init_define_process_env();
|
28789
|
-
import { useEffect as
|
28790
|
-
import { selectPeerScreenSharing as selectPeerScreenSharing4, useHMSStore as
|
28874
|
+
import { useEffect as useEffect52 } from "react";
|
28875
|
+
import { selectPeerScreenSharing as selectPeerScreenSharing4, useHMSStore as useHMSStore82, useWhiteboard as useWhiteboard3 } from "@100mslive/react-sdk";
|
28791
28876
|
var useCloseScreenshareWhiteboard = () => {
|
28792
|
-
const peerSharing =
|
28877
|
+
const peerSharing = useHMSStore82(selectPeerScreenSharing4);
|
28793
28878
|
const { isOwner: isWhiteboardOwner, toggle: toggleWhiteboard } = useWhiteboard3();
|
28794
|
-
|
28879
|
+
useEffect52(() => {
|
28795
28880
|
if (isWhiteboardOwner && peerSharing) {
|
28796
28881
|
toggleWhiteboard?.();
|
28797
28882
|
}
|
@@ -28799,22 +28884,24 @@ var useCloseScreenshareWhiteboard = () => {
|
|
28799
28884
|
};
|
28800
28885
|
|
28801
28886
|
// src/Prebuilt/layouts/VideoStreamingSection.tsx
|
28802
|
-
var HLSView = React153.lazy(() => import("./HLSView-
|
28887
|
+
var HLSView = React153.lazy(() => import("./HLSView-SJJ2GAYJ.js"));
|
28803
28888
|
var VideoStreamingSection = ({
|
28804
28889
|
screenType,
|
28805
28890
|
elements,
|
28806
28891
|
hideControls = false
|
28807
28892
|
}) => {
|
28808
|
-
const
|
28809
|
-
const isConnected =
|
28893
|
+
const localPeerRoleName = useHMSStore83(selectLocalPeerRoleName6);
|
28894
|
+
const isConnected = useHMSStore83(selectIsConnectedToRoom9);
|
28895
|
+
const isSharingScreen = useHMSStore83(selectIsLocalScreenShared2);
|
28810
28896
|
const hmsActions = useHMSActions46();
|
28811
|
-
const waitingViewerRole = useWaitingViewerRole();
|
28812
28897
|
const urlToIframe = useUrlToEmbed();
|
28813
28898
|
const pdfAnnotatorActive = usePDFConfig();
|
28814
28899
|
const isMobileHLSStream = useMobileHLSStream();
|
28815
28900
|
const isLandscapeHLSStream = useLandscapeHLSStream();
|
28816
28901
|
useCloseScreenshareWhiteboard();
|
28817
|
-
|
28902
|
+
const { isNotAllowedToPublish, isScreenOnlyPublishParams, hasSubscribedRolePublishing } = useWaitingRoomInfo();
|
28903
|
+
console.log("pring ", isNotAllowedToPublish, isScreenOnlyPublishParams, hasSubscribedRolePublishing);
|
28904
|
+
useEffect53(() => {
|
28818
28905
|
if (!isConnected) {
|
28819
28906
|
return;
|
28820
28907
|
}
|
@@ -28826,7 +28913,7 @@ var VideoStreamingSection = ({
|
|
28826
28913
|
"chatPeerBlacklist" /* CHAT_PEER_BLACKLIST */
|
28827
28914
|
]);
|
28828
28915
|
}, [isConnected, hmsActions]);
|
28829
|
-
if (!
|
28916
|
+
if (!localPeerRoleName) {
|
28830
28917
|
return null;
|
28831
28918
|
}
|
28832
28919
|
return /* @__PURE__ */ React153.createElement(Suspense, { fallback: /* @__PURE__ */ React153.createElement(FullPageProgress_default, null) }, /* @__PURE__ */ React153.createElement(
|
@@ -28839,14 +28926,39 @@ var VideoStreamingSection = ({
|
|
28839
28926
|
},
|
28840
28927
|
direction: match12({ isLandscapeHLSStream, isMobileHLSStream }).with({ isLandscapeHLSStream: true }, () => "row").with({ isMobileHLSStream: true }, () => "column").otherwise(() => "row")
|
28841
28928
|
},
|
28842
|
-
match12({
|
28929
|
+
match12({
|
28930
|
+
screenType,
|
28931
|
+
isNotAllowedToPublish,
|
28932
|
+
isScreenOnlyPublishParams,
|
28933
|
+
hasSubscribedRolePublishing,
|
28934
|
+
isSharingScreen,
|
28935
|
+
pdfAnnotatorActive,
|
28936
|
+
urlToIframe
|
28937
|
+
}).with(
|
28843
28938
|
{
|
28844
28939
|
screenType: "hls_live_streaming"
|
28845
28940
|
},
|
28846
28941
|
() => /* @__PURE__ */ React153.createElement(HLSView, null)
|
28847
28942
|
).when(
|
28848
|
-
({
|
28849
|
-
() => /* @__PURE__ */ React153.createElement(
|
28943
|
+
({ isNotAllowedToPublish: isNotAllowedToPublish2, hasSubscribedRolePublishing: hasSubscribedRolePublishing2 }) => isNotAllowedToPublish2 && !hasSubscribedRolePublishing2,
|
28944
|
+
() => /* @__PURE__ */ React153.createElement(
|
28945
|
+
WaitingView,
|
28946
|
+
{
|
28947
|
+
title: "Waiting for Host to join",
|
28948
|
+
subtitle: "Sit back and relax",
|
28949
|
+
icon: /* @__PURE__ */ React153.createElement(PeopleAddIcon3, { width: "56px", height: "56px", style: { color: "white" } })
|
28950
|
+
}
|
28951
|
+
)
|
28952
|
+
).when(
|
28953
|
+
({ isScreenOnlyPublishParams: isScreenOnlyPublishParams2, isSharingScreen: isSharingScreen2, hasSubscribedRolePublishing: hasSubscribedRolePublishing2 }) => isScreenOnlyPublishParams2 && !isSharingScreen2 && !hasSubscribedRolePublishing2,
|
28954
|
+
() => /* @__PURE__ */ React153.createElement(
|
28955
|
+
WaitingView,
|
28956
|
+
{
|
28957
|
+
title: "Ready to present",
|
28958
|
+
subtitle: "Select the Screenshare button to start presenting",
|
28959
|
+
icon: /* @__PURE__ */ React153.createElement(ShareScreenIcon6, { width: "56px", height: "56px", style: { color: "white" } })
|
28960
|
+
}
|
28961
|
+
)
|
28850
28962
|
).when(
|
28851
28963
|
({ pdfAnnotatorActive: pdfAnnotatorActive2 }) => !!pdfAnnotatorActive2,
|
28852
28964
|
() => /* @__PURE__ */ React153.createElement(PDFView, null)
|
@@ -28888,7 +29000,7 @@ init_define_process_env();
|
|
28888
29000
|
init_define_process_env();
|
28889
29001
|
import React156 from "react";
|
28890
29002
|
import { useMedia as useMedia37 } from "react-use";
|
28891
|
-
import { HMSRoomState as HMSRoomState6, selectRoomState as selectRoomState6, useHMSStore as
|
29003
|
+
import { HMSRoomState as HMSRoomState6, selectRoomState as selectRoomState6, useHMSStore as useHMSStore85 } from "@100mslive/react-sdk";
|
28892
29004
|
|
28893
29005
|
// src/Prebuilt/components/Header/RoomDetailsHeader.tsx
|
28894
29006
|
init_define_process_env();
|
@@ -28924,7 +29036,7 @@ import {
|
|
28924
29036
|
selectVideoTrackByID as selectVideoTrackByID7,
|
28925
29037
|
useDevices as useDevices3,
|
28926
29038
|
useHMSActions as useHMSActions47,
|
28927
|
-
useHMSStore as
|
29039
|
+
useHMSStore as useHMSStore84
|
28928
29040
|
} from "@100mslive/react-sdk";
|
28929
29041
|
import {
|
28930
29042
|
BluetoothIcon,
|
@@ -28938,9 +29050,9 @@ var CamaraFlipActions = () => {
|
|
28938
29050
|
const actions = useHMSActions47();
|
28939
29051
|
const { allDevices } = useDevices3();
|
28940
29052
|
const { videoInput } = allDevices;
|
28941
|
-
const isVideoOn =
|
28942
|
-
const videoTrackId =
|
28943
|
-
const localVideoTrack =
|
29053
|
+
const isVideoOn = useHMSStore84(selectIsLocalVideoEnabled8);
|
29054
|
+
const videoTrackId = useHMSStore84(selectLocalVideoTrackID3);
|
29055
|
+
const localVideoTrack = useHMSStore84(selectVideoTrackByID7(videoTrackId));
|
28944
29056
|
if (!videoInput || !videoInput?.length || !localVideoTrack?.facingMode) {
|
28945
29057
|
return null;
|
28946
29058
|
}
|
@@ -29076,7 +29188,7 @@ var SelectWithLabel = ({ label, icon = /* @__PURE__ */ React155.createElement(Re
|
|
29076
29188
|
|
29077
29189
|
// src/Prebuilt/components/Header/Header.tsx
|
29078
29190
|
var Header2 = () => {
|
29079
|
-
const roomState =
|
29191
|
+
const roomState = useHMSStore85(selectRoomState6);
|
29080
29192
|
const isMobile = useMedia37(config.media.md);
|
29081
29193
|
if (roomState !== HMSRoomState6.Connected) {
|
29082
29194
|
return /* @__PURE__ */ React156.createElement(React156.Fragment, null);
|
@@ -29098,12 +29210,12 @@ var Header2 = () => {
|
|
29098
29210
|
|
29099
29211
|
// src/Prebuilt/components/PreviousRoleInMetadata.tsx
|
29100
29212
|
init_define_process_env();
|
29101
|
-
import { useEffect as
|
29213
|
+
import { useEffect as useEffect54 } from "react";
|
29102
29214
|
import { selectLocalPeerRoleName as selectLocalPeerRoleName7, useHMSVanillaStore as useHMSVanillaStore13 } from "@100mslive/react-sdk";
|
29103
29215
|
var PreviousRoleInMetadata = () => {
|
29104
29216
|
const vanillaStore = useHMSVanillaStore13();
|
29105
29217
|
const { updateMetaData } = useMyMetadata();
|
29106
|
-
|
29218
|
+
useEffect54(() => {
|
29107
29219
|
let previousRole = vanillaStore.getState(selectLocalPeerRoleName7);
|
29108
29220
|
const unsubscribe = vanillaStore.subscribe((currentRole) => {
|
29109
29221
|
if (previousRole !== currentRole && currentRole) {
|
@@ -29121,19 +29233,19 @@ var ConferenceScreen = () => {
|
|
29121
29233
|
const { userName, endpoints, onJoin: onJoinFunc } = useHMSPrebuiltContext();
|
29122
29234
|
const screenProps = useRoomLayoutConferencingScreen();
|
29123
29235
|
const { isPreviewScreenEnabled } = useRoomLayoutPreviewScreen();
|
29124
|
-
const roomState =
|
29125
|
-
const isConnectedToRoom =
|
29236
|
+
const roomState = useHMSStore86(selectRoomState7);
|
29237
|
+
const isConnectedToRoom = useHMSStore86(selectIsConnectedToRoom10);
|
29126
29238
|
const hmsActions = useHMSActions48();
|
29127
|
-
const [hideControls, setHideControls] =
|
29128
|
-
const dropdownList =
|
29239
|
+
const [hideControls, setHideControls] = useState67(false);
|
29240
|
+
const dropdownList = useHMSStore86(selectAppData12(APP_DATA.dropdownList));
|
29129
29241
|
const authTokenInAppData = useAuthToken();
|
29130
|
-
const headerRef =
|
29131
|
-
const footerRef =
|
29242
|
+
const headerRef = useRef28(null);
|
29243
|
+
const footerRef = useRef28(null);
|
29132
29244
|
const isMobileDevice = isAndroid || isIOS || isIPadOS;
|
29133
|
-
const dropdownListRef =
|
29245
|
+
const dropdownListRef = useRef28();
|
29134
29246
|
const [isHLSStarted] = useSetAppDataByKey(APP_DATA.hlsStarted);
|
29135
29247
|
const showChat = !!screenProps.elements?.chat;
|
29136
|
-
const autoRoomJoined =
|
29248
|
+
const autoRoomJoined = useRef28(isPreviewScreenEnabled);
|
29137
29249
|
const isMobileHLSStream = useMobileHLSStream();
|
29138
29250
|
const isLandscapeHLSStream = useLandscapeHLSStream();
|
29139
29251
|
const isMwebHLSStream = isMobileHLSStream || isLandscapeHLSStream;
|
@@ -29142,7 +29254,7 @@ var ConferenceScreen = () => {
|
|
29142
29254
|
setHideControls((value) => !value);
|
29143
29255
|
}
|
29144
29256
|
};
|
29145
|
-
|
29257
|
+
useEffect55(() => {
|
29146
29258
|
let timeout;
|
29147
29259
|
dropdownListRef.current = dropdownList || [];
|
29148
29260
|
if (dropdownListRef.current && dropdownListRef.current.length === 0) {
|
@@ -29157,7 +29269,7 @@ var ConferenceScreen = () => {
|
|
29157
29269
|
clearTimeout(timeout);
|
29158
29270
|
};
|
29159
29271
|
}, [dropdownList, hideControls, isMobileDevice]);
|
29160
|
-
|
29272
|
+
useEffect55(() => {
|
29161
29273
|
if (authTokenInAppData && !isConnectedToRoom && !isPreviewScreenEnabled && roomState !== HMSRoomState7.Connecting && !autoRoomJoined.current) {
|
29162
29274
|
hmsActions.join({
|
29163
29275
|
userName: userName || uuid3(),
|
@@ -29172,7 +29284,7 @@ var ConferenceScreen = () => {
|
|
29172
29284
|
autoRoomJoined.current = true;
|
29173
29285
|
}
|
29174
29286
|
}, [authTokenInAppData, endpoints?.init, hmsActions, isConnectedToRoom, isPreviewScreenEnabled, roomState, userName]);
|
29175
|
-
|
29287
|
+
useEffect55(() => {
|
29176
29288
|
onJoinFunc?.();
|
29177
29289
|
return () => {
|
29178
29290
|
PictureInPicture.stop().catch((error) => console.error("stopping pip", error.message));
|
@@ -29353,12 +29465,12 @@ var ErrorBoundary = class extends Component {
|
|
29353
29465
|
|
29354
29466
|
// src/Prebuilt/components/init/Init.jsx
|
29355
29467
|
init_define_process_env();
|
29356
|
-
import React159, { useEffect as
|
29468
|
+
import React159, { useEffect as useEffect57 } from "react";
|
29357
29469
|
|
29358
29470
|
// src/Prebuilt/services/FeatureFlags.jsx
|
29359
29471
|
init_define_process_env();
|
29360
|
-
import { useEffect as
|
29361
|
-
import { selectRoomID, useHMSStore as
|
29472
|
+
import { useEffect as useEffect56 } from "react";
|
29473
|
+
import { selectRoomID, useHMSStore as useHMSStore87 } from "@100mslive/react-sdk";
|
29362
29474
|
var FeatureFlags = class {
|
29363
29475
|
static enableTranscription = define_process_env_default.REACT_APP_ENABLE_TRANSCRIPTION === "true";
|
29364
29476
|
static enableStatsForNerds = define_process_env_default.REACT_APP_ENABLE_STATS_FOR_NERDS === "true";
|
@@ -29383,8 +29495,8 @@ var FeatureFlags = class {
|
|
29383
29495
|
}
|
29384
29496
|
};
|
29385
29497
|
function FeatureFlagsInit() {
|
29386
|
-
const roomId =
|
29387
|
-
|
29498
|
+
const roomId = useHMSStore87(selectRoomID);
|
29499
|
+
useEffect56(() => {
|
29388
29500
|
if (roomId) {
|
29389
29501
|
FeatureFlags.init(roomId);
|
29390
29502
|
}
|
@@ -29395,10 +29507,10 @@ function FeatureFlagsInit() {
|
|
29395
29507
|
// src/Prebuilt/components/init/Init.jsx
|
29396
29508
|
var Init = () => {
|
29397
29509
|
const { toggleTheme } = useTheme();
|
29398
|
-
|
29510
|
+
useEffect57(() => {
|
29399
29511
|
window.toggleUiTheme = toggleTheme;
|
29400
29512
|
}, [toggleTheme]);
|
29401
|
-
|
29513
|
+
useEffect57(() => {
|
29402
29514
|
function resetHeight() {
|
29403
29515
|
document.body.style.height = `${window.visualViewport?.height || window.innerHeight}px`;
|
29404
29516
|
}
|
@@ -29413,7 +29525,7 @@ var Init = () => {
|
|
29413
29525
|
|
29414
29526
|
// src/Prebuilt/components/Input/KeyboardInputManager.js
|
29415
29527
|
init_define_process_env();
|
29416
|
-
import { useEffect as
|
29528
|
+
import { useEffect as useEffect58 } from "react";
|
29417
29529
|
import {
|
29418
29530
|
selectAppData as selectAppData13,
|
29419
29531
|
selectIsLocalAudioEnabled as selectIsLocalAudioEnabled2,
|
@@ -29498,7 +29610,7 @@ var KeyboardInputManager = class {
|
|
29498
29610
|
var KeyboardHandler = () => {
|
29499
29611
|
const store = useHMSVanillaStore14();
|
29500
29612
|
const actions = useHMSActions49();
|
29501
|
-
|
29613
|
+
useEffect58(() => {
|
29502
29614
|
const keyboardManager = new KeyboardInputManager(store, actions);
|
29503
29615
|
keyboardManager.bindAllShortcuts();
|
29504
29616
|
return keyboardManager.unbindAllShortcuts;
|
@@ -29513,10 +29625,10 @@ import { ExitIcon as ExitIcon3 } from "@100mslive/react-icons";
|
|
29513
29625
|
|
29514
29626
|
// src/Prebuilt/AppStateContext.tsx
|
29515
29627
|
init_define_process_env();
|
29516
|
-
import React160, { useContext as useContext4, useEffect as
|
29628
|
+
import React160, { useContext as useContext4, useEffect as useEffect59 } from "react";
|
29517
29629
|
import { usePreviousDistinct } from "react-use";
|
29518
|
-
import { match as match13, P as
|
29519
|
-
import { HMSRoomState as HMSRoomState8, selectRoomState as selectRoomState8, useHMSStore as
|
29630
|
+
import { match as match13, P as P5 } from "ts-pattern";
|
29631
|
+
import { HMSRoomState as HMSRoomState8, selectRoomState as selectRoomState8, useHMSStore as useHMSStore88 } from "@100mslive/react-sdk";
|
29520
29632
|
|
29521
29633
|
// src/Prebuilt/components/hooks/useRedirectToLeave.tsx
|
29522
29634
|
init_define_process_env();
|
@@ -29553,7 +29665,7 @@ var useHMSAppStateContext = () => {
|
|
29553
29665
|
var useAppStateManager = () => {
|
29554
29666
|
const roomLayout = useRoomLayout();
|
29555
29667
|
const [activeState, setActiveState] = React160.useState();
|
29556
|
-
const roomState =
|
29668
|
+
const roomState = useHMSStore88(selectRoomState8);
|
29557
29669
|
const prevRoomState = usePreviousDistinct(roomState);
|
29558
29670
|
const { isLeaveScreenEnabled } = useRoomLayoutLeaveScreen();
|
29559
29671
|
const { isPreviewScreenEnabled } = useRoomLayoutPreviewScreen();
|
@@ -29561,11 +29673,11 @@ var useAppStateManager = () => {
|
|
29561
29673
|
const rejoin = () => {
|
29562
29674
|
setActiveState(isPreviewScreenEnabled ? "preview" /* PREVIEW */ : "meeting" /* MEETING */);
|
29563
29675
|
};
|
29564
|
-
|
29676
|
+
useEffect59(() => {
|
29565
29677
|
if (!roomLayout) {
|
29566
29678
|
return;
|
29567
29679
|
}
|
29568
|
-
match13([roomState, prevRoomState]).with([HMSRoomState8.Connected,
|
29680
|
+
match13([roomState, prevRoomState]).with([HMSRoomState8.Connected, P5.any], () => setActiveState("meeting" /* MEETING */)).with(
|
29569
29681
|
[HMSRoomState8.Disconnecting, HMSRoomState8.Connected],
|
29570
29682
|
[HMSRoomState8.Disconnecting, HMSRoomState8.Connecting],
|
29571
29683
|
[HMSRoomState8.Disconnecting, HMSRoomState8.Reconnecting],
|
@@ -29579,7 +29691,7 @@ var useAppStateManager = () => {
|
|
29579
29691
|
VBHandler.reset();
|
29580
29692
|
redirectToLeave(1e3);
|
29581
29693
|
}
|
29582
|
-
).with([HMSRoomState8.Disconnected,
|
29694
|
+
).with([HMSRoomState8.Disconnected, P5.nullish], () => {
|
29583
29695
|
setActiveState(isPreviewScreenEnabled ? "preview" /* PREVIEW */ : "meeting" /* MEETING */);
|
29584
29696
|
}).otherwise(() => {
|
29585
29697
|
});
|
@@ -29633,15 +29745,15 @@ var LeaveScreen = () => {
|
|
29633
29745
|
|
29634
29746
|
// src/Prebuilt/components/MwebLandscapePrompt.tsx
|
29635
29747
|
init_define_process_env();
|
29636
|
-
import React162, { useEffect as
|
29748
|
+
import React162, { useEffect as useEffect60, useState as useState68 } from "react";
|
29637
29749
|
import { useMedia as useMedia38 } from "react-use";
|
29638
|
-
import { match as match14, P as
|
29750
|
+
import { match as match14, P as P6 } from "ts-pattern";
|
29639
29751
|
import { RefreshIcon } from "@100mslive/react-icons";
|
29640
29752
|
var MwebLandscapePrompt = () => {
|
29641
|
-
const [showMwebLandscapePrompt, setShowMwebLandscapePrompt] =
|
29753
|
+
const [showMwebLandscapePrompt, setShowMwebLandscapePrompt] = useState68(false);
|
29642
29754
|
const isLandscape = useMedia38(config.media.ls);
|
29643
29755
|
const isLandscapeHLSStream = useLandscapeHLSStream();
|
29644
|
-
|
29756
|
+
useEffect60(() => {
|
29645
29757
|
if (!isMobileUserAgent) {
|
29646
29758
|
setShowMwebLandscapePrompt(false);
|
29647
29759
|
return;
|
@@ -29654,7 +29766,7 @@ var MwebLandscapePrompt = () => {
|
|
29654
29766
|
const angle = window.screen.orientation.angle;
|
29655
29767
|
const type = window.screen.orientation.type || "";
|
29656
29768
|
setShowMwebLandscapePrompt(
|
29657
|
-
match14({ angle, isLandscapeHLSStream, isLandscape, type }).with({ isLandscapeHLSStream: true }, () => false).with({ angle:
|
29769
|
+
match14({ angle, isLandscapeHLSStream, isLandscape, type }).with({ isLandscapeHLSStream: true }, () => false).with({ angle: P6.when((angle2) => angle2 && angle2 >= 90) }, ({ type: type2 }) => type2.includes("landscape")).otherwise(() => isLandscape)
|
29658
29770
|
);
|
29659
29771
|
};
|
29660
29772
|
handleRotation();
|
@@ -29685,18 +29797,18 @@ init_define_process_env();
|
|
29685
29797
|
|
29686
29798
|
// src/Prebuilt/components/Notifications/Notifications.tsx
|
29687
29799
|
init_define_process_env();
|
29688
|
-
import React171, { useCallback as useCallback36, useEffect as
|
29800
|
+
import React171, { useCallback as useCallback36, useEffect as useEffect70 } from "react";
|
29689
29801
|
import {
|
29690
29802
|
HMSNotificationTypes as HMSNotificationTypes10,
|
29691
29803
|
HMSRoomState as HMSRoomState10,
|
29692
|
-
selectIsLocalScreenShared as
|
29804
|
+
selectIsLocalScreenShared as selectIsLocalScreenShared3,
|
29693
29805
|
selectLocalPeerID as selectLocalPeerID16,
|
29694
29806
|
selectPeerNameByID as selectPeerNameByID6,
|
29695
29807
|
selectRoomState as selectRoomState10,
|
29696
29808
|
useAwayNotifications as useAwayNotifications2,
|
29697
29809
|
useCustomEvent as useCustomEvent4,
|
29698
29810
|
useHMSNotifications as useHMSNotifications10,
|
29699
|
-
useHMSStore as
|
29811
|
+
useHMSStore as useHMSStore92,
|
29700
29812
|
useHMSVanillaStore as useHMSVanillaStore16
|
29701
29813
|
} from "@100mslive/react-sdk";
|
29702
29814
|
import { GroupIcon as GroupIcon2 } from "@100mslive/react-icons";
|
@@ -29734,15 +29846,15 @@ function AutoplayBlockedModal() {
|
|
29734
29846
|
|
29735
29847
|
// src/Prebuilt/components/Notifications/ChatNotifications.tsx
|
29736
29848
|
init_define_process_env();
|
29737
|
-
import React164, { useEffect as
|
29849
|
+
import React164, { useEffect as useEffect61 } from "react";
|
29738
29850
|
import { v4 as uuid4 } from "uuid";
|
29739
|
-
import { selectLocalPeerID as selectLocalPeerID15, selectSessionStore as selectSessionStore12, useHMSStore as
|
29851
|
+
import { selectLocalPeerID as selectLocalPeerID15, selectSessionStore as selectSessionStore12, useHMSStore as useHMSStore89 } from "@100mslive/react-sdk";
|
29740
29852
|
import { ChatIcon as ChatIcon2, ChatUnreadIcon } from "@100mslive/react-icons";
|
29741
29853
|
var NOTIFICATION_TIME_DIFFERENCE = 5e3;
|
29742
29854
|
var ChatNotifications = () => {
|
29743
|
-
const chatState =
|
29744
|
-
const localPeerId =
|
29745
|
-
|
29855
|
+
const chatState = useHMSStore89(selectSessionStore12("chatState" /* CHAT_STATE */));
|
29856
|
+
const localPeerId = useHMSStore89(selectLocalPeerID15);
|
29857
|
+
useEffect61(() => {
|
29746
29858
|
if (!chatState || chatState.updatedBy?.peerId === localPeerId) {
|
29747
29859
|
return;
|
29748
29860
|
}
|
@@ -29762,7 +29874,7 @@ var ChatNotifications = () => {
|
|
29762
29874
|
|
29763
29875
|
// src/Prebuilt/components/Notifications/HandRaisedNotifications.tsx
|
29764
29876
|
init_define_process_env();
|
29765
|
-
import { useEffect as
|
29877
|
+
import { useEffect as useEffect62 } from "react";
|
29766
29878
|
import {
|
29767
29879
|
HMSNotificationTypes as HMSNotificationTypes2,
|
29768
29880
|
HMSRoomState as HMSRoomState9,
|
@@ -29770,7 +29882,7 @@ import {
|
|
29770
29882
|
selectPeerByID as selectPeerByID6,
|
29771
29883
|
selectRoomState as selectRoomState9,
|
29772
29884
|
useHMSNotifications as useHMSNotifications2,
|
29773
|
-
useHMSStore as
|
29885
|
+
useHMSStore as useHMSStore91,
|
29774
29886
|
useHMSVanillaStore as useHMSVanillaStore15
|
29775
29887
|
} from "@100mslive/react-sdk";
|
29776
29888
|
|
@@ -29780,12 +29892,12 @@ init_define_process_env();
|
|
29780
29892
|
// src/Prebuilt/components/Toast/ToastConfig.jsx
|
29781
29893
|
init_define_process_env();
|
29782
29894
|
import React165, { useCallback as useCallback35 } from "react";
|
29783
|
-
import { selectPeerByID as selectPeerByID5, useHMSActions as useHMSActions50, useHMSStore as
|
29895
|
+
import { selectPeerByID as selectPeerByID5, useHMSActions as useHMSActions50, useHMSStore as useHMSStore90 } from "@100mslive/react-sdk";
|
29784
29896
|
import {
|
29785
29897
|
ChatUnreadIcon as ChatUnreadIcon2,
|
29786
29898
|
ConnectivityIcon,
|
29787
29899
|
HandIcon as HandIcon6,
|
29788
|
-
PeopleAddIcon as
|
29900
|
+
PeopleAddIcon as PeopleAddIcon4,
|
29789
29901
|
PeopleRemoveIcon as PeopleRemoveIcon4,
|
29790
29902
|
PoorConnectivityIcon as PoorConnectivityIcon2
|
29791
29903
|
} from "@100mslive/react-icons";
|
@@ -29801,7 +29913,7 @@ var HandRaiseAction = React165.forwardRef(({ id = "", isSingleHandRaise = true }
|
|
29801
29913
|
const hmsActions = useHMSActions50();
|
29802
29914
|
const toggleSidepane = useSidepaneToggle(SIDE_PANE_OPTIONS.PARTICIPANTS);
|
29803
29915
|
const isParticipantsOpen = useIsSidepaneTypeOpen(SIDE_PANE_OPTIONS.PARTICIPANTS);
|
29804
|
-
const peer =
|
29916
|
+
const peer = useHMSStore90(selectPeerByID5(id));
|
29805
29917
|
const layout = useRoomLayout();
|
29806
29918
|
const {
|
29807
29919
|
bring_to_stage_label,
|
@@ -29837,13 +29949,13 @@ var ToastConfig = {
|
|
29837
29949
|
single: function(notification) {
|
29838
29950
|
return {
|
29839
29951
|
title: `${notification.data?.name} joined`,
|
29840
|
-
icon: /* @__PURE__ */ React165.createElement(
|
29952
|
+
icon: /* @__PURE__ */ React165.createElement(PeopleAddIcon4, null)
|
29841
29953
|
};
|
29842
29954
|
},
|
29843
29955
|
multiple: function(notifications) {
|
29844
29956
|
return {
|
29845
29957
|
title: `${notifications[notifications.length - 1].data.name} and ${notifications.length - 1} others joined`,
|
29846
|
-
icon: /* @__PURE__ */ React165.createElement(
|
29958
|
+
icon: /* @__PURE__ */ React165.createElement(PeopleAddIcon4, null)
|
29847
29959
|
};
|
29848
29960
|
}
|
29849
29961
|
},
|
@@ -29998,11 +30110,11 @@ ToastManager.addListener(ToastBatcher.syncUItoast.bind(ToastBatcher));
|
|
29998
30110
|
// src/Prebuilt/components/Notifications/HandRaisedNotifications.tsx
|
29999
30111
|
var HandRaisedNotifications = () => {
|
30000
30112
|
const notification = useHMSNotifications2(HMSNotificationTypes2.HAND_RAISE_CHANGED);
|
30001
|
-
const roomState =
|
30113
|
+
const roomState = useHMSStore91(selectRoomState9);
|
30002
30114
|
const vanillaStore = useHMSVanillaStore15();
|
30003
30115
|
const { on_stage_exp } = useRoomLayoutConferencingScreen().elements || {};
|
30004
30116
|
const isSubscribing = !!useSubscribedNotifications(SUBSCRIBED_NOTIFICATIONS.METADATA_UPDATED);
|
30005
|
-
|
30117
|
+
useEffect62(() => {
|
30006
30118
|
if (!notification?.data) {
|
30007
30119
|
return;
|
30008
30120
|
}
|
@@ -30022,13 +30134,13 @@ var HandRaisedNotifications = () => {
|
|
30022
30134
|
|
30023
30135
|
// src/Prebuilt/components/Notifications/InitErrorModal.tsx
|
30024
30136
|
init_define_process_env();
|
30025
|
-
import React166, { useEffect as
|
30137
|
+
import React166, { useEffect as useEffect63, useState as useState69 } from "react";
|
30026
30138
|
import { HMSNotificationTypes as HMSNotificationTypes3, useHMSNotifications as useHMSNotifications3 } from "@100mslive/react-sdk";
|
30027
30139
|
var InitErrorModal = () => {
|
30028
30140
|
const notification = useHMSNotifications3(HMSNotificationTypes3.ERROR);
|
30029
|
-
const [showModal, setShowModal] =
|
30030
|
-
const [info, setInfo] =
|
30031
|
-
|
30141
|
+
const [showModal, setShowModal] = useState69(false);
|
30142
|
+
const [info, setInfo] = useState69({ title: "Init Error", description: "" });
|
30143
|
+
useEffect63(() => {
|
30032
30144
|
const data3 = notification?.data;
|
30033
30145
|
if (!data3 || data3.action !== "INIT") {
|
30034
30146
|
return;
|
@@ -30053,7 +30165,7 @@ var InitErrorModal = () => {
|
|
30053
30165
|
|
30054
30166
|
// src/Prebuilt/components/Notifications/PeerNotifications.tsx
|
30055
30167
|
init_define_process_env();
|
30056
|
-
import { useEffect as
|
30168
|
+
import { useEffect as useEffect64 } from "react";
|
30057
30169
|
import { HMSNotificationTypes as HMSNotificationTypes4, useHMSNotifications as useHMSNotifications4 } from "@100mslive/react-sdk";
|
30058
30170
|
var notificationTypes = [HMSNotificationTypes4.PEER_JOINED, HMSNotificationTypes4.PEER_LEFT];
|
30059
30171
|
var PeerNotifications = () => {
|
@@ -30061,7 +30173,7 @@ var PeerNotifications = () => {
|
|
30061
30173
|
const isPeerJoinSubscribed = useSubscribedNotifications(SUBSCRIBED_NOTIFICATIONS.PEER_JOINED);
|
30062
30174
|
const isPeerLeftSubscribed = useSubscribedNotifications(SUBSCRIBED_NOTIFICATIONS.PEER_LEFT);
|
30063
30175
|
const [selectedPeer, setPeerSelector] = useSetSubscribedChatSelector(CHAT_SELECTOR.PEER);
|
30064
|
-
|
30176
|
+
useEffect64(() => {
|
30065
30177
|
if (!notification?.data) {
|
30066
30178
|
return;
|
30067
30179
|
}
|
@@ -30090,7 +30202,7 @@ var PeerNotifications = () => {
|
|
30090
30202
|
|
30091
30203
|
// src/Prebuilt/components/Notifications/PermissionErrorModal.tsx
|
30092
30204
|
init_define_process_env();
|
30093
|
-
import React167, { useEffect as
|
30205
|
+
import React167, { useEffect as useEffect65, useState as useState70 } from "react";
|
30094
30206
|
import { useMedia as useMedia39 } from "react-use";
|
30095
30207
|
import { HMSNotificationTypes as HMSNotificationTypes5, useHMSNotifications as useHMSNotifications5 } from "@100mslive/react-sdk";
|
30096
30208
|
|
@@ -30103,10 +30215,10 @@ var ios_perm_0_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATwAAACh
|
|
30103
30215
|
// src/Prebuilt/components/Notifications/PermissionErrorModal.tsx
|
30104
30216
|
function PermissionErrorModal() {
|
30105
30217
|
const notification = useHMSNotifications5(HMSNotificationTypes5.ERROR);
|
30106
|
-
const [deviceType, setDeviceType] =
|
30107
|
-
const [isSystemError, setIsSystemError] =
|
30218
|
+
const [deviceType, setDeviceType] = useState70("");
|
30219
|
+
const [isSystemError, setIsSystemError] = useState70(false);
|
30108
30220
|
const isMobile = useMedia39(config.media.md);
|
30109
|
-
|
30221
|
+
useEffect65(() => {
|
30110
30222
|
if (!notification || notification.data?.code !== 3001 && notification.data?.code !== 3011 || notification.data?.code === 3001 && notification.data?.message.includes("screen")) {
|
30111
30223
|
return;
|
30112
30224
|
}
|
@@ -30163,7 +30275,7 @@ function PermissionErrorModal() {
|
|
30163
30275
|
|
30164
30276
|
// src/Prebuilt/components/Notifications/ReconnectNotifications.tsx
|
30165
30277
|
init_define_process_env();
|
30166
|
-
import React168, { useEffect as
|
30278
|
+
import React168, { useEffect as useEffect66, useState as useState71 } from "react";
|
30167
30279
|
import { HMSNotificationTypes as HMSNotificationTypes6, useHMSNotifications as useHMSNotifications6 } from "@100mslive/react-sdk";
|
30168
30280
|
var notificationTypes2 = [
|
30169
30281
|
HMSNotificationTypes6.RECONNECTED,
|
@@ -30173,8 +30285,8 @@ var notificationTypes2 = [
|
|
30173
30285
|
var notificationId = null;
|
30174
30286
|
var ReconnectNotifications = () => {
|
30175
30287
|
const notification = useHMSNotifications6(notificationTypes2);
|
30176
|
-
const [open, setOpen] =
|
30177
|
-
|
30288
|
+
const [open, setOpen] = useState71(false);
|
30289
|
+
useEffect66(() => {
|
30178
30290
|
if (!notification) {
|
30179
30291
|
return;
|
30180
30292
|
}
|
@@ -30212,7 +30324,7 @@ var ReconnectNotifications = () => {
|
|
30212
30324
|
|
30213
30325
|
// src/Prebuilt/components/Notifications/TrackBulkUnmuteModal.tsx
|
30214
30326
|
init_define_process_env();
|
30215
|
-
import React169, { useEffect as
|
30327
|
+
import React169, { useEffect as useEffect67, useState as useState72 } from "react";
|
30216
30328
|
import {
|
30217
30329
|
HMSNotificationTypes as HMSNotificationTypes7,
|
30218
30330
|
useHMSActions as useHMSActions51,
|
@@ -30221,13 +30333,13 @@ import {
|
|
30221
30333
|
import { MicOnIcon as MicOnIcon5 } from "@100mslive/react-icons";
|
30222
30334
|
var TrackBulkUnmuteModal = () => {
|
30223
30335
|
const hmsActions = useHMSActions51();
|
30224
|
-
const [muteNotification, setMuteNotification] =
|
30336
|
+
const [muteNotification, setMuteNotification] = useState72(null);
|
30225
30337
|
const notification = useHMSNotifications7([
|
30226
30338
|
HMSNotificationTypes7.CHANGE_MULTI_TRACK_STATE_REQUEST,
|
30227
30339
|
HMSNotificationTypes7.ROOM_ENDED,
|
30228
30340
|
HMSNotificationTypes7.REMOVED_FROM_ROOM
|
30229
30341
|
]);
|
30230
|
-
|
30342
|
+
useEffect67(() => {
|
30231
30343
|
switch (notification?.type) {
|
30232
30344
|
case HMSNotificationTypes7.REMOVED_FROM_ROOM:
|
30233
30345
|
case HMSNotificationTypes7.ROOM_ENDED:
|
@@ -30266,7 +30378,7 @@ var TrackBulkUnmuteModal = () => {
|
|
30266
30378
|
|
30267
30379
|
// src/Prebuilt/components/Notifications/TrackNotifications.tsx
|
30268
30380
|
init_define_process_env();
|
30269
|
-
import { useEffect as
|
30381
|
+
import { useEffect as useEffect68 } from "react";
|
30270
30382
|
import { HMSNotificationTypes as HMSNotificationTypes8, useHMSNotifications as useHMSNotifications8 } from "@100mslive/react-sdk";
|
30271
30383
|
var notificationTypes3 = [
|
30272
30384
|
HMSNotificationTypes8.TRACK_ADDED,
|
@@ -30276,7 +30388,7 @@ var notificationTypes3 = [
|
|
30276
30388
|
];
|
30277
30389
|
var TrackNotifications = () => {
|
30278
30390
|
const notification = useHMSNotifications8(notificationTypes3);
|
30279
|
-
|
30391
|
+
useEffect68(() => {
|
30280
30392
|
if (notification) {
|
30281
30393
|
console.debug(`[${notification.type}]`, notification);
|
30282
30394
|
}
|
@@ -30286,7 +30398,7 @@ var TrackNotifications = () => {
|
|
30286
30398
|
|
30287
30399
|
// src/Prebuilt/components/Notifications/TrackUnmuteModal.tsx
|
30288
30400
|
init_define_process_env();
|
30289
|
-
import React170, { useEffect as
|
30401
|
+
import React170, { useEffect as useEffect69, useState as useState73 } from "react";
|
30290
30402
|
import {
|
30291
30403
|
HMSNotificationTypes as HMSNotificationTypes9,
|
30292
30404
|
useHMSActions as useHMSActions52,
|
@@ -30300,8 +30412,8 @@ var TrackUnmuteModal = () => {
|
|
30300
30412
|
HMSNotificationTypes9.ROOM_ENDED,
|
30301
30413
|
HMSNotificationTypes9.REMOVED_FROM_ROOM
|
30302
30414
|
]);
|
30303
|
-
const [muteNotification, setMuteNotification] =
|
30304
|
-
|
30415
|
+
const [muteNotification, setMuteNotification] = useState73(null);
|
30416
|
+
useEffect69(() => {
|
30305
30417
|
switch (notification?.type) {
|
30306
30418
|
case HMSNotificationTypes9.REMOVED_FROM_ROOM:
|
30307
30419
|
case HMSNotificationTypes9.ROOM_ENDED:
|
@@ -30338,17 +30450,17 @@ var TrackUnmuteModal = () => {
|
|
30338
30450
|
// src/Prebuilt/components/Notifications/Notifications.tsx
|
30339
30451
|
var pollToastKey = {};
|
30340
30452
|
function Notifications() {
|
30341
|
-
const localPeerID =
|
30453
|
+
const localPeerID = useHMSStore92(selectLocalPeerID16);
|
30342
30454
|
const notification = useHMSNotifications10();
|
30343
30455
|
const subscribedNotifications = useSubscribedNotifications() || {};
|
30344
|
-
const roomState =
|
30456
|
+
const roomState = useHMSStore92(selectRoomState10);
|
30345
30457
|
const updateRoomLayoutForRole = useUpdateRoomLayout();
|
30346
30458
|
const isNotificationDisabled = useIsNotificationDisabled();
|
30347
30459
|
const screenProps = useRoomLayoutConferencingScreen();
|
30348
30460
|
const vanillaStore = useHMSVanillaStore16();
|
30349
30461
|
const togglePollView = usePollViewToggle();
|
30350
30462
|
const { showNotification } = useAwayNotifications2();
|
30351
|
-
const amIScreenSharing =
|
30463
|
+
const amIScreenSharing = useHMSStore92(selectIsLocalScreenShared3);
|
30352
30464
|
const logoURL = useRoomLayout()?.logo?.url;
|
30353
30465
|
const handleRoleChangeDenied = useCallback36((request) => {
|
30354
30466
|
ToastManager.addToast({
|
@@ -30357,7 +30469,7 @@ function Notifications() {
|
|
30357
30469
|
});
|
30358
30470
|
}, []);
|
30359
30471
|
useCustomEvent4({ type: ROLE_CHANGE_DECLINED, onEvent: handleRoleChangeDenied });
|
30360
|
-
|
30472
|
+
useEffect70(() => {
|
30361
30473
|
if (!notification || isNotificationDisabled) {
|
30362
30474
|
return;
|
30363
30475
|
}
|
@@ -30502,8 +30614,8 @@ var PreviewScreen = () => {
|
|
30502
30614
|
|
30503
30615
|
// src/Prebuilt/components/Toast/ToastContainer.jsx
|
30504
30616
|
init_define_process_env();
|
30505
|
-
import React174, { useEffect as
|
30506
|
-
import { selectIsConnectedToRoom as selectIsConnectedToRoom11, useHMSStore as
|
30617
|
+
import React174, { useEffect as useEffect71, useState as useState74 } from "react";
|
30618
|
+
import { selectIsConnectedToRoom as selectIsConnectedToRoom11, useHMSStore as useHMSStore93 } from "@100mslive/react-sdk";
|
30507
30619
|
|
30508
30620
|
// src/Prebuilt/components/Toast/Toast.jsx
|
30509
30621
|
init_define_process_env();
|
@@ -30526,9 +30638,9 @@ var Toast2 = ({ title, description, close = true, open, duration, onOpenChange,
|
|
30526
30638
|
|
30527
30639
|
// src/Prebuilt/components/Toast/ToastContainer.jsx
|
30528
30640
|
var ToastContainer = () => {
|
30529
|
-
const isConnected =
|
30530
|
-
const [toasts, setToast] =
|
30531
|
-
|
30641
|
+
const isConnected = useHMSStore93(selectIsConnectedToRoom11);
|
30642
|
+
const [toasts, setToast] = useState74([]);
|
30643
|
+
useEffect71(() => {
|
30532
30644
|
ToastManager.addListener(setToast);
|
30533
30645
|
return () => {
|
30534
30646
|
ToastManager.removeListener(setToast);
|
@@ -30550,7 +30662,7 @@ var ToastContainer = () => {
|
|
30550
30662
|
// src/Prebuilt/layouts/Sheet.tsx
|
30551
30663
|
init_define_process_env();
|
30552
30664
|
import React176 from "react";
|
30553
|
-
import { selectAppData as selectAppData14, useHMSStore as
|
30665
|
+
import { selectAppData as selectAppData14, useHMSStore as useHMSStore94 } from "@100mslive/react-sdk";
|
30554
30666
|
|
30555
30667
|
// src/Prebuilt/components/RoomDetails/RoomDetailsSheet.tsx
|
30556
30668
|
init_define_process_env();
|
@@ -30574,7 +30686,7 @@ var RoomDetailsSheet = () => {
|
|
30574
30686
|
|
30575
30687
|
// src/Prebuilt/layouts/Sheet.tsx
|
30576
30688
|
var Sheet2 = () => {
|
30577
|
-
const sheet =
|
30689
|
+
const sheet = useHMSStore94(selectAppData14(APP_DATA.sheet));
|
30578
30690
|
let ViewComponent;
|
30579
30691
|
if (sheet === SHEET_OPTIONS.ROOM_DETAILS) {
|
30580
30692
|
ViewComponent = /* @__PURE__ */ React176.createElement(RoomDetailsSheet, null);
|
@@ -30584,7 +30696,7 @@ var Sheet2 = () => {
|
|
30584
30696
|
|
30585
30697
|
// src/Prebuilt/plugins/FlyingEmoji.jsx
|
30586
30698
|
init_define_process_env();
|
30587
|
-
import React177, { useCallback as useCallback37, useEffect as
|
30699
|
+
import React177, { useCallback as useCallback37, useEffect as useEffect72, useMemo as useMemo21, useState as useState75 } from "react";
|
30588
30700
|
import { useMedia as useMedia40 } from "react-use";
|
30589
30701
|
import {
|
30590
30702
|
selectIsLargeRoom as selectIsLargeRoom4,
|
@@ -30592,7 +30704,7 @@ import {
|
|
30592
30704
|
selectPeerNameByID as selectPeerNameByID7,
|
30593
30705
|
useCustomEvent as useCustomEvent5,
|
30594
30706
|
useHMSActions as useHMSActions53,
|
30595
|
-
useHMSStore as
|
30707
|
+
useHMSStore as useHMSStore95,
|
30596
30708
|
useHMSVanillaStore as useHMSVanillaStore17
|
30597
30709
|
} from "@100mslive/react-sdk";
|
30598
30710
|
var emojiCount = 1;
|
@@ -30619,12 +30731,12 @@ var getStartingPoints = (isMobile) => {
|
|
30619
30731
|
return arr;
|
30620
30732
|
};
|
30621
30733
|
function FlyingEmoji() {
|
30622
|
-
const localPeerId =
|
30734
|
+
const localPeerId = useHMSStore95(selectLocalPeerID17);
|
30623
30735
|
const vanillaStore = useHMSVanillaStore17();
|
30624
30736
|
const hmsActions = useHMSActions53();
|
30625
|
-
const [emojis, setEmojis] =
|
30737
|
+
const [emojis, setEmojis] = useState75([]);
|
30626
30738
|
const isMobile = useMedia40(config.media.md);
|
30627
|
-
const isLargeRoom =
|
30739
|
+
const isLargeRoom = useHMSStore95(selectIsLargeRoom4);
|
30628
30740
|
const startingPoints = useMemo21(() => getStartingPoints(isMobile), [isMobile]);
|
30629
30741
|
const showFlyingEmoji = useCallback37(
|
30630
30742
|
async ({ emojiId, senderId }) => {
|
@@ -30658,7 +30770,7 @@ function FlyingEmoji() {
|
|
30658
30770
|
type: EMOJI_REACTION_TYPE,
|
30659
30771
|
onEvent: showFlyingEmoji
|
30660
30772
|
});
|
30661
|
-
|
30773
|
+
useEffect72(() => {
|
30662
30774
|
window.showFlyingEmoji = showFlyingEmoji;
|
30663
30775
|
}, [showFlyingEmoji]);
|
30664
30776
|
return /* @__PURE__ */ React177.createElement(
|
@@ -30737,22 +30849,22 @@ function RemoteStopScreenshare() {
|
|
30737
30849
|
|
30738
30850
|
// src/Prebuilt/components/hooks/useAutoStartStreaming.tsx
|
30739
30851
|
init_define_process_env();
|
30740
|
-
import { useCallback as useCallback39, useEffect as
|
30852
|
+
import { useCallback as useCallback39, useEffect as useEffect73, useRef as useRef29 } from "react";
|
30741
30853
|
import {
|
30742
30854
|
selectIsConnectedToRoom as selectIsConnectedToRoom12,
|
30743
30855
|
selectPermissions as selectPermissions20,
|
30744
30856
|
useHMSActions as useHMSActions55,
|
30745
|
-
useHMSStore as
|
30857
|
+
useHMSStore as useHMSStore96,
|
30746
30858
|
useRecordingStreaming as useRecordingStreaming12
|
30747
30859
|
} from "@100mslive/react-sdk";
|
30748
30860
|
var useAutoStartStreaming = () => {
|
30749
30861
|
const [isHLSStarted, setHLSStarted] = useSetAppDataByKey(APP_DATA.hlsStarted);
|
30750
|
-
const permissions =
|
30862
|
+
const permissions = useHMSStore96(selectPermissions20);
|
30751
30863
|
const showStreamingUI = useShowStreamingUI();
|
30752
30864
|
const hmsActions = useHMSActions55();
|
30753
|
-
const isConnected =
|
30865
|
+
const isConnected = useHMSStore96(selectIsConnectedToRoom12);
|
30754
30866
|
const { isHLSRunning, isRTMPRunning, isHLSRecordingOn, isBrowserRecordingOn } = useRecordingStreaming12();
|
30755
|
-
const streamStartedRef =
|
30867
|
+
const streamStartedRef = useRef29(false);
|
30756
30868
|
const startHLS = useCallback39(async () => {
|
30757
30869
|
try {
|
30758
30870
|
if (isHLSStarted || !showStreamingUI || isHLSRunning || isRTMPRunning || isHLSRecordingOn || isBrowserRecordingOn) {
|
@@ -30776,12 +30888,12 @@ var useAutoStartStreaming = () => {
|
|
30776
30888
|
isHLSRecordingOn,
|
30777
30889
|
isBrowserRecordingOn
|
30778
30890
|
]);
|
30779
|
-
|
30891
|
+
useEffect73(() => {
|
30780
30892
|
if (!isHLSStarted && !isHLSRunning) {
|
30781
30893
|
streamStartedRef.current = false;
|
30782
30894
|
}
|
30783
30895
|
}, [isHLSStarted, isHLSRunning]);
|
30784
|
-
|
30896
|
+
useEffect73(() => {
|
30785
30897
|
if (!isConnected || streamStartedRef.current || !permissions?.hlsStreaming) {
|
30786
30898
|
return;
|
30787
30899
|
}
|
@@ -30803,9 +30915,9 @@ var HMSPrebuilt = React179.forwardRef(
|
|
30803
30915
|
onLeave,
|
30804
30916
|
onJoin
|
30805
30917
|
}, ref) => {
|
30806
|
-
const reactiveStore =
|
30918
|
+
const reactiveStore = useRef30();
|
30807
30919
|
const [hydrated, setHydrated] = React179.useState(false);
|
30808
|
-
|
30920
|
+
useEffect74(() => {
|
30809
30921
|
setHydrated(true);
|
30810
30922
|
const hms = new HMSReactiveStore();
|
30811
30923
|
const hmsStore = hms.getStore();
|
@@ -30820,13 +30932,13 @@ var HMSPrebuilt = React179.forwardRef(
|
|
30820
30932
|
hmsNotifications
|
30821
30933
|
};
|
30822
30934
|
}, []);
|
30823
|
-
|
30935
|
+
useEffect74(() => {
|
30824
30936
|
if (!ref || !reactiveStore.current) {
|
30825
30937
|
return;
|
30826
30938
|
}
|
30827
30939
|
ref.current = { ...reactiveStore.current };
|
30828
30940
|
}, [ref]);
|
30829
|
-
|
30941
|
+
useEffect74(() => {
|
30830
30942
|
return () => {
|
30831
30943
|
VBHandler.reset();
|
30832
30944
|
reactiveStore?.current?.hmsActions.leave();
|
@@ -30936,9 +31048,9 @@ var AppStates = ({ activeState }) => {
|
|
30936
31048
|
return match15({ activeState, isPreviewScreenEnabled, isLeaveScreenEnabled }).with({ activeState: "preview" /* PREVIEW */, isPreviewScreenEnabled: true }, () => /* @__PURE__ */ React179.createElement(PreviewScreen, null)).with({ activeState: "leave" /* LEAVE */, isLeaveScreenEnabled: true }, () => /* @__PURE__ */ React179.createElement(LeaveScreen, null)).otherwise(() => /* @__PURE__ */ React179.createElement(ConferenceScreen, null));
|
30937
31049
|
};
|
30938
31050
|
var BackSwipe = () => {
|
30939
|
-
const isConnectedToRoom =
|
31051
|
+
const isConnectedToRoom = useHMSStore97(selectIsConnectedToRoom13);
|
30940
31052
|
const hmsActions = useHMSActions56();
|
30941
|
-
|
31053
|
+
useEffect74(() => {
|
30942
31054
|
const onRouteLeave = async () => {
|
30943
31055
|
if (isConnectedToRoom) {
|
30944
31056
|
await hmsActions.leave();
|
@@ -31093,6 +31205,7 @@ export {
|
|
31093
31205
|
ChatToggle,
|
31094
31206
|
Logo,
|
31095
31207
|
RoomDetailsRow,
|
31208
|
+
WaitingView,
|
31096
31209
|
HMSPrebuilt,
|
31097
31210
|
Progress,
|
31098
31211
|
TextArea
|
@@ -31109,4 +31222,4 @@ lodash/lodash.js:
|
|
31109
31222
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
31110
31223
|
*)
|
31111
31224
|
*/
|
31112
|
-
//# sourceMappingURL=chunk-
|
31225
|
+
//# sourceMappingURL=chunk-FMGGXDNB.js.map
|