@100mslive/roomkit-react 0.1.7-alpha.0 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{HLSView-F5BDZVT2.js → HLSView-3S74KF3A.js} +6 -5
- package/dist/{HLSView-F5BDZVT2.js.map → HLSView-3S74KF3A.js.map} +2 -2
- package/dist/Prebuilt/components/RoleChangeRequest/RequestPrompt.d.ts +9 -0
- package/dist/VideoTile/StyledVideoTile.d.ts +445 -3
- package/dist/{VirtualBackground-THDRYDRA.js → VirtualBackground-3TI5NA4V.js} +3 -3
- package/dist/{chunk-JSH7SKEH.js → chunk-36X4ZCLC.js} +2 -2
- package/dist/{chunk-U3G743OY.js → chunk-5DQ3WTED.js} +2 -2
- package/dist/{chunk-U3G743OY.js.map → chunk-5DQ3WTED.js.map} +1 -1
- package/dist/{chunk-CDYRVICT.js → chunk-Z7P5WITU.js} +40 -32
- package/dist/chunk-Z7P5WITU.js.map +7 -0
- package/dist/{conference-6IVZHILI.js → conference-JNABIZBG.js} +506 -490
- package/dist/conference-JNABIZBG.js.map +7 -0
- package/dist/index.cjs.js +826 -790
- package/dist/index.cjs.js.map +4 -4
- package/dist/index.js +2 -2
- package/dist/meta.cjs.json +185 -126
- package/dist/meta.esbuild.json +221 -162
- package/package.json +6 -6
- package/src/Input/Input.tsx +1 -1
- package/src/Prebuilt/common/utils.js +7 -0
- package/src/Prebuilt/components/Chat/ChatBody.jsx +125 -106
- package/src/Prebuilt/components/Footer/ParticipantList.jsx +1 -1
- package/src/Prebuilt/components/Leave/DesktopLeaveRoom.tsx +36 -44
- package/src/Prebuilt/components/Leave/MwebLeaveRoom.tsx +23 -35
- package/src/Prebuilt/components/Preview/PreviewJoin.tsx +5 -3
- package/src/Prebuilt/components/RaiseHand.jsx +4 -11
- package/src/Prebuilt/components/RoleChangeRequest/RequestPrompt.tsx +66 -0
- package/src/Prebuilt/components/{RoleChangeRequestModal.tsx → RoleChangeRequest/RoleChangeRequestModal.tsx} +18 -50
- package/src/Prebuilt/components/VideoTile.jsx +18 -12
- package/src/Prebuilt/components/conference.jsx +1 -1
- package/src/Prebuilt/components/hooks/useMetadata.jsx +2 -1
- package/src/Prebuilt/layouts/HLSView.jsx +3 -2
- package/src/Prebuilt/layouts/SidePane.tsx +0 -1
- package/src/VideoTile/StyledVideoTile.tsx +10 -14
- package/dist/chunk-CDYRVICT.js.map +0 -7
- package/dist/conference-6IVZHILI.js.map +0 -7
- /package/dist/Prebuilt/components/{RoleChangeRequestModal.d.ts → RoleChangeRequest/RoleChangeRequestModal.d.ts} +0 -0
- /package/dist/{VirtualBackground-THDRYDRA.js.map → VirtualBackground-3TI5NA4V.js.map} +0 -0
- /package/dist/{chunk-JSH7SKEH.js.map → chunk-36X4ZCLC.js.map} +0 -0
package/dist/index.cjs.js
CHANGED
@@ -105,7 +105,7 @@ var __async = (__this, __arguments, generator) => {
|
|
105
105
|
var define_process_env_default;
|
106
106
|
var init_define_process_env = __esm({
|
107
107
|
"<define:process.env>"() {
|
108
|
-
define_process_env_default = { GITHUB_STATE: "/home/runner/work/_temp/_runner_file_commands/save_state_8f8a0291-7787-40d4-befb-0019c24b8a38", npm_package_devDependencies_ts_node: "^10.4.0", npm_package_devDependencies__types_node: "^16.11.17", npm_package_devDependencies_rollup: "^2.70.1", 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", USER: "runner", npm_package_devDependencies_webpack_cli: "^4.9.2", npm_package_devDependencies_webpack_bundle_analyzer: "^4.5.0", npm_package_devDependencies_jest: "26.6.0", npm_config_version_commit_hooks: "true", npm_config_user_agent: "yarn/1.22.19 npm/? node/v16.20.2 linux x64", npm_config_always_auth: "", NX_WORKSPACE_ROOT: "/home/runner/work/web-sdks/web-sdks", npm_package_devDependencies__rollup_plugin_node_resolve: "^13.1.3", 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.8.16-alpha.0", RUNNER_ENVIRONMENT: "github-hosted", GITHUB_ENV: "/home/runner/work/_temp/_runner_file_commands/set_env_8f8a0291-7787-40d4-befb-0019c24b8a38", PIPX_HOME: "/opt/pipx", npm_node_execpath: "/opt/hostedtoolcache/node/16.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.11.16-alpha.0", 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.0", 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", 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_webpack_manifest_plugin: "^4.1.1", npm_package_devDependencies_typedoc_plugin_markdown: "^3.14.0", npm_config_init_license: "MIT", GRADLE_HOME: "/usr/share/gradle-8.3", ANDROID_NDK_LATEST_HOME: "/usr/local/lib/android/sdk/ndk/25.2.9519653", 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: "574", 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.7", 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_dependencies_react_router_dom: "^6.3.0", npm_package_devDependencies_babel_loader: "^8.2.5", npm_package_devDependencies__rollup_plugin_image: "^3.0.2", npm_package_keywords_1: "react", GOROOT_1_20_X64: "/opt/hostedtoolcache/go/1.20.8/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.1/x64", JAVA_HOME_17_X64: "/usr/lib/jvm/temurin-17-jdk-amd64", ImageVersion: "20230911.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", 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_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:18506", GITHUB_WORKFLOW: "Publish Packages", _: "/usr/local/bin/yarn", npm_package_scripts_app: "cd apps/100ms-web && yarn start", 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__rollup_plugin_commonjs: "^21.0.3", npm_package_devDependencies__babel_preset_react: "^7.22.5", npm_package_module: "dist/index.js", npm_package_scripts_sdk: "cd packages/hms-video-web && yarn start", 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.1.16-alpha.0", npm_package_devDependencies__types_lodash_merge: "^4.6.6", npm_package_devDependencies__storybook_cli: "^7.0.27", npm_package_devDependencies__rollup_plugin_json: "^6.0.0", GITHUB_RUN_ID: "6198915575", 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_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: "02a796684045c2468c14db4cb894c56a17c6c2ba", GITHUB_BASE_REF: "", ImageOS: "ubuntu22", npm_package_workspaces_1: "apps/*", npm_package_scripts_start: 'concurrently "yarn dev" "yarn types"', npm_config_ignore_scripts: "", NX_TASK_HASH: "8a4484713b154f3742de308ef3744078cdc8cc6e16292ef890f36d3e4d15b9d8", npm_package_exports___import: "./dist/index.js", GITHUB_WORKFLOW_REF: "100mslive/web-sdks/.github/workflows/publish.yml@refs/heads/main", PERFLOG_LOCATION_SETTING: "RUNNER_PERFLOG", GOROOT_1_18_X64: "/opt/hostedtoolcache/go/1.18.10/x64", GITHUB_ACTION_REPOSITORY: "", npm_package_workspaces_2: "playwright/*", npm_package_devDependencies_postcss_loader: "^6.2.1", PATH: "/tmp/yarn--1694786016419-0.6818104641303016:/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/16.20.2/x64/libexec/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/16.20.2/x64/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/16.20.2/x64/bin/node_modules/npm/bin/node-gyp-bin:/tmp/yarn--1694786016213-0.12270191559192756:/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/16.20.2/x64/libexec/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/16.20.2/x64/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/16.20.2/x64/bin/node_modules/npm/bin/node-gyp-bin:/tmp/yarn--1694785976000-0.6614035614405027:/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/16.20.2/x64/libexec/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/16.20.2/x64/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/16.20.2/x64/bin/node_modules/npm/bin/node-gyp-bin:/tmp/yarn--1694785975797-0.26100102923431345:/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/16.20.2/x64/libexec/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/16.20.2/x64/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/16.20.2/x64/bin/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/16.20.2/x64/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:/snap/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin", NODE: "/opt/hostedtoolcache/node/16.20.2/x64/bin/node", ANT_HOME: "/usr/share/ant", DOTNET_MULTILEVEL_LOOKUP: "0", RUNNER_TRACKING_ID: "github_ebe58d16-d54e-40ee-9a20-f8cf86e54702", INVOCATION_ID: "c5fa857d24e84556a121754af31fdaec", NPM_CONFIG_USERCONFIG: "/home/runner/work/_temp/.npmrc", RUNNER_TOOL_CACHE: "/opt/hostedtoolcache", GOROOT_1_19_X64: "/opt/hostedtoolcache/go/1.19.13/x64", npm_package_husky_hooks_pre_push: "lint-staged", 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", GITHUB_ACTION: "__run_3", GITHUB_RUN_NUMBER: "372", GITHUB_TRIGGERING_ACTOR: "eswarclynn", RUNNER_ARCH: "X64", XDG_RUNTIME_DIR: "/run/user/1001", AGENT_TOOLSDIRECTORY: "/opt/hostedtoolcache", npm_package_devDependencies_babel_plugin_istanbul: "^6.1.1", LERNA_PACKAGE_NAME: "@100mslive/roomkit-react", npm_package_dependencies_pusher_js: "^7.0.3", npm_package_dependencies__radix_ui_react_select: "1.0.0", npm_package_size_limit_0_limit: "80 KB", npm_package_devDependencies__commitlint_cli: "^15.0.0", npm_package_devDependencies__rollup_plugin_typescript: "^8.3.1", LANG: "C.UTF-8", VCPKG_INSTALLATION_ROOT: "/usr/local/share/vcpkg", npm_package_size_limit_1_limit: "80 KB", npm_package_lint_staged__: "format && lint:fix", npm_package_devDependencies_webpack: "^5.76.0", 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_rollup_plugin_terser: "^7.0.2", npm_package_devDependencies__types_mdx: "2.0.2", CONDA: "/usr/share/miniconda", RUNNER_NAME: "GitHub Actions 3", XDG_CONFIG_HOME: "/home/runner/.config", STATS_VMD: "true", GITHUB_REF_NAME: "main", GITHUB_REPOSITORY: "100mslive/web-sdks", npm_lifecycle_script: "rm -rf dist && node ../../scripts/build-webapp", npm_package_size_limit_2_limit: "20 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_devDependencies_rollup_plugin_import_css: "^3.3.1", 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-web/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_webpack_dev_server: "^4.7.4", 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.8.16-alpha.0", npm_package_scripts_types: "tsc -w", GITHUB_REPOSITORY_ID: "429826515", GITHUB_ACTIONS: "true", STATS_NM: "true", npm_lifecycle_event: "build:only", npm_package_version: "0.1.7-alpha.0", npm_package_size_limit_4_limit: "400 KB", npm_package_size_limit_1_path: "packages/hms-video-web/dist/index.js", npm_package_husky_hooks_pre_commit: "lint-staged", 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_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/hms-video-store/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: "20 KB", npm_package_size_limit_3_path: "packages/hms-video-store/dist/index.js", npm_package_devDependencies_cypress: "^9.5.2", npm_package_devDependencies_rollup_plugin_esbuild: "^5.0.0", GITHUB_SHA: "02a796684045c2468c14db4cb894c56a17c6c2ba", GITHUB_RUN_ATTEMPT: "1", npm_package_size_limit_7_limit: "20 KB", npm_package_size_limit_4_path: "packages/roomkit-react/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/main", GITHUB_ACTOR: "eswarclynn", ANDROID_SDK_ROOT: "/usr/local/lib/android/sdk", npm_package_size_limit_8_limit: "100 KB", npm_package_size_limit_5_path: "packages/roomkit-react/dist/index.js", npm_config_strict_ssl: "true", npm_package_license: "MIT", LEIN_HOME: "/usr/local/lib/lein", npm_package_size_limit_9_limit: "100 KB", npm_package_size_limit_6_path: "packages/hms-virtual-background/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_8f8a0291-7787-40d4-befb-0019c24b8a38", JAVA_HOME: "/usr/lib/jvm/temurin-11-jdk-amd64", PWD: "/home/runner/work/web-sdks/web-sdks/packages/roomkit-react", GITHUB_ACTOR_ID: "64120992", 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/hms-virtual-background/dist/index.js", 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.10.0-standalone.jar", GHCUP_INSTALL_BASE_PREFIX: "/usr/local", GITHUB_OUTPUT: "/home/runner/work/_temp/_runner_file_commands/set_output_8f8a0291-7787-40d4-befb-0019c24b8a38", npm_package_size_limit_8_path: "packages/react-icons/dist/index.cjs.js", 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_size_limit_9_path: "packages/react-icons/dist/index.js", 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_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.154/provjobd.data", npm_package_scripts_reactsdk: "cd packages/react-sdk && yarn start", npm_package_scripts_app_custom: "cd apps/100ms-custom-app && 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_8f8a0291-7787-40d4-befb-0019c24b8a38" };
|
108
|
+
define_process_env_default = { GITHUB_STATE: "/home/runner/work/_temp/_runner_file_commands/save_state_65f74fd7-f5bc-45d5-85b8-1c9068538afc", npm_package_devDependencies_ts_node: "^10.4.0", npm_package_devDependencies__types_node: "^16.11.17", npm_package_devDependencies_rollup: "^2.70.1", 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", USER: "runner", npm_package_devDependencies_webpack_cli: "^4.9.2", npm_package_devDependencies_webpack_bundle_analyzer: "^4.5.0", npm_package_devDependencies_jest: "26.6.0", npm_config_version_commit_hooks: "true", npm_config_user_agent: "yarn/1.22.19 npm/? node/v16.20.2 linux x64", npm_config_always_auth: "", NX_WORKSPACE_ROOT: "/home/runner/work/web-sdks/web-sdks", npm_package_devDependencies__rollup_plugin_node_resolve: "^13.1.3", 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.8.16", RUNNER_ENVIRONMENT: "github-hosted", GITHUB_ENV: "/home/runner/work/_temp/_runner_file_commands/set_env_65f74fd7-f5bc-45d5-85b8-1c9068538afc", PIPX_HOME: "/opt/pipx", npm_node_execpath: "/opt/hostedtoolcache/node/16.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.11.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.0", 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", 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_webpack_manifest_plugin: "^4.1.1", npm_package_devDependencies_typedoc_plugin_markdown: "^3.14.0", npm_config_init_license: "MIT", GRADLE_HOME: "/usr/share/gradle-8.3", ANDROID_NDK_LATEST_HOME: "/usr/local/lib/android/sdk/ndk/25.2.9519653", 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: "574", 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.7", 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_dependencies_react_router_dom: "^6.3.0", npm_package_devDependencies_babel_loader: "^8.2.5", npm_package_devDependencies__rollup_plugin_image: "^3.0.2", npm_package_keywords_1: "react", GOROOT_1_20_X64: "/opt/hostedtoolcache/go/1.20.8/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.1/x64", JAVA_HOME_17_X64: "/usr/lib/jvm/temurin-17-jdk-amd64", ImageVersion: "20230917.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", 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_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:17542", GITHUB_WORKFLOW: "Publish Packages", _: "/usr/local/bin/yarn", npm_package_scripts_app: "cd apps/100ms-web && yarn start", 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__rollup_plugin_commonjs: "^21.0.3", npm_package_devDependencies__babel_preset_react: "^7.22.5", npm_package_module: "dist/index.js", npm_package_scripts_sdk: "cd packages/hms-video-web && yarn start", 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.1.16", npm_package_devDependencies__types_lodash_merge: "^4.6.6", npm_package_devDependencies__storybook_cli: "^7.0.27", npm_package_devDependencies__rollup_plugin_json: "^6.0.0", GITHUB_RUN_ID: "6274864041", 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_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: "c06edac3e71481de08e948ffe0affaf705564ad1", GITHUB_BASE_REF: "", ImageOS: "ubuntu22", npm_package_workspaces_1: "apps/*", npm_package_scripts_start: 'concurrently "yarn dev" "yarn types"', npm_config_ignore_scripts: "", NX_TASK_HASH: "a13657573a20325fbab8195dc3c439a3cab8b45d9afa8908077111230c193f7d", npm_package_exports___import: "./dist/index.js", GITHUB_WORKFLOW_REF: "100mslive/web-sdks/.github/workflows/publish.yml@refs/heads/main", PERFLOG_LOCATION_SETTING: "RUNNER_PERFLOG", GITHUB_ACTION_REPOSITORY: "", npm_package_workspaces_2: "playwright/*", npm_package_devDependencies_postcss_loader: "^6.2.1", PATH: "/tmp/yarn--1695389159534-0.6976221952069648:/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/16.20.2/x64/libexec/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/16.20.2/x64/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/16.20.2/x64/bin/node_modules/npm/bin/node-gyp-bin:/tmp/yarn--1695389159279-0.6182414195103341:/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/16.20.2/x64/libexec/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/16.20.2/x64/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/16.20.2/x64/bin/node_modules/npm/bin/node-gyp-bin:/tmp/yarn--1695389110508-0.5040870972461822:/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/16.20.2/x64/libexec/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/16.20.2/x64/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/16.20.2/x64/bin/node_modules/npm/bin/node-gyp-bin:/tmp/yarn--1695389110274-0.11196884659863793:/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/16.20.2/x64/libexec/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/16.20.2/x64/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/16.20.2/x64/bin/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/16.20.2/x64/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:/snap/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin", NODE: "/opt/hostedtoolcache/node/16.20.2/x64/bin/node", ANT_HOME: "/usr/share/ant", DOTNET_MULTILEVEL_LOOKUP: "0", RUNNER_TRACKING_ID: "github_35529230-1c18-4abd-9f2e-d2da638d7fac", INVOCATION_ID: "16ba877776b64e45add1e48585532bee", NPM_CONFIG_USERCONFIG: "/home/runner/work/_temp/.npmrc", RUNNER_TOOL_CACHE: "/opt/hostedtoolcache", GOROOT_1_19_X64: "/opt/hostedtoolcache/go/1.19.13/x64", npm_package_husky_hooks_pre_push: "lint-staged", 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", GITHUB_ACTION: "__run_3", GITHUB_RUN_NUMBER: "373", GITHUB_TRIGGERING_ACTOR: "raviteja83", RUNNER_ARCH: "X64", XDG_RUNTIME_DIR: "/run/user/1001", AGENT_TOOLSDIRECTORY: "/opt/hostedtoolcache", npm_package_devDependencies_babel_plugin_istanbul: "^6.1.1", LERNA_PACKAGE_NAME: "@100mslive/roomkit-react", npm_package_dependencies_pusher_js: "^7.0.3", npm_package_dependencies__radix_ui_react_select: "1.0.0", npm_package_size_limit_0_limit: "80 KB", npm_package_devDependencies__commitlint_cli: "^15.0.0", npm_package_devDependencies__rollup_plugin_typescript: "^8.3.1", LANG: "C.UTF-8", VCPKG_INSTALLATION_ROOT: "/usr/local/share/vcpkg", npm_package_size_limit_1_limit: "80 KB", npm_package_lint_staged__: "format && lint:fix", npm_package_devDependencies_webpack: "^5.76.0", 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_rollup_plugin_terser: "^7.0.2", npm_package_devDependencies__types_mdx: "2.0.2", CONDA: "/usr/share/miniconda", RUNNER_NAME: "GitHub Actions 5", XDG_CONFIG_HOME: "/home/runner/.config", STATS_VMD: "true", GITHUB_REF_NAME: "main", GITHUB_REPOSITORY: "100mslive/web-sdks", npm_lifecycle_script: "rm -rf dist && node ../../scripts/build-webapp", npm_package_size_limit_2_limit: "20 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_devDependencies_rollup_plugin_import_css: "^3.3.1", 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-web/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_webpack_dev_server: "^4.7.4", 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.8.16", npm_package_scripts_types: "tsc -w", GITHUB_REPOSITORY_ID: "429826515", GITHUB_ACTIONS: "true", STATS_NM: "true", npm_lifecycle_event: "build:only", npm_package_version: "0.1.7", npm_package_size_limit_4_limit: "400 KB", npm_package_size_limit_1_path: "packages/hms-video-web/dist/index.js", npm_package_husky_hooks_pre_commit: "lint-staged", 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_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/hms-video-store/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: "20 KB", npm_package_size_limit_3_path: "packages/hms-video-store/dist/index.js", npm_package_devDependencies_cypress: "^9.5.2", npm_package_devDependencies_rollup_plugin_esbuild: "^5.0.0", GITHUB_SHA: "c06edac3e71481de08e948ffe0affaf705564ad1", GITHUB_RUN_ATTEMPT: "1", npm_package_size_limit_7_limit: "20 KB", npm_package_size_limit_4_path: "packages/roomkit-react/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/main", GITHUB_ACTOR: "raviteja83", ANDROID_SDK_ROOT: "/usr/local/lib/android/sdk", npm_package_size_limit_8_limit: "100 KB", npm_package_size_limit_5_path: "packages/roomkit-react/dist/index.js", npm_config_strict_ssl: "true", npm_package_license: "MIT", LEIN_HOME: "/usr/local/lib/lein", npm_package_size_limit_9_limit: "100 KB", npm_package_size_limit_6_path: "packages/hms-virtual-background/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_65f74fd7-f5bc-45d5-85b8-1c9068538afc", JAVA_HOME: "/usr/lib/jvm/temurin-11-jdk-amd64", PWD: "/home/runner/work/web-sdks/web-sdks/packages/roomkit-react", GITHUB_ACTOR_ID: "6763261", 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/hms-virtual-background/dist/index.js", 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.10.0-standalone.jar", GHCUP_INSTALL_BASE_PREFIX: "/usr/local", GITHUB_OUTPUT: "/home/runner/work/_temp/_runner_file_commands/set_output_65f74fd7-f5bc-45d5-85b8-1c9068538afc", npm_package_size_limit_8_path: "packages/react-icons/dist/index.cjs.js", 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_size_limit_9_path: "packages/react-icons/dist/index.js", 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_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.154/provjobd.data", npm_package_scripts_reactsdk: "cd packages/react-sdk && yarn start", npm_package_scripts_app_custom: "cd apps/100ms-custom-app && 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_65f74fd7-f5bc-45d5-85b8-1c9068538afc" };
|
109
109
|
}
|
110
110
|
});
|
111
111
|
|
@@ -1776,7 +1776,7 @@ var init_Input = __esm({
|
|
1776
1776
|
border: "1px solid transparent"
|
1777
1777
|
},
|
1778
1778
|
"&::placeholder": {
|
1779
|
-
color: "$
|
1779
|
+
color: "$on_surface_medium"
|
1780
1780
|
},
|
1781
1781
|
variants: {
|
1782
1782
|
alert_error_default: {
|
@@ -1917,19 +1917,10 @@ var init_StyledVideoTile = __esm({
|
|
1917
1917
|
textOverflow: "ellipsis",
|
1918
1918
|
fontFamily: "$sans"
|
1919
1919
|
});
|
1920
|
-
AttributeBox = styled("div", __spreadValues({
|
1921
|
-
position: "absolute",
|
1922
|
-
color: "$on_primary_high",
|
1923
|
-
w: "$12",
|
1924
|
-
h: "$12",
|
1925
|
-
bg: "$secondary_dim",
|
1926
|
-
r: "$round"
|
1927
|
-
}, flexCenter));
|
1928
|
-
AudioIndicator = styled("div", __spreadProps(__spreadValues({
|
1920
|
+
AttributeBox = styled("div", __spreadProps(__spreadValues({
|
1929
1921
|
position: "absolute",
|
1930
1922
|
top: "$4",
|
1931
|
-
|
1932
|
-
color: "$on_primary_high",
|
1923
|
+
color: "$on_secondary_high",
|
1933
1924
|
bg: "$secondary_dim",
|
1934
1925
|
borderRadius: "$round",
|
1935
1926
|
width: "$14",
|
@@ -1950,12 +1941,18 @@ var init_StyledVideoTile = __esm({
|
|
1950
1941
|
width: "$13",
|
1951
1942
|
height: "$13"
|
1952
1943
|
}
|
1944
|
+
},
|
1945
|
+
position: {
|
1946
|
+
left: { left: "$4" },
|
1947
|
+
right: { right: "$4" }
|
1953
1948
|
}
|
1954
1949
|
},
|
1955
1950
|
defaultVariants: {
|
1956
|
-
size: "medium"
|
1951
|
+
size: "medium",
|
1952
|
+
position: "left"
|
1957
1953
|
}
|
1958
1954
|
}));
|
1955
|
+
AudioIndicator = styled(AttributeBox, { defaultVariants: { position: "right" } });
|
1959
1956
|
FullScreenButton = styled("button", {
|
1960
1957
|
width: "2.25rem",
|
1961
1958
|
height: "2.25rem",
|
@@ -1992,9 +1989,9 @@ var init_StyledVideoTile = __esm({
|
|
1992
1989
|
Container,
|
1993
1990
|
Overlay: Overlay2,
|
1994
1991
|
Info,
|
1995
|
-
AudioIndicator,
|
1996
1992
|
AvatarContainer,
|
1997
1993
|
AttributeBox,
|
1994
|
+
AudioIndicator,
|
1998
1995
|
FullScreenButton
|
1999
1996
|
};
|
2000
1997
|
}
|
@@ -5844,7 +5841,7 @@ var init_useRedirectToLeave = __esm({
|
|
5844
5841
|
});
|
5845
5842
|
|
5846
5843
|
// src/Prebuilt/common/utils.js
|
5847
|
-
var getMetadata, isScreenshareSupported, getFormattedCount, formatTime;
|
5844
|
+
var getMetadata, isScreenshareSupported, getFormattedCount, formatTime, getAttributeBoxSize;
|
5848
5845
|
var init_utils2 = __esm({
|
5849
5846
|
"src/Prebuilt/common/utils.js"() {
|
5850
5847
|
"use strict";
|
@@ -5872,6 +5869,12 @@ var init_utils2 = __esm({
|
|
5872
5869
|
const hour = hours !== 0 ? `${hours < 10 ? "0" : ""}${hours}:` : "";
|
5873
5870
|
return `${hour}${minutes < 10 ? "0" : ""}${minutes}:${seconds < 10 ? "0" : ""}${seconds}`;
|
5874
5871
|
};
|
5872
|
+
getAttributeBoxSize = (width, height) => {
|
5873
|
+
if (!width || !height) {
|
5874
|
+
return "";
|
5875
|
+
}
|
5876
|
+
return width < 180 || height < 180 ? "small" : "medium";
|
5877
|
+
};
|
5875
5878
|
}
|
5876
5879
|
});
|
5877
5880
|
|
@@ -6240,11 +6243,12 @@ var init_useMetadata = __esm({
|
|
6240
6243
|
yield hmsActions.lowerLocalPeerHand();
|
6241
6244
|
} else {
|
6242
6245
|
yield hmsActions.raiseLocalPeerHand();
|
6246
|
+
yield update({ isBRBOn: false });
|
6243
6247
|
}
|
6244
6248
|
}), [isHandRaised]);
|
6245
6249
|
const toggleBRB = (0, import_react49.useCallback)(() => __async(void 0, null, function* () {
|
6246
6250
|
const newValue = !(metaData == null ? void 0 : metaData.isBRBOn);
|
6247
|
-
yield update({ isBRBOn:
|
6251
|
+
yield update({ isBRBOn: newValue });
|
6248
6252
|
if (newValue) {
|
6249
6253
|
yield hmsActions.lowerLocalPeerHand();
|
6250
6254
|
}
|
@@ -8654,7 +8658,7 @@ var init_peerTileUtils = __esm({
|
|
8654
8658
|
});
|
8655
8659
|
|
8656
8660
|
// src/Prebuilt/components/VideoTile.jsx
|
8657
|
-
var import_react74, import_react_use9, import_react_sdk36, import_react_icons29, Tile,
|
8661
|
+
var import_react74, import_react_use9, import_react_sdk36, import_react_icons29, Tile, heightAnimation, AudioLevelIndicator, AudioLevel, PeerMetadata, VideoTile, VideoTile_default;
|
8658
8662
|
var init_VideoTile2 = __esm({
|
8659
8663
|
"src/Prebuilt/components/VideoTile.jsx"() {
|
8660
8664
|
"use strict";
|
@@ -8673,6 +8677,7 @@ var init_VideoTile2 = __esm({
|
|
8673
8677
|
init_VideoTile();
|
8674
8678
|
init_peerTileUtils();
|
8675
8679
|
init_useUISettings();
|
8680
|
+
init_utils2();
|
8676
8681
|
init_constants();
|
8677
8682
|
Tile = ({
|
8678
8683
|
peerId,
|
@@ -8690,6 +8695,7 @@ var init_VideoTile2 = __esm({
|
|
8690
8695
|
hideAudioMuteOnTile = false,
|
8691
8696
|
hideMetadataOnTile = false
|
8692
8697
|
}) => {
|
8698
|
+
var _a7, _b7;
|
8693
8699
|
const trackSelector = trackId ? (0, import_react_sdk36.selectVideoTrackByID)(trackId) : (0, import_react_sdk36.selectVideoTrackByPeerID)(peerId);
|
8694
8700
|
const track = (0, import_react_sdk36.useHMSStore)(trackSelector);
|
8695
8701
|
const isMobile = (0, import_react_use9.useMedia)(config.media.md);
|
@@ -8719,21 +8725,25 @@ var init_VideoTile2 = __esm({
|
|
8719
8725
|
const onHoverHandler = (0, import_react74.useCallback)((event) => {
|
8720
8726
|
setIsMouseHovered(event.type === "mouseenter");
|
8721
8727
|
}, []);
|
8722
|
-
const
|
8728
|
+
const ref = (0, import_react74.useRef)(null);
|
8729
|
+
const calculatedHeight = ((_a7 = ref.current) == null ? void 0 : _a7.clientHeight) || "";
|
8730
|
+
const calculatedWidth = ((_b7 = ref.current) == null ? void 0 : _b7.clientWidth) || "";
|
8731
|
+
const isTileBigEnoughToShowStats = calculatedHeight >= 180 && calculatedWidth >= 180;
|
8723
8732
|
const avatarSize = (0, import_react74.useMemo)(() => {
|
8724
|
-
if (!
|
8733
|
+
if (!calculatedWidth || !calculatedHeight) {
|
8725
8734
|
return void 0;
|
8726
8735
|
}
|
8727
|
-
if (
|
8736
|
+
if (calculatedWidth <= 150 || calculatedHeight <= 150) {
|
8728
8737
|
return "small";
|
8729
|
-
} else if (
|
8738
|
+
} else if (calculatedWidth <= 300 || calculatedHeight <= 300) {
|
8730
8739
|
return "medium";
|
8731
8740
|
}
|
8732
8741
|
return "large";
|
8733
|
-
}, [
|
8742
|
+
}, [calculatedWidth, calculatedHeight]);
|
8734
8743
|
return /* @__PURE__ */ import_react74.default.createElement(
|
8735
8744
|
StyledVideoTile.Root,
|
8736
8745
|
{
|
8746
|
+
ref,
|
8737
8747
|
css: __spreadValues({
|
8738
8748
|
width,
|
8739
8749
|
height
|
@@ -8769,7 +8779,7 @@ var init_VideoTile2 = __esm({
|
|
8769
8779
|
StyledVideoTile.AudioIndicator,
|
8770
8780
|
{
|
8771
8781
|
"data-testid": "participant_audio_mute_icon",
|
8772
|
-
size:
|
8782
|
+
size: getAttributeBoxSize(calculatedWidth, calculatedHeight)
|
8773
8783
|
},
|
8774
8784
|
/* @__PURE__ */ import_react74.default.createElement(import_react_icons29.MicOffIcon, null)
|
8775
8785
|
) : /* @__PURE__ */ import_react74.default.createElement(AudioLevel, { trackId: audioTrack == null ? void 0 : audioTrack.id }) : null,
|
@@ -8783,7 +8793,7 @@ var init_VideoTile2 = __esm({
|
|
8783
8793
|
enableSpotlightingPeer
|
8784
8794
|
}
|
8785
8795
|
) : null,
|
8786
|
-
!hideMetadataOnTile && /* @__PURE__ */ import_react74.default.createElement(PeerMetadata, { peerId }),
|
8796
|
+
!hideMetadataOnTile && /* @__PURE__ */ import_react74.default.createElement(PeerMetadata, { peerId, height: calculatedHeight, width: calculatedWidth }),
|
8787
8797
|
/* @__PURE__ */ import_react74.default.createElement(
|
8788
8798
|
TileConnection_default,
|
8789
8799
|
{
|
@@ -8799,7 +8809,6 @@ var init_VideoTile2 = __esm({
|
|
8799
8809
|
) : null
|
8800
8810
|
);
|
8801
8811
|
};
|
8802
|
-
metaStyles = { top: "$4", left: "$4", width: "$14", height: "$14" };
|
8803
8812
|
heightAnimation = (value) => keyframes({
|
8804
8813
|
"50%": {
|
8805
8814
|
transform: `scale3d(1,${value},1)`
|
@@ -8837,11 +8846,11 @@ var init_VideoTile2 = __esm({
|
|
8837
8846
|
AudioLevel = ({ trackId }) => {
|
8838
8847
|
return /* @__PURE__ */ import_react74.default.createElement(StyledVideoTile.AudioIndicator, null, /* @__PURE__ */ import_react74.default.createElement(Flex, { align: "center", justify: "center", css: { gap: "$2" } }, [3, 2, 3].map((v, i) => /* @__PURE__ */ import_react74.default.createElement(AudioLevelIndicator, { trackId, value: v, delay: i * 0.15, key: i }))));
|
8839
8848
|
};
|
8840
|
-
PeerMetadata = ({ peerId }) => {
|
8849
|
+
PeerMetadata = ({ peerId, height, width }) => {
|
8841
8850
|
const metaData = (0, import_react_sdk36.useHMSStore)((0, import_react_sdk36.selectPeerMetadata)(peerId));
|
8842
8851
|
const isBRB = (metaData == null ? void 0 : metaData.isBRBOn) || false;
|
8843
8852
|
const isHandRaised = (0, import_react_sdk36.useHMSStore)((0, import_react_sdk36.selectHasPeerHandRaised)(peerId));
|
8844
|
-
return /* @__PURE__ */ import_react74.default.createElement(import_react74.Fragment, null, isHandRaised ? /* @__PURE__ */ import_react74.default.createElement(StyledVideoTile.AttributeBox, {
|
8853
|
+
return /* @__PURE__ */ import_react74.default.createElement(import_react74.Fragment, null, isHandRaised ? /* @__PURE__ */ import_react74.default.createElement(StyledVideoTile.AttributeBox, { size: getAttributeBoxSize(width, height), "data-testid": "raiseHand_icon_onTile" }, /* @__PURE__ */ import_react74.default.createElement(import_react_icons29.HandIcon, { width: 24, height: 24 })) : null, isBRB ? /* @__PURE__ */ import_react74.default.createElement(StyledVideoTile.AttributeBox, { size: getAttributeBoxSize(width, height), "data-testid": "brb_icon_onTile" }, /* @__PURE__ */ import_react74.default.createElement(import_react_icons29.BrbTileIcon, { width: 22, height: 22 })) : null);
|
8845
8854
|
};
|
8846
8855
|
VideoTile = import_react74.default.memo(Tile);
|
8847
8856
|
VideoTile_default = VideoTile;
|
@@ -9302,7 +9311,7 @@ var init_PreviewJoin = __esm({
|
|
9302
9311
|
}
|
9303
9312
|
},
|
9304
9313
|
/* @__PURE__ */ import_react78.default.createElement(PreviewTile, { name, error: previewError })
|
9305
|
-
) : null, /* @__PURE__ */ import_react78.default.createElement(Box, { css: { w: "100%", maxWidth: `${aspectRatio * 360}px` } }, /* @__PURE__ */ import_react78.default.createElement(PreviewControls, { hideSettings: !toggleVideo && !toggleAudio }), /* @__PURE__ */ import_react78.default.createElement(
|
9314
|
+
) : null, /* @__PURE__ */ import_react78.default.createElement(Box, { css: { w: "100%", maxWidth: `${Math.max(aspectRatio, 1) * 360}px` } }, /* @__PURE__ */ import_react78.default.createElement(PreviewControls, { hideSettings: !toggleVideo && !toggleAudio }), /* @__PURE__ */ import_react78.default.createElement(
|
9306
9315
|
PreviewForm_default,
|
9307
9316
|
{
|
9308
9317
|
name,
|
@@ -9355,7 +9364,7 @@ var init_PreviewJoin = __esm({
|
|
9355
9364
|
"data-testid": "preview_tile"
|
9356
9365
|
}
|
9357
9366
|
), !isVideoOn ? /* @__PURE__ */ import_react78.default.createElement(StyledVideoTile.AvatarContainer, null, /* @__PURE__ */ import_react78.default.createElement(Avatar, { name, "data-testid": "preview_avatar_tile" })) : null) : !error ? /* @__PURE__ */ import_react78.default.createElement(FullPageProgress_default, null) : null,
|
9358
|
-
showMuteIcon ? /* @__PURE__ */ import_react78.default.createElement(StyledVideoTile.AudioIndicator,
|
9367
|
+
showMuteIcon ? /* @__PURE__ */ import_react78.default.createElement(StyledVideoTile.AudioIndicator, null, /* @__PURE__ */ import_react78.default.createElement(import_react_icons32.MicOffIcon, null)) : /* @__PURE__ */ import_react78.default.createElement(AudioLevel, { trackId: localPeer == null ? void 0 : localPeer.audioTrack })
|
9359
9368
|
);
|
9360
9369
|
};
|
9361
9370
|
PreviewControls = ({ hideSettings }) => {
|
@@ -9363,7 +9372,7 @@ var init_PreviewJoin = __esm({
|
|
9363
9372
|
return /* @__PURE__ */ import_react78.default.createElement(
|
9364
9373
|
Flex,
|
9365
9374
|
{
|
9366
|
-
justify: "between",
|
9375
|
+
justify: hideSettings && isMobile ? "center" : "between",
|
9367
9376
|
css: {
|
9368
9377
|
width: "100%",
|
9369
9378
|
mt: "$8"
|
@@ -10029,11 +10038,12 @@ var init_DesktopLeaveRoom = __esm({
|
|
10029
10038
|
const permissions = (0, import_react_sdk46.useHMSStore)(import_react_sdk46.selectPermissions);
|
10030
10039
|
const { isStreamingOn } = (0, import_react_sdk46.useRecordingStreaming)();
|
10031
10040
|
const showStream = screenType !== "hls_live_streaming" && isStreamingOn;
|
10041
|
+
const showLeaveOptions = (permissions == null ? void 0 : permissions.hlsStreaming) && isStreamingOn || (permissions == null ? void 0 : permissions.endRoom);
|
10032
10042
|
useDropdownList({ open: open || showEndStreamAlert || showLeaveRoomAlert, name: "LeaveRoom" });
|
10033
10043
|
if (!permissions || !isConnected) {
|
10034
10044
|
return null;
|
10035
10045
|
}
|
10036
|
-
return /* @__PURE__ */ import_react91.default.createElement(import_react91.Fragment, null,
|
10046
|
+
return /* @__PURE__ */ import_react91.default.createElement(import_react91.Fragment, null, showLeaveOptions ? /* @__PURE__ */ import_react91.default.createElement(Flex, null, /* @__PURE__ */ import_react91.default.createElement(
|
10037
10047
|
LeaveIconButton,
|
10038
10048
|
{
|
10039
10049
|
key: "LeaveRoom",
|
@@ -10042,9 +10052,7 @@ var init_DesktopLeaveRoom = __esm({
|
|
10042
10052
|
borderTopRightRadius: 0,
|
10043
10053
|
borderBottomRightRadius: 0
|
10044
10054
|
},
|
10045
|
-
onClick: () =>
|
10046
|
-
leaveRoom({ endstream: false });
|
10047
|
-
}
|
10055
|
+
onClick: () => setShowLeaveRoomAlert(true)
|
10048
10056
|
},
|
10049
10057
|
/* @__PURE__ */ import_react91.default.createElement(Tooltip, { title: "Leave Room" }, /* @__PURE__ */ import_react91.default.createElement(Box, null, /* @__PURE__ */ import_react91.default.createElement(import_react_icons36.ExitIcon, { style: { transform: "rotate(180deg)" } })))
|
10050
10058
|
), /* @__PURE__ */ import_react91.default.createElement(Dropdown.Root, { open, onOpenChange: setOpen, modal: false }, /* @__PURE__ */ import_react91.default.createElement(
|
@@ -10063,7 +10071,7 @@ var init_DesktopLeaveRoom = __esm({
|
|
10063
10071
|
{
|
10064
10072
|
css: {
|
10065
10073
|
bg: "$surface_dim",
|
10066
|
-
color: "$
|
10074
|
+
color: "$on_surface_medium",
|
10067
10075
|
"&:hover": { bg: "$surface_default", color: "$on_surface_high" }
|
10068
10076
|
},
|
10069
10077
|
onClick: () => leaveRoom({ endstream: false }),
|
@@ -10081,7 +10089,7 @@ var init_DesktopLeaveRoom = __esm({
|
|
10081
10089
|
css: { p: 0 }
|
10082
10090
|
}
|
10083
10091
|
)
|
10084
|
-
),
|
10092
|
+
), /* @__PURE__ */ import_react91.default.createElement(
|
10085
10093
|
Dropdown.Item,
|
10086
10094
|
{
|
10087
10095
|
css: {
|
@@ -10106,15 +10114,11 @@ var init_DesktopLeaveRoom = __esm({
|
|
10106
10114
|
css: { p: 0 }
|
10107
10115
|
}
|
10108
10116
|
)
|
10109
|
-
)
|
10117
|
+
)))) : /* @__PURE__ */ import_react91.default.createElement(
|
10110
10118
|
LeaveIconButton,
|
10111
10119
|
{
|
10112
10120
|
onClick: () => {
|
10113
|
-
|
10114
|
-
setShowLeaveRoomAlert(true);
|
10115
|
-
} else {
|
10116
|
-
leaveRoom({ endstream: false });
|
10117
|
-
}
|
10121
|
+
setShowLeaveRoomAlert(true);
|
10118
10122
|
},
|
10119
10123
|
key: "LeaveRoom",
|
10120
10124
|
"data-testid": "leave_room_btn"
|
@@ -10128,7 +10132,7 @@ var init_DesktopLeaveRoom = __esm({
|
|
10128
10132
|
isStreamingOn,
|
10129
10133
|
isModal: true
|
10130
10134
|
}
|
10131
|
-
)))),
|
10135
|
+
)))), /* @__PURE__ */ import_react91.default.createElement(Dialog.Root, { open: showLeaveRoomAlert, modal: false }, /* @__PURE__ */ import_react91.default.createElement(Dialog.Portal, null, /* @__PURE__ */ import_react91.default.createElement(Dialog.Overlay, null), /* @__PURE__ */ import_react91.default.createElement(Dialog.Content, { css: { w: "min(420px, 90%)", p: "$8", bg: "$surface_dim" } }, /* @__PURE__ */ import_react91.default.createElement(LeaveSessionContent, { setShowLeaveRoomAlert, leaveRoom, isModal: true })))));
|
10132
10136
|
};
|
10133
10137
|
}
|
10134
10138
|
});
|
@@ -10162,11 +10166,12 @@ var init_MwebLeaveRoom = __esm({
|
|
10162
10166
|
const permissions = (0, import_react_sdk47.useHMSStore)(import_react_sdk47.selectPermissions);
|
10163
10167
|
const { isStreamingOn } = (0, import_react_sdk47.useRecordingStreaming)();
|
10164
10168
|
const showStream = screenType !== "hls_live_streaming" && isStreamingOn;
|
10169
|
+
const showLeaveOptions = (permissions == null ? void 0 : permissions.hlsStreaming) && isStreamingOn || (permissions == null ? void 0 : permissions.endRoom);
|
10165
10170
|
useDropdownList({ open, name: "LeaveRoom" });
|
10166
10171
|
if (!permissions || !isConnected) {
|
10167
10172
|
return null;
|
10168
10173
|
}
|
10169
|
-
return /* @__PURE__ */ import_react92.default.createElement(import_react92.Fragment, null,
|
10174
|
+
return /* @__PURE__ */ import_react92.default.createElement(import_react92.Fragment, null, showLeaveOptions ? /* @__PURE__ */ import_react92.default.createElement(Sheet.Root, { open, onOpenChange: setOpen }, /* @__PURE__ */ import_react92.default.createElement(Sheet.Trigger, { asChild: true }, /* @__PURE__ */ import_react92.default.createElement(
|
10170
10175
|
LeaveIconButton,
|
10171
10176
|
{
|
10172
10177
|
key: "LeaveRoom",
|
@@ -10188,7 +10193,7 @@ var init_MwebLeaveRoom = __esm({
|
|
10188
10193
|
onClick: () => leaveRoom({ endstream: false }),
|
10189
10194
|
css: { pt: 0, mt: "$10", color: "$on_surface_low", "&:hover": { color: "$on_surface_high" } }
|
10190
10195
|
}
|
10191
|
-
),
|
10196
|
+
), /* @__PURE__ */ import_react92.default.createElement(
|
10192
10197
|
LeaveCard,
|
10193
10198
|
{
|
10194
10199
|
title: showStream ? "End Stream" : "End Session",
|
@@ -10202,28 +10207,14 @@ var init_MwebLeaveRoom = __esm({
|
|
10202
10207
|
setShowEndStreamAlert(true);
|
10203
10208
|
}
|
10204
10209
|
}
|
10205
|
-
) : null)) : /* @__PURE__ */ import_react92.default.createElement(
|
10206
|
-
LeaveIconButton,
|
10207
|
-
{
|
10208
|
-
key: "LeaveRoom",
|
10209
|
-
"data-testid": "leave_room_btn",
|
10210
|
-
onClick: () => {
|
10211
|
-
if (screenType === "hls_live_streaming") {
|
10212
|
-
setShowLeaveRoomAlert(true);
|
10213
|
-
} else {
|
10214
|
-
leaveRoom({ endstream: false });
|
10215
|
-
}
|
10216
|
-
}
|
10217
|
-
},
|
10218
|
-
/* @__PURE__ */ import_react92.default.createElement(Tooltip, { title: "Leave Room" }, /* @__PURE__ */ import_react92.default.createElement(Box, null, /* @__PURE__ */ import_react92.default.createElement(import_react_icons37.ExitIcon, { style: { transform: "rotate(180deg)" } })))
|
10219
|
-
), /* @__PURE__ */ import_react92.default.createElement(Sheet.Root, { open: showEndStreamAlert, onOpenChange: setShowEndStreamAlert }, /* @__PURE__ */ import_react92.default.createElement(Sheet.Content, { css: { bg: "$surface_dim", p: "$10", pb: "$12" } }, /* @__PURE__ */ import_react92.default.createElement(
|
10210
|
+
))) : /* @__PURE__ */ import_react92.default.createElement(LeaveIconButton, { key: "LeaveRoom", "data-testid": "leave_room_btn", onClick: () => setShowLeaveRoomAlert(true) }, /* @__PURE__ */ import_react92.default.createElement(Tooltip, { title: "Leave Room" }, /* @__PURE__ */ import_react92.default.createElement(Box, null, /* @__PURE__ */ import_react92.default.createElement(import_react_icons37.ExitIcon, { style: { transform: "rotate(180deg)" } })))), /* @__PURE__ */ import_react92.default.createElement(Sheet.Root, { open: showEndStreamAlert, onOpenChange: setShowEndStreamAlert }, /* @__PURE__ */ import_react92.default.createElement(Sheet.Content, { css: { bg: "$surface_dim", p: "$10", pb: "$12" } }, /* @__PURE__ */ import_react92.default.createElement(
|
10220
10211
|
EndSessionContent,
|
10221
10212
|
{
|
10222
10213
|
setShowEndStreamAlert,
|
10223
10214
|
leaveRoom: isStreamingOn ? leaveRoom : endRoom,
|
10224
10215
|
isStreamingOn
|
10225
10216
|
}
|
10226
|
-
))),
|
10217
|
+
))), /* @__PURE__ */ import_react92.default.createElement(Sheet.Root, { open: showLeaveRoomAlert, onOpenChange: setShowLeaveRoomAlert }, /* @__PURE__ */ import_react92.default.createElement(Sheet.Content, { css: { bg: "$surface_dim", p: "$10", pb: "$12" } }, /* @__PURE__ */ import_react92.default.createElement(LeaveSessionContent, { setShowLeaveRoomAlert, leaveRoom }))));
|
10227
10218
|
};
|
10228
10219
|
}
|
10229
10220
|
});
|
@@ -12017,30 +12008,21 @@ var init_MoreSettings = __esm({
|
|
12017
12008
|
});
|
12018
12009
|
|
12019
12010
|
// src/Prebuilt/components/RaiseHand.jsx
|
12020
|
-
var import_react110,
|
12011
|
+
var import_react110, import_react_icons49, RaiseHand;
|
12021
12012
|
var init_RaiseHand = __esm({
|
12022
12013
|
"src/Prebuilt/components/RaiseHand.jsx"() {
|
12023
12014
|
"use strict";
|
12024
12015
|
init_define_process_env();
|
12025
12016
|
import_react110 = __toESM(require("react"));
|
12026
|
-
import_react_sdk60 = require("@100mslive/react-sdk");
|
12027
12017
|
import_react_icons49 = require("@100mslive/react-icons");
|
12028
12018
|
init_Tooltip2();
|
12029
12019
|
init_IconButton3();
|
12020
|
+
init_useMetadata();
|
12030
12021
|
RaiseHand = () => {
|
12031
|
-
const
|
12032
|
-
|
12033
|
-
|
12034
|
-
|
12035
|
-
IconButton_default,
|
12036
|
-
{
|
12037
|
-
active: !isHandRaised,
|
12038
|
-
onClick: () => {
|
12039
|
-
isHandRaised ? actions.lowerLocalPeerHand() : actions.raiseLocalPeerHand();
|
12040
|
-
}
|
12041
|
-
},
|
12042
|
-
/* @__PURE__ */ import_react110.default.createElement(import_react_icons49.HandIcon, null)
|
12043
|
-
));
|
12022
|
+
const { isHandRaised, toggleHandRaise } = useMyMetadata();
|
12023
|
+
return /* @__PURE__ */ import_react110.default.createElement(Tooltip, { title: isHandRaised ? "Lower hand" : "Raise hand" }, /* @__PURE__ */ import_react110.default.createElement(IconButton_default, { active: !isHandRaised, onClick: () => __async(void 0, null, function* () {
|
12024
|
+
return yield toggleHandRaise();
|
12025
|
+
}) }, /* @__PURE__ */ import_react110.default.createElement(import_react_icons49.HandIcon, null)));
|
12044
12026
|
};
|
12045
12027
|
}
|
12046
12028
|
});
|
@@ -12345,7 +12327,7 @@ var init_pdfFileOptions = __esm({
|
|
12345
12327
|
// src/Prebuilt/components/pdfAnnotator/shareScreenOptions.jsx
|
12346
12328
|
function ShareScreenOptions() {
|
12347
12329
|
const [openModals, setOpenModals] = (0, import_react116.useState)(/* @__PURE__ */ new Set());
|
12348
|
-
const { amIScreenSharing } = (0,
|
12330
|
+
const { amIScreenSharing } = (0, import_react_sdk60.useScreenShare)();
|
12349
12331
|
const updateState = (modalName, value) => {
|
12350
12332
|
setOpenModals((modals) => {
|
12351
12333
|
const copy = new Set(modals);
|
@@ -12357,7 +12339,7 @@ function ShareScreenOptions() {
|
|
12357
12339
|
return copy;
|
12358
12340
|
});
|
12359
12341
|
};
|
12360
|
-
const { toggleScreenShare } = (0,
|
12342
|
+
const { toggleScreenShare } = (0, import_react_sdk60.useScreenShare)();
|
12361
12343
|
return /* @__PURE__ */ import_react116.default.createElement(import_react116.Fragment, null, /* @__PURE__ */ import_react116.default.createElement(
|
12362
12344
|
Dropdown.Root,
|
12363
12345
|
{
|
@@ -12578,13 +12560,13 @@ function ShareScreenOptions() {
|
|
12578
12560
|
)
|
12579
12561
|
), openModals.has(MODALS3.PDF_SHARE) && /* @__PURE__ */ import_react116.default.createElement(PDFFileOptions, { onOpenChange: (value) => updateState(MODALS3.PDF_SHARE, value) }));
|
12580
12562
|
}
|
12581
|
-
var import_react116,
|
12563
|
+
var import_react116, import_react_sdk60, import_react_icons52, MODALS3;
|
12582
12564
|
var init_shareScreenOptions = __esm({
|
12583
12565
|
"src/Prebuilt/components/pdfAnnotator/shareScreenOptions.jsx"() {
|
12584
12566
|
"use strict";
|
12585
12567
|
init_define_process_env();
|
12586
12568
|
import_react116 = __toESM(require("react"));
|
12587
|
-
|
12569
|
+
import_react_sdk60 = require("@100mslive/react-sdk");
|
12588
12570
|
import_react_icons52 = require("@100mslive/react-icons");
|
12589
12571
|
init_pdf_share();
|
12590
12572
|
init_screen_share();
|
@@ -12600,13 +12582,13 @@ var init_shareScreenOptions = __esm({
|
|
12600
12582
|
});
|
12601
12583
|
|
12602
12584
|
// src/Prebuilt/components/ScreenShareToggle.jsx
|
12603
|
-
var import_react117,
|
12585
|
+
var import_react117, import_react_sdk61, import_react_icons53, ScreenshareToggle;
|
12604
12586
|
var init_ScreenShareToggle = __esm({
|
12605
12587
|
"src/Prebuilt/components/ScreenShareToggle.jsx"() {
|
12606
12588
|
"use strict";
|
12607
12589
|
init_define_process_env();
|
12608
12590
|
import_react117 = __toESM(require("react"));
|
12609
|
-
|
12591
|
+
import_react_sdk61 = require("@100mslive/react-sdk");
|
12610
12592
|
import_react_icons53 = require("@100mslive/react-icons");
|
12611
12593
|
init_shareScreenOptions();
|
12612
12594
|
init_Layout();
|
@@ -12616,9 +12598,9 @@ var init_ScreenShareToggle = __esm({
|
|
12616
12598
|
init_utils2();
|
12617
12599
|
init_constants();
|
12618
12600
|
ScreenshareToggle = ({ css: css2 = {} }) => {
|
12619
|
-
const isAllowedToPublish = (0,
|
12601
|
+
const isAllowedToPublish = (0, import_react_sdk61.useHMSStore)(import_react_sdk61.selectIsAllowedToPublish);
|
12620
12602
|
const isAudioOnly = useUISettings(UI_SETTINGS.isAudioOnly);
|
12621
|
-
const { amIScreenSharing, screenShareVideoTrackId: video, toggleScreenShare } = (0,
|
12603
|
+
const { amIScreenSharing, screenShareVideoTrackId: video, toggleScreenShare } = (0, import_react_sdk61.useScreenShare)();
|
12622
12604
|
const isVideoScreenshare = amIScreenSharing && !!video;
|
12623
12605
|
if (!isAllowedToPublish.screen || !isScreenshareSupported()) {
|
12624
12606
|
return null;
|
@@ -12642,20 +12624,20 @@ var init_ScreenShareToggle = __esm({
|
|
12642
12624
|
});
|
12643
12625
|
|
12644
12626
|
// src/Prebuilt/components/Footer/ChatToggle.tsx
|
12645
|
-
var import_react118,
|
12627
|
+
var import_react118, import_react_sdk62, import_react_icons54, ChatToggle;
|
12646
12628
|
var init_ChatToggle = __esm({
|
12647
12629
|
"src/Prebuilt/components/Footer/ChatToggle.tsx"() {
|
12648
12630
|
"use strict";
|
12649
12631
|
init_define_process_env();
|
12650
12632
|
import_react118 = __toESM(require("react"));
|
12651
|
-
|
12633
|
+
import_react_sdk62 = require("@100mslive/react-sdk");
|
12652
12634
|
import_react_icons54 = require("@100mslive/react-icons");
|
12653
12635
|
init_src();
|
12654
12636
|
init_IconButton3();
|
12655
12637
|
init_useSidepane();
|
12656
12638
|
init_constants();
|
12657
12639
|
ChatToggle = () => {
|
12658
|
-
const countUnreadMessages = (0,
|
12640
|
+
const countUnreadMessages = (0, import_react_sdk62.useHMSStore)(import_react_sdk62.selectUnreadHMSMessagesCount);
|
12659
12641
|
const isChatOpen = useIsSidepaneTypeOpen(SIDE_PANE_OPTIONS.CHAT);
|
12660
12642
|
const toggleChat = useSidepaneToggle(SIDE_PANE_OPTIONS.CHAT);
|
12661
12643
|
return /* @__PURE__ */ import_react118.default.createElement(Tooltip, { key: "chat", title: `${isChatOpen ? "Close" : "Open"} chat` }, /* @__PURE__ */ import_react118.default.createElement(IconButton_default, { onClick: toggleChat, active: !isChatOpen, "data-testid": "chat_btn" }, countUnreadMessages === 0 ? /* @__PURE__ */ import_react118.default.createElement(import_react_icons54.ChatIcon, null) : /* @__PURE__ */ import_react118.default.createElement(import_react_icons54.ChatUnreadIcon, { "data-testid": "chat_unread_btn" })));
|
@@ -12664,13 +12646,13 @@ var init_ChatToggle = __esm({
|
|
12664
12646
|
});
|
12665
12647
|
|
12666
12648
|
// src/Prebuilt/components/Footer/RoleOptions.tsx
|
12667
|
-
var import_react119,
|
12649
|
+
var import_react119, import_react_sdk63, import_react_icons55, dropdownItemCSS, optionTextCSS, RoleOptions;
|
12668
12650
|
var init_RoleOptions = __esm({
|
12669
12651
|
"src/Prebuilt/components/Footer/RoleOptions.tsx"() {
|
12670
12652
|
"use strict";
|
12671
12653
|
init_define_process_env();
|
12672
12654
|
import_react119 = __toESM(require("react"));
|
12673
|
-
|
12655
|
+
import_react_sdk63 = require("@100mslive/react-sdk");
|
12674
12656
|
import_react_icons55 = require("@100mslive/react-icons");
|
12675
12657
|
init_Dropdown2();
|
12676
12658
|
init_Layout();
|
@@ -12681,11 +12663,11 @@ var init_RoleOptions = __esm({
|
|
12681
12663
|
optionTextCSS = { fontWeight: "$semiBold", color: "$on_surface_high", textTransform: "none" };
|
12682
12664
|
RoleOptions = ({ roleName, peerList }) => {
|
12683
12665
|
const [openOptions, setOpenOptions] = (0, import_react119.useState)(false);
|
12684
|
-
const permissions = (0,
|
12685
|
-
const hmsActions = (0,
|
12666
|
+
const permissions = (0, import_react_sdk63.useHMSStore)(import_react_sdk63.selectPermissions);
|
12667
|
+
const hmsActions = (0, import_react_sdk63.useHMSActions)();
|
12686
12668
|
const { elements } = useRoomLayoutConferencingScreen();
|
12687
12669
|
const { on_stage_role, off_stage_roles = [] } = (elements == null ? void 0 : elements.on_stage_exp) || {};
|
12688
|
-
const vanillaStore = (0,
|
12670
|
+
const vanillaStore = (0, import_react_sdk63.useHMSVanillaStore)();
|
12689
12671
|
const store = vanillaStore.getState();
|
12690
12672
|
let allPeersHaveVideoOn = true;
|
12691
12673
|
let allPeersHaveAudioOn = true;
|
@@ -12868,14 +12850,14 @@ var init_RoleAccordion = __esm({
|
|
12868
12850
|
});
|
12869
12851
|
|
12870
12852
|
// src/Prebuilt/components/Footer/ParticipantList.jsx
|
12871
|
-
var import_react121, import_react_use19,
|
12853
|
+
var import_react121, import_react_use19, import_react_sdk64, import_react_icons56, ParticipantList, ParticipantCount, VirtualizedParticipants, Participant, ParticipantActions, ParticipantMoreActions, ParticipantSearch;
|
12872
12854
|
var init_ParticipantList = __esm({
|
12873
12855
|
"src/Prebuilt/components/Footer/ParticipantList.jsx"() {
|
12874
12856
|
"use strict";
|
12875
12857
|
init_define_process_env();
|
12876
12858
|
import_react121 = __toESM(require("react"));
|
12877
12859
|
import_react_use19 = require("react-use");
|
12878
|
-
|
12860
|
+
import_react_sdk64 = require("@100mslive/react-sdk");
|
12879
12861
|
import_react_icons56 = require("@100mslive/react-icons");
|
12880
12862
|
init_src();
|
12881
12863
|
init_IconButton3();
|
@@ -12891,7 +12873,7 @@ var init_ParticipantList = __esm({
|
|
12891
12873
|
const [filter, setFilter] = (0, import_react121.useState)();
|
12892
12874
|
const { participants, isConnected, peerCount } = useParticipants2(filter);
|
12893
12875
|
const peersOrderedByRoles = {};
|
12894
|
-
const handRaisedPeers = (0,
|
12876
|
+
const handRaisedPeers = (0, import_react_sdk64.useHMSStore)(import_react_sdk64.selectHandRaisedPeers);
|
12895
12877
|
participants.forEach((participant) => {
|
12896
12878
|
if (peersOrderedByRoles[participant.roleName] === void 0) {
|
12897
12879
|
peersOrderedByRoles[participant.roleName] = [];
|
@@ -12921,7 +12903,7 @@ var init_ParticipantList = __esm({
|
|
12921
12903
|
)));
|
12922
12904
|
};
|
12923
12905
|
ParticipantCount = () => {
|
12924
|
-
const peerCount = (0,
|
12906
|
+
const peerCount = (0, import_react_sdk64.useHMSStore)(import_react_sdk64.selectPeerCount);
|
12925
12907
|
const toggleSidepane = useSidepaneToggle(SIDE_PANE_OPTIONS.PARTICIPANTS);
|
12926
12908
|
const isParticipantsOpen = useIsSidepaneTypeOpen(SIDE_PANE_OPTIONS.PARTICIPANTS);
|
12927
12909
|
(0, import_react121.useEffect)(() => {
|
@@ -12989,7 +12971,7 @@ var init_ParticipantList = __esm({
|
|
12989
12971
|
);
|
12990
12972
|
};
|
12991
12973
|
Participant = ({ peer, isConnected }) => {
|
12992
|
-
const localPeerId = (0,
|
12974
|
+
const localPeerId = (0, import_react_sdk64.useHMSStore)(import_react_sdk64.selectLocalPeerID);
|
12993
12975
|
return /* @__PURE__ */ import_react121.default.createElement(
|
12994
12976
|
Flex,
|
12995
12977
|
{
|
@@ -13011,10 +12993,10 @@ var init_ParticipantList = __esm({
|
|
13011
12993
|
};
|
13012
12994
|
ParticipantActions = import_react121.default.memo(({ peerId, role, isLocal }) => {
|
13013
12995
|
var _a7;
|
13014
|
-
const isHandRaised = (0,
|
13015
|
-
const canChangeRole = (_a7 = (0,
|
12996
|
+
const isHandRaised = (0, import_react_sdk64.useHMSStore)((0, import_react_sdk64.selectHasPeerHandRaised)(peerId));
|
12997
|
+
const canChangeRole = (_a7 = (0, import_react_sdk64.useHMSStore)(import_react_sdk64.selectPermissions)) == null ? void 0 : _a7.changeRole;
|
13016
12998
|
const shouldShowMoreActions = canChangeRole;
|
13017
|
-
const isAudioMuted = !(0,
|
12999
|
+
const isAudioMuted = !(0, import_react_sdk64.useHMSStore)((0, import_react_sdk64.selectIsPeerAudioEnabled)(peerId));
|
13018
13000
|
return /* @__PURE__ */ import_react121.default.createElement(
|
13019
13001
|
Flex,
|
13020
13002
|
{
|
@@ -13048,8 +13030,8 @@ var init_ParticipantList = __esm({
|
|
13048
13030
|
});
|
13049
13031
|
ParticipantMoreActions = ({ peerId, role }) => {
|
13050
13032
|
var _a7;
|
13051
|
-
const hmsActions = (0,
|
13052
|
-
const { changeRole: canChangeRole, removeOthers: canRemoveOthers } = (0,
|
13033
|
+
const hmsActions = (0, import_react_sdk64.useHMSActions)();
|
13034
|
+
const { changeRole: canChangeRole, removeOthers: canRemoveOthers } = (0, import_react_sdk64.useHMSStore)(import_react_sdk64.selectPermissions);
|
13053
13035
|
const { elements } = useRoomLayoutConferencingScreen();
|
13054
13036
|
const {
|
13055
13037
|
bring_to_stage_label,
|
@@ -13059,8 +13041,8 @@ var init_ParticipantList = __esm({
|
|
13059
13041
|
} = elements.on_stage_exp || {};
|
13060
13042
|
const isInStage = role === on_stage_role;
|
13061
13043
|
const shouldShowStageRoleChange = canChangeRole && (isInStage && remove_from_stage_label || (off_stage_roles == null ? void 0 : off_stage_roles.includes(role)) && bring_to_stage_label);
|
13062
|
-
const prevRole = (_a7 = (0,
|
13063
|
-
const localPeerId = (0,
|
13044
|
+
const prevRole = (_a7 = (0, import_react_sdk64.useHMSStore)((0, import_react_sdk64.selectPeerMetadata)(peerId))) == null ? void 0 : _a7.prevRole;
|
13045
|
+
const localPeerId = (0, import_react_sdk64.useHMSStore)(import_react_sdk64.selectLocalPeerID);
|
13064
13046
|
const isLocal = localPeerId === peerId;
|
13065
13047
|
const [open, setOpen] = (0, import_react121.useState)(false);
|
13066
13048
|
const handleStageAction = () => __async(void 0, null, function* () {
|
@@ -13136,7 +13118,7 @@ var init_ParticipantList = __esm({
|
|
13136
13118
|
{
|
13137
13119
|
type: "text",
|
13138
13120
|
placeholder: placeholder || "Search for participants",
|
13139
|
-
css: { w: "100%", p: "$6", pl: "$
|
13121
|
+
css: { w: "100%", p: "$6", pl: "$16", mr: "$4", bg: inSidePane ? "$surface_default" : "$surface_dim" },
|
13140
13122
|
value,
|
13141
13123
|
onKeyDown: (event) => {
|
13142
13124
|
event.stopPropagation();
|
@@ -13154,7 +13136,7 @@ var init_ParticipantList = __esm({
|
|
13154
13136
|
});
|
13155
13137
|
|
13156
13138
|
// src/Prebuilt/components/Footer/Footer.tsx
|
13157
|
-
var import_react122, import_react_use20, import_chat,
|
13139
|
+
var import_react122, import_react_use20, import_chat, import_react_sdk65, VirtualBackground3, Footer2;
|
13158
13140
|
var init_Footer3 = __esm({
|
13159
13141
|
"src/Prebuilt/components/Footer/Footer.tsx"() {
|
13160
13142
|
"use strict";
|
@@ -13162,7 +13144,7 @@ var init_Footer3 = __esm({
|
|
13162
13144
|
import_react122 = __toESM(require("react"));
|
13163
13145
|
import_react_use20 = require("react-use");
|
13164
13146
|
import_chat = require("@100mslive/types-prebuilt/elements/chat");
|
13165
|
-
|
13147
|
+
import_react_sdk65 = require("@100mslive/react-sdk");
|
13166
13148
|
init_src();
|
13167
13149
|
init_AudioVideoToggle();
|
13168
13150
|
init_EmojiReaction();
|
@@ -13183,7 +13165,7 @@ var init_Footer3 = __esm({
|
|
13183
13165
|
const isMobile = (0, import_react_use20.useMedia)(config.media.md);
|
13184
13166
|
const isOverlayChat = !!((_a7 = elements == null ? void 0 : elements.chat) == null ? void 0 : _a7.is_overlay);
|
13185
13167
|
const openByDefault = ((_b7 = elements == null ? void 0 : elements.chat) == null ? void 0 : _b7.initial_state) === import_chat.Chat_ChatState.CHAT_STATE_OPEN;
|
13186
|
-
const { toggleAudio, toggleVideo } = (0,
|
13168
|
+
const { toggleAudio, toggleVideo } = (0, import_react_sdk65.useAVToggle)();
|
13187
13169
|
const noAVPermissions = !(toggleAudio || toggleVideo);
|
13188
13170
|
const isChatOpen = useIsSidepaneTypeOpen(SIDE_PANE_OPTIONS.CHAT);
|
13189
13171
|
const toggleChat = useSidepaneToggle(SIDE_PANE_OPTIONS.CHAT);
|
@@ -13241,9 +13223,9 @@ var init_Footer3 = __esm({
|
|
13241
13223
|
|
13242
13224
|
// src/Prebuilt/components/Notifications/HLSFailureModal.jsx
|
13243
13225
|
function HLSFailureModal() {
|
13244
|
-
const { hlsError } = (0,
|
13226
|
+
const { hlsError } = (0, import_react_sdk66.useHMSStore)(import_react_sdk66.selectHLSState).error || false;
|
13245
13227
|
const [openModal, setOpenModal] = (0, import_react123.useState)(!!hlsError);
|
13246
|
-
const hmsActions = (0,
|
13228
|
+
const hmsActions = (0, import_react_sdk66.useHMSActions)();
|
13247
13229
|
const [isHLSStarted, setHLSStarted] = useSetAppDataByKey(APP_DATA.hlsStarted);
|
13248
13230
|
const startHLS = (0, import_react123.useCallback)(() => __async(this, null, function* () {
|
13249
13231
|
try {
|
@@ -13285,13 +13267,13 @@ function HLSFailureModal() {
|
|
13285
13267
|
), /* @__PURE__ */ import_react123.default.createElement(Text, { variant: "sm", css: { mb: "$10", color: "$on_surface_medium" } }, "Something went wrong and your live broadcast failed. Please try again."), /* @__PURE__ */ import_react123.default.createElement(Flex, { align: "center", justify: "between", css: { w: "100%", gap: "$8" } }, /* @__PURE__ */ import_react123.default.createElement(Button, { outlined: true, variant: "standard", css: { w: "100%" }, onClick: () => setOpenModal(false) }, "Dismiss"), /* @__PURE__ */ import_react123.default.createElement(Button, { css: { w: "100%" }, onClick: startHLS }, "Go Live"))))
|
13286
13268
|
) : null;
|
13287
13269
|
}
|
13288
|
-
var import_react123,
|
13270
|
+
var import_react123, import_react_sdk66;
|
13289
13271
|
var init_HLSFailureModal = __esm({
|
13290
13272
|
"src/Prebuilt/components/Notifications/HLSFailureModal.jsx"() {
|
13291
13273
|
"use strict";
|
13292
13274
|
init_define_process_env();
|
13293
13275
|
import_react123 = __toESM(require("react"));
|
13294
|
-
|
13276
|
+
import_react_sdk66 = require("@100mslive/react-sdk");
|
13295
13277
|
init_Button2();
|
13296
13278
|
init_Layout();
|
13297
13279
|
init_Modal();
|
@@ -13301,14 +13283,125 @@ var init_HLSFailureModal = __esm({
|
|
13301
13283
|
}
|
13302
13284
|
});
|
13303
13285
|
|
13286
|
+
// src/Prebuilt/components/RoleChangeRequest/RequestPrompt.tsx
|
13287
|
+
var import_react124, import_react_use21, RequestPrompt, RequestActions;
|
13288
|
+
var init_RequestPrompt = __esm({
|
13289
|
+
"src/Prebuilt/components/RoleChangeRequest/RequestPrompt.tsx"() {
|
13290
|
+
"use strict";
|
13291
|
+
init_define_process_env();
|
13292
|
+
import_react124 = __toESM(require("react"));
|
13293
|
+
import_react_use21 = require("react-use");
|
13294
|
+
init_src();
|
13295
|
+
init_Sheet2();
|
13296
|
+
RequestPrompt = ({
|
13297
|
+
open = true,
|
13298
|
+
onOpenChange,
|
13299
|
+
title,
|
13300
|
+
body,
|
13301
|
+
actionText = "Accept",
|
13302
|
+
onAction
|
13303
|
+
}) => {
|
13304
|
+
const isMobile = (0, import_react_use21.useMedia)(config.media.md);
|
13305
|
+
if (isMobile) {
|
13306
|
+
return /* @__PURE__ */ import_react124.default.createElement(Sheet.Root, { open, onOpenChange }, /* @__PURE__ */ import_react124.default.createElement(Sheet.Content, { css: { py: "$8" } }, /* @__PURE__ */ import_react124.default.createElement(Text, { css: { fontWeight: "$semiBold", c: "$on_surface_high", "@md": { px: "$8" } } }, title), body, /* @__PURE__ */ import_react124.default.createElement(RequestActions, { actionText, onAction })));
|
13307
|
+
}
|
13308
|
+
return /* @__PURE__ */ import_react124.default.createElement(Dialog.Root, { open, onOpenChange }, /* @__PURE__ */ import_react124.default.createElement(Dialog.Portal, null, /* @__PURE__ */ import_react124.default.createElement(Dialog.Overlay, null), /* @__PURE__ */ import_react124.default.createElement(Dialog.Content, { css: { p: "$10" } }, /* @__PURE__ */ import_react124.default.createElement(Dialog.Title, { css: { p: 0, display: "flex", flexDirection: "row", gap: "$md", justifyContent: "center" } }, /* @__PURE__ */ import_react124.default.createElement(Text, { variant: "h6" }, title)), /* @__PURE__ */ import_react124.default.createElement(Box, { css: { mt: "$4", mb: "$10" } }, body), /* @__PURE__ */ import_react124.default.createElement(RequestActions, { actionText, onAction }))));
|
13309
|
+
};
|
13310
|
+
RequestActions = ({ onAction, actionText }) => /* @__PURE__ */ import_react124.default.createElement(Flex, { justify: "center", align: "center", css: { width: "100%", gap: "$md", "@md": { mt: "$8", px: "$8" } } }, /* @__PURE__ */ import_react124.default.createElement(Box, { css: { width: "50%" } }, /* @__PURE__ */ import_react124.default.createElement(Dialog.Close, { css: { width: "100%" } }, /* @__PURE__ */ import_react124.default.createElement(Button, { variant: "standard", outlined: true, css: { width: "100%" } }, "Decline"))), /* @__PURE__ */ import_react124.default.createElement(Box, { css: { width: "50%" } }, /* @__PURE__ */ import_react124.default.createElement(Button, { variant: "primary", css: { width: "100%" }, onClick: onAction }, actionText)));
|
13311
|
+
}
|
13312
|
+
});
|
13313
|
+
|
13314
|
+
// src/Prebuilt/components/RoleChangeRequest/RoleChangeRequestModal.tsx
|
13315
|
+
var import_react125, import_react_sdk67, RoleChangeRequestModal;
|
13316
|
+
var init_RoleChangeRequestModal = __esm({
|
13317
|
+
"src/Prebuilt/components/RoleChangeRequest/RoleChangeRequestModal.tsx"() {
|
13318
|
+
"use strict";
|
13319
|
+
init_define_process_env();
|
13320
|
+
import_react125 = __toESM(require("react"));
|
13321
|
+
import_react_sdk67 = require("@100mslive/react-sdk");
|
13322
|
+
init_src();
|
13323
|
+
init_PreviewJoin();
|
13324
|
+
init_RequestPrompt();
|
13325
|
+
init_useMetadata();
|
13326
|
+
init_constants();
|
13327
|
+
RoleChangeRequestModal = () => {
|
13328
|
+
const hmsActions = (0, import_react_sdk67.useHMSActions)();
|
13329
|
+
const { updateMetaData } = useMyMetadata();
|
13330
|
+
const currentRole = (0, import_react_sdk67.useHMSStore)(import_react_sdk67.selectLocalPeerRoleName);
|
13331
|
+
const roleChangeRequest = (0, import_react_sdk67.useHMSStore)(import_react_sdk67.selectRoleChangeRequest);
|
13332
|
+
const name = (0, import_react_sdk67.useHMSStore)(import_react_sdk67.selectLocalPeerName);
|
13333
|
+
const { sendEvent } = (0, import_react_sdk67.useCustomEvent)({ type: ROLE_CHANGE_DECLINED });
|
13334
|
+
(0, import_react125.useEffect)(() => {
|
13335
|
+
if (!(roleChangeRequest == null ? void 0 : roleChangeRequest.role)) {
|
13336
|
+
return;
|
13337
|
+
}
|
13338
|
+
(() => __async(void 0, null, function* () {
|
13339
|
+
yield hmsActions.preview({ asRole: roleChangeRequest.role.name });
|
13340
|
+
}))();
|
13341
|
+
}, [hmsActions, roleChangeRequest, currentRole, updateMetaData]);
|
13342
|
+
if (!(roleChangeRequest == null ? void 0 : roleChangeRequest.role)) {
|
13343
|
+
return null;
|
13344
|
+
}
|
13345
|
+
const body = /* @__PURE__ */ import_react125.default.createElement(import_react125.default.Fragment, null, /* @__PURE__ */ import_react125.default.createElement(
|
13346
|
+
Text,
|
13347
|
+
{
|
13348
|
+
variant: "xs",
|
13349
|
+
css: {
|
13350
|
+
c: "$on_surface_medium",
|
13351
|
+
textAlign: "center",
|
13352
|
+
"@md": { textAlign: "left", borderBottom: "1px solid $border_bright", pb: "$4", px: "$8" }
|
13353
|
+
}
|
13354
|
+
},
|
13355
|
+
"Setup your audio and video before joining"
|
13356
|
+
), /* @__PURE__ */ import_react125.default.createElement(
|
13357
|
+
Flex,
|
13358
|
+
{
|
13359
|
+
align: "center",
|
13360
|
+
justify: "center",
|
13361
|
+
css: {
|
13362
|
+
"@sm": { width: "100%" },
|
13363
|
+
flexDirection: "column",
|
13364
|
+
mt: "$6",
|
13365
|
+
"@md": { px: "$8" }
|
13366
|
+
}
|
13367
|
+
},
|
13368
|
+
/* @__PURE__ */ import_react125.default.createElement(PreviewTile, { name: name || "" }),
|
13369
|
+
/* @__PURE__ */ import_react125.default.createElement(PreviewControls, { hideSettings: true })
|
13370
|
+
));
|
13371
|
+
return /* @__PURE__ */ import_react125.default.createElement(
|
13372
|
+
RequestPrompt,
|
13373
|
+
{
|
13374
|
+
title: "You're invited to join the stage",
|
13375
|
+
onOpenChange: (value) => __async(void 0, null, function* () {
|
13376
|
+
var _a7;
|
13377
|
+
if (!value) {
|
13378
|
+
hmsActions.rejectChangeRole(roleChangeRequest);
|
13379
|
+
sendEvent(__spreadProps(__spreadValues({}, roleChangeRequest), { peerName: name }), { peerId: (_a7 = roleChangeRequest.requestedBy) == null ? void 0 : _a7.id });
|
13380
|
+
yield hmsActions.cancelMidCallPreview();
|
13381
|
+
yield hmsActions.lowerLocalPeerHand();
|
13382
|
+
}
|
13383
|
+
}),
|
13384
|
+
body,
|
13385
|
+
onAction: () => __async(void 0, null, function* () {
|
13386
|
+
yield hmsActions.acceptChangeRole(roleChangeRequest);
|
13387
|
+
yield updateMetaData({ prevRole: currentRole });
|
13388
|
+
yield hmsActions.lowerLocalPeerHand();
|
13389
|
+
}),
|
13390
|
+
actionText: "Accept"
|
13391
|
+
}
|
13392
|
+
);
|
13393
|
+
};
|
13394
|
+
}
|
13395
|
+
});
|
13396
|
+
|
13304
13397
|
// src/Prebuilt/components/hooks/useVideoTileLayout.ts
|
13305
|
-
var
|
13398
|
+
var import_react126, VideoTileContext, useVideoTileContext;
|
13306
13399
|
var init_useVideoTileLayout = __esm({
|
13307
13400
|
"src/Prebuilt/components/hooks/useVideoTileLayout.ts"() {
|
13308
13401
|
"use strict";
|
13309
13402
|
init_define_process_env();
|
13310
|
-
|
13311
|
-
VideoTileContext =
|
13403
|
+
import_react126 = __toESM(require("react"));
|
13404
|
+
VideoTileContext = import_react126.default.createContext({
|
13312
13405
|
enableSpotlightingPeer: true,
|
13313
13406
|
hideParticipantNameOnTile: false,
|
13314
13407
|
roundedVideoTile: true,
|
@@ -13318,21 +13411,21 @@ var init_useVideoTileLayout = __esm({
|
|
13318
13411
|
hideMetadataOnTile: false
|
13319
13412
|
});
|
13320
13413
|
useVideoTileContext = () => {
|
13321
|
-
const context = (0,
|
13414
|
+
const context = (0, import_react126.useContext)(VideoTileContext);
|
13322
13415
|
return context;
|
13323
13416
|
};
|
13324
13417
|
}
|
13325
13418
|
});
|
13326
13419
|
|
13327
13420
|
// src/Prebuilt/components/InsetTile.tsx
|
13328
|
-
var
|
13421
|
+
var import_react127, import_react_draggable, import_react_use22, import_react_sdk68, import_react_icons57, MinimisedTile, insetHeightPx, insetMaxWidthPx, defaultMobileAspectRatio, desktopAspectRatio, InsetTile;
|
13329
13422
|
var init_InsetTile = __esm({
|
13330
13423
|
"src/Prebuilt/components/InsetTile.tsx"() {
|
13331
13424
|
"use strict";
|
13332
13425
|
init_define_process_env();
|
13333
|
-
|
13426
|
+
import_react127 = __toESM(require("react"));
|
13334
13427
|
import_react_draggable = __toESM(require("react-draggable"));
|
13335
|
-
|
13428
|
+
import_react_use22 = require("react-use");
|
13336
13429
|
import_react_sdk68 = require("@100mslive/react-sdk");
|
13337
13430
|
import_react_icons57 = require("@100mslive/react-icons");
|
13338
13431
|
init_Layout();
|
@@ -13345,14 +13438,14 @@ var init_InsetTile = __esm({
|
|
13345
13438
|
init_useVideoTileLayout();
|
13346
13439
|
init_constants();
|
13347
13440
|
MinimisedTile = ({ setMinimised }) => {
|
13348
|
-
return /* @__PURE__ */
|
13441
|
+
return /* @__PURE__ */ import_react127.default.createElement(Flex, { align: "center", css: { gap: "$6", r: "$1", bg: "$surface_default", p: "$4", color: "$on_surface_high" } }, /* @__PURE__ */ import_react127.default.createElement(AudioVideoToggle, { hideOptions: true }), /* @__PURE__ */ import_react127.default.createElement(Text, null, "You"), /* @__PURE__ */ import_react127.default.createElement(
|
13349
13442
|
IconButton_default,
|
13350
13443
|
{
|
13351
13444
|
className: "__cancel-drag-event",
|
13352
13445
|
onClick: () => setMinimised(false),
|
13353
13446
|
css: { bg: "transparent", border: "transparent" }
|
13354
13447
|
},
|
13355
|
-
/* @__PURE__ */
|
13448
|
+
/* @__PURE__ */ import_react127.default.createElement(import_react_icons57.ExpandIcon, null)
|
13356
13449
|
));
|
13357
13450
|
};
|
13358
13451
|
insetHeightPx = 180;
|
@@ -13360,8 +13453,8 @@ var init_InsetTile = __esm({
|
|
13360
13453
|
defaultMobileAspectRatio = 9 / 16;
|
13361
13454
|
desktopAspectRatio = 1 / defaultMobileAspectRatio;
|
13362
13455
|
InsetTile = () => {
|
13363
|
-
const isMobile = (0,
|
13364
|
-
const isLandscape = (0,
|
13456
|
+
const isMobile = (0, import_react_use22.useMedia)(config.media.md);
|
13457
|
+
const isLandscape = (0, import_react_use22.useMedia)(config.media.ls);
|
13365
13458
|
const localPeer = (0, import_react_sdk68.useHMSStore)(import_react_sdk68.selectLocalPeer);
|
13366
13459
|
const [minimised, setMinimised] = useSetAppDataByKey(APP_DATA.minimiseInset);
|
13367
13460
|
const videoTrack = (0, import_react_sdk68.useHMSStore)((0, import_react_sdk68.selectVideoTrackByID)(localPeer == null ? void 0 : localPeer.videoTrack));
|
@@ -13377,8 +13470,8 @@ var init_InsetTile = __esm({
|
|
13377
13470
|
width = 240;
|
13378
13471
|
height = width / aspectRatio;
|
13379
13472
|
}
|
13380
|
-
const nodeRef = (0,
|
13381
|
-
(0,
|
13473
|
+
const nodeRef = (0, import_react127.useRef)(null);
|
13474
|
+
(0, import_react127.useEffect)(() => {
|
13382
13475
|
const node = nodeRef.current;
|
13383
13476
|
if (!node || !window.ResizeObserver) {
|
13384
13477
|
return;
|
@@ -13399,7 +13492,7 @@ var init_InsetTile = __esm({
|
|
13399
13492
|
if (!isAllowedToPublish.video && !isAllowedToPublish.audio) {
|
13400
13493
|
return null;
|
13401
13494
|
}
|
13402
|
-
return /* @__PURE__ */
|
13495
|
+
return /* @__PURE__ */ import_react127.default.createElement(import_react_draggable.default, { bounds: "parent", nodeRef, cancel: ".__cancel-drag-event" }, /* @__PURE__ */ import_react127.default.createElement(
|
13403
13496
|
Box,
|
13404
13497
|
{
|
13405
13498
|
ref: nodeRef,
|
@@ -13415,7 +13508,7 @@ var init_InsetTile = __esm({
|
|
13415
13508
|
h: height
|
13416
13509
|
} : {})
|
13417
13510
|
},
|
13418
|
-
minimised ? /* @__PURE__ */
|
13511
|
+
minimised ? /* @__PURE__ */ import_react127.default.createElement(MinimisedTile, { setMinimised }) : /* @__PURE__ */ import_react127.default.createElement(
|
13419
13512
|
VideoTile_default,
|
13420
13513
|
__spreadProps(__spreadValues({
|
13421
13514
|
peerId: localPeer == null ? void 0 : localPeer.id,
|
@@ -13439,12 +13532,12 @@ var init_InsetTile = __esm({
|
|
13439
13532
|
});
|
13440
13533
|
|
13441
13534
|
// src/Prebuilt/components/Pagination.tsx
|
13442
|
-
var
|
13535
|
+
var import_react128, import_react_icons58, Pagination;
|
13443
13536
|
var init_Pagination2 = __esm({
|
13444
13537
|
"src/Prebuilt/components/Pagination.tsx"() {
|
13445
13538
|
"use strict";
|
13446
13539
|
init_define_process_env();
|
13447
|
-
|
13540
|
+
import_react128 = __toESM(require("react"));
|
13448
13541
|
import_react_icons58 = require("@100mslive/react-icons");
|
13449
13542
|
init_Pagination();
|
13450
13543
|
Pagination = ({
|
@@ -13462,7 +13555,7 @@ var init_Pagination2 = __esm({
|
|
13462
13555
|
e.stopPropagation();
|
13463
13556
|
onPageChange(Math.max(page - 1, 0));
|
13464
13557
|
};
|
13465
|
-
(0,
|
13558
|
+
(0, import_react128.useEffect)(() => {
|
13466
13559
|
if (page >= numPages) {
|
13467
13560
|
onPageChange(Math.max(0, numPages - 1));
|
13468
13561
|
}
|
@@ -13470,7 +13563,7 @@ var init_Pagination2 = __esm({
|
|
13470
13563
|
if (numPages <= 1) {
|
13471
13564
|
return null;
|
13472
13565
|
}
|
13473
|
-
return /* @__PURE__ */
|
13566
|
+
return /* @__PURE__ */ import_react128.default.createElement(StyledPagination.Root, { css: { flexShrink: 0 } }, /* @__PURE__ */ import_react128.default.createElement(StyledPagination.Chevron, { disabled: disableLeft, onClick: prevPage }, /* @__PURE__ */ import_react128.default.createElement(import_react_icons58.ChevronLeftIcon, { width: 16, height: 16, style: { cursor: disableLeft ? "not-allowed" : "pointer" } })), numPages <= 5 ? /* @__PURE__ */ import_react128.default.createElement(StyledPagination.Dots, null, [...Array(numPages)].map((_, i) => /* @__PURE__ */ import_react128.default.createElement(
|
13474
13567
|
StyledPagination.Dot,
|
13475
13568
|
{
|
13476
13569
|
key: i,
|
@@ -13480,25 +13573,25 @@ var init_Pagination2 = __esm({
|
|
13480
13573
|
onPageChange(i);
|
13481
13574
|
}
|
13482
13575
|
}
|
13483
|
-
))) : null, /* @__PURE__ */
|
13576
|
+
))) : null, /* @__PURE__ */ import_react128.default.createElement(StyledPagination.Chevron, { disabled: disableRight, onClick: nextPage }, /* @__PURE__ */ import_react128.default.createElement(import_react_icons58.ChevronRightIcon, { width: 16, height: 16, style: { cursor: disableRight ? "not-allowed" : "pointer" } })));
|
13484
13577
|
};
|
13485
13578
|
}
|
13486
13579
|
});
|
13487
13580
|
|
13488
13581
|
// src/Prebuilt/components/VideoLayouts/Grid.tsx
|
13489
|
-
var
|
13582
|
+
var import_react129, Grid;
|
13490
13583
|
var init_Grid = __esm({
|
13491
13584
|
"src/Prebuilt/components/VideoLayouts/Grid.tsx"() {
|
13492
13585
|
"use strict";
|
13493
13586
|
init_define_process_env();
|
13494
|
-
|
13587
|
+
import_react129 = __toESM(require("react"));
|
13495
13588
|
init_Layout();
|
13496
13589
|
init_VideoTile2();
|
13497
13590
|
init_useVideoTileLayout();
|
13498
|
-
Grid =
|
13591
|
+
Grid = import_react129.default.forwardRef(
|
13499
13592
|
({ tiles, edgeToEdge }, ref) => {
|
13500
13593
|
const videoTileProps = useVideoTileContext();
|
13501
|
-
return /* @__PURE__ */
|
13594
|
+
return /* @__PURE__ */ import_react129.default.createElement(
|
13502
13595
|
Box,
|
13503
13596
|
{
|
13504
13597
|
ref,
|
@@ -13516,7 +13609,7 @@ var init_Grid = __esm({
|
|
13516
13609
|
},
|
13517
13610
|
tiles == null ? void 0 : tiles.map((tile) => {
|
13518
13611
|
var _a7, _b7, _c, _d;
|
13519
|
-
return /* @__PURE__ */
|
13612
|
+
return /* @__PURE__ */ import_react129.default.createElement(
|
13520
13613
|
VideoTile_default,
|
13521
13614
|
__spreadValues({
|
13522
13615
|
key: ((_a7 = tile.track) == null ? void 0 : _a7.id) || ((_b7 = tile.peer) == null ? void 0 : _b7.id),
|
@@ -13536,25 +13629,25 @@ var init_Grid = __esm({
|
|
13536
13629
|
});
|
13537
13630
|
|
13538
13631
|
// src/Prebuilt/components/hooks/useTileLayout.tsx
|
13539
|
-
var
|
13632
|
+
var import_react130, import_react_use23, import_react_sdk69, aspectRatioConfig, usePagesWithTiles, useTileLayout;
|
13540
13633
|
var init_useTileLayout = __esm({
|
13541
13634
|
"src/Prebuilt/components/hooks/useTileLayout.tsx"() {
|
13542
13635
|
"use strict";
|
13543
13636
|
init_define_process_env();
|
13544
|
-
|
13545
|
-
|
13637
|
+
import_react130 = require("react");
|
13638
|
+
import_react_use23 = require("react-use");
|
13546
13639
|
import_react_sdk69 = require("@100mslive/react-sdk");
|
13547
13640
|
init_Theme();
|
13548
13641
|
aspectRatioConfig = { default: [1 / 1, 4 / 3, 16 / 9], mobile: [1 / 1, 3 / 4, 9 / 16] };
|
13549
13642
|
usePagesWithTiles = ({ peers, maxTileCount }) => {
|
13550
13643
|
const vanillaStore = (0, import_react_sdk69.useHMSVanillaStore)();
|
13551
13644
|
const tracksMap = vanillaStore.getState(import_react_sdk69.selectTracksMap);
|
13552
|
-
const peersWithTiles = (0,
|
13645
|
+
const peersWithTiles = (0, import_react130.useMemo)(
|
13553
13646
|
() => (0, import_react_sdk69.getPeersWithTiles)(peers, tracksMap, () => false),
|
13554
13647
|
[peers, tracksMap]
|
13555
13648
|
);
|
13556
13649
|
const noOfPages = Math.ceil(peersWithTiles.length / maxTileCount);
|
13557
|
-
const pagesList = (0,
|
13650
|
+
const pagesList = (0, import_react130.useMemo)(() => {
|
13558
13651
|
let sliceStart = 0;
|
13559
13652
|
let remaining = peersWithTiles.length;
|
13560
13653
|
const list = [];
|
@@ -13574,10 +13667,10 @@ var init_useTileLayout = __esm({
|
|
13574
13667
|
edgeToEdge = false
|
13575
13668
|
}) => {
|
13576
13669
|
const vanillaStore = (0, import_react_sdk69.useHMSVanillaStore)();
|
13577
|
-
const [ref, { width, height }] = (0,
|
13578
|
-
const isMobile = (0,
|
13579
|
-
const [pagesWithTiles, setPagesWithTiles] = (0,
|
13580
|
-
(0,
|
13670
|
+
const [ref, { width, height }] = (0, import_react_use23.useMeasure)();
|
13671
|
+
const isMobile = (0, import_react_use23.useMedia)(config.media.lg);
|
13672
|
+
const [pagesWithTiles, setPagesWithTiles] = (0, import_react130.useState)([]);
|
13673
|
+
(0, import_react130.useEffect)(() => {
|
13581
13674
|
if (width === 0 || height === 0) {
|
13582
13675
|
return;
|
13583
13676
|
}
|
@@ -13647,14 +13740,14 @@ var init_useTileLayout = __esm({
|
|
13647
13740
|
function EqualProminence({ isInsetEnabled = false, peers, onPageChange, onPageSize, edgeToEdge }) {
|
13648
13741
|
var _a7;
|
13649
13742
|
const localPeer = (0, import_react_sdk70.useHMSStore)(import_react_sdk70.selectLocalPeer);
|
13650
|
-
const isMobile = (0,
|
13743
|
+
const isMobile = (0, import_react_use24.useMedia)(config.media.md);
|
13651
13744
|
let maxTileCount = useUISettings(UI_SETTINGS.maxTileCount);
|
13652
13745
|
maxTileCount = isMobile ? Math.min(maxTileCount, 6) : maxTileCount;
|
13653
13746
|
let pageList = usePagesWithTiles({
|
13654
13747
|
peers,
|
13655
13748
|
maxTileCount
|
13656
13749
|
});
|
13657
|
-
const inputPeers = (0,
|
13750
|
+
const inputPeers = (0, import_react131.useMemo)(
|
13658
13751
|
() => pageList.length === 0 ? localPeer ? [localPeer] : [] : peers,
|
13659
13752
|
[pageList.length, peers, localPeer]
|
13660
13753
|
);
|
@@ -13667,14 +13760,14 @@ function EqualProminence({ isInsetEnabled = false, peers, onPageChange, onPageSi
|
|
13667
13760
|
maxTileCount,
|
13668
13761
|
edgeToEdge
|
13669
13762
|
});
|
13670
|
-
const [page, setPage] = (0,
|
13763
|
+
const [page, setPage] = (0, import_react131.useState)(0);
|
13671
13764
|
const pageSize = ((_a7 = pagesWithTiles[0]) == null ? void 0 : _a7.length) || 0;
|
13672
|
-
(0,
|
13765
|
+
(0, import_react131.useEffect)(() => {
|
13673
13766
|
if (pageSize > 0) {
|
13674
13767
|
onPageSize == null ? void 0 : onPageSize(pageSize);
|
13675
13768
|
}
|
13676
13769
|
}, [pageSize, onPageSize]);
|
13677
|
-
return /* @__PURE__ */
|
13770
|
+
return /* @__PURE__ */ import_react131.default.createElement(Flex, { direction: "column", css: { flex: "1 1 0", h: "100%", position: "relative", minWidth: 0 } }, /* @__PURE__ */ import_react131.default.createElement(Grid, { tiles: pagesWithTiles[page], ref, edgeToEdge }), !edgeToEdge && /* @__PURE__ */ import_react131.default.createElement(
|
13678
13771
|
Pagination,
|
13679
13772
|
{
|
13680
13773
|
page,
|
@@ -13684,15 +13777,15 @@ function EqualProminence({ isInsetEnabled = false, peers, onPageChange, onPageSi
|
|
13684
13777
|
},
|
13685
13778
|
numPages: pagesWithTiles.length
|
13686
13779
|
}
|
13687
|
-
), isInsetEnabled && pageList.length > 0 && pageList[0][0].peer.id !== (localPeer == null ? void 0 : localPeer.id) && /* @__PURE__ */
|
13780
|
+
), isInsetEnabled && pageList.length > 0 && pageList[0][0].peer.id !== (localPeer == null ? void 0 : localPeer.id) && /* @__PURE__ */ import_react131.default.createElement(InsetTile, null));
|
13688
13781
|
}
|
13689
|
-
var
|
13782
|
+
var import_react131, import_react_use24, import_react_sdk70;
|
13690
13783
|
var init_EqualProminence = __esm({
|
13691
13784
|
"src/Prebuilt/components/VideoLayouts/EqualProminence.tsx"() {
|
13692
13785
|
"use strict";
|
13693
13786
|
init_define_process_env();
|
13694
|
-
|
13695
|
-
|
13787
|
+
import_react131 = __toESM(require("react"));
|
13788
|
+
import_react_use24 = require("react-use");
|
13696
13789
|
import_react_sdk70 = require("@100mslive/react-sdk");
|
13697
13790
|
init_Layout();
|
13698
13791
|
init_Theme();
|
@@ -13706,16 +13799,16 @@ var init_EqualProminence = __esm({
|
|
13706
13799
|
});
|
13707
13800
|
|
13708
13801
|
// src/Prebuilt/components/VideoLayouts/ProminenceLayout.tsx
|
13709
|
-
var
|
13802
|
+
var import_react132, Root25, ProminentSection, SecondarySection, ProminenceLayout;
|
13710
13803
|
var init_ProminenceLayout = __esm({
|
13711
13804
|
"src/Prebuilt/components/VideoLayouts/ProminenceLayout.tsx"() {
|
13712
13805
|
"use strict";
|
13713
13806
|
init_define_process_env();
|
13714
|
-
|
13807
|
+
import_react132 = __toESM(require("react"));
|
13715
13808
|
init_Layout();
|
13716
13809
|
init_VideoTile2();
|
13717
13810
|
init_useVideoTileLayout();
|
13718
|
-
Root25 = ({ children, edgeToEdge }) => /* @__PURE__ */
|
13811
|
+
Root25 = ({ children, edgeToEdge }) => /* @__PURE__ */ import_react132.default.createElement(
|
13719
13812
|
Flex,
|
13720
13813
|
{
|
13721
13814
|
direction: "column",
|
@@ -13724,7 +13817,7 @@ var init_ProminenceLayout = __esm({
|
|
13724
13817
|
children
|
13725
13818
|
);
|
13726
13819
|
ProminentSection = ({ children, css: css2 = {} }) => {
|
13727
|
-
return /* @__PURE__ */
|
13820
|
+
return /* @__PURE__ */ import_react132.default.createElement(Flex, { direction: "column", css: __spreadValues({ flex: "1 1 0", gap: "$2", minHeight: 0 }, css2) }, children);
|
13728
13821
|
};
|
13729
13822
|
SecondarySection = ({
|
13730
13823
|
tiles,
|
@@ -13735,12 +13828,12 @@ var init_ProminenceLayout = __esm({
|
|
13735
13828
|
if (!(tiles == null ? void 0 : tiles.length)) {
|
13736
13829
|
return null;
|
13737
13830
|
}
|
13738
|
-
return /* @__PURE__ */
|
13831
|
+
return /* @__PURE__ */ import_react132.default.createElement(
|
13739
13832
|
Box,
|
13740
13833
|
{
|
13741
13834
|
css: {
|
13742
13835
|
display: "grid",
|
13743
|
-
gridTemplateRows:
|
13836
|
+
gridTemplateRows: import_react132.default.Children.count(children) > 0 ? "136px auto" : "154px",
|
13744
13837
|
gridTemplateColumns: `repeat(${tiles.length}, minmax(0, 1fr))`,
|
13745
13838
|
margin: "0 auto",
|
13746
13839
|
gap: "$2 $4",
|
@@ -13750,7 +13843,7 @@ var init_ProminenceLayout = __esm({
|
|
13750
13843
|
},
|
13751
13844
|
tiles.map((tile) => {
|
13752
13845
|
var _a7, _b7, _c, _d;
|
13753
|
-
return /* @__PURE__ */
|
13846
|
+
return /* @__PURE__ */ import_react132.default.createElement(
|
13754
13847
|
VideoTile_default,
|
13755
13848
|
__spreadValues({
|
13756
13849
|
key: ((_a7 = tile.track) == null ? void 0 : _a7.id) || ((_b7 = tile.peer) == null ? void 0 : _b7.id),
|
@@ -13767,7 +13860,7 @@ var init_ProminenceLayout = __esm({
|
|
13767
13860
|
}, tileLayoutProps)
|
13768
13861
|
);
|
13769
13862
|
}),
|
13770
|
-
/* @__PURE__ */
|
13863
|
+
/* @__PURE__ */ import_react132.default.createElement(Box, { css: { gridColumn: `1/span ${tiles.length}` } }, children)
|
13771
13864
|
);
|
13772
13865
|
};
|
13773
13866
|
ProminenceLayout = {
|
@@ -13779,30 +13872,30 @@ var init_ProminenceLayout = __esm({
|
|
13779
13872
|
});
|
13780
13873
|
|
13781
13874
|
// src/Prebuilt/components/SecondaryTiles.tsx
|
13782
|
-
var
|
13875
|
+
var import_react133, import_react_use25, SecondaryTiles;
|
13783
13876
|
var init_SecondaryTiles = __esm({
|
13784
13877
|
"src/Prebuilt/components/SecondaryTiles.tsx"() {
|
13785
13878
|
"use strict";
|
13786
13879
|
init_define_process_env();
|
13787
|
-
|
13788
|
-
|
13880
|
+
import_react133 = __toESM(require("react"));
|
13881
|
+
import_react_use25 = require("react-use");
|
13789
13882
|
init_ProminenceLayout();
|
13790
13883
|
init_Theme();
|
13791
13884
|
init_Pagination2();
|
13792
13885
|
init_useTileLayout();
|
13793
13886
|
SecondaryTiles = ({ peers, onPageChange, onPageSize, edgeToEdge }) => {
|
13794
13887
|
var _a7;
|
13795
|
-
const isMobile = (0,
|
13888
|
+
const isMobile = (0, import_react_use25.useMedia)(config.media.md);
|
13796
13889
|
const maxTileCount = isMobile ? 2 : 4;
|
13797
13890
|
const pagesWithTiles = usePagesWithTiles({ peers, maxTileCount });
|
13798
|
-
const [page, setPage] = (0,
|
13891
|
+
const [page, setPage] = (0, import_react133.useState)(0);
|
13799
13892
|
const pageSize = ((_a7 = pagesWithTiles[0]) == null ? void 0 : _a7.length) || 0;
|
13800
|
-
(0,
|
13893
|
+
(0, import_react133.useEffect)(() => {
|
13801
13894
|
if (pageSize > 0) {
|
13802
13895
|
onPageSize == null ? void 0 : onPageSize(pageSize);
|
13803
13896
|
}
|
13804
13897
|
}, [pageSize, onPageSize]);
|
13805
|
-
return /* @__PURE__ */
|
13898
|
+
return /* @__PURE__ */ import_react133.default.createElement(ProminenceLayout.SecondarySection, { tiles: pagesWithTiles[page], edgeToEdge }, !edgeToEdge && /* @__PURE__ */ import_react133.default.createElement(
|
13806
13899
|
Pagination,
|
13807
13900
|
{
|
13808
13901
|
page,
|
@@ -13818,16 +13911,16 @@ var init_SecondaryTiles = __esm({
|
|
13818
13911
|
});
|
13819
13912
|
|
13820
13913
|
// src/Prebuilt/components/hooks/useRoleProminencePeers.tsx
|
13821
|
-
var
|
13914
|
+
var import_react134, useRoleProminencePeers;
|
13822
13915
|
var init_useRoleProminencePeers = __esm({
|
13823
13916
|
"src/Prebuilt/components/hooks/useRoleProminencePeers.tsx"() {
|
13824
13917
|
"use strict";
|
13825
13918
|
init_define_process_env();
|
13826
|
-
|
13919
|
+
import_react134 = require("react");
|
13827
13920
|
init_useUISettings();
|
13828
13921
|
useRoleProminencePeers = (prominentRoles, peers, isInsetEnabled) => {
|
13829
13922
|
const pinnedTrack = usePinnedTrack();
|
13830
|
-
const [prominentPeers, secondaryPeers] = (0,
|
13923
|
+
const [prominentPeers, secondaryPeers] = (0, import_react134.useMemo)(() => {
|
13831
13924
|
return peers.reduce(
|
13832
13925
|
(acc, peer) => {
|
13833
13926
|
if (pinnedTrack) {
|
@@ -13880,14 +13973,14 @@ function RoleProminence({
|
|
13880
13973
|
pageList,
|
13881
13974
|
maxTileCount
|
13882
13975
|
});
|
13883
|
-
const [page, setPage] = (0,
|
13976
|
+
const [page, setPage] = (0, import_react135.useState)(0);
|
13884
13977
|
const pageSize = ((_a7 = pagesWithTiles[0]) == null ? void 0 : _a7.length) || 0;
|
13885
|
-
(0,
|
13978
|
+
(0, import_react135.useEffect)(() => {
|
13886
13979
|
if (pageSize > 0) {
|
13887
13980
|
onPageSize == null ? void 0 : onPageSize(pageSize);
|
13888
13981
|
}
|
13889
13982
|
}, [pageSize, onPageSize]);
|
13890
|
-
return /* @__PURE__ */
|
13983
|
+
return /* @__PURE__ */ import_react135.default.createElement(ProminenceLayout.Root, null, /* @__PURE__ */ import_react135.default.createElement(ProminenceLayout.ProminentSection, null, /* @__PURE__ */ import_react135.default.createElement(Grid, { ref, tiles: pagesWithTiles[page] })), !edgeToEdge && /* @__PURE__ */ import_react135.default.createElement(
|
13891
13984
|
Pagination,
|
13892
13985
|
{
|
13893
13986
|
page,
|
@@ -13897,14 +13990,14 @@ function RoleProminence({
|
|
13897
13990
|
},
|
13898
13991
|
numPages: pagesWithTiles.length
|
13899
13992
|
}
|
13900
|
-
), /* @__PURE__ */
|
13993
|
+
), /* @__PURE__ */ import_react135.default.createElement(SecondaryTiles, { peers: secondaryPeers, isInsetEnabled, edgeToEdge }), isInsetEnabled && localPeer && !prominentPeers.includes(localPeer) && /* @__PURE__ */ import_react135.default.createElement(InsetTile, null));
|
13901
13994
|
}
|
13902
|
-
var
|
13995
|
+
var import_react135, import_react_sdk71;
|
13903
13996
|
var init_RoleProminence = __esm({
|
13904
13997
|
"src/Prebuilt/components/VideoLayouts/RoleProminence.tsx"() {
|
13905
13998
|
"use strict";
|
13906
13999
|
init_define_process_env();
|
13907
|
-
|
14000
|
+
import_react135 = __toESM(require("react"));
|
13908
14001
|
import_react_sdk71 = require("@100mslive/react-sdk");
|
13909
14002
|
init_InsetTile();
|
13910
14003
|
init_Pagination2();
|
@@ -13917,12 +14010,12 @@ var init_RoleProminence = __esm({
|
|
13917
14010
|
});
|
13918
14011
|
|
13919
14012
|
// src/Prebuilt/components/ScreenshareDisplay.jsx
|
13920
|
-
var
|
14013
|
+
var import_react136, import_react_sdk72, import_react_icons59, ScreenshareDisplay;
|
13921
14014
|
var init_ScreenshareDisplay = __esm({
|
13922
14015
|
"src/Prebuilt/components/ScreenshareDisplay.jsx"() {
|
13923
14016
|
"use strict";
|
13924
14017
|
init_define_process_env();
|
13925
|
-
|
14018
|
+
import_react136 = __toESM(require("react"));
|
13926
14019
|
import_react_sdk72 = require("@100mslive/react-sdk");
|
13927
14020
|
import_react_icons59 = require("@100mslive/react-icons");
|
13928
14021
|
init_Button2();
|
@@ -13930,7 +14023,7 @@ var init_ScreenshareDisplay = __esm({
|
|
13930
14023
|
init_Text2();
|
13931
14024
|
ScreenshareDisplay = () => {
|
13932
14025
|
const hmsActions = (0, import_react_sdk72.useHMSActions)();
|
13933
|
-
return /* @__PURE__ */
|
14026
|
+
return /* @__PURE__ */ import_react136.default.createElement(
|
13934
14027
|
Flex,
|
13935
14028
|
{
|
13936
14029
|
direction: "column",
|
@@ -13942,9 +14035,9 @@ var init_ScreenshareDisplay = __esm({
|
|
13942
14035
|
color: "$on_surface_high"
|
13943
14036
|
}
|
13944
14037
|
},
|
13945
|
-
/* @__PURE__ */
|
13946
|
-
/* @__PURE__ */
|
13947
|
-
/* @__PURE__ */
|
14038
|
+
/* @__PURE__ */ import_react136.default.createElement(import_react_icons59.ShareScreenIcon, { width: 48, height: 48 }),
|
14039
|
+
/* @__PURE__ */ import_react136.default.createElement(Text, { variant: "h5", css: { m: "$8 0" } }, "You are sharing your screen"),
|
14040
|
+
/* @__PURE__ */ import_react136.default.createElement(
|
13948
14041
|
Button,
|
13949
14042
|
{
|
13950
14043
|
variant: "danger",
|
@@ -13954,7 +14047,7 @@ var init_ScreenshareDisplay = __esm({
|
|
13954
14047
|
}),
|
13955
14048
|
"data-testid": "stop_screen_share_btn"
|
13956
14049
|
},
|
13957
|
-
/* @__PURE__ */
|
14050
|
+
/* @__PURE__ */ import_react136.default.createElement(import_react_icons59.CrossIcon, { width: 18, height: 18 }),
|
13958
14051
|
"\xA0 Stop screen share"
|
13959
14052
|
)
|
13960
14053
|
);
|
@@ -13963,13 +14056,13 @@ var init_ScreenshareDisplay = __esm({
|
|
13963
14056
|
});
|
13964
14057
|
|
13965
14058
|
// src/Prebuilt/components/ScreenshareTile.jsx
|
13966
|
-
var
|
14059
|
+
var import_react137, import_react_use26, import_screenfull2, import_react_sdk73, import_react_icons60, labelStyles, Tile2, ScreenshareTile, ScreenshareTile_default;
|
13967
14060
|
var init_ScreenshareTile = __esm({
|
13968
14061
|
"src/Prebuilt/components/ScreenshareTile.jsx"() {
|
13969
14062
|
"use strict";
|
13970
14063
|
init_define_process_env();
|
13971
|
-
|
13972
|
-
|
14064
|
+
import_react137 = __toESM(require("react"));
|
14065
|
+
import_react_use26 = require("react-use");
|
13973
14066
|
import_screenfull2 = __toESM(require("screenfull"));
|
13974
14067
|
import_react_sdk73 = require("@100mslive/react-sdk");
|
13975
14068
|
import_react_icons60 = require("@100mslive/react-icons");
|
@@ -13994,17 +14087,17 @@ var init_ScreenshareTile = __esm({
|
|
13994
14087
|
const track = (0, import_react_sdk73.useHMSStore)((0, import_react_sdk73.selectScreenShareByPeerID)(peerId));
|
13995
14088
|
const peer = (0, import_react_sdk73.useHMSStore)((0, import_react_sdk73.selectPeerByID)(peerId));
|
13996
14089
|
const isAudioOnly = useUISettings(UI_SETTINGS.isAudioOnly);
|
13997
|
-
const [isMouseHovered, setIsMouseHovered] = (0,
|
14090
|
+
const [isMouseHovered, setIsMouseHovered] = (0, import_react137.useState)(false);
|
13998
14091
|
const showStatsOnTiles = useUISettings(UI_SETTINGS.showStatsOnTiles);
|
13999
|
-
const fullscreenRef = (0,
|
14000
|
-
const [fullscreen, setFullscreen] = (0,
|
14001
|
-
const isFullscreen = (0,
|
14092
|
+
const fullscreenRef = (0, import_react137.useRef)(null);
|
14093
|
+
const [fullscreen, setFullscreen] = (0, import_react137.useState)(false);
|
14094
|
+
const isFullscreen = (0, import_react_use26.useFullscreen)(fullscreenRef, fullscreen, {
|
14002
14095
|
onClose: () => setFullscreen(false)
|
14003
14096
|
});
|
14004
14097
|
const isFullScreenSupported = import_screenfull2.default.isEnabled;
|
14005
14098
|
const audioTrack = (0, import_react_sdk73.useHMSStore)((0, import_react_sdk73.selectScreenShareAudioByPeerID)(peer == null ? void 0 : peer.id));
|
14006
14099
|
if (isLocal && !["browser", "window", "application"].includes(track == null ? void 0 : track.displaySurface)) {
|
14007
|
-
return /* @__PURE__ */
|
14100
|
+
return /* @__PURE__ */ import_react137.default.createElement(ScreenshareDisplay, null);
|
14008
14101
|
}
|
14009
14102
|
if (!peer) {
|
14010
14103
|
return null;
|
@@ -14014,7 +14107,7 @@ var init_ScreenshareTile = __esm({
|
|
14014
14107
|
isLocal: false,
|
14015
14108
|
track
|
14016
14109
|
});
|
14017
|
-
return /* @__PURE__ */
|
14110
|
+
return /* @__PURE__ */ import_react137.default.createElement(StyledVideoTile.Root, { css: { width, height, p: 0, minHeight: 0 }, "data-testid": "screenshare_tile" }, /* @__PURE__ */ import_react137.default.createElement(
|
14018
14111
|
StyledVideoTile.Container,
|
14019
14112
|
{
|
14020
14113
|
transparentBg: true,
|
@@ -14025,9 +14118,9 @@ var init_ScreenshareTile = __esm({
|
|
14025
14118
|
setIsMouseHovered(false);
|
14026
14119
|
}
|
14027
14120
|
},
|
14028
|
-
showStatsOnTiles ? /* @__PURE__ */
|
14029
|
-
isFullScreenSupported && isMouseHovered ? /* @__PURE__ */
|
14030
|
-
track ? /* @__PURE__ */
|
14121
|
+
showStatsOnTiles ? /* @__PURE__ */ import_react137.default.createElement(VideoTileStats, { audioTrackID: audioTrack == null ? void 0 : audioTrack.id, videoTrackID: track == null ? void 0 : track.id, peerID: peerId, isLocal }) : null,
|
14122
|
+
isFullScreenSupported && isMouseHovered ? /* @__PURE__ */ import_react137.default.createElement(StyledVideoTile.FullScreenButton, { onClick: () => setFullscreen(!fullscreen) }, isFullscreen ? /* @__PURE__ */ import_react137.default.createElement(import_react_icons60.ShrinkIcon, null) : /* @__PURE__ */ import_react137.default.createElement(import_react_icons60.ExpandIcon, null)) : null,
|
14123
|
+
track ? /* @__PURE__ */ import_react137.default.createElement(
|
14031
14124
|
Video,
|
14032
14125
|
{
|
14033
14126
|
screenShare: true,
|
@@ -14037,8 +14130,8 @@ var init_ScreenshareTile = __esm({
|
|
14037
14130
|
css: { minHeight: 0 }
|
14038
14131
|
}
|
14039
14132
|
) : null,
|
14040
|
-
/* @__PURE__ */
|
14041
|
-
isMouseHovered && !peer.isLocal ? /* @__PURE__ */
|
14133
|
+
/* @__PURE__ */ import_react137.default.createElement(StyledVideoTile.Info, { css: labelStyles }, label),
|
14134
|
+
isMouseHovered && !peer.isLocal ? /* @__PURE__ */ import_react137.default.createElement(
|
14042
14135
|
TileMenu_default,
|
14043
14136
|
{
|
14044
14137
|
isScreenshare: true,
|
@@ -14050,19 +14143,19 @@ var init_ScreenshareTile = __esm({
|
|
14050
14143
|
) : null
|
14051
14144
|
));
|
14052
14145
|
};
|
14053
|
-
ScreenshareTile =
|
14146
|
+
ScreenshareTile = import_react137.default.memo(Tile2);
|
14054
14147
|
ScreenshareTile_default = ScreenshareTile;
|
14055
14148
|
}
|
14056
14149
|
});
|
14057
14150
|
|
14058
14151
|
// src/Prebuilt/components/VideoLayouts/ScreenshareLayout.tsx
|
14059
|
-
var
|
14152
|
+
var import_react138, import_react_use27, import_react_sdk74, ScreenshareLayout;
|
14060
14153
|
var init_ScreenshareLayout = __esm({
|
14061
14154
|
"src/Prebuilt/components/VideoLayouts/ScreenshareLayout.tsx"() {
|
14062
14155
|
"use strict";
|
14063
14156
|
init_define_process_env();
|
14064
|
-
|
14065
|
-
|
14157
|
+
import_react138 = __toESM(require("react"));
|
14158
|
+
import_react_use27 = require("react-use");
|
14066
14159
|
import_react_sdk74 = require("@100mslive/react-sdk");
|
14067
14160
|
init_Theme();
|
14068
14161
|
init_Pagination2();
|
@@ -14075,20 +14168,20 @@ var init_ScreenshareLayout = __esm({
|
|
14075
14168
|
var _a7;
|
14076
14169
|
const peersSharing = (0, import_react_sdk74.useHMSStore)(import_react_sdk74.selectPeersScreenSharing);
|
14077
14170
|
const [, setActiveScreenSharePeer] = useSetAppDataByKey(APP_DATA.activeScreensharePeerId);
|
14078
|
-
const [page, setPage] = (0,
|
14171
|
+
const [page, setPage] = (0, import_react138.useState)(0);
|
14079
14172
|
const activeSharePeer = peersSharing[page];
|
14080
|
-
const isMobile = (0,
|
14081
|
-
const secondaryPeers = (0,
|
14173
|
+
const isMobile = (0, import_react_use27.useMedia)(config.media.md);
|
14174
|
+
const secondaryPeers = (0, import_react138.useMemo)(
|
14082
14175
|
() => isMobile ? activeSharePeer ? [activeSharePeer, ...peers.filter((p) => p.id !== (activeSharePeer == null ? void 0 : activeSharePeer.id))] : peers : peers.filter((p) => p.id !== (activeSharePeer == null ? void 0 : activeSharePeer.id)),
|
14083
14176
|
[activeSharePeer, peers, isMobile]
|
14084
14177
|
);
|
14085
|
-
(0,
|
14178
|
+
(0, import_react138.useEffect)(() => {
|
14086
14179
|
setActiveScreenSharePeer(isMobile ? "" : activeSharePeer == null ? void 0 : activeSharePeer.id);
|
14087
14180
|
return () => {
|
14088
14181
|
setActiveScreenSharePeer("");
|
14089
14182
|
};
|
14090
14183
|
}, [activeSharePeer == null ? void 0 : activeSharePeer.id, isMobile, setActiveScreenSharePeer]);
|
14091
|
-
return /* @__PURE__ */
|
14184
|
+
return /* @__PURE__ */ import_react138.default.createElement(ProminenceLayout.Root, { edgeToEdge }, /* @__PURE__ */ import_react138.default.createElement(ProminenceLayout.ProminentSection, null, /* @__PURE__ */ import_react138.default.createElement(ScreenshareTile_default, { peerId: (_a7 = peersSharing[page]) == null ? void 0 : _a7.id }), !edgeToEdge && /* @__PURE__ */ import_react138.default.createElement(Pagination, { page, onPageChange: setPage, numPages: peersSharing.length })), /* @__PURE__ */ import_react138.default.createElement(
|
14092
14185
|
SecondaryTiles,
|
14093
14186
|
{
|
14094
14187
|
peers: secondaryPeers,
|
@@ -14191,12 +14284,12 @@ var init_PeersSorter = __esm({
|
|
14191
14284
|
});
|
14192
14285
|
|
14193
14286
|
// src/Prebuilt/components/VideoLayouts/GridLayout.tsx
|
14194
|
-
var
|
14287
|
+
var import_react139, import_react_sdk76, GridLayout;
|
14195
14288
|
var init_GridLayout = __esm({
|
14196
14289
|
"src/Prebuilt/components/VideoLayouts/GridLayout.tsx"() {
|
14197
14290
|
"use strict";
|
14198
14291
|
init_define_process_env();
|
14199
|
-
|
14292
|
+
import_react139 = __toESM(require("react"));
|
14200
14293
|
import_react_sdk76 = require("@100mslive/react-sdk");
|
14201
14294
|
init_EqualProminence();
|
14202
14295
|
init_RoleProminence();
|
@@ -14221,17 +14314,17 @@ var init_GridLayout = __esm({
|
|
14221
14314
|
const isRoleProminence = prominentRoles.length && peers.some(
|
14222
14315
|
(peer) => peer.roleName && prominentRoles.includes(peer.roleName) && (peer.videoTrack || peer.audioTrack)
|
14223
14316
|
) || pinnedTrack;
|
14224
|
-
const updatedPeers = (0,
|
14317
|
+
const updatedPeers = (0, import_react139.useMemo)(() => {
|
14225
14318
|
if (isInsetEnabled && !isRoleProminence && !peerSharing) {
|
14226
14319
|
return peers.filter((peer) => !peer.isLocal);
|
14227
14320
|
}
|
14228
14321
|
return peers;
|
14229
14322
|
}, [isInsetEnabled, isRoleProminence, peerSharing, peers]);
|
14230
14323
|
const vanillaStore = (0, import_react_sdk76.useHMSVanillaStore)();
|
14231
|
-
const [sortedPeers, setSortedPeers] = (0,
|
14232
|
-
const peersSorter = (0,
|
14233
|
-
const [pageSize, setPageSize] = (0,
|
14234
|
-
const [mainPage, setMainPage] = (0,
|
14324
|
+
const [sortedPeers, setSortedPeers] = (0, import_react139.useState)(updatedPeers);
|
14325
|
+
const peersSorter = (0, import_react139.useMemo)(() => new PeersSorter_default(vanillaStore), [vanillaStore]);
|
14326
|
+
const [pageSize, setPageSize] = (0, import_react139.useState)(0);
|
14327
|
+
const [mainPage, setMainPage] = (0, import_react139.useState)(0);
|
14235
14328
|
const tileLayout = {
|
14236
14329
|
enableSpotlightingPeer: enable_spotlighting_peer,
|
14237
14330
|
hideParticipantNameOnTile: hide_participant_name_on_tile,
|
@@ -14240,7 +14333,7 @@ var init_GridLayout = __esm({
|
|
14240
14333
|
hideMetadataOnTile: hide_metadata_on_tile,
|
14241
14334
|
objectFit: video_object_fit
|
14242
14335
|
};
|
14243
|
-
(0,
|
14336
|
+
(0, import_react139.useEffect)(() => {
|
14244
14337
|
if (mainPage !== 0) {
|
14245
14338
|
return;
|
14246
14339
|
}
|
@@ -14251,7 +14344,7 @@ var init_GridLayout = __esm({
|
|
14251
14344
|
peersSorter.onUpdate(setSortedPeers);
|
14252
14345
|
}, [mainPage, peersSorter, updatedPeers, pageSize]);
|
14253
14346
|
if (peerSharing) {
|
14254
|
-
return /* @__PURE__ */
|
14347
|
+
return /* @__PURE__ */ import_react139.default.createElement(VideoTileContext.Provider, { value: tileLayout }, /* @__PURE__ */ import_react139.default.createElement(
|
14255
14348
|
ScreenshareLayout,
|
14256
14349
|
{
|
14257
14350
|
peers: sortedPeers,
|
@@ -14261,7 +14354,7 @@ var init_GridLayout = __esm({
|
|
14261
14354
|
}
|
14262
14355
|
));
|
14263
14356
|
} else if (isRoleProminence) {
|
14264
|
-
return /* @__PURE__ */
|
14357
|
+
return /* @__PURE__ */ import_react139.default.createElement(VideoTileContext.Provider, { value: tileLayout }, /* @__PURE__ */ import_react139.default.createElement(
|
14265
14358
|
RoleProminence,
|
14266
14359
|
{
|
14267
14360
|
peers: sortedPeers,
|
@@ -14273,7 +14366,7 @@ var init_GridLayout = __esm({
|
|
14273
14366
|
}
|
14274
14367
|
));
|
14275
14368
|
}
|
14276
|
-
return /* @__PURE__ */
|
14369
|
+
return /* @__PURE__ */ import_react139.default.createElement(VideoTileContext.Provider, { value: tileLayout }, /* @__PURE__ */ import_react139.default.createElement(
|
14277
14370
|
EqualProminence,
|
14278
14371
|
{
|
14279
14372
|
peers: sortedPeers,
|
@@ -14288,12 +14381,12 @@ var init_GridLayout = __esm({
|
|
14288
14381
|
});
|
14289
14382
|
|
14290
14383
|
// src/Prebuilt/layouts/EmbedView.jsx
|
14291
|
-
var
|
14384
|
+
var import_react140, import_react_sdk77, EmbedView, EmbebScreenShareView, EmbedComponent;
|
14292
14385
|
var init_EmbedView = __esm({
|
14293
14386
|
"src/Prebuilt/layouts/EmbedView.jsx"() {
|
14294
14387
|
"use strict";
|
14295
14388
|
init_define_process_env();
|
14296
|
-
|
14389
|
+
import_react140 = __toESM(require("react"));
|
14297
14390
|
import_react_sdk77 = require("@100mslive/react-sdk");
|
14298
14391
|
init_SecondaryTiles();
|
14299
14392
|
init_ProminenceLayout();
|
@@ -14301,37 +14394,37 @@ var init_EmbedView = __esm({
|
|
14301
14394
|
init_useUISettings();
|
14302
14395
|
init_constants();
|
14303
14396
|
EmbedView = () => {
|
14304
|
-
return /* @__PURE__ */
|
14397
|
+
return /* @__PURE__ */ import_react140.default.createElement(EmbebScreenShareView, null, /* @__PURE__ */ import_react140.default.createElement(EmbedComponent, null));
|
14305
14398
|
};
|
14306
14399
|
EmbebScreenShareView = ({ children }) => {
|
14307
14400
|
const peers = (0, import_react_sdk77.useHMSStore)(import_react_sdk77.selectPeers);
|
14308
14401
|
const peerPresenting = (0, import_react_sdk77.useHMSStore)(import_react_sdk77.selectPeerScreenSharing);
|
14309
14402
|
const [, setActiveScreenSharePeer] = useSetAppDataByKey(APP_DATA.activeScreensharePeerId);
|
14310
|
-
const smallTilePeers = (0,
|
14403
|
+
const smallTilePeers = (0, import_react140.useMemo)(() => {
|
14311
14404
|
const smallTilePeers2 = peers.filter((peer) => peer.id !== (peerPresenting == null ? void 0 : peerPresenting.id));
|
14312
14405
|
return smallTilePeers2;
|
14313
14406
|
}, [peers, peerPresenting]);
|
14314
|
-
(0,
|
14407
|
+
(0, import_react140.useEffect)(() => {
|
14315
14408
|
setActiveScreenSharePeer(peerPresenting == null ? void 0 : peerPresenting.id);
|
14316
14409
|
return () => {
|
14317
14410
|
setActiveScreenSharePeer("");
|
14318
14411
|
};
|
14319
14412
|
}, [peerPresenting == null ? void 0 : peerPresenting.id, setActiveScreenSharePeer]);
|
14320
|
-
return /* @__PURE__ */
|
14413
|
+
return /* @__PURE__ */ import_react140.default.createElement(ProminenceLayout.Root, null, /* @__PURE__ */ import_react140.default.createElement(ProminenceLayout.ProminentSection, null, children), /* @__PURE__ */ import_react140.default.createElement(SecondaryTiles, { peers: smallTilePeers }));
|
14321
14414
|
};
|
14322
14415
|
EmbedComponent = () => {
|
14323
14416
|
const { amIScreenSharing, toggleScreenShare } = (0, import_react_sdk77.useScreenShare)(import_react_sdk77.throwErrorHandler);
|
14324
14417
|
const [embedConfig, setEmbedConfig] = useSetAppDataByKey(APP_DATA.embedConfig);
|
14325
|
-
const [wasScreenShared, setWasScreenShared] = (0,
|
14326
|
-
const screenShareAttemptInProgress = (0,
|
14418
|
+
const [wasScreenShared, setWasScreenShared] = (0, import_react140.useState)(false);
|
14419
|
+
const screenShareAttemptInProgress = (0, import_react140.useRef)(false);
|
14327
14420
|
const src = embedConfig.url;
|
14328
|
-
const iframeRef = (0,
|
14329
|
-
const resetEmbedConfig = (0,
|
14421
|
+
const iframeRef = (0, import_react140.useRef)();
|
14422
|
+
const resetEmbedConfig = (0, import_react140.useCallback)(() => {
|
14330
14423
|
if (src) {
|
14331
14424
|
setEmbedConfig({ url: "" });
|
14332
14425
|
}
|
14333
14426
|
}, [src, setEmbedConfig]);
|
14334
|
-
(0,
|
14427
|
+
(0, import_react140.useEffect)(() => {
|
14335
14428
|
if (embedConfig.shareScreen && !amIScreenSharing && !wasScreenShared && !screenShareAttemptInProgress.current) {
|
14336
14429
|
screenShareAttemptInProgress.current = true;
|
14337
14430
|
toggleScreenShare({
|
@@ -14344,7 +14437,7 @@ var init_EmbedView = __esm({
|
|
14344
14437
|
});
|
14345
14438
|
}
|
14346
14439
|
}, []);
|
14347
|
-
(0,
|
14440
|
+
(0, import_react140.useEffect)(() => {
|
14348
14441
|
if (wasScreenShared && !amIScreenSharing) {
|
14349
14442
|
resetEmbedConfig();
|
14350
14443
|
}
|
@@ -14355,7 +14448,7 @@ var init_EmbedView = __esm({
|
|
14355
14448
|
}
|
14356
14449
|
};
|
14357
14450
|
}, [wasScreenShared, amIScreenSharing, resetEmbedConfig, toggleScreenShare]);
|
14358
|
-
return /* @__PURE__ */
|
14451
|
+
return /* @__PURE__ */ import_react140.default.createElement(Box, { ref: iframeRef, css: { size: "100%" } }, /* @__PURE__ */ import_react140.default.createElement(
|
14359
14452
|
"iframe",
|
14360
14453
|
{
|
14361
14454
|
src,
|
@@ -14370,12 +14463,12 @@ var init_EmbedView = __esm({
|
|
14370
14463
|
});
|
14371
14464
|
|
14372
14465
|
// src/Prebuilt/layouts/PDFView.jsx
|
14373
|
-
var
|
14466
|
+
var import_react141, import_react_sdk78, PDFView, PDFEmbedComponent;
|
14374
14467
|
var init_PDFView = __esm({
|
14375
14468
|
"src/Prebuilt/layouts/PDFView.jsx"() {
|
14376
14469
|
"use strict";
|
14377
14470
|
init_define_process_env();
|
14378
|
-
|
14471
|
+
import_react141 = __toESM(require("react"));
|
14379
14472
|
import_react_sdk78 = require("@100mslive/react-sdk");
|
14380
14473
|
init_Layout();
|
14381
14474
|
init_Theme();
|
@@ -14383,25 +14476,25 @@ var init_PDFView = __esm({
|
|
14383
14476
|
init_useUISettings();
|
14384
14477
|
init_constants();
|
14385
14478
|
PDFView = () => {
|
14386
|
-
return /* @__PURE__ */
|
14479
|
+
return /* @__PURE__ */ import_react141.default.createElement(EmbebScreenShareView, null, /* @__PURE__ */ import_react141.default.createElement(PDFEmbedComponent, null));
|
14387
14480
|
};
|
14388
14481
|
PDFEmbedComponent = () => {
|
14389
|
-
const ref = (0,
|
14482
|
+
const ref = (0, import_react141.useRef)();
|
14390
14483
|
const themeType = useTheme().themeType;
|
14391
|
-
const [isPDFLoaded, setIsPDFLoaded] = (0,
|
14484
|
+
const [isPDFLoaded, setIsPDFLoaded] = (0, import_react141.useState)(false);
|
14392
14485
|
let pdfJSURL = define_process_env_default.REACT_APP_PDFJS_IFRAME_URL;
|
14393
14486
|
const { amIScreenSharing, toggleScreenShare } = (0, import_react_sdk78.useScreenShare)(import_react_sdk78.throwErrorHandler);
|
14394
14487
|
const [pdfConfig, setPDFConfig] = useSetAppDataByKey(APP_DATA.pdfConfig);
|
14395
14488
|
if (pdfConfig.url && !pdfConfig.file) {
|
14396
14489
|
pdfJSURL = pdfJSURL + "?file=" + encodeURIComponent(pdfConfig.url);
|
14397
14490
|
}
|
14398
|
-
const [wasScreenShared, setWasScreenShared] = (0,
|
14399
|
-
const screenShareAttemptInProgress = (0,
|
14400
|
-
const iframeRef = (0,
|
14401
|
-
const resetEmbedConfig = (0,
|
14491
|
+
const [wasScreenShared, setWasScreenShared] = (0, import_react141.useState)(false);
|
14492
|
+
const screenShareAttemptInProgress = (0, import_react141.useRef)(false);
|
14493
|
+
const iframeRef = (0, import_react141.useRef)();
|
14494
|
+
const resetEmbedConfig = (0, import_react141.useCallback)(() => {
|
14402
14495
|
setPDFConfig({ state: false });
|
14403
14496
|
}, [setPDFConfig]);
|
14404
|
-
(0,
|
14497
|
+
(0, import_react141.useEffect)(() => {
|
14405
14498
|
if (isPDFLoaded && ref.current) {
|
14406
14499
|
ref.current.contentWindow.postMessage(
|
14407
14500
|
{
|
@@ -14411,7 +14504,7 @@ var init_PDFView = __esm({
|
|
14411
14504
|
);
|
14412
14505
|
}
|
14413
14506
|
}, [isPDFLoaded, themeType]);
|
14414
|
-
(0,
|
14507
|
+
(0, import_react141.useEffect)(() => {
|
14415
14508
|
if (!amIScreenSharing && !wasScreenShared && !screenShareAttemptInProgress.current) {
|
14416
14509
|
screenShareAttemptInProgress.current = true;
|
14417
14510
|
toggleScreenShare({
|
@@ -14425,7 +14518,7 @@ var init_PDFView = __esm({
|
|
14425
14518
|
});
|
14426
14519
|
}
|
14427
14520
|
}, []);
|
14428
|
-
(0,
|
14521
|
+
(0, import_react141.useEffect)(() => {
|
14429
14522
|
if (wasScreenShared && !amIScreenSharing) {
|
14430
14523
|
resetEmbedConfig();
|
14431
14524
|
}
|
@@ -14436,7 +14529,7 @@ var init_PDFView = __esm({
|
|
14436
14529
|
}
|
14437
14530
|
};
|
14438
14531
|
}, [wasScreenShared, amIScreenSharing, resetEmbedConfig, toggleScreenShare]);
|
14439
|
-
return /* @__PURE__ */
|
14532
|
+
return /* @__PURE__ */ import_react141.default.createElement(Box, { ref: iframeRef, css: { size: "100%" } }, /* @__PURE__ */ import_react141.default.createElement(
|
14440
14533
|
"iframe",
|
14441
14534
|
{
|
14442
14535
|
src: pdfJSURL,
|
@@ -14479,12 +14572,12 @@ var init_empty_chat = __esm({
|
|
14479
14572
|
});
|
14480
14573
|
|
14481
14574
|
// src/Prebuilt/components/hooks/useSetPinnedMessage.js
|
14482
|
-
var
|
14575
|
+
var import_react142, import_react_sdk79, useSetPinnedMessage;
|
14483
14576
|
var init_useSetPinnedMessage = __esm({
|
14484
14577
|
"src/Prebuilt/components/hooks/useSetPinnedMessage.js"() {
|
14485
14578
|
"use strict";
|
14486
14579
|
init_define_process_env();
|
14487
|
-
|
14580
|
+
import_react142 = require("react");
|
14488
14581
|
import_react_sdk79 = require("@100mslive/react-sdk");
|
14489
14582
|
init_ToastManager();
|
14490
14583
|
init_constants();
|
@@ -14492,7 +14585,7 @@ var init_useSetPinnedMessage = __esm({
|
|
14492
14585
|
const hmsActions = (0, import_react_sdk79.useHMSActions)();
|
14493
14586
|
const vanillaStore = (0, import_react_sdk79.useHMSVanillaStore)();
|
14494
14587
|
const pinnedMessage = (0, import_react_sdk79.useHMSStore)(import_react_sdk79.selectSessionMetadata);
|
14495
|
-
const setPinnedMessage = (0,
|
14588
|
+
const setPinnedMessage = (0, import_react142.useCallback)(
|
14496
14589
|
/**
|
14497
14590
|
* @param {import("@100mslive/react-sdk").HMSMessage | undefined} message
|
14498
14591
|
*/
|
@@ -14510,18 +14603,33 @@ var init_useSetPinnedMessage = __esm({
|
|
14510
14603
|
}
|
14511
14604
|
});
|
14512
14605
|
|
14606
|
+
// src/Prebuilt/components/Chat/useUnreadCount.js
|
14607
|
+
var import_react_sdk80, useUnreadCount;
|
14608
|
+
var init_useUnreadCount = __esm({
|
14609
|
+
"src/Prebuilt/components/Chat/useUnreadCount.js"() {
|
14610
|
+
"use strict";
|
14611
|
+
init_define_process_env();
|
14612
|
+
import_react_sdk80 = require("@100mslive/react-sdk");
|
14613
|
+
useUnreadCount = ({ role, peerId }) => {
|
14614
|
+
const unreadCountSelector = role ? (0, import_react_sdk80.selectMessagesUnreadCountByRole)(role) : peerId ? (0, import_react_sdk80.selectMessagesUnreadCountByPeerID)(peerId) : import_react_sdk80.selectUnreadHMSMessagesCount;
|
14615
|
+
const unreadCount = (0, import_react_sdk80.useHMSStore)(unreadCountSelector);
|
14616
|
+
return unreadCount;
|
14617
|
+
};
|
14618
|
+
}
|
14619
|
+
});
|
14620
|
+
|
14513
14621
|
// src/Prebuilt/components/Chat/ChatBody.jsx
|
14514
|
-
var
|
14622
|
+
var import_react143, import_react_intersection_observer, import_react_use28, import_react_virtualized_auto_sizer, import_react_window2, import_react_sdk81, import_react_icons61, formatTime2, MessageTypeContainer, MessageType, URL_REGEX, Link3, AnnotisedMessage, getMessageType, ChatActions, SenderName, ChatMessage, ChatList, VirtualizedChatMessages, ChatBody;
|
14515
14623
|
var init_ChatBody = __esm({
|
14516
14624
|
"src/Prebuilt/components/Chat/ChatBody.jsx"() {
|
14517
14625
|
"use strict";
|
14518
14626
|
init_define_process_env();
|
14519
|
-
|
14627
|
+
import_react143 = __toESM(require("react"));
|
14520
14628
|
import_react_intersection_observer = require("react-intersection-observer");
|
14521
|
-
|
14629
|
+
import_react_use28 = require("react-use");
|
14522
14630
|
import_react_virtualized_auto_sizer = __toESM(require("react-virtualized-auto-sizer"));
|
14523
14631
|
import_react_window2 = require("react-window");
|
14524
|
-
|
14632
|
+
import_react_sdk81 = require("@100mslive/react-sdk");
|
14525
14633
|
import_react_icons61 = require("@100mslive/react-icons");
|
14526
14634
|
init_Dropdown2();
|
14527
14635
|
init_IconButton2();
|
@@ -14532,6 +14640,7 @@ var init_ChatBody = __esm({
|
|
14532
14640
|
init_empty_chat();
|
14533
14641
|
init_useRoomLayoutScreen();
|
14534
14642
|
init_useSetPinnedMessage();
|
14643
|
+
init_useUnreadCount();
|
14535
14644
|
formatTime2 = (date) => {
|
14536
14645
|
if (!(date instanceof Date)) {
|
14537
14646
|
return "";
|
@@ -14548,7 +14657,7 @@ var init_ChatBody = __esm({
|
|
14548
14657
|
return `${hours}:${mins} ${suffix}`;
|
14549
14658
|
};
|
14550
14659
|
MessageTypeContainer = ({ left, right }) => {
|
14551
|
-
return /* @__PURE__ */
|
14660
|
+
return /* @__PURE__ */ import_react143.default.createElement(
|
14552
14661
|
Flex,
|
14553
14662
|
{
|
14554
14663
|
align: "center",
|
@@ -14560,16 +14669,16 @@ var init_ChatBody = __esm({
|
|
14560
14669
|
r: "$0"
|
14561
14670
|
}
|
14562
14671
|
},
|
14563
|
-
left && /* @__PURE__ */
|
14564
|
-
left && right && /* @__PURE__ */
|
14565
|
-
right && /* @__PURE__ */
|
14672
|
+
left && /* @__PURE__ */ import_react143.default.createElement(SenderName, { variant: "tiny", as: "span", css: { color: "$on_surface_medium" } }, left),
|
14673
|
+
left && right && /* @__PURE__ */ import_react143.default.createElement(Box, { css: { borderLeft: "1px solid $border_bright", mx: "$4", h: "$8" } }),
|
14674
|
+
right && /* @__PURE__ */ import_react143.default.createElement(SenderName, { as: "span", variant: "tiny", css: { textTransform: "uppercase" } }, right)
|
14566
14675
|
);
|
14567
14676
|
};
|
14568
14677
|
MessageType = ({ roles, hasCurrentUserSent, receiver }) => {
|
14569
|
-
const peerName = (0,
|
14570
|
-
const localPeerRoleName = (0,
|
14678
|
+
const peerName = (0, import_react_sdk81.useHMSStore)((0, import_react_sdk81.selectPeerNameByID)(receiver));
|
14679
|
+
const localPeerRoleName = (0, import_react_sdk81.useHMSStore)(import_react_sdk81.selectLocalPeerRoleName);
|
14571
14680
|
if (receiver) {
|
14572
|
-
return /* @__PURE__ */
|
14681
|
+
return /* @__PURE__ */ import_react143.default.createElement(
|
14573
14682
|
MessageTypeContainer,
|
14574
14683
|
{
|
14575
14684
|
left: hasCurrentUserSent ? `${peerName ? `TO ${peerName}` : ""}` : "TO YOU",
|
@@ -14578,7 +14687,7 @@ var init_ChatBody = __esm({
|
|
14578
14687
|
);
|
14579
14688
|
}
|
14580
14689
|
if (roles && roles.length) {
|
14581
|
-
return /* @__PURE__ */
|
14690
|
+
return /* @__PURE__ */ import_react143.default.createElement(MessageTypeContainer, { left: "TO", right: hasCurrentUserSent ? roles.join(",") : localPeerRoleName });
|
14582
14691
|
}
|
14583
14692
|
return null;
|
14584
14693
|
};
|
@@ -14592,10 +14701,10 @@ var init_ChatBody = __esm({
|
|
14592
14701
|
});
|
14593
14702
|
AnnotisedMessage = ({ message }) => {
|
14594
14703
|
if (!message) {
|
14595
|
-
return /* @__PURE__ */
|
14704
|
+
return /* @__PURE__ */ import_react143.default.createElement(import_react143.Fragment, null);
|
14596
14705
|
}
|
14597
|
-
return /* @__PURE__ */
|
14598
|
-
(part) => URL_REGEX.test(part) ? /* @__PURE__ */
|
14706
|
+
return /* @__PURE__ */ import_react143.default.createElement(import_react143.Fragment, null, message.trim().split(/(\s)/).map(
|
14707
|
+
(part) => URL_REGEX.test(part) ? /* @__PURE__ */ import_react143.default.createElement(Link3, { href: part, key: part, target: "_blank", rel: "noopener noreferrer" }, part) : part
|
14599
14708
|
));
|
14600
14709
|
};
|
14601
14710
|
getMessageType = ({ roles, receiver }) => {
|
@@ -14605,18 +14714,18 @@ var init_ChatBody = __esm({
|
|
14605
14714
|
return receiver ? "private" : "";
|
14606
14715
|
};
|
14607
14716
|
ChatActions = ({ onPin, showPinAction }) => {
|
14608
|
-
const [open, setOpen] = (0,
|
14717
|
+
const [open, setOpen] = (0, import_react143.useState)(false);
|
14609
14718
|
if (!showPinAction) {
|
14610
14719
|
return null;
|
14611
14720
|
}
|
14612
|
-
return /* @__PURE__ */
|
14721
|
+
return /* @__PURE__ */ import_react143.default.createElement(Dropdown.Root, { open, onOpenChange: setOpen }, /* @__PURE__ */ import_react143.default.createElement(Dropdown.Trigger, { className: "chat_actions", css: { opacity: open ? 1 : 0, "@md": { opacity: 1 } }, asChild: true }, /* @__PURE__ */ import_react143.default.createElement(IconButton, null, /* @__PURE__ */ import_react143.default.createElement(Tooltip, { title: "More options" }, /* @__PURE__ */ import_react143.default.createElement(import_react_icons61.VerticalMenuIcon, null)))), /* @__PURE__ */ import_react143.default.createElement(Dropdown.Portal, null, /* @__PURE__ */ import_react143.default.createElement(
|
14613
14722
|
Dropdown.Content,
|
14614
14723
|
{
|
14615
14724
|
sideOffset: 5,
|
14616
14725
|
align: "end",
|
14617
14726
|
css: { width: "$48", backgroundColor: "$surface_bright", py: "$0", border: "1px solid $border_bright" }
|
14618
14727
|
},
|
14619
|
-
/* @__PURE__ */
|
14728
|
+
/* @__PURE__ */ import_react143.default.createElement(Dropdown.Item, { "data-testid": "pin_message_btn", onClick: onPin }, /* @__PURE__ */ import_react143.default.createElement(import_react_icons61.PinIcon, null), /* @__PURE__ */ import_react143.default.createElement(Text, { variant: "sm", css: { ml: "$4" } }, "Pin Message"))
|
14620
14729
|
)));
|
14621
14730
|
};
|
14622
14731
|
SenderName = styled(Text, {
|
@@ -14628,120 +14737,127 @@ var init_ChatBody = __esm({
|
|
14628
14737
|
color: "$on_surface_high",
|
14629
14738
|
fontWeight: "$semiBold"
|
14630
14739
|
});
|
14631
|
-
ChatMessage =
|
14632
|
-
|
14633
|
-
|
14634
|
-
|
14635
|
-
|
14636
|
-
|
14637
|
-
|
14638
|
-
|
14639
|
-
|
14640
|
-
|
14641
|
-
|
14642
|
-
|
14643
|
-
|
14644
|
-
|
14645
|
-
|
14646
|
-
|
14647
|
-
|
14648
|
-
|
14649
|
-
|
14650
|
-
|
14651
|
-
|
14652
|
-
|
14653
|
-
|
14654
|
-
|
14655
|
-
|
14656
|
-
|
14657
|
-
|
14658
|
-
|
14659
|
-
|
14660
|
-
|
14661
|
-
|
14662
|
-
|
14663
|
-
|
14664
|
-
/* @__PURE__ */ import_react141.default.createElement(
|
14665
|
-
Flex,
|
14740
|
+
ChatMessage = import_react143.default.memo(
|
14741
|
+
({ index, style = {}, message, setRowHeight, isLast = false, unreadCount = 0, scrollToBottom, onPin }) => {
|
14742
|
+
var _a7, _b7;
|
14743
|
+
const { ref, inView } = (0, import_react_intersection_observer.useInView)({ threshold: 0.5, triggerOnce: true });
|
14744
|
+
const rowRef = (0, import_react143.useRef)(null);
|
14745
|
+
(0, import_react143.useEffect)(() => {
|
14746
|
+
if (rowRef.current) {
|
14747
|
+
setRowHeight(index, rowRef.current.clientHeight);
|
14748
|
+
}
|
14749
|
+
}, [index, setRowHeight]);
|
14750
|
+
const isMobile = (0, import_react_use28.useMedia)(config.media.md);
|
14751
|
+
const { elements } = useRoomLayoutConferencingScreen();
|
14752
|
+
const isOverlay = ((_a7 = elements == null ? void 0 : elements.chat) == null ? void 0 : _a7.is_overlay) && isMobile;
|
14753
|
+
const hmsActions = (0, import_react_sdk81.useHMSActions)();
|
14754
|
+
const localPeerId = (0, import_react_sdk81.useHMSStore)(import_react_sdk81.selectLocalPeerID);
|
14755
|
+
const permissions = (0, import_react_sdk81.useHMSStore)(import_react_sdk81.selectPermissions);
|
14756
|
+
const messageType = getMessageType({
|
14757
|
+
roles: message.recipientRoles,
|
14758
|
+
receiver: message.recipientPeer
|
14759
|
+
});
|
14760
|
+
const showPinAction = permissions.removeOthers && !messageType && ((_b7 = elements == null ? void 0 : elements.chat) == null ? void 0 : _b7.allow_pinning_messages);
|
14761
|
+
(0, import_react143.useEffect)(() => {
|
14762
|
+
if (message.id && !message.read && inView) {
|
14763
|
+
hmsActions.setMessageRead(true, message.id);
|
14764
|
+
}
|
14765
|
+
}, [message.read, hmsActions, inView, message.id]);
|
14766
|
+
(0, import_react143.useEffect)(() => {
|
14767
|
+
if (isLast && inView && unreadCount >= 1) {
|
14768
|
+
scrollToBottom(1);
|
14769
|
+
}
|
14770
|
+
}, [inView, isLast, scrollToBottom, unreadCount]);
|
14771
|
+
return /* @__PURE__ */ import_react143.default.createElement(
|
14772
|
+
Box,
|
14666
14773
|
{
|
14667
|
-
ref
|
14668
|
-
|
14669
|
-
css: {
|
14670
|
-
|
14671
|
-
// Theme independent color, token should not be used for transparent chat
|
14672
|
-
bg: messageType ? isOverlay ? "rgba(0, 0, 0, 0.64)" : "$surface_default" : void 0,
|
14673
|
-
r: messageType ? "$1" : void 0,
|
14674
|
-
px: messageType ? "$4" : "$2",
|
14675
|
-
py: messageType ? "$4" : 0,
|
14676
|
-
userSelect: "none"
|
14677
|
-
},
|
14678
|
-
key: message.time,
|
14679
|
-
"data-testid": "chat_msg"
|
14774
|
+
ref,
|
14775
|
+
as: "div",
|
14776
|
+
css: { mb: "$10", pr: "$10", mt: "$8", "&:hover .chat_actions": { opacity: 1 } },
|
14777
|
+
style
|
14680
14778
|
},
|
14681
|
-
/* @__PURE__ */
|
14682
|
-
|
14779
|
+
/* @__PURE__ */ import_react143.default.createElement(
|
14780
|
+
Flex,
|
14683
14781
|
{
|
14782
|
+
ref: rowRef,
|
14783
|
+
align: "center",
|
14684
14784
|
css: {
|
14685
|
-
|
14686
|
-
|
14687
|
-
|
14688
|
-
|
14689
|
-
|
14690
|
-
|
14785
|
+
flexWrap: "wrap",
|
14786
|
+
// Theme independent color, token should not be used for transparent chat
|
14787
|
+
bg: messageType ? isOverlay ? "rgba(0, 0, 0, 0.64)" : "$surface_default" : void 0,
|
14788
|
+
r: messageType ? "$1" : void 0,
|
14789
|
+
px: messageType ? "$4" : "$2",
|
14790
|
+
py: messageType ? "$4" : 0,
|
14791
|
+
userSelect: "none"
|
14691
14792
|
},
|
14692
|
-
|
14793
|
+
key: message.time,
|
14794
|
+
"data-testid": "chat_msg"
|
14693
14795
|
},
|
14694
|
-
/* @__PURE__ */
|
14796
|
+
/* @__PURE__ */ import_react143.default.createElement(
|
14695
14797
|
Text,
|
14696
14798
|
{
|
14697
|
-
as: "span",
|
14698
|
-
variant: "xs",
|
14699
14799
|
css: {
|
14700
|
-
|
14701
|
-
|
14702
|
-
|
14703
|
-
|
14800
|
+
color: isOverlay ? "#FFF" : "$on_surface_high",
|
14801
|
+
fontWeight: "$semiBold",
|
14802
|
+
display: "inline-flex",
|
14803
|
+
alignItems: "center",
|
14804
|
+
justifyContent: "space-between",
|
14805
|
+
width: "100%"
|
14806
|
+
},
|
14807
|
+
as: "div"
|
14704
14808
|
},
|
14705
|
-
|
14706
|
-
|
14707
|
-
|
14708
|
-
|
14709
|
-
|
14710
|
-
|
14711
|
-
|
14712
|
-
|
14713
|
-
|
14809
|
+
/* @__PURE__ */ import_react143.default.createElement(Flex, { align: "baseline" }, message.senderName === "You" || !message.senderName ? /* @__PURE__ */ import_react143.default.createElement(SenderName, { as: "span", variant: "sm", css: { color: isOverlay ? "#FFF" : "$on_surface_high" } }, message.senderName || "Anonymous") : /* @__PURE__ */ import_react143.default.createElement(Tooltip, { title: message.senderName, side: "top", align: "start" }, /* @__PURE__ */ import_react143.default.createElement(SenderName, { as: "span", variant: "sm", css: { color: isOverlay ? "#FFF" : "$on_surface_high" } }, message.senderName)), !isOverlay ? /* @__PURE__ */ import_react143.default.createElement(
|
14810
|
+
Text,
|
14811
|
+
{
|
14812
|
+
as: "span",
|
14813
|
+
variant: "xs",
|
14814
|
+
css: {
|
14815
|
+
ml: "$4",
|
14816
|
+
color: "$on_surface_medium",
|
14817
|
+
flexShrink: 0
|
14818
|
+
}
|
14819
|
+
},
|
14820
|
+
formatTime2(message.time)
|
14821
|
+
) : null),
|
14822
|
+
/* @__PURE__ */ import_react143.default.createElement(
|
14823
|
+
MessageType,
|
14824
|
+
{
|
14825
|
+
hasCurrentUserSent: message.sender === localPeerId,
|
14826
|
+
receiver: message.recipientPeer,
|
14827
|
+
roles: message.recipientRoles
|
14828
|
+
}
|
14829
|
+
),
|
14830
|
+
!isOverlay ? /* @__PURE__ */ import_react143.default.createElement(ChatActions, { onPin, showPinAction }) : null
|
14714
14831
|
),
|
14715
|
-
|
14716
|
-
|
14717
|
-
|
14718
|
-
|
14719
|
-
|
14720
|
-
|
14721
|
-
|
14722
|
-
|
14723
|
-
|
14724
|
-
|
14725
|
-
|
14726
|
-
|
14727
|
-
|
14832
|
+
/* @__PURE__ */ import_react143.default.createElement(
|
14833
|
+
Text,
|
14834
|
+
{
|
14835
|
+
variant: "sm",
|
14836
|
+
css: {
|
14837
|
+
w: "100%",
|
14838
|
+
mt: "$2",
|
14839
|
+
wordBreak: "break-word",
|
14840
|
+
whiteSpace: "pre-wrap",
|
14841
|
+
userSelect: "all",
|
14842
|
+
color: isOverlay ? "#FFF" : "$on_surface_high"
|
14843
|
+
},
|
14844
|
+
onClick: (e) => e.stopPropagation()
|
14728
14845
|
},
|
14729
|
-
|
14730
|
-
|
14731
|
-
/* @__PURE__ */ import_react141.default.createElement(AnnotisedMessage, { message: message.message })
|
14846
|
+
/* @__PURE__ */ import_react143.default.createElement(AnnotisedMessage, { message: message.message })
|
14847
|
+
)
|
14732
14848
|
)
|
14733
|
-
)
|
14734
|
-
|
14735
|
-
|
14736
|
-
ChatList =
|
14737
|
-
({ width, height, setRowHeight, getRowHeight, messages, scrollToBottom }, listRef) => {
|
14849
|
+
);
|
14850
|
+
}
|
14851
|
+
);
|
14852
|
+
ChatList = import_react143.default.forwardRef(
|
14853
|
+
({ width, height, setRowHeight, getRowHeight, messages, unreadCount = 0, scrollToBottom }, listRef) => {
|
14738
14854
|
const { setPinnedMessage } = useSetPinnedMessage();
|
14739
|
-
(0,
|
14855
|
+
(0, import_react143.useLayoutEffect)(() => {
|
14740
14856
|
if (listRef.current && listRef.current.scrollToItem) {
|
14741
14857
|
scrollToBottom(1);
|
14742
14858
|
}
|
14743
14859
|
}, [listRef]);
|
14744
|
-
return /* @__PURE__ */
|
14860
|
+
return /* @__PURE__ */ import_react143.default.createElement(
|
14745
14861
|
import_react_window2.VariableSizeList,
|
14746
14862
|
{
|
14747
14863
|
ref: listRef,
|
@@ -14753,7 +14869,7 @@ var init_ChatBody = __esm({
|
|
14753
14869
|
overflowX: "hidden"
|
14754
14870
|
}
|
14755
14871
|
},
|
14756
|
-
({ index, style }) => /* @__PURE__ */
|
14872
|
+
({ index, style }) => /* @__PURE__ */ import_react143.default.createElement(
|
14757
14873
|
ChatMessage,
|
14758
14874
|
{
|
14759
14875
|
style,
|
@@ -14761,25 +14877,28 @@ var init_ChatBody = __esm({
|
|
14761
14877
|
key: messages[index].id,
|
14762
14878
|
message: messages[index],
|
14763
14879
|
setRowHeight,
|
14880
|
+
unreadCount,
|
14881
|
+
isLast: index >= messages.length - 2,
|
14882
|
+
scrollToBottom,
|
14764
14883
|
onPin: () => setPinnedMessage(messages[index])
|
14765
14884
|
}
|
14766
14885
|
)
|
14767
14886
|
);
|
14768
14887
|
}
|
14769
14888
|
);
|
14770
|
-
VirtualizedChatMessages =
|
14771
|
-
const rowHeights = (0,
|
14889
|
+
VirtualizedChatMessages = import_react143.default.forwardRef(({ messages, unreadCount = 0, scrollToBottom }, listRef) => {
|
14890
|
+
const rowHeights = (0, import_react143.useRef)({});
|
14772
14891
|
function getRowHeight(index) {
|
14773
14892
|
return rowHeights.current[index] + 16 || 72;
|
14774
14893
|
}
|
14775
|
-
const setRowHeight = (0,
|
14894
|
+
const setRowHeight = (0, import_react143.useCallback)(
|
14776
14895
|
(index, size) => {
|
14777
14896
|
listRef.current.resetAfterIndex(0);
|
14778
14897
|
rowHeights.current = __spreadProps(__spreadValues({}, rowHeights.current), { [index]: size });
|
14779
14898
|
},
|
14780
14899
|
[listRef]
|
14781
14900
|
);
|
14782
|
-
return /* @__PURE__ */
|
14901
|
+
return /* @__PURE__ */ import_react143.default.createElement(
|
14783
14902
|
Box,
|
14784
14903
|
{
|
14785
14904
|
css: {
|
@@ -14788,14 +14907,14 @@ var init_ChatBody = __esm({
|
|
14788
14907
|
},
|
14789
14908
|
as: "div"
|
14790
14909
|
},
|
14791
|
-
/* @__PURE__ */
|
14910
|
+
/* @__PURE__ */ import_react143.default.createElement(
|
14792
14911
|
import_react_virtualized_auto_sizer.default,
|
14793
14912
|
{
|
14794
14913
|
style: {
|
14795
14914
|
width: "90%"
|
14796
14915
|
}
|
14797
14916
|
},
|
14798
|
-
({ height, width }) => /* @__PURE__ */
|
14917
|
+
({ height, width }) => /* @__PURE__ */ import_react143.default.createElement(
|
14799
14918
|
ChatList,
|
14800
14919
|
{
|
14801
14920
|
width,
|
@@ -14804,21 +14923,23 @@ var init_ChatBody = __esm({
|
|
14804
14923
|
setRowHeight,
|
14805
14924
|
getRowHeight,
|
14806
14925
|
scrollToBottom,
|
14807
|
-
ref: listRef
|
14926
|
+
ref: listRef,
|
14927
|
+
unreadCount
|
14808
14928
|
}
|
14809
14929
|
)
|
14810
14930
|
)
|
14811
14931
|
);
|
14812
14932
|
});
|
14813
|
-
ChatBody =
|
14933
|
+
ChatBody = import_react143.default.forwardRef(({ role, peerId, scrollToBottom }, listRef) => {
|
14814
14934
|
var _a7;
|
14815
|
-
const storeMessageSelector = role ? (0,
|
14816
|
-
let messages = (0,
|
14817
|
-
messages = (0,
|
14818
|
-
const isMobile = (0,
|
14935
|
+
const storeMessageSelector = role ? (0, import_react_sdk81.selectMessagesByRole)(role) : peerId ? (0, import_react_sdk81.selectMessagesByPeerID)(peerId) : import_react_sdk81.selectHMSMessages;
|
14936
|
+
let messages = (0, import_react_sdk81.useHMSStore)(storeMessageSelector);
|
14937
|
+
messages = (0, import_react143.useMemo)(() => (messages == null ? void 0 : messages.filter((message) => message.type === "chat")) || [], [messages]);
|
14938
|
+
const isMobile = (0, import_react_use28.useMedia)(config.media.md);
|
14819
14939
|
const { elements } = useRoomLayoutConferencingScreen();
|
14940
|
+
const unreadCount = useUnreadCount({ role, peerId });
|
14820
14941
|
if (messages.length === 0 && !(isMobile && ((_a7 = elements == null ? void 0 : elements.chat) == null ? void 0 : _a7.is_overlay))) {
|
14821
|
-
return /* @__PURE__ */
|
14942
|
+
return /* @__PURE__ */ import_react143.default.createElement(
|
14822
14943
|
Flex,
|
14823
14944
|
{
|
14824
14945
|
css: {
|
@@ -14830,7 +14951,7 @@ var init_ChatBody = __esm({
|
|
14830
14951
|
align: "center",
|
14831
14952
|
justify: "center"
|
14832
14953
|
},
|
14833
|
-
/* @__PURE__ */
|
14954
|
+
/* @__PURE__ */ import_react143.default.createElement(Box, null, /* @__PURE__ */ import_react143.default.createElement("img", { src: empty_chat_default, alt: "Empty Chat", height: 132, width: 185, style: { margin: "0 auto" } }), /* @__PURE__ */ import_react143.default.createElement(Text, { variant: "h5", css: { mt: "$8", c: "$on_surface_high" } }, "Start a conversation"), /* @__PURE__ */ import_react143.default.createElement(
|
14834
14955
|
Text,
|
14835
14956
|
{
|
14836
14957
|
variant: "sm",
|
@@ -14840,27 +14961,35 @@ var init_ChatBody = __esm({
|
|
14840
14961
|
))
|
14841
14962
|
);
|
14842
14963
|
}
|
14843
|
-
return /* @__PURE__ */
|
14964
|
+
return /* @__PURE__ */ import_react143.default.createElement(import_react143.Fragment, null, /* @__PURE__ */ import_react143.default.createElement(
|
14965
|
+
VirtualizedChatMessages,
|
14966
|
+
{
|
14967
|
+
messages,
|
14968
|
+
scrollToBottom,
|
14969
|
+
unreadCount,
|
14970
|
+
ref: listRef
|
14971
|
+
}
|
14972
|
+
));
|
14844
14973
|
});
|
14845
14974
|
}
|
14846
14975
|
});
|
14847
14976
|
|
14848
14977
|
// src/Prebuilt/components/AppData/useChatState.js
|
14849
|
-
var
|
14978
|
+
var import_react144, import_react_sdk82, useChatDraftMessage;
|
14850
14979
|
var init_useChatState = __esm({
|
14851
14980
|
"src/Prebuilt/components/AppData/useChatState.js"() {
|
14852
14981
|
"use strict";
|
14853
14982
|
init_define_process_env();
|
14854
|
-
|
14855
|
-
|
14983
|
+
import_react144 = require("react");
|
14984
|
+
import_react_sdk82 = require("@100mslive/react-sdk");
|
14856
14985
|
init_constants();
|
14857
14986
|
useChatDraftMessage = () => {
|
14858
|
-
const hmsActions = (0,
|
14859
|
-
let chatDraftMessage = (0,
|
14987
|
+
const hmsActions = (0, import_react_sdk82.useHMSActions)();
|
14988
|
+
let chatDraftMessage = (0, import_react_sdk82.useHMSStore)((0, import_react_sdk82.selectAppData)(APP_DATA.chatDraft));
|
14860
14989
|
if (chatDraftMessage === void 0 || chatDraftMessage === null) {
|
14861
14990
|
chatDraftMessage = "";
|
14862
14991
|
}
|
14863
|
-
const setDraftMessage = (0,
|
14992
|
+
const setDraftMessage = (0, import_react144.useCallback)(
|
14864
14993
|
(message) => {
|
14865
14994
|
hmsActions.setAppData(APP_DATA.chatDraft, message, true);
|
14866
14995
|
},
|
@@ -14872,15 +15001,15 @@ var init_useChatState = __esm({
|
|
14872
15001
|
});
|
14873
15002
|
|
14874
15003
|
// src/Prebuilt/components/Chat/useEmojiPickerStyles.js
|
14875
|
-
var
|
15004
|
+
var import_react145, useEmojiPickerStyles;
|
14876
15005
|
var init_useEmojiPickerStyles = __esm({
|
14877
15006
|
"src/Prebuilt/components/Chat/useEmojiPickerStyles.js"() {
|
14878
15007
|
"use strict";
|
14879
15008
|
init_define_process_env();
|
14880
|
-
|
15009
|
+
import_react145 = require("react");
|
14881
15010
|
useEmojiPickerStyles = (showing) => {
|
14882
|
-
const ref = (0,
|
14883
|
-
(0,
|
15011
|
+
const ref = (0, import_react145.useRef)(null);
|
15012
|
+
(0, import_react145.useEffect)(() => {
|
14884
15013
|
if (showing) {
|
14885
15014
|
setTimeout(() => {
|
14886
15015
|
var _a7, _b7;
|
@@ -14913,9 +15042,9 @@ var init_useEmojiPickerStyles = __esm({
|
|
14913
15042
|
|
14914
15043
|
// src/Prebuilt/components/Chat/ChatFooter.tsx
|
14915
15044
|
function EmojiPicker({ onSelect }) {
|
14916
|
-
const [showEmoji, setShowEmoji] = (0,
|
15045
|
+
const [showEmoji, setShowEmoji] = (0, import_react146.useState)(false);
|
14917
15046
|
const ref = useEmojiPickerStyles(showEmoji);
|
14918
|
-
return /* @__PURE__ */
|
15047
|
+
return /* @__PURE__ */ import_react146.default.createElement(Popover2.Root, { open: showEmoji, onOpenChange: setShowEmoji }, /* @__PURE__ */ import_react146.default.createElement(Popover2.Trigger, { asChild: true, css: { appearance: "none" } }, /* @__PURE__ */ import_react146.default.createElement(IconButton, { as: "div" }, /* @__PURE__ */ import_react146.default.createElement(import_react_icons62.EmojiIcon, null))), /* @__PURE__ */ import_react146.default.createElement(Popover2.Portal, null, /* @__PURE__ */ import_react146.default.createElement(
|
14919
15048
|
Popover2.Content,
|
14920
15049
|
{
|
14921
15050
|
alignOffset: -40,
|
@@ -14925,7 +15054,7 @@ function EmojiPicker({ onSelect }) {
|
|
14925
15054
|
p: 0
|
14926
15055
|
}
|
14927
15056
|
},
|
14928
|
-
/* @__PURE__ */
|
15057
|
+
/* @__PURE__ */ import_react146.default.createElement(
|
14929
15058
|
Box,
|
14930
15059
|
{
|
14931
15060
|
css: {
|
@@ -14934,20 +15063,20 @@ function EmojiPicker({ onSelect }) {
|
|
14934
15063
|
},
|
14935
15064
|
ref
|
14936
15065
|
},
|
14937
|
-
/* @__PURE__ */
|
15066
|
+
/* @__PURE__ */ import_react146.default.createElement(import_react147.default, { onEmojiSelect: onSelect, data: import_data.default, previewPosition: "none", skinPosition: "search" })
|
14938
15067
|
)
|
14939
15068
|
)));
|
14940
15069
|
}
|
14941
|
-
var
|
15070
|
+
var import_react146, import_react_use29, import_data, import_react147, import_react_sdk83, import_react_icons62, TextArea, ChatFooter;
|
14942
15071
|
var init_ChatFooter = __esm({
|
14943
15072
|
"src/Prebuilt/components/Chat/ChatFooter.tsx"() {
|
14944
15073
|
"use strict";
|
14945
15074
|
init_define_process_env();
|
14946
|
-
|
14947
|
-
|
15075
|
+
import_react146 = __toESM(require("react"));
|
15076
|
+
import_react_use29 = require("react-use");
|
14948
15077
|
import_data = __toESM(require("@emoji-mart/data"));
|
14949
|
-
|
14950
|
-
|
15078
|
+
import_react147 = __toESM(require("@emoji-mart/react"));
|
15079
|
+
import_react_sdk83 = require("@100mslive/react-sdk");
|
14951
15080
|
import_react_icons62 = require("@100mslive/react-icons");
|
14952
15081
|
init_src();
|
14953
15082
|
init_ToastManager();
|
@@ -14978,13 +15107,13 @@ var init_ChatFooter = __esm({
|
|
14978
15107
|
children
|
14979
15108
|
}) => {
|
14980
15109
|
var _a7;
|
14981
|
-
const hmsActions = (0,
|
14982
|
-
const inputRef = (0,
|
15110
|
+
const hmsActions = (0, import_react_sdk83.useHMSActions)();
|
15111
|
+
const inputRef = (0, import_react146.useRef)(null);
|
14983
15112
|
const [draftMessage, setDraftMessage] = useChatDraftMessage();
|
14984
|
-
const isMobile = (0,
|
15113
|
+
const isMobile = (0, import_react_use29.useMedia)(config.media.md);
|
14985
15114
|
const { elements } = useRoomLayoutConferencingScreen();
|
14986
15115
|
const isOverlayChat = (_a7 = elements == null ? void 0 : elements.chat) == null ? void 0 : _a7.is_overlay;
|
14987
|
-
const sendMessage = (0,
|
15116
|
+
const sendMessage = (0, import_react146.useCallback)(() => __async(void 0, null, function* () {
|
14988
15117
|
var _a8;
|
14989
15118
|
const message = (_a8 = inputRef == null ? void 0 : inputRef.current) == null ? void 0 : _a8.value;
|
14990
15119
|
if (!message || !message.trim().length) {
|
@@ -15007,19 +15136,19 @@ var init_ChatFooter = __esm({
|
|
15007
15136
|
ToastManager.addToast({ title: err.message });
|
15008
15137
|
}
|
15009
15138
|
}), [role, peerId, hmsActions, onSend]);
|
15010
|
-
(0,
|
15139
|
+
(0, import_react146.useEffect)(() => {
|
15011
15140
|
const messageElement = inputRef.current;
|
15012
15141
|
if (messageElement) {
|
15013
15142
|
messageElement.value = draftMessage;
|
15014
15143
|
}
|
15015
15144
|
}, [draftMessage]);
|
15016
|
-
(0,
|
15145
|
+
(0, import_react146.useEffect)(() => {
|
15017
15146
|
const messageElement = inputRef.current;
|
15018
15147
|
return () => {
|
15019
15148
|
setDraftMessage((messageElement == null ? void 0 : messageElement.value) || "");
|
15020
15149
|
};
|
15021
15150
|
}, [setDraftMessage]);
|
15022
|
-
return /* @__PURE__ */
|
15151
|
+
return /* @__PURE__ */ import_react146.default.createElement(import_react146.default.Fragment, null, /* @__PURE__ */ import_react146.default.createElement(Flex, { align: "center", css: { gap: "$4", w: "100%" } }, /* @__PURE__ */ import_react146.default.createElement(
|
15023
15152
|
Flex,
|
15024
15153
|
{
|
15025
15154
|
align: "center",
|
@@ -15040,7 +15169,7 @@ var init_ChatFooter = __esm({
|
|
15040
15169
|
}
|
15041
15170
|
},
|
15042
15171
|
children,
|
15043
|
-
/* @__PURE__ */
|
15172
|
+
/* @__PURE__ */ import_react146.default.createElement(
|
15044
15173
|
TextArea,
|
15045
15174
|
{
|
15046
15175
|
css: {
|
@@ -15068,7 +15197,7 @@ var init_ChatFooter = __esm({
|
|
15068
15197
|
onCopy: (e) => e.stopPropagation()
|
15069
15198
|
}
|
15070
15199
|
),
|
15071
|
-
!isMobile ? /* @__PURE__ */
|
15200
|
+
!isMobile ? /* @__PURE__ */ import_react146.default.createElement(
|
15072
15201
|
EmojiPicker,
|
15073
15202
|
{
|
15074
15203
|
onSelect: (emoji) => {
|
@@ -15078,7 +15207,7 @@ var init_ChatFooter = __esm({
|
|
15078
15207
|
}
|
15079
15208
|
}
|
15080
15209
|
) : null,
|
15081
|
-
/* @__PURE__ */
|
15210
|
+
/* @__PURE__ */ import_react146.default.createElement(
|
15082
15211
|
IconButton,
|
15083
15212
|
{
|
15084
15213
|
className: "send-msg",
|
@@ -15091,36 +15220,21 @@ var init_ChatFooter = __esm({
|
|
15091
15220
|
},
|
15092
15221
|
"data-testid": "send_msg_btn"
|
15093
15222
|
},
|
15094
|
-
/* @__PURE__ */
|
15223
|
+
/* @__PURE__ */ import_react146.default.createElement(import_react_icons62.SendIcon, null)
|
15095
15224
|
)
|
15096
15225
|
)));
|
15097
15226
|
};
|
15098
15227
|
}
|
15099
15228
|
});
|
15100
15229
|
|
15101
|
-
// src/Prebuilt/components/Chat/useUnreadCount.js
|
15102
|
-
var import_react_sdk83, useUnreadCount;
|
15103
|
-
var init_useUnreadCount = __esm({
|
15104
|
-
"src/Prebuilt/components/Chat/useUnreadCount.js"() {
|
15105
|
-
"use strict";
|
15106
|
-
init_define_process_env();
|
15107
|
-
import_react_sdk83 = require("@100mslive/react-sdk");
|
15108
|
-
useUnreadCount = ({ role, peerId }) => {
|
15109
|
-
const unreadCountSelector = role ? (0, import_react_sdk83.selectMessagesUnreadCountByRole)(role) : peerId ? (0, import_react_sdk83.selectMessagesUnreadCountByPeerID)(peerId) : import_react_sdk83.selectUnreadHMSMessagesCount;
|
15110
|
-
const unreadCount = (0, import_react_sdk83.useHMSStore)(unreadCountSelector);
|
15111
|
-
return unreadCount;
|
15112
|
-
};
|
15113
|
-
}
|
15114
|
-
});
|
15115
|
-
|
15116
15230
|
// src/Prebuilt/components/Chat/Chat.jsx
|
15117
|
-
var
|
15231
|
+
var import_react148, import_react_use30, import_react_sdk84, import_react_icons63, PINNED_MESSAGE_LENGTH, PinnedMessage, Chat, NewMessageIndicator;
|
15118
15232
|
var init_Chat = __esm({
|
15119
15233
|
"src/Prebuilt/components/Chat/Chat.jsx"() {
|
15120
15234
|
"use strict";
|
15121
15235
|
init_define_process_env();
|
15122
|
-
|
15123
|
-
|
15236
|
+
import_react148 = __toESM(require("react"));
|
15237
|
+
import_react_use30 = require("react-use");
|
15124
15238
|
import_react_sdk84 = require("@100mslive/react-sdk");
|
15125
15239
|
import_react_icons63 = require("@100mslive/react-icons");
|
15126
15240
|
init_Button2();
|
@@ -15139,7 +15253,7 @@ var init_Chat = __esm({
|
|
15139
15253
|
const permissions = (0, import_react_sdk84.useHMSStore)(import_react_sdk84.selectPermissions);
|
15140
15254
|
const pinnedMessage = (0, import_react_sdk84.useHMSStore)((0, import_react_sdk84.selectSessionStore)(SESSION_STORE_KEY.PINNED_MESSAGE));
|
15141
15255
|
const formattedPinnedMessage = (pinnedMessage == null ? void 0 : pinnedMessage.length) && pinnedMessage.length > PINNED_MESSAGE_LENGTH ? `${pinnedMessage.slice(0, PINNED_MESSAGE_LENGTH)}...` : pinnedMessage;
|
15142
|
-
return pinnedMessage ? /* @__PURE__ */
|
15256
|
+
return pinnedMessage ? /* @__PURE__ */ import_react148.default.createElement(
|
15143
15257
|
Flex,
|
15144
15258
|
{
|
15145
15259
|
title: pinnedMessage,
|
@@ -15147,8 +15261,8 @@ var init_Chat = __esm({
|
|
15147
15261
|
align: "center",
|
15148
15262
|
justify: "between"
|
15149
15263
|
},
|
15150
|
-
/* @__PURE__ */
|
15151
|
-
/* @__PURE__ */
|
15264
|
+
/* @__PURE__ */ import_react148.default.createElement(import_react_icons63.PinIcon, null),
|
15265
|
+
/* @__PURE__ */ import_react148.default.createElement(
|
15152
15266
|
Box,
|
15153
15267
|
{
|
15154
15268
|
css: {
|
@@ -15158,15 +15272,15 @@ var init_Chat = __esm({
|
|
15158
15272
|
overflowY: "auto"
|
15159
15273
|
}
|
15160
15274
|
},
|
15161
|
-
/* @__PURE__ */
|
15275
|
+
/* @__PURE__ */ import_react148.default.createElement(Text, { variant: "sm" }, /* @__PURE__ */ import_react148.default.createElement(AnnotisedMessage, { message: formattedPinnedMessage }))
|
15162
15276
|
),
|
15163
|
-
permissions.removeOthers && /* @__PURE__ */
|
15277
|
+
permissions.removeOthers && /* @__PURE__ */ import_react148.default.createElement(
|
15164
15278
|
Flex,
|
15165
15279
|
{
|
15166
15280
|
onClick: () => clearPinnedMessage(),
|
15167
15281
|
css: { cursor: "pointer", color: "$on_surface_medium", "&:hover": { color: "$on_surface_high" } }
|
15168
15282
|
},
|
15169
|
-
/* @__PURE__ */
|
15283
|
+
/* @__PURE__ */ import_react148.default.createElement(import_react_icons63.CrossIcon, null)
|
15170
15284
|
)
|
15171
15285
|
) : null;
|
15172
15286
|
};
|
@@ -15176,16 +15290,16 @@ var init_Chat = __esm({
|
|
15176
15290
|
const [peerSelector, setPeerSelector] = useSetSubscribedChatSelector(CHAT_SELECTOR.PEER_ID);
|
15177
15291
|
const [roleSelector, setRoleSelector] = useSetSubscribedChatSelector(CHAT_SELECTOR.ROLE);
|
15178
15292
|
const peerName = (0, import_react_sdk84.useHMSStore)((0, import_react_sdk84.selectPeerNameByID)(peerSelector));
|
15179
|
-
const [chatOptions, setChatOptions] = (0,
|
15293
|
+
const [chatOptions, setChatOptions] = (0, import_react148.useState)({
|
15180
15294
|
role: roleSelector || "",
|
15181
15295
|
peerId: peerSelector && peerName ? peerSelector : "",
|
15182
15296
|
selection: roleSelector ? roleSelector : peerSelector && peerName ? peerName : "Everyone"
|
15183
15297
|
});
|
15184
|
-
const [isSelectorOpen] = (0,
|
15185
|
-
const listRef = (0,
|
15298
|
+
const [isSelectorOpen] = (0, import_react148.useState)(false);
|
15299
|
+
const listRef = (0, import_react148.useRef)(null);
|
15186
15300
|
const hmsActions = (0, import_react_sdk84.useHMSActions)();
|
15187
15301
|
const { setPinnedMessage } = useSetPinnedMessage();
|
15188
|
-
(0,
|
15302
|
+
(0, import_react148.useEffect)(() => {
|
15189
15303
|
if (notification && notification.data && peerSelector === notification.data.id) {
|
15190
15304
|
setPeerSelector("");
|
15191
15305
|
setChatOptions({
|
@@ -15197,14 +15311,14 @@ var init_Chat = __esm({
|
|
15197
15311
|
}, [notification, peerSelector, setPeerSelector]);
|
15198
15312
|
const storeMessageSelector = import_react_sdk84.selectHMSMessagesCount;
|
15199
15313
|
const { elements } = useRoomLayoutConferencingScreen();
|
15200
|
-
const isMobile = (0,
|
15314
|
+
const isMobile = (0, import_react_use30.useMedia)(config.media.md);
|
15201
15315
|
let isScrolledToBottom = false;
|
15202
15316
|
if (listRef.current) {
|
15203
15317
|
const currentRef = listRef.current._outerRef;
|
15204
15318
|
isScrolledToBottom = currentRef.scrollHeight - currentRef.clientHeight - currentRef.scrollTop < 10;
|
15205
15319
|
}
|
15206
15320
|
const messagesCount = (0, import_react_sdk84.useHMSStore)(storeMessageSelector) || 0;
|
15207
|
-
const scrollToBottom = (0,
|
15321
|
+
const scrollToBottom = (0, import_react148.useCallback)(
|
15208
15322
|
(unreadCount = 0) => {
|
15209
15323
|
var _a8;
|
15210
15324
|
if (listRef.current && listRef.current.scrollToItem && unreadCount > 0) {
|
@@ -15218,7 +15332,7 @@ var init_Chat = __esm({
|
|
15218
15332
|
},
|
15219
15333
|
[hmsActions, messagesCount]
|
15220
15334
|
);
|
15221
|
-
return /* @__PURE__ */
|
15335
|
+
return /* @__PURE__ */ import_react148.default.createElement(
|
15222
15336
|
Flex,
|
15223
15337
|
{
|
15224
15338
|
direction: "column",
|
@@ -15227,8 +15341,8 @@ var init_Chat = __esm({
|
|
15227
15341
|
gap: "$4"
|
15228
15342
|
}
|
15229
15343
|
},
|
15230
|
-
isMobile && ((_a7 = elements == null ? void 0 : elements.chat) == null ? void 0 : _a7.is_overlay) ? null : /* @__PURE__ */
|
15231
|
-
/* @__PURE__ */
|
15344
|
+
isMobile && ((_a7 = elements == null ? void 0 : elements.chat) == null ? void 0 : _a7.is_overlay) ? null : /* @__PURE__ */ import_react148.default.createElement(import_react148.default.Fragment, null, ((_b7 = elements == null ? void 0 : elements.chat) == null ? void 0 : _b7.allow_pinning_messages) ? /* @__PURE__ */ import_react148.default.createElement(PinnedMessage, { clearPinnedMessage: setPinnedMessage }) : null),
|
15345
|
+
/* @__PURE__ */ import_react148.default.createElement(
|
15232
15346
|
ChatBody,
|
15233
15347
|
{
|
15234
15348
|
role: chatOptions.role,
|
@@ -15238,7 +15352,7 @@ var init_Chat = __esm({
|
|
15238
15352
|
screenType
|
15239
15353
|
}
|
15240
15354
|
),
|
15241
|
-
/* @__PURE__ */
|
15355
|
+
/* @__PURE__ */ import_react148.default.createElement(
|
15242
15356
|
ChatFooter,
|
15243
15357
|
{
|
15244
15358
|
role: chatOptions.role,
|
@@ -15256,7 +15370,7 @@ var init_Chat = __esm({
|
|
15256
15370
|
},
|
15257
15371
|
peerId: chatOptions.peerId
|
15258
15372
|
},
|
15259
|
-
!isSelectorOpen && !isScrolledToBottom && /* @__PURE__ */
|
15373
|
+
!isSelectorOpen && !isScrolledToBottom && /* @__PURE__ */ import_react148.default.createElement(NewMessageIndicator, { role: chatOptions.role, peerId: chatOptions.peerId, scrollToBottom })
|
15260
15374
|
)
|
15261
15375
|
);
|
15262
15376
|
};
|
@@ -15265,7 +15379,7 @@ var init_Chat = __esm({
|
|
15265
15379
|
if (!unreadCount) {
|
15266
15380
|
return null;
|
15267
15381
|
}
|
15268
|
-
return /* @__PURE__ */
|
15382
|
+
return /* @__PURE__ */ import_react148.default.createElement(
|
15269
15383
|
Flex,
|
15270
15384
|
{
|
15271
15385
|
justify: "center",
|
@@ -15276,7 +15390,7 @@ var init_Chat = __esm({
|
|
15276
15390
|
position: "absolute"
|
15277
15391
|
}
|
15278
15392
|
},
|
15279
|
-
/* @__PURE__ */
|
15393
|
+
/* @__PURE__ */ import_react148.default.createElement(
|
15280
15394
|
Button,
|
15281
15395
|
{
|
15282
15396
|
variant: "standard",
|
@@ -15299,7 +15413,7 @@ var init_Chat = __esm({
|
|
15299
15413
|
},
|
15300
15414
|
"New ",
|
15301
15415
|
unreadCount === 1 ? "message" : "messages",
|
15302
|
-
/* @__PURE__ */
|
15416
|
+
/* @__PURE__ */ import_react148.default.createElement(import_react_icons63.ChevronDownIcon, null)
|
15303
15417
|
)
|
15304
15418
|
);
|
15305
15419
|
};
|
@@ -15307,13 +15421,13 @@ var init_Chat = __esm({
|
|
15307
15421
|
});
|
15308
15422
|
|
15309
15423
|
// src/Prebuilt/components/SidePaneTabs.tsx
|
15310
|
-
var
|
15424
|
+
var import_react149, import_react_use31, import_react_sdk85, import_react_icons64, tabTriggerCSS, ParticipantCount2, SidePaneTabs;
|
15311
15425
|
var init_SidePaneTabs = __esm({
|
15312
15426
|
"src/Prebuilt/components/SidePaneTabs.tsx"() {
|
15313
15427
|
"use strict";
|
15314
15428
|
init_define_process_env();
|
15315
|
-
|
15316
|
-
|
15429
|
+
import_react149 = __toESM(require("react"));
|
15430
|
+
import_react_use31 = require("react-use");
|
15317
15431
|
import_react_sdk85 = require("@100mslive/react-sdk");
|
15318
15432
|
import_react_icons64 = require("@100mslive/react-icons");
|
15319
15433
|
init_Chat();
|
@@ -15333,23 +15447,23 @@ var init_SidePaneTabs = __esm({
|
|
15333
15447
|
justifyContent: "center"
|
15334
15448
|
};
|
15335
15449
|
ParticipantCount2 = ({ count }) => {
|
15336
|
-
return count < 1e3 ? /* @__PURE__ */
|
15450
|
+
return count < 1e3 ? /* @__PURE__ */ import_react149.default.createElement("span", null, "(", count, ")") : /* @__PURE__ */ import_react149.default.createElement(Tooltip, { title: count }, /* @__PURE__ */ import_react149.default.createElement("span", null, "(", getFormattedCount(count), ")"));
|
15337
15451
|
};
|
15338
|
-
SidePaneTabs =
|
15452
|
+
SidePaneTabs = import_react149.default.memo(({ active = SIDE_PANE_OPTIONS.CHAT, screenType, hideControls }) => {
|
15339
15453
|
var _a7;
|
15340
15454
|
const toggleChat = useSidepaneToggle(SIDE_PANE_OPTIONS.CHAT);
|
15341
15455
|
const toggleParticipants = useSidepaneToggle(SIDE_PANE_OPTIONS.PARTICIPANTS);
|
15342
15456
|
const resetSidePane = useSidepaneReset();
|
15343
|
-
const [activeTab, setActiveTab] = (0,
|
15457
|
+
const [activeTab, setActiveTab] = (0, import_react149.useState)(active);
|
15344
15458
|
const peerCount = (0, import_react_sdk85.useHMSStore)(import_react_sdk85.selectPeerCount);
|
15345
15459
|
const { elements } = useRoomLayoutConferencingScreen();
|
15346
15460
|
const showChat = !!(elements == null ? void 0 : elements.chat);
|
15347
15461
|
const showParticipants = !!(elements == null ? void 0 : elements.participant_list);
|
15348
15462
|
const hideTabs = !(showChat && showParticipants);
|
15349
|
-
const isMobile = (0,
|
15463
|
+
const isMobile = (0, import_react_use31.useMedia)(config.media.md);
|
15350
15464
|
const isOverlayChat = !!((_a7 = elements == null ? void 0 : elements.chat) == null ? void 0 : _a7.is_overlay) && isMobile;
|
15351
15465
|
const isChatOpen = useIsSidepaneTypeOpen(SIDE_PANE_OPTIONS.CHAT);
|
15352
|
-
(0,
|
15466
|
+
(0, import_react149.useEffect)(() => {
|
15353
15467
|
if (activeTab === SIDE_PANE_OPTIONS.CHAT && !showChat && showParticipants) {
|
15354
15468
|
setActiveTab(SIDE_PANE_OPTIONS.PARTICIPANTS);
|
15355
15469
|
} else if (activeTab === SIDE_PANE_OPTIONS.PARTICIPANTS && showChat && !showParticipants) {
|
@@ -15358,10 +15472,10 @@ var init_SidePaneTabs = __esm({
|
|
15358
15472
|
resetSidePane();
|
15359
15473
|
}
|
15360
15474
|
}, [showChat, activeTab, showParticipants, resetSidePane]);
|
15361
|
-
(0,
|
15475
|
+
(0, import_react149.useEffect)(() => {
|
15362
15476
|
setActiveTab(active);
|
15363
15477
|
}, [active]);
|
15364
|
-
return /* @__PURE__ */
|
15478
|
+
return /* @__PURE__ */ import_react149.default.createElement(
|
15365
15479
|
Flex,
|
15366
15480
|
{
|
15367
15481
|
direction: "column",
|
@@ -15372,7 +15486,7 @@ var init_SidePaneTabs = __esm({
|
|
15372
15486
|
transition: "margin 0.3s ease-in-out"
|
15373
15487
|
}
|
15374
15488
|
},
|
15375
|
-
isOverlayChat && isChatOpen && showChat ? /* @__PURE__ */
|
15489
|
+
isOverlayChat && isChatOpen && showChat ? /* @__PURE__ */ import_react149.default.createElement(Chat, { screenType }) : /* @__PURE__ */ import_react149.default.createElement(import_react149.default.Fragment, null, hideTabs ? /* @__PURE__ */ import_react149.default.createElement(import_react149.default.Fragment, null, /* @__PURE__ */ import_react149.default.createElement(Text, { variant: "sm", css: { fontWeight: "$semiBold", p: "$4", c: "$on_surface_high", pr: "$12" } }, showChat ? "Chat" : /* @__PURE__ */ import_react149.default.createElement("span", null, "Participants ", /* @__PURE__ */ import_react149.default.createElement(ParticipantCount2, { count: peerCount }))), showChat ? /* @__PURE__ */ import_react149.default.createElement(Chat, { screenType }) : /* @__PURE__ */ import_react149.default.createElement(ParticipantList, null)) : /* @__PURE__ */ import_react149.default.createElement(
|
15376
15490
|
Tabs.Root,
|
15377
15491
|
{
|
15378
15492
|
value: activeTab,
|
@@ -15382,7 +15496,7 @@ var init_SidePaneTabs = __esm({
|
|
15382
15496
|
size: "100%"
|
15383
15497
|
}
|
15384
15498
|
},
|
15385
|
-
/* @__PURE__ */
|
15499
|
+
/* @__PURE__ */ import_react149.default.createElement(Tabs.List, { css: { w: "calc(100% - $12)", p: "$2", borderRadius: "$2", bg: "$surface_default" } }, /* @__PURE__ */ import_react149.default.createElement(
|
15386
15500
|
Tabs.Trigger,
|
15387
15501
|
{
|
15388
15502
|
value: SIDE_PANE_OPTIONS.CHAT,
|
@@ -15392,7 +15506,7 @@ var init_SidePaneTabs = __esm({
|
|
15392
15506
|
})
|
15393
15507
|
},
|
15394
15508
|
"Chat"
|
15395
|
-
), /* @__PURE__ */
|
15509
|
+
), /* @__PURE__ */ import_react149.default.createElement(
|
15396
15510
|
Tabs.Trigger,
|
15397
15511
|
{
|
15398
15512
|
value: SIDE_PANE_OPTIONS.PARTICIPANTS,
|
@@ -15402,12 +15516,12 @@ var init_SidePaneTabs = __esm({
|
|
15402
15516
|
})
|
15403
15517
|
},
|
15404
15518
|
"Participants ",
|
15405
|
-
/* @__PURE__ */
|
15519
|
+
/* @__PURE__ */ import_react149.default.createElement(ParticipantCount2, { count: peerCount })
|
15406
15520
|
)),
|
15407
|
-
/* @__PURE__ */
|
15408
|
-
/* @__PURE__ */
|
15521
|
+
/* @__PURE__ */ import_react149.default.createElement(Tabs.Content, { value: SIDE_PANE_OPTIONS.PARTICIPANTS, css: { p: 0 } }, /* @__PURE__ */ import_react149.default.createElement(ParticipantList, null)),
|
15522
|
+
/* @__PURE__ */ import_react149.default.createElement(Tabs.Content, { value: SIDE_PANE_OPTIONS.CHAT, css: { p: 0 } }, /* @__PURE__ */ import_react149.default.createElement(Chat, { screenType }))
|
15409
15523
|
)),
|
15410
|
-
isOverlayChat && isChatOpen ? null : /* @__PURE__ */
|
15524
|
+
isOverlayChat && isChatOpen ? null : /* @__PURE__ */ import_react149.default.createElement(
|
15411
15525
|
IconButton,
|
15412
15526
|
{
|
15413
15527
|
css: { position: "absolute", right: "$10", top: "$11", "@md": { top: "$8", right: "$8" } },
|
@@ -15421,7 +15535,7 @@ var init_SidePaneTabs = __esm({
|
|
15421
15535
|
},
|
15422
15536
|
"data-testid": "close_chat"
|
15423
15537
|
},
|
15424
|
-
/* @__PURE__ */
|
15538
|
+
/* @__PURE__ */ import_react149.default.createElement(import_react_icons64.CrossIcon, null)
|
15425
15539
|
)
|
15426
15540
|
);
|
15427
15541
|
});
|
@@ -15437,12 +15551,12 @@ var init_rtmp = __esm({
|
|
15437
15551
|
});
|
15438
15552
|
|
15439
15553
|
// src/Prebuilt/components/Streaming/HLSStreaming.jsx
|
15440
|
-
var
|
15554
|
+
var import_react150, import_react_sdk86, import_react_icons65, getCardData, Card, HLSStreaming, StartHLS, EndHLS;
|
15441
15555
|
var init_HLSStreaming = __esm({
|
15442
15556
|
"src/Prebuilt/components/Streaming/HLSStreaming.jsx"() {
|
15443
15557
|
"use strict";
|
15444
15558
|
init_define_process_env();
|
15445
|
-
|
15559
|
+
import_react150 = __toESM(require("react"));
|
15446
15560
|
import_react_sdk86 = require("@100mslive/react-sdk");
|
15447
15561
|
import_react_icons65 = require("@100mslive/react-icons");
|
15448
15562
|
init_src();
|
@@ -15458,7 +15572,7 @@ var init_HLSStreaming = __esm({
|
|
15458
15572
|
data3 = {
|
15459
15573
|
title: formattedRoleName,
|
15460
15574
|
content: "Broadcasters can livestream audio or video, manage stream appearance and control the room via HLS.",
|
15461
|
-
icon: /* @__PURE__ */
|
15575
|
+
icon: /* @__PURE__ */ import_react150.default.createElement(import_react_icons65.SupportIcon, null)
|
15462
15576
|
};
|
15463
15577
|
break;
|
15464
15578
|
}
|
@@ -15466,7 +15580,7 @@ var init_HLSStreaming = __esm({
|
|
15466
15580
|
data3 = {
|
15467
15581
|
title: "HLS Viewer",
|
15468
15582
|
content: "Viewers can view and send chat messages, but need to be made broadcasters to participate with audio or video.",
|
15469
|
-
icon: /* @__PURE__ */
|
15583
|
+
icon: /* @__PURE__ */ import_react150.default.createElement(import_react_icons65.EyeOpenIcon, null)
|
15470
15584
|
};
|
15471
15585
|
break;
|
15472
15586
|
}
|
@@ -15474,7 +15588,7 @@ var init_HLSStreaming = __esm({
|
|
15474
15588
|
data3 = {
|
15475
15589
|
title: formattedRoleName,
|
15476
15590
|
content: `${formattedRoleName} is customised with specific permissions, which will determine how it interacts with this room.`,
|
15477
|
-
icon: /* @__PURE__ */
|
15591
|
+
icon: /* @__PURE__ */ import_react150.default.createElement(import_react_icons65.WrenchIcon, null),
|
15478
15592
|
order: 1
|
15479
15593
|
};
|
15480
15594
|
}
|
@@ -15482,8 +15596,8 @@ var init_HLSStreaming = __esm({
|
|
15482
15596
|
return data3;
|
15483
15597
|
};
|
15484
15598
|
Card = ({ title, icon, link, content, isHLSRunning, order = 0 }) => {
|
15485
|
-
const [copied, setCopied] = (0,
|
15486
|
-
return isHLSRunning ? /* @__PURE__ */
|
15599
|
+
const [copied, setCopied] = (0, import_react150.useState)(false);
|
15600
|
+
return isHLSRunning ? /* @__PURE__ */ import_react150.default.createElement(
|
15487
15601
|
Box,
|
15488
15602
|
{
|
15489
15603
|
key: title,
|
@@ -15494,9 +15608,9 @@ var init_HLSStreaming = __esm({
|
|
15494
15608
|
borderRadius: "$2"
|
15495
15609
|
}
|
15496
15610
|
},
|
15497
|
-
/* @__PURE__ */
|
15498
|
-
/* @__PURE__ */
|
15499
|
-
/* @__PURE__ */
|
15611
|
+
/* @__PURE__ */ import_react150.default.createElement(Flex, { align: "center", gap: "2", css: { color: "$primary_bright" } }, icon, /* @__PURE__ */ import_react150.default.createElement(Text, { variant: "h6", css: { fontWeight: "$semiBold" } }, title)),
|
15612
|
+
/* @__PURE__ */ import_react150.default.createElement(Text, { variant: "sm", css: { color: "$on_surface_medium", mt: "$6" } }, content),
|
15613
|
+
/* @__PURE__ */ import_react150.default.createElement(
|
15500
15614
|
Button,
|
15501
15615
|
{
|
15502
15616
|
variant: "standard",
|
@@ -15508,7 +15622,7 @@ var init_HLSStreaming = __esm({
|
|
15508
15622
|
css: { w: "100%", r: "$1", mt: "$10", fontWeight: "$semiBold" },
|
15509
15623
|
icon: true
|
15510
15624
|
},
|
15511
|
-
copied ? /* @__PURE__ */
|
15625
|
+
copied ? /* @__PURE__ */ import_react150.default.createElement(import_react150.default.Fragment, null, "Link copied!") : /* @__PURE__ */ import_react150.default.createElement(import_react150.default.Fragment, null, /* @__PURE__ */ import_react150.default.createElement(import_react_icons65.LinkIcon, { style: { color: "inherit" } }), "Copy Invite Link")
|
15512
15626
|
)
|
15513
15627
|
) : null;
|
15514
15628
|
};
|
@@ -15517,15 +15631,15 @@ var init_HLSStreaming = __esm({
|
|
15517
15631
|
const roomId = (0, import_react_sdk86.useHMSStore)(import_react_sdk86.selectRoomID);
|
15518
15632
|
const cards = roleNames.map((roleName) => getCardData(roleName, roomId));
|
15519
15633
|
const { isHLSRunning } = (0, import_react_sdk86.useRecordingStreaming)();
|
15520
|
-
const [showLinks, setShowLinks] = (0,
|
15521
|
-
return !showLinks ? /* @__PURE__ */
|
15634
|
+
const [showLinks, setShowLinks] = (0, import_react150.useState)(false);
|
15635
|
+
return !showLinks ? /* @__PURE__ */ import_react150.default.createElement(Container4, { rounded: true }, /* @__PURE__ */ import_react150.default.createElement(ContentHeader, { title: "Start Streaming", content: "HLS", onBack }), /* @__PURE__ */ import_react150.default.createElement(ContentBody, { title: "HLS Streaming", Icon: import_react_icons65.GoLiveIcon, removeVerticalPadding: true }, "Stream directly from the browser using any device with multiple hosts and real-time messaging, all within this platform."), isHLSRunning ? /* @__PURE__ */ import_react150.default.createElement(EndHLS, { setShowLinks }) : /* @__PURE__ */ import_react150.default.createElement(StartHLS, null)) : /* @__PURE__ */ import_react150.default.createElement(Container4, { rounded: true }, /* @__PURE__ */ import_react150.default.createElement(ContentHeader, { title: "Invite People", content: "Start the conversation", onBack: () => setShowLinks(false) }), /* @__PURE__ */ import_react150.default.createElement(Flex, { direction: "column", css: { gap: "$10", p: "$0 $10", overflowY: "auto", mb: "$10" } }, cards.map((card) => /* @__PURE__ */ import_react150.default.createElement(Card, __spreadProps(__spreadValues({ key: card.title }, card), { isHLSRunning })))));
|
15522
15636
|
};
|
15523
15637
|
StartHLS = () => {
|
15524
|
-
const [record, setRecord] = (0,
|
15525
|
-
const [error, setError] = (0,
|
15638
|
+
const [record, setRecord] = (0, import_react150.useState)(false);
|
15639
|
+
const [error, setError] = (0, import_react150.useState)(false);
|
15526
15640
|
const hmsActions = (0, import_react_sdk86.useHMSActions)();
|
15527
15641
|
const [isHLSStarted, setHLSStarted] = useSetAppDataByKey(APP_DATA.hlsStarted);
|
15528
|
-
const startHLS = (0,
|
15642
|
+
const startHLS = (0, import_react150.useCallback)(
|
15529
15643
|
(variants) => __async(void 0, null, function* () {
|
15530
15644
|
try {
|
15531
15645
|
if (isHLSStarted) {
|
@@ -15544,7 +15658,7 @@ var init_HLSStreaming = __esm({
|
|
15544
15658
|
}),
|
15545
15659
|
[hmsActions, record, isHLSStarted, setHLSStarted]
|
15546
15660
|
);
|
15547
|
-
return /* @__PURE__ */
|
15661
|
+
return /* @__PURE__ */ import_react150.default.createElement(import_react150.Fragment, null, /* @__PURE__ */ import_react150.default.createElement(RecordStream, { record, setRecord, testId: "hls-recording" }), /* @__PURE__ */ import_react150.default.createElement(Box, { css: { p: "$4 $10" } }, /* @__PURE__ */ import_react150.default.createElement(ErrorText, { error }), /* @__PURE__ */ import_react150.default.createElement(
|
15548
15662
|
Button,
|
15549
15663
|
{
|
15550
15664
|
"data-testid": "start_hls",
|
@@ -15553,21 +15667,21 @@ var init_HLSStreaming = __esm({
|
|
15553
15667
|
onClick: () => startHLS(),
|
15554
15668
|
disabled: isHLSStarted
|
15555
15669
|
},
|
15556
|
-
isHLSStarted ? /* @__PURE__ */
|
15670
|
+
isHLSStarted ? /* @__PURE__ */ import_react150.default.createElement(Loading, { size: 24, color: "currentColor" }) : /* @__PURE__ */ import_react150.default.createElement(import_react_icons65.GoLiveIcon, null),
|
15557
15671
|
isHLSStarted ? "Starting stream..." : "Go Live"
|
15558
|
-
)), /* @__PURE__ */
|
15672
|
+
)), /* @__PURE__ */ import_react150.default.createElement(Flex, { align: "center", css: { p: "$4 $10" } }, /* @__PURE__ */ import_react150.default.createElement(Text, null, /* @__PURE__ */ import_react150.default.createElement(import_react_icons65.InfoIcon, { width: 16, height: 16 })), /* @__PURE__ */ import_react150.default.createElement(Text, { variant: "tiny", color: "$on_surface_medium", css: { mx: "$8" } }, "You cannot start recording once the stream starts, you will have to stop the stream to enable recording.")));
|
15559
15673
|
};
|
15560
15674
|
EndHLS = ({ setShowLinks }) => {
|
15561
15675
|
const hmsActions = (0, import_react_sdk86.useHMSActions)();
|
15562
|
-
const [inProgress, setInProgress] = (0,
|
15563
|
-
const [error, setError] = (0,
|
15676
|
+
const [inProgress, setInProgress] = (0, import_react150.useState)(false);
|
15677
|
+
const [error, setError] = (0, import_react150.useState)("");
|
15564
15678
|
const { isHLSRunning } = (0, import_react_sdk86.useRecordingStreaming)();
|
15565
|
-
(0,
|
15679
|
+
(0, import_react150.useEffect)(() => {
|
15566
15680
|
if (inProgress && !isHLSRunning) {
|
15567
15681
|
setInProgress(false);
|
15568
15682
|
}
|
15569
15683
|
}, [inProgress, isHLSRunning]);
|
15570
|
-
return /* @__PURE__ */
|
15684
|
+
return /* @__PURE__ */ import_react150.default.createElement(Box, { css: { p: "$4 $10" } }, /* @__PURE__ */ import_react150.default.createElement(ErrorText, { error }), /* @__PURE__ */ import_react150.default.createElement(
|
15571
15685
|
Button,
|
15572
15686
|
{
|
15573
15687
|
"data-testid": "stop_hls",
|
@@ -15586,20 +15700,20 @@ var init_HLSStreaming = __esm({
|
|
15586
15700
|
}
|
15587
15701
|
})
|
15588
15702
|
},
|
15589
|
-
/* @__PURE__ */
|
15703
|
+
/* @__PURE__ */ import_react150.default.createElement(import_react_icons65.EndStreamIcon, null),
|
15590
15704
|
"End Stream"
|
15591
|
-
), /* @__PURE__ */
|
15705
|
+
), /* @__PURE__ */ import_react150.default.createElement(Button, { icon: true, css: { w: "100%", r: "$0", mt: "$8" }, onClick: () => setShowLinks(true) }, /* @__PURE__ */ import_react150.default.createElement(import_react_icons65.PeopleIcon, null), " Invite People"));
|
15592
15706
|
};
|
15593
15707
|
}
|
15594
15708
|
});
|
15595
15709
|
|
15596
15710
|
// src/Prebuilt/components/Streaming/StreamingLanding.jsx
|
15597
|
-
var
|
15711
|
+
var import_react151, import_react_sdk87, import_react_icons66, StreamingLanding;
|
15598
15712
|
var init_StreamingLanding = __esm({
|
15599
15713
|
"src/Prebuilt/components/Streaming/StreamingLanding.jsx"() {
|
15600
15714
|
"use strict";
|
15601
15715
|
init_define_process_env();
|
15602
|
-
|
15716
|
+
import_react151 = __toESM(require("react"));
|
15603
15717
|
import_react_sdk87 = require("@100mslive/react-sdk");
|
15604
15718
|
import_react_icons66 = require("@100mslive/react-icons");
|
15605
15719
|
init_Layout();
|
@@ -15615,13 +15729,13 @@ var init_StreamingLanding = __esm({
|
|
15615
15729
|
const toggleStreaming = useSidepaneToggle(SIDE_PANE_OPTIONS.STREAMING);
|
15616
15730
|
const { isHLSRunning, isRTMPRunning } = (0, import_react_sdk87.useRecordingStreaming)();
|
15617
15731
|
const permissions = (0, import_react_sdk87.useHMSStore)(import_react_sdk87.selectPermissions);
|
15618
|
-
const [showHLS, setShowHLS] = (0,
|
15619
|
-
const [showRTMP, setShowRTMP] = (0,
|
15732
|
+
const [showHLS, setShowHLS] = (0, import_react151.useState)(isHLSRunning);
|
15733
|
+
const [showRTMP, setShowRTMP] = (0, import_react151.useState)(isRTMPRunning);
|
15620
15734
|
if (!(permissions == null ? void 0 : permissions.hlsStreaming) && !(permissions == null ? void 0 : permissions.rtmpStreaming)) {
|
15621
15735
|
toggleStreaming();
|
15622
15736
|
return null;
|
15623
15737
|
}
|
15624
|
-
return /* @__PURE__ */
|
15738
|
+
return /* @__PURE__ */ import_react151.default.createElement(import_react151.Fragment, null, /* @__PURE__ */ import_react151.default.createElement(Flex, { css: { w: "100%", py: "$8" } }, /* @__PURE__ */ import_react151.default.createElement(
|
15625
15739
|
Box,
|
15626
15740
|
{
|
15627
15741
|
css: {
|
@@ -15631,8 +15745,8 @@ var init_StreamingLanding = __esm({
|
|
15631
15745
|
r: "$round"
|
15632
15746
|
}
|
15633
15747
|
},
|
15634
|
-
/* @__PURE__ */
|
15635
|
-
), /* @__PURE__ */
|
15748
|
+
/* @__PURE__ */ import_react151.default.createElement(import_react_icons66.ColoredHandIcon, { width: 40, height: 40 })
|
15749
|
+
), /* @__PURE__ */ import_react151.default.createElement(Box, { css: { flex: "1 1 0", mx: "$8" } }, /* @__PURE__ */ import_react151.default.createElement(Text, { variant: "sm" }, "Welcome !"), /* @__PURE__ */ import_react151.default.createElement(Text, { variant: "h6" }, "Let\u2019s get you started")), /* @__PURE__ */ import_react151.default.createElement(IconButton_default, { onClick: toggleStreaming, css: { alignSelf: "flex-start" }, "data-testid": "close_streaming" }, /* @__PURE__ */ import_react151.default.createElement(import_react_icons66.CrossIcon, null))), /* @__PURE__ */ import_react151.default.createElement(Text, { variant: "tiny", color: "$on_surface_medium" }, "Start Streaming"), (permissions == null ? void 0 : permissions.hlsStreaming) && /* @__PURE__ */ import_react151.default.createElement(
|
15636
15750
|
StreamCard,
|
15637
15751
|
{
|
15638
15752
|
testId: "hls_stream",
|
@@ -15642,7 +15756,7 @@ var init_StreamingLanding = __esm({
|
|
15642
15756
|
onClick: () => setShowHLS(true),
|
15643
15757
|
Icon: import_react_icons66.GoLiveIcon
|
15644
15758
|
}
|
15645
|
-
), (permissions == null ? void 0 : permissions.rtmpStreaming) && /* @__PURE__ */
|
15759
|
+
), (permissions == null ? void 0 : permissions.rtmpStreaming) && /* @__PURE__ */ import_react151.default.createElement(
|
15646
15760
|
StreamCard,
|
15647
15761
|
{
|
15648
15762
|
testId: "rtmp_stream",
|
@@ -15654,19 +15768,19 @@ var init_StreamingLanding = __esm({
|
|
15654
15768
|
},
|
15655
15769
|
imgSrc: rtmp_default
|
15656
15770
|
}
|
15657
|
-
), showHLS && /* @__PURE__ */
|
15771
|
+
), showHLS && /* @__PURE__ */ import_react151.default.createElement(HLSStreaming, { onBack: () => setShowHLS(false) }), showRTMP && /* @__PURE__ */ import_react151.default.createElement(RTMPStreaming, { onBack: () => setShowRTMP(false) }));
|
15658
15772
|
};
|
15659
15773
|
}
|
15660
15774
|
});
|
15661
15775
|
|
15662
15776
|
// src/Prebuilt/layouts/SidePane.tsx
|
15663
|
-
var
|
15777
|
+
var import_react152, import_react_use32, import_react_sdk88, SidePane, SidePane_default;
|
15664
15778
|
var init_SidePane = __esm({
|
15665
15779
|
"src/Prebuilt/layouts/SidePane.tsx"() {
|
15666
15780
|
"use strict";
|
15667
15781
|
init_define_process_env();
|
15668
|
-
|
15669
|
-
|
15782
|
+
import_react152 = __toESM(require("react"));
|
15783
|
+
import_react_use32 = require("react-use");
|
15670
15784
|
import_react_sdk88 = require("@100mslive/react-sdk");
|
15671
15785
|
init_SidePaneTabs();
|
15672
15786
|
init_StreamingLanding();
|
@@ -15681,16 +15795,16 @@ var init_SidePane = __esm({
|
|
15681
15795
|
hideControls = false
|
15682
15796
|
}) => {
|
15683
15797
|
var _a7, _b7;
|
15684
|
-
const isMobile = (0,
|
15798
|
+
const isMobile = (0, import_react_use32.useMedia)(config.media.md);
|
15685
15799
|
const sidepane = (0, import_react_sdk88.useHMSStore)((0, import_react_sdk88.selectAppData)(APP_DATA.sidePane));
|
15686
15800
|
const activeScreensharePeerId = (0, import_react_sdk88.useHMSStore)((0, import_react_sdk88.selectAppData)(APP_DATA.activeScreensharePeerId));
|
15687
15801
|
const trackId = (_a7 = (0, import_react_sdk88.useHMSStore)((0, import_react_sdk88.selectVideoTrackByPeerID)(activeScreensharePeerId))) == null ? void 0 : _a7.id;
|
15688
15802
|
const { elements } = useRoomLayoutConferencingScreen();
|
15689
15803
|
let ViewComponent;
|
15690
15804
|
if (sidepane === SIDE_PANE_OPTIONS.PARTICIPANTS || sidepane === SIDE_PANE_OPTIONS.CHAT) {
|
15691
|
-
ViewComponent = /* @__PURE__ */
|
15805
|
+
ViewComponent = /* @__PURE__ */ import_react152.default.createElement(SidePaneTabs, { screenType, hideControls, active: sidepane });
|
15692
15806
|
} else if (sidepane === SIDE_PANE_OPTIONS.STREAMING) {
|
15693
|
-
ViewComponent = /* @__PURE__ */
|
15807
|
+
ViewComponent = /* @__PURE__ */ import_react152.default.createElement(StreamingLanding, null);
|
15694
15808
|
}
|
15695
15809
|
if (!ViewComponent && !trackId) {
|
15696
15810
|
return null;
|
@@ -15703,7 +15817,7 @@ var init_SidePane = __esm({
|
|
15703
15817
|
objectFit: tileProps == null ? void 0 : tileProps.video_object_fit
|
15704
15818
|
};
|
15705
15819
|
const mwebStreamingChat = isMobile && sidepane === SIDE_PANE_OPTIONS.CHAT && ((_b7 = elements == null ? void 0 : elements.chat) == null ? void 0 : _b7.is_overlay);
|
15706
|
-
return /* @__PURE__ */
|
15820
|
+
return /* @__PURE__ */ import_react152.default.createElement(
|
15707
15821
|
Flex,
|
15708
15822
|
{
|
15709
15823
|
direction: "column",
|
@@ -15716,17 +15830,16 @@ var init_SidePane = __esm({
|
|
15716
15830
|
"@md": { position: mwebStreamingChat ? "absolute" : "", zIndex: 12 }
|
15717
15831
|
}
|
15718
15832
|
},
|
15719
|
-
trackId && /* @__PURE__ */
|
15833
|
+
trackId && /* @__PURE__ */ import_react152.default.createElement(
|
15720
15834
|
VideoTile_default,
|
15721
15835
|
__spreadValues({
|
15722
15836
|
peerId: activeScreensharePeerId,
|
15723
15837
|
trackId,
|
15724
|
-
width: "100%",
|
15725
15838
|
height: 225,
|
15726
15839
|
rootCSS: { p: 0, alignSelf: "start", flexShrink: 0 }
|
15727
15840
|
}, tileLayout)
|
15728
15841
|
),
|
15729
|
-
!!ViewComponent && /* @__PURE__ */
|
15842
|
+
!!ViewComponent && /* @__PURE__ */ import_react152.default.createElement(
|
15730
15843
|
Box,
|
15731
15844
|
{
|
15732
15845
|
css: {
|
@@ -15764,17 +15877,17 @@ var init_SidePane = __esm({
|
|
15764
15877
|
});
|
15765
15878
|
|
15766
15879
|
// src/Prebuilt/layouts/WaitingView.jsx
|
15767
|
-
var
|
15880
|
+
var import_react153, import_react_icons67, WaitingView;
|
15768
15881
|
var init_WaitingView = __esm({
|
15769
15882
|
"src/Prebuilt/layouts/WaitingView.jsx"() {
|
15770
15883
|
"use strict";
|
15771
15884
|
init_define_process_env();
|
15772
|
-
|
15885
|
+
import_react153 = __toESM(require("react"));
|
15773
15886
|
import_react_icons67 = require("@100mslive/react-icons");
|
15774
15887
|
init_Layout();
|
15775
15888
|
init_Text2();
|
15776
|
-
WaitingView =
|
15777
|
-
return /* @__PURE__ */
|
15889
|
+
WaitingView = import_react153.default.memo(() => {
|
15890
|
+
return /* @__PURE__ */ import_react153.default.createElement(
|
15778
15891
|
Box,
|
15779
15892
|
{
|
15780
15893
|
css: {
|
@@ -15788,7 +15901,7 @@ var init_WaitingView = __esm({
|
|
15788
15901
|
},
|
15789
15902
|
"data-testid": "waiting_view"
|
15790
15903
|
},
|
15791
|
-
/* @__PURE__ */
|
15904
|
+
/* @__PURE__ */ import_react153.default.createElement(
|
15792
15905
|
Flex,
|
15793
15906
|
{
|
15794
15907
|
align: "center",
|
@@ -15802,8 +15915,8 @@ var init_WaitingView = __esm({
|
|
15802
15915
|
gap: "$8"
|
15803
15916
|
}
|
15804
15917
|
},
|
15805
|
-
/* @__PURE__ */
|
15806
|
-
/* @__PURE__ */
|
15918
|
+
/* @__PURE__ */ import_react153.default.createElement(import_react_icons67.ColoredTimeIcon, { width: "80px", height: "80px" }),
|
15919
|
+
/* @__PURE__ */ import_react153.default.createElement(
|
15807
15920
|
Flex,
|
15808
15921
|
{
|
15809
15922
|
direction: "column",
|
@@ -15813,8 +15926,8 @@ var init_WaitingView = __esm({
|
|
15813
15926
|
gap: "$4"
|
15814
15927
|
}
|
15815
15928
|
},
|
15816
|
-
/* @__PURE__ */
|
15817
|
-
/* @__PURE__ */
|
15929
|
+
/* @__PURE__ */ import_react153.default.createElement(Text, { color: "white", variant: "h6", css: { "@md": { fontSize: "$md" } } }, "Please wait"),
|
15930
|
+
/* @__PURE__ */ import_react153.default.createElement(Text, { color: "$on_surface_medium", css: { mt: "$4", "@md": { fontSize: "$sm" } } }, "Sit back and relax till others let you join.")
|
15818
15931
|
)
|
15819
15932
|
)
|
15820
15933
|
);
|
@@ -15825,7 +15938,7 @@ var init_WaitingView = __esm({
|
|
15825
15938
|
// src/Prebuilt/components/HlsStatsOverlay.jsx
|
15826
15939
|
function HlsStatsOverlay({ hlsStatsState, onClose }) {
|
15827
15940
|
var _a7, _b7, _c;
|
15828
|
-
return /* @__PURE__ */
|
15941
|
+
return /* @__PURE__ */ import_react154.default.createElement(
|
15829
15942
|
Flex,
|
15830
15943
|
{
|
15831
15944
|
css: {
|
@@ -15839,8 +15952,8 @@ function HlsStatsOverlay({ hlsStatsState, onClose }) {
|
|
15839
15952
|
},
|
15840
15953
|
direction: "column"
|
15841
15954
|
},
|
15842
|
-
/* @__PURE__ */
|
15843
|
-
/* @__PURE__ */
|
15955
|
+
/* @__PURE__ */ import_react154.default.createElement(IconButton_default, { css: { position: "absolute", top: "$2", right: "$2" }, onClick: onClose }, /* @__PURE__ */ import_react154.default.createElement(import_react_icons68.CloseIcon, null)),
|
15956
|
+
/* @__PURE__ */ import_react154.default.createElement(HlsStatsRow, { label: "URL" }, /* @__PURE__ */ import_react154.default.createElement(Flex, { align: "center" }, /* @__PURE__ */ import_react154.default.createElement(
|
15844
15957
|
"a",
|
15845
15958
|
{
|
15846
15959
|
style: { cursor: "pointer", textDecoration: "underline" },
|
@@ -15850,12 +15963,12 @@ function HlsStatsOverlay({ hlsStatsState, onClose }) {
|
|
15850
15963
|
},
|
15851
15964
|
"Stream url"
|
15852
15965
|
))),
|
15853
|
-
/* @__PURE__ */
|
15854
|
-
/* @__PURE__ */
|
15855
|
-
/* @__PURE__ */
|
15856
|
-
/* @__PURE__ */
|
15857
|
-
/* @__PURE__ */
|
15858
|
-
/* @__PURE__ */
|
15966
|
+
/* @__PURE__ */ import_react154.default.createElement(HlsStatsRow, { label: "Video size" }, ` ${(_a7 = hlsStatsState == null ? void 0 : hlsStatsState.videoSize) == null ? void 0 : _a7.width}x${(_b7 = hlsStatsState == null ? void 0 : hlsStatsState.videoSize) == null ? void 0 : _b7.height}`),
|
15967
|
+
/* @__PURE__ */ import_react154.default.createElement(HlsStatsRow, { label: "Buffer duration" }, (_c = hlsStatsState == null ? void 0 : hlsStatsState.bufferedDuration) == null ? void 0 : _c.toFixed(2), " "),
|
15968
|
+
/* @__PURE__ */ import_react154.default.createElement(HlsStatsRow, { label: "Connection speed" }, `${((hlsStatsState == null ? void 0 : hlsStatsState.bandwidthEstimate) / (1e3 * 1e3)).toFixed(2)} Mbps`),
|
15969
|
+
/* @__PURE__ */ import_react154.default.createElement(HlsStatsRow, { label: "Bitrate" }, `${((hlsStatsState == null ? void 0 : hlsStatsState.bitrate) / (1e3 * 1e3)).toFixed(2)} Mbps`),
|
15970
|
+
/* @__PURE__ */ import_react154.default.createElement(HlsStatsRow, { label: "distance from live" }, getDurationFromSeconds(hlsStatsState.distanceFromLive / 1e3)),
|
15971
|
+
/* @__PURE__ */ import_react154.default.createElement(HlsStatsRow, { label: "Dropped frames" }, hlsStatsState == null ? void 0 : hlsStatsState.droppedFrames)
|
15859
15972
|
);
|
15860
15973
|
}
|
15861
15974
|
function getDurationFromSeconds(timeInSeconds) {
|
@@ -15873,18 +15986,18 @@ function getDurationFromSeconds(timeInSeconds) {
|
|
15873
15986
|
}
|
15874
15987
|
return videoTimeStr;
|
15875
15988
|
}
|
15876
|
-
var
|
15989
|
+
var import_react154, import_react_icons68, HlsStatsRow;
|
15877
15990
|
var init_HlsStatsOverlay = __esm({
|
15878
15991
|
"src/Prebuilt/components/HlsStatsOverlay.jsx"() {
|
15879
15992
|
"use strict";
|
15880
15993
|
init_define_process_env();
|
15881
|
-
|
15994
|
+
import_react154 = __toESM(require("react"));
|
15882
15995
|
import_react_icons68 = require("@100mslive/react-icons");
|
15883
15996
|
init_Layout();
|
15884
15997
|
init_Text2();
|
15885
15998
|
init_IconButton3();
|
15886
|
-
HlsStatsRow = (0,
|
15887
|
-
return /* @__PURE__ */
|
15999
|
+
HlsStatsRow = (0, import_react154.memo)(({ label, children }) => {
|
16000
|
+
return /* @__PURE__ */ import_react154.default.createElement(Flex, { gap: 4, justify: "center", css: { width: "100%" } }, /* @__PURE__ */ import_react154.default.createElement(
|
15888
16001
|
Text,
|
15889
16002
|
{
|
15890
16003
|
css: {
|
@@ -15895,7 +16008,7 @@ var init_HlsStatsOverlay = __esm({
|
|
15895
16008
|
}
|
15896
16009
|
},
|
15897
16010
|
label
|
15898
|
-
), /* @__PURE__ */
|
16011
|
+
), /* @__PURE__ */ import_react154.default.createElement(
|
15899
16012
|
Text,
|
15900
16013
|
{
|
15901
16014
|
css: {
|
@@ -15942,31 +16055,31 @@ var init_Controls = __esm({
|
|
15942
16055
|
});
|
15943
16056
|
|
15944
16057
|
// src/Prebuilt/components/HMSVideo/HMSVideo.jsx
|
15945
|
-
var
|
16058
|
+
var import_react155, HMSVideo;
|
15946
16059
|
var init_HMSVideo = __esm({
|
15947
16060
|
"src/Prebuilt/components/HMSVideo/HMSVideo.jsx"() {
|
15948
16061
|
"use strict";
|
15949
16062
|
init_define_process_env();
|
15950
|
-
|
16063
|
+
import_react155 = __toESM(require("react"));
|
15951
16064
|
init_src();
|
15952
|
-
HMSVideo = (0,
|
16065
|
+
HMSVideo = (0, import_react155.forwardRef)((_a7, videoRef) => {
|
15953
16066
|
var _b7 = _a7, { children } = _b7, props = __objRest(_b7, ["children"]);
|
15954
|
-
return /* @__PURE__ */
|
16067
|
+
return /* @__PURE__ */ import_react155.default.createElement(Flex, __spreadValues({ "data-testid": "hms-video", css: { size: "100%", position: "relative" }, direction: "column" }, props), /* @__PURE__ */ import_react155.default.createElement("video", { style: { flex: "1 1 0", margin: "0 auto", minHeight: "0" }, ref: videoRef, playsInline: true }), children);
|
15955
16068
|
});
|
15956
16069
|
}
|
15957
16070
|
});
|
15958
16071
|
|
15959
16072
|
// src/Prebuilt/components/HMSVideo/PlayButton.jsx
|
15960
|
-
var
|
16073
|
+
var import_react156, import_react_icons69, PlayButton;
|
15961
16074
|
var init_PlayButton = __esm({
|
15962
16075
|
"src/Prebuilt/components/HMSVideo/PlayButton.jsx"() {
|
15963
16076
|
"use strict";
|
15964
16077
|
init_define_process_env();
|
15965
|
-
|
16078
|
+
import_react156 = __toESM(require("react"));
|
15966
16079
|
import_react_icons69 = require("@100mslive/react-icons");
|
15967
16080
|
init_src();
|
15968
16081
|
PlayButton = ({ onClick, isPaused }) => {
|
15969
|
-
return /* @__PURE__ */
|
16082
|
+
return /* @__PURE__ */ import_react156.default.createElement(Tooltip, { title: isPaused ? "Play" : "Pause", side: "top" }, /* @__PURE__ */ import_react156.default.createElement(IconButton, { onClick, "data-testid": "play_pause_btn" }, isPaused ? /* @__PURE__ */ import_react156.default.createElement(import_react_icons69.PlayIcon, { width: 20, height: 20 }) : /* @__PURE__ */ import_react156.default.createElement(import_react_icons69.PauseIcon, { width: 20, height: 20 })));
|
15970
16083
|
};
|
15971
16084
|
}
|
15972
16085
|
});
|
@@ -15998,19 +16111,19 @@ var init_HMSVIdeoUtils = __esm({
|
|
15998
16111
|
});
|
15999
16112
|
|
16000
16113
|
// src/Prebuilt/components/HMSVideo/VideoProgress.jsx
|
16001
|
-
var
|
16114
|
+
var import_react157, VideoProgress;
|
16002
16115
|
var init_VideoProgress = __esm({
|
16003
16116
|
"src/Prebuilt/components/HMSVideo/VideoProgress.jsx"() {
|
16004
16117
|
"use strict";
|
16005
16118
|
init_define_process_env();
|
16006
|
-
|
16119
|
+
import_react157 = __toESM(require("react"));
|
16007
16120
|
init_src();
|
16008
16121
|
init_HMSVIdeoUtils();
|
16009
16122
|
VideoProgress = ({ onValueChange, hlsPlayer: hlsPlayer2 }) => {
|
16010
|
-
const [videoProgress, setVideoProgress] = (0,
|
16011
|
-
const [bufferProgress, setBufferProgress] = (0,
|
16012
|
-
const progressRootRef = (0,
|
16013
|
-
(0,
|
16123
|
+
const [videoProgress, setVideoProgress] = (0, import_react157.useState)(0);
|
16124
|
+
const [bufferProgress, setBufferProgress] = (0, import_react157.useState)(0);
|
16125
|
+
const progressRootRef = (0, import_react157.useRef)();
|
16126
|
+
(0, import_react157.useEffect)(() => {
|
16014
16127
|
const videoEl = hlsPlayer2.getVideoElement();
|
16015
16128
|
const timeupdateHandler = () => {
|
16016
16129
|
var _a7;
|
@@ -16041,14 +16154,14 @@ var init_VideoProgress = __esm({
|
|
16041
16154
|
onValueChange(currentTime);
|
16042
16155
|
}
|
16043
16156
|
};
|
16044
|
-
return hlsPlayer2.getVideoElement() ? /* @__PURE__ */
|
16157
|
+
return hlsPlayer2.getVideoElement() ? /* @__PURE__ */ import_react157.default.createElement(
|
16045
16158
|
Flex,
|
16046
16159
|
{
|
16047
16160
|
ref: progressRootRef,
|
16048
16161
|
css: { cursor: "pointer", h: "$4", alignSelf: "stretch" },
|
16049
16162
|
onClick: onProgressChangeHandler
|
16050
16163
|
},
|
16051
|
-
/* @__PURE__ */
|
16164
|
+
/* @__PURE__ */ import_react157.default.createElement(
|
16052
16165
|
Box,
|
16053
16166
|
{
|
16054
16167
|
id: "video-actual",
|
@@ -16059,7 +16172,7 @@ var init_VideoProgress = __esm({
|
|
16059
16172
|
}
|
16060
16173
|
}
|
16061
16174
|
),
|
16062
|
-
/* @__PURE__ */
|
16175
|
+
/* @__PURE__ */ import_react157.default.createElement(
|
16063
16176
|
Box,
|
16064
16177
|
{
|
16065
16178
|
id: "video-buffer",
|
@@ -16070,7 +16183,7 @@ var init_VideoProgress = __esm({
|
|
16070
16183
|
}
|
16071
16184
|
}
|
16072
16185
|
),
|
16073
|
-
/* @__PURE__ */
|
16186
|
+
/* @__PURE__ */ import_react157.default.createElement(
|
16074
16187
|
Box,
|
16075
16188
|
{
|
16076
16189
|
id: "video-rest",
|
@@ -16087,18 +16200,18 @@ var init_VideoProgress = __esm({
|
|
16087
16200
|
});
|
16088
16201
|
|
16089
16202
|
// src/Prebuilt/components/HMSVideo/VideoTime.jsx
|
16090
|
-
var
|
16203
|
+
var import_react158, import_hls_player2, VideoTime;
|
16091
16204
|
var init_VideoTime = __esm({
|
16092
16205
|
"src/Prebuilt/components/HMSVideo/VideoTime.jsx"() {
|
16093
16206
|
"use strict";
|
16094
16207
|
init_define_process_env();
|
16095
|
-
|
16208
|
+
import_react158 = __toESM(require("react"));
|
16096
16209
|
import_hls_player2 = require("@100mslive/hls-player");
|
16097
16210
|
init_src();
|
16098
16211
|
init_HMSVIdeoUtils();
|
16099
16212
|
VideoTime = ({ hlsPlayer: hlsPlayer2 }) => {
|
16100
|
-
const [videoTime, setVideoTime] = (0,
|
16101
|
-
(0,
|
16213
|
+
const [videoTime, setVideoTime] = (0, import_react158.useState)("");
|
16214
|
+
(0, import_react158.useEffect)(() => {
|
16102
16215
|
const timeupdateHandler = (currentTime) => setVideoTime(getDurationFromSeconds2(currentTime));
|
16103
16216
|
if (hlsPlayer2) {
|
16104
16217
|
hlsPlayer2.on(import_hls_player2.HMSHLSPlayerEvents.CURRENT_TIME, timeupdateHandler);
|
@@ -16109,7 +16222,7 @@ var init_VideoTime = __esm({
|
|
16109
16222
|
}
|
16110
16223
|
};
|
16111
16224
|
}, [hlsPlayer2]);
|
16112
|
-
return hlsPlayer2 ? /* @__PURE__ */
|
16225
|
+
return hlsPlayer2 ? /* @__PURE__ */ import_react158.default.createElement(
|
16113
16226
|
Text,
|
16114
16227
|
{
|
16115
16228
|
css: {
|
@@ -16126,19 +16239,19 @@ var init_VideoTime = __esm({
|
|
16126
16239
|
});
|
16127
16240
|
|
16128
16241
|
// src/Prebuilt/components/HMSVideo/VolumeControl.jsx
|
16129
|
-
var
|
16242
|
+
var import_react159, import_react_icons70, VolumeControl, VolumeIcon;
|
16130
16243
|
var init_VolumeControl = __esm({
|
16131
16244
|
"src/Prebuilt/components/HMSVideo/VolumeControl.jsx"() {
|
16132
16245
|
"use strict";
|
16133
16246
|
init_define_process_env();
|
16134
|
-
|
16247
|
+
import_react159 = __toESM(require("react"));
|
16135
16248
|
import_react_icons70 = require("@100mslive/react-icons");
|
16136
16249
|
init_src();
|
16137
16250
|
VolumeControl = ({ hlsPlayer: hlsPlayer2 }) => {
|
16138
16251
|
var _a7;
|
16139
|
-
const [volume, setVolume] = (0,
|
16140
|
-
const [showSlider, setShowSlider] = (0,
|
16141
|
-
return /* @__PURE__ */
|
16252
|
+
const [volume, setVolume] = (0, import_react159.useState)((_a7 = hlsPlayer2 == null ? void 0 : hlsPlayer2.volume) != null ? _a7 : 100);
|
16253
|
+
const [showSlider, setShowSlider] = (0, import_react159.useState)(false);
|
16254
|
+
return /* @__PURE__ */ import_react159.default.createElement(
|
16142
16255
|
Flex,
|
16143
16256
|
{
|
16144
16257
|
align: "center",
|
@@ -16152,7 +16265,7 @@ var init_VolumeControl = __esm({
|
|
16152
16265
|
setShowSlider(false);
|
16153
16266
|
}
|
16154
16267
|
},
|
16155
|
-
/* @__PURE__ */
|
16268
|
+
/* @__PURE__ */ import_react159.default.createElement(
|
16156
16269
|
VolumeIcon,
|
16157
16270
|
{
|
16158
16271
|
volume,
|
@@ -16167,7 +16280,7 @@ var init_VolumeControl = __esm({
|
|
16167
16280
|
}
|
16168
16281
|
}
|
16169
16282
|
),
|
16170
|
-
/* @__PURE__ */
|
16283
|
+
/* @__PURE__ */ import_react159.default.createElement(
|
16171
16284
|
Slider,
|
16172
16285
|
{
|
16173
16286
|
css: {
|
@@ -16195,9 +16308,9 @@ var init_VolumeControl = __esm({
|
|
16195
16308
|
};
|
16196
16309
|
VolumeIcon = ({ volume, onClick }) => {
|
16197
16310
|
if (volume === 0) {
|
16198
|
-
return /* @__PURE__ */
|
16311
|
+
return /* @__PURE__ */ import_react159.default.createElement(import_react_icons70.VolumeZeroIcon, { style: { cursor: "pointer", transition: "color 0.3s" }, onClick });
|
16199
16312
|
}
|
16200
|
-
return volume < 50 ? /* @__PURE__ */
|
16313
|
+
return volume < 50 ? /* @__PURE__ */ import_react159.default.createElement(import_react_icons70.VolumeOneIcon, { style: { cursor: "pointer", transition: "color 0.3s" }, onClick }) : /* @__PURE__ */ import_react159.default.createElement(import_react_icons70.VolumeTwoIcon, { style: { cursor: "pointer", transition: "color 0.3s" }, onClick });
|
16201
16314
|
};
|
16202
16315
|
}
|
16203
16316
|
});
|
@@ -16230,15 +16343,15 @@ var init_HMSVideo2 = __esm({
|
|
16230
16343
|
});
|
16231
16344
|
|
16232
16345
|
// src/Prebuilt/components/HMSVideo/FullscreenButton.jsx
|
16233
|
-
var
|
16346
|
+
var import_react160, FullScreenButton2;
|
16234
16347
|
var init_FullscreenButton = __esm({
|
16235
16348
|
"src/Prebuilt/components/HMSVideo/FullscreenButton.jsx"() {
|
16236
16349
|
"use strict";
|
16237
16350
|
init_define_process_env();
|
16238
|
-
|
16351
|
+
import_react160 = __toESM(require("react"));
|
16239
16352
|
init_src();
|
16240
16353
|
FullScreenButton2 = ({ isFullScreen, icon, onToggle }) => {
|
16241
|
-
return /* @__PURE__ */
|
16354
|
+
return /* @__PURE__ */ import_react160.default.createElement(Tooltip, { title: `${isFullScreen ? "Exit" : "Go"} fullscreen`, side: "top" }, /* @__PURE__ */ import_react160.default.createElement(
|
16242
16355
|
IconButton,
|
16243
16356
|
{
|
16244
16357
|
variant: "standard",
|
@@ -16247,7 +16360,7 @@ var init_FullscreenButton = __esm({
|
|
16247
16360
|
key: "fullscreen_btn",
|
16248
16361
|
"data-testid": "fullscreen_btn"
|
16249
16362
|
},
|
16250
|
-
/* @__PURE__ */
|
16363
|
+
/* @__PURE__ */ import_react160.default.createElement(Flex, null, icon)
|
16251
16364
|
));
|
16252
16365
|
};
|
16253
16366
|
}
|
@@ -16255,7 +16368,7 @@ var init_FullscreenButton = __esm({
|
|
16255
16368
|
|
16256
16369
|
// src/Prebuilt/components/HMSVideo/HLSAutoplayBlockedPrompt.jsx
|
16257
16370
|
function HLSAutoplayBlockedPrompt({ open, unblockAutoPlay }) {
|
16258
|
-
return /* @__PURE__ */
|
16371
|
+
return /* @__PURE__ */ import_react161.default.createElement(
|
16259
16372
|
Dialog.Root,
|
16260
16373
|
{
|
16261
16374
|
open,
|
@@ -16265,7 +16378,7 @@ function HLSAutoplayBlockedPrompt({ open, unblockAutoPlay }) {
|
|
16265
16378
|
}
|
16266
16379
|
}
|
16267
16380
|
},
|
16268
|
-
/* @__PURE__ */
|
16381
|
+
/* @__PURE__ */ import_react161.default.createElement(DialogContent, { title: "Attention", closeable: false }, /* @__PURE__ */ import_react161.default.createElement(DialogRow, null, /* @__PURE__ */ import_react161.default.createElement(Text, { variant: "md" }, 'The browser wants us to get a confirmation for playing the HLS Stream. Please click "play stream" to proceed.')), /* @__PURE__ */ import_react161.default.createElement(DialogRow, { justify: "end" }, /* @__PURE__ */ import_react161.default.createElement(
|
16269
16382
|
Button,
|
16270
16383
|
{
|
16271
16384
|
variant: "primary",
|
@@ -16277,12 +16390,12 @@ function HLSAutoplayBlockedPrompt({ open, unblockAutoPlay }) {
|
|
16277
16390
|
)))
|
16278
16391
|
);
|
16279
16392
|
}
|
16280
|
-
var
|
16393
|
+
var import_react161;
|
16281
16394
|
var init_HLSAutoplayBlockedPrompt = __esm({
|
16282
16395
|
"src/Prebuilt/components/HMSVideo/HLSAutoplayBlockedPrompt.jsx"() {
|
16283
16396
|
"use strict";
|
16284
16397
|
init_define_process_env();
|
16285
|
-
|
16398
|
+
import_react161 = __toESM(require("react"));
|
16286
16399
|
init_src();
|
16287
16400
|
init_DialogContent2();
|
16288
16401
|
}
|
@@ -16290,7 +16403,7 @@ var init_HLSAutoplayBlockedPrompt = __esm({
|
|
16290
16403
|
|
16291
16404
|
// src/Prebuilt/components/HMSVideo/HLSQualitySelector.jsx
|
16292
16405
|
function HLSQualitySelector({ open, onOpen, layers, onQualityChange, selection, isAuto }) {
|
16293
|
-
return /* @__PURE__ */
|
16406
|
+
return /* @__PURE__ */ import_react162.default.createElement(Dropdown.Root, { open, onOpenChange: (value) => onOpen(value) }, /* @__PURE__ */ import_react162.default.createElement(Dropdown.Trigger, { asChild: true, "data-testid": "quality_selector" }, /* @__PURE__ */ import_react162.default.createElement(
|
16294
16407
|
Flex,
|
16295
16408
|
{
|
16296
16409
|
css: {
|
@@ -16300,7 +16413,7 @@ function HLSQualitySelector({ open, onOpen, layers, onQualityChange, selection,
|
|
16300
16413
|
p: "$2"
|
16301
16414
|
}
|
16302
16415
|
},
|
16303
|
-
/* @__PURE__ */
|
16416
|
+
/* @__PURE__ */ import_react162.default.createElement(Tooltip, { title: "Select Quality", side: "top" }, /* @__PURE__ */ import_react162.default.createElement(Flex, { align: "center" }, /* @__PURE__ */ import_react162.default.createElement(
|
16304
16417
|
Box,
|
16305
16418
|
{
|
16306
16419
|
css: {
|
@@ -16311,8 +16424,8 @@ function HLSQualitySelector({ open, onOpen, layers, onQualityChange, selection,
|
|
16311
16424
|
c: "$on_surface_high"
|
16312
16425
|
}
|
16313
16426
|
},
|
16314
|
-
/* @__PURE__ */
|
16315
|
-
), /* @__PURE__ */
|
16427
|
+
/* @__PURE__ */ import_react162.default.createElement(import_react_icons71.SettingsIcon, null)
|
16428
|
+
), /* @__PURE__ */ import_react162.default.createElement(
|
16316
16429
|
Text,
|
16317
16430
|
{
|
16318
16431
|
variant: {
|
@@ -16322,7 +16435,7 @@ function HLSQualitySelector({ open, onOpen, layers, onQualityChange, selection,
|
|
16322
16435
|
},
|
16323
16436
|
css: { display: "flex", alignItems: "center", ml: "$2", c: "$on_surface_medium" }
|
16324
16437
|
},
|
16325
|
-
isAuto && /* @__PURE__ */
|
16438
|
+
isAuto && /* @__PURE__ */ import_react162.default.createElement(import_react162.default.Fragment, null, "Auto", /* @__PURE__ */ import_react162.default.createElement(
|
16326
16439
|
Box,
|
16327
16440
|
{
|
16328
16441
|
css: {
|
@@ -16337,7 +16450,7 @@ function HLSQualitySelector({ open, onOpen, layers, onQualityChange, selection,
|
|
16337
16450
|
selection && Math.min(selection.width, selection.height),
|
16338
16451
|
"p"
|
16339
16452
|
)))
|
16340
|
-
)), layers.length > 0 && /* @__PURE__ */
|
16453
|
+
)), layers.length > 0 && /* @__PURE__ */ import_react162.default.createElement(
|
16341
16454
|
Dropdown.Content,
|
16342
16455
|
{
|
16343
16456
|
sideOffset: 5,
|
@@ -16353,7 +16466,7 @@ function HLSQualitySelector({ open, onOpen, layers, onQualityChange, selection,
|
|
16353
16466
|
}
|
16354
16467
|
},
|
16355
16468
|
layers.map((layer) => {
|
16356
|
-
return /* @__PURE__ */
|
16469
|
+
return /* @__PURE__ */ import_react162.default.createElement(
|
16357
16470
|
Dropdown.Item,
|
16358
16471
|
{
|
16359
16472
|
onClick: () => onQualityChange(layer),
|
@@ -16368,12 +16481,12 @@ function HLSQualitySelector({ open, onOpen, layers, onQualityChange, selection,
|
|
16368
16481
|
gap: "$2"
|
16369
16482
|
}
|
16370
16483
|
},
|
16371
|
-
/* @__PURE__ */
|
16372
|
-
/* @__PURE__ */
|
16373
|
-
!isAuto && layer.width === (selection == null ? void 0 : selection.width) && layer.height === (selection == null ? void 0 : selection.height) && /* @__PURE__ */
|
16484
|
+
/* @__PURE__ */ import_react162.default.createElement(Text, { variant: "caption", css: { fontWeight: "$semiBold" } }, getQualityText(layer)),
|
16485
|
+
/* @__PURE__ */ import_react162.default.createElement(Text, { variant: "caption", css: { flex: "1 1 0", c: "$on_surface_low", pl: "$2" } }, getBitrateText(layer)),
|
16486
|
+
!isAuto && layer.width === (selection == null ? void 0 : selection.width) && layer.height === (selection == null ? void 0 : selection.height) && /* @__PURE__ */ import_react162.default.createElement(import_react_icons71.CheckIcon, { width: "16px", height: "16px" })
|
16374
16487
|
);
|
16375
16488
|
}),
|
16376
|
-
/* @__PURE__ */
|
16489
|
+
/* @__PURE__ */ import_react162.default.createElement(
|
16377
16490
|
Dropdown.Item,
|
16378
16491
|
{
|
16379
16492
|
onClick: () => onQualityChange({ height: "auto" }),
|
@@ -16388,17 +16501,17 @@ function HLSQualitySelector({ open, onOpen, layers, onQualityChange, selection,
|
|
16388
16501
|
gap: "$2"
|
16389
16502
|
}
|
16390
16503
|
},
|
16391
|
-
/* @__PURE__ */
|
16392
|
-
isAuto && /* @__PURE__ */
|
16504
|
+
/* @__PURE__ */ import_react162.default.createElement(Text, { variant: "caption", css: { fontWeight: "$semiBold", flex: "1 1 0" } }, "Auto"),
|
16505
|
+
isAuto && /* @__PURE__ */ import_react162.default.createElement(import_react_icons71.CheckIcon, { width: "16px", height: "16px" })
|
16393
16506
|
)
|
16394
16507
|
));
|
16395
16508
|
}
|
16396
|
-
var
|
16509
|
+
var import_react162, import_react_icons71, getQualityText, getBitrateText;
|
16397
16510
|
var init_HLSQualitySelector = __esm({
|
16398
16511
|
"src/Prebuilt/components/HMSVideo/HLSQualitySelector.jsx"() {
|
16399
16512
|
"use strict";
|
16400
16513
|
init_define_process_env();
|
16401
|
-
|
16514
|
+
import_react162 = __toESM(require("react"));
|
16402
16515
|
import_react_icons71 = require("@100mslive/react-icons");
|
16403
16516
|
init_src();
|
16404
16517
|
getQualityText = (layer) => `${Math.min(layer.height, layer.width)}p `;
|
@@ -16411,13 +16524,13 @@ var HLSView_exports = {};
|
|
16411
16524
|
__export(HLSView_exports, {
|
16412
16525
|
default: () => HLSView_default
|
16413
16526
|
});
|
16414
|
-
var
|
16527
|
+
var import_react163, import_react_use33, import_hls_player3, import_screenfull3, import_react_sdk89, import_react_icons72, hlsPlayer, HLSView, HLSView_default;
|
16415
16528
|
var init_HLSView = __esm({
|
16416
16529
|
"src/Prebuilt/layouts/HLSView.jsx"() {
|
16417
16530
|
"use strict";
|
16418
16531
|
init_define_process_env();
|
16419
|
-
|
16420
|
-
|
16532
|
+
import_react163 = __toESM(require("react"));
|
16533
|
+
import_react_use33 = require("react-use");
|
16421
16534
|
import_hls_player3 = require("@100mslive/hls-player");
|
16422
16535
|
import_screenfull3 = __toESM(require("screenfull"));
|
16423
16536
|
import_react_sdk89 = require("@100mslive/react-sdk");
|
@@ -16437,33 +16550,33 @@ var init_HLSView = __esm({
|
|
16437
16550
|
init_constants();
|
16438
16551
|
HLSView = () => {
|
16439
16552
|
var _a7;
|
16440
|
-
const videoRef = (0,
|
16441
|
-
const hlsViewRef = (0,
|
16553
|
+
const videoRef = (0, import_react163.useRef)(null);
|
16554
|
+
const hlsViewRef = (0, import_react163.useRef)(null);
|
16442
16555
|
const hlsState = (0, import_react_sdk89.useHMSStore)(import_react_sdk89.selectHLSState);
|
16443
16556
|
const enablHlsStats = (0, import_react_sdk89.useHMSStore)((0, import_react_sdk89.selectAppData)(APP_DATA.hlsStats));
|
16444
16557
|
const hmsActions = (0, import_react_sdk89.useHMSActions)();
|
16445
16558
|
const { themeType, theme: theme2 } = useTheme();
|
16446
|
-
const [streamEnded, setStreamEnded] = (0,
|
16447
|
-
let [hlsStatsState, setHlsStatsState] = (0,
|
16559
|
+
const [streamEnded, setStreamEnded] = (0, import_react163.useState)(false);
|
16560
|
+
let [hlsStatsState, setHlsStatsState] = (0, import_react163.useState)(null);
|
16448
16561
|
const hlsUrl = (_a7 = hlsState.variants[0]) == null ? void 0 : _a7.url;
|
16449
|
-
const [availableLayers, setAvailableLayers] = (0,
|
16450
|
-
const [isVideoLive, setIsVideoLive] = (0,
|
16451
|
-
const [isUserSelectedAuto, setIsUserSelectedAuto] = (0,
|
16452
|
-
const [currentSelectedQuality, setCurrentSelectedQuality] = (0,
|
16453
|
-
const [isHlsAutoplayBlocked, setIsHlsAutoplayBlocked] = (0,
|
16454
|
-
const [isPaused, setIsPaused] = (0,
|
16562
|
+
const [availableLayers, setAvailableLayers] = (0, import_react163.useState)([]);
|
16563
|
+
const [isVideoLive, setIsVideoLive] = (0, import_react163.useState)(true);
|
16564
|
+
const [isUserSelectedAuto, setIsUserSelectedAuto] = (0, import_react163.useState)(true);
|
16565
|
+
const [currentSelectedQuality, setCurrentSelectedQuality] = (0, import_react163.useState)(null);
|
16566
|
+
const [isHlsAutoplayBlocked, setIsHlsAutoplayBlocked] = (0, import_react163.useState)(false);
|
16567
|
+
const [isPaused, setIsPaused] = (0, import_react163.useState)(false);
|
16455
16568
|
const isFullScreenSupported = import_screenfull3.default.isEnabled;
|
16456
|
-
const [show, toggle] = (0,
|
16457
|
-
const [controlsVisible, setControlsVisible] = (0,
|
16458
|
-
const controlsRef = (0,
|
16459
|
-
const controlsTimerRef = (0,
|
16460
|
-
const [qualityDropDownOpen, setQualityDropDownOpen] = (0,
|
16461
|
-
const isMobile = (0,
|
16462
|
-
const isFullScreen = (0,
|
16569
|
+
const [show, toggle] = (0, import_react_use33.useToggle)(false);
|
16570
|
+
const [controlsVisible, setControlsVisible] = (0, import_react163.useState)(true);
|
16571
|
+
const controlsRef = (0, import_react163.useRef)();
|
16572
|
+
const controlsTimerRef = (0, import_react163.useRef)();
|
16573
|
+
const [qualityDropDownOpen, setQualityDropDownOpen] = (0, import_react163.useState)(false);
|
16574
|
+
const isMobile = (0, import_react_use33.useMedia)(config.media.md);
|
16575
|
+
const isFullScreen = (0, import_react_use33.useFullscreen)(hlsViewRef, show, {
|
16463
16576
|
onClose: () => toggle(false)
|
16464
16577
|
});
|
16465
|
-
const [showLoader, setShowLoader] = (0,
|
16466
|
-
(0,
|
16578
|
+
const [showLoader, setShowLoader] = (0, import_react163.useState)(false);
|
16579
|
+
(0, import_react163.useEffect)(() => {
|
16467
16580
|
const videoEl = videoRef.current;
|
16468
16581
|
const showLoader2 = () => setShowLoader(true);
|
16469
16582
|
const hideLoader = () => setShowLoader(false);
|
@@ -16474,7 +16587,7 @@ var init_HLSView = __esm({
|
|
16474
16587
|
videoEl == null ? void 0 : videoEl.removeEventListener("waiting", showLoader2);
|
16475
16588
|
};
|
16476
16589
|
}, []);
|
16477
|
-
(0,
|
16590
|
+
(0, import_react163.useEffect)(() => {
|
16478
16591
|
const videoElem = videoRef.current;
|
16479
16592
|
const setStreamEndedCallback = () => {
|
16480
16593
|
setStreamEnded(true);
|
@@ -16485,7 +16598,7 @@ var init_HLSView = __esm({
|
|
16485
16598
|
videoElem == null ? void 0 : videoElem.removeEventListener("ended", setStreamEndedCallback);
|
16486
16599
|
};
|
16487
16600
|
}, [hlsUrl]);
|
16488
|
-
(0,
|
16601
|
+
(0, import_react163.useEffect)(() => {
|
16489
16602
|
let videoEl = videoRef.current;
|
16490
16603
|
const manifestLoadedHandler = ({ layers }) => {
|
16491
16604
|
setAvailableLayers(layers);
|
@@ -16550,7 +16663,7 @@ var init_HLSView = __esm({
|
|
16550
16663
|
};
|
16551
16664
|
}
|
16552
16665
|
}, [hlsUrl]);
|
16553
|
-
(0,
|
16666
|
+
(0, import_react163.useEffect)(() => {
|
16554
16667
|
const onHLSStats = (state) => setHlsStatsState(state);
|
16555
16668
|
if (enablHlsStats) {
|
16556
16669
|
hlsPlayer == null ? void 0 : hlsPlayer.on(import_hls_player3.HMSHLSPlayerEvents.STATS, onHLSStats);
|
@@ -16569,7 +16682,7 @@ var init_HLSView = __esm({
|
|
16569
16682
|
console.error("Tried to unblock Autoplay failed with", error.message);
|
16570
16683
|
}
|
16571
16684
|
});
|
16572
|
-
const handleQuality = (0,
|
16685
|
+
const handleQuality = (0, import_react163.useCallback)(
|
16573
16686
|
(quality) => {
|
16574
16687
|
if (hlsPlayer) {
|
16575
16688
|
setIsUserSelectedAuto(quality.height.toString().toLowerCase() === "auto");
|
@@ -16582,7 +16695,7 @@ var init_HLSView = __esm({
|
|
16582
16695
|
const sfnOverlayClose = () => {
|
16583
16696
|
hmsActions.setAppData(APP_DATA.hlsStats, !enablHlsStats);
|
16584
16697
|
};
|
16585
|
-
(0,
|
16698
|
+
(0, import_react163.useEffect)(() => {
|
16586
16699
|
if (controlsVisible && isFullScreen && !qualityDropDownOpen) {
|
16587
16700
|
if (controlsTimerRef.current) {
|
16588
16701
|
clearTimeout(controlsTimerRef.current);
|
@@ -16600,7 +16713,7 @@ var init_HLSView = __esm({
|
|
16600
16713
|
}
|
16601
16714
|
};
|
16602
16715
|
}, [controlsVisible, isFullScreen, qualityDropDownOpen]);
|
16603
|
-
const onHoverHandler = (0,
|
16716
|
+
const onHoverHandler = (0, import_react163.useCallback)(
|
16604
16717
|
(event) => {
|
16605
16718
|
if (event.type === "mouseenter" || qualityDropDownOpen) {
|
16606
16719
|
setControlsVisible(true);
|
@@ -16617,7 +16730,7 @@ var init_HLSView = __esm({
|
|
16617
16730
|
},
|
16618
16731
|
[controlsVisible, isFullScreen, qualityDropDownOpen]
|
16619
16732
|
);
|
16620
|
-
return /* @__PURE__ */
|
16733
|
+
return /* @__PURE__ */ import_react163.default.createElement(
|
16621
16734
|
Flex,
|
16622
16735
|
{
|
16623
16736
|
key: "hls-viewer",
|
@@ -16627,8 +16740,8 @@ var init_HLSView = __esm({
|
|
16627
16740
|
size: "100%"
|
16628
16741
|
}
|
16629
16742
|
},
|
16630
|
-
(hlsStatsState == null ? void 0 : hlsStatsState.url) && enablHlsStats ? /* @__PURE__ */
|
16631
|
-
hlsUrl && !streamEnded ? /* @__PURE__ */
|
16743
|
+
(hlsStatsState == null ? void 0 : hlsStatsState.url) && enablHlsStats ? /* @__PURE__ */ import_react163.default.createElement(HlsStatsOverlay, { hlsStatsState, onClose: sfnOverlayClose }) : null,
|
16744
|
+
hlsUrl && !streamEnded ? /* @__PURE__ */ import_react163.default.createElement(
|
16632
16745
|
Flex,
|
16633
16746
|
{
|
16634
16747
|
id: "hls-player-container",
|
@@ -16640,8 +16753,8 @@ var init_HLSView = __esm({
|
|
16640
16753
|
height: "100%"
|
16641
16754
|
}
|
16642
16755
|
},
|
16643
|
-
/* @__PURE__ */
|
16644
|
-
showLoader && /* @__PURE__ */
|
16756
|
+
/* @__PURE__ */ import_react163.default.createElement(HLSAutoplayBlockedPrompt, { open: isHlsAutoplayBlocked, unblockAutoPlay }),
|
16757
|
+
showLoader && /* @__PURE__ */ import_react163.default.createElement(
|
16645
16758
|
Flex,
|
16646
16759
|
{
|
16647
16760
|
align: "center",
|
@@ -16650,9 +16763,9 @@ var init_HLSView = __esm({
|
|
16650
16763
|
position: "absolute"
|
16651
16764
|
}
|
16652
16765
|
},
|
16653
|
-
/* @__PURE__ */
|
16766
|
+
/* @__PURE__ */ import_react163.default.createElement(Loading, { width: 72, height: 72 })
|
16654
16767
|
),
|
16655
|
-
/* @__PURE__ */
|
16768
|
+
/* @__PURE__ */ import_react163.default.createElement(
|
16656
16769
|
HMSVideoPlayer.Root,
|
16657
16770
|
{
|
16658
16771
|
ref: videoRef,
|
@@ -16660,7 +16773,7 @@ var init_HLSView = __esm({
|
|
16660
16773
|
onMouseMove: onHoverHandler,
|
16661
16774
|
onMouseLeave: onHoverHandler
|
16662
16775
|
},
|
16663
|
-
isMobile && isPaused && /* @__PURE__ */
|
16776
|
+
isMobile && isPaused && /* @__PURE__ */ import_react163.default.createElement(
|
16664
16777
|
Box,
|
16665
16778
|
{
|
16666
16779
|
css: {
|
@@ -16668,17 +16781,18 @@ var init_HLSView = __esm({
|
|
16668
16781
|
top: "40%",
|
16669
16782
|
left: "50%",
|
16670
16783
|
transform: "translateY(-40%) translateX(-50%)",
|
16671
|
-
padding: "$
|
16784
|
+
padding: "$8 14px $8 18px",
|
16672
16785
|
display: "inline-flex",
|
16673
|
-
r: "
|
16786
|
+
r: "50%",
|
16787
|
+
gap: "$1",
|
16674
16788
|
bg: "$primary_default"
|
16675
16789
|
}
|
16676
16790
|
},
|
16677
|
-
/* @__PURE__ */
|
16791
|
+
/* @__PURE__ */ import_react163.default.createElement(IconButton, { onClick: () => __async(void 0, null, function* () {
|
16678
16792
|
return yield hlsPlayer == null ? void 0 : hlsPlayer.play();
|
16679
|
-
}), "data-testid": "play_btn" }, /* @__PURE__ */
|
16793
|
+
}), "data-testid": "play_btn" }, /* @__PURE__ */ import_react163.default.createElement(import_react_icons72.PlayIcon, { width: "60px", height: "60px" }))
|
16680
16794
|
),
|
16681
|
-
/* @__PURE__ */
|
16795
|
+
/* @__PURE__ */ import_react163.default.createElement(
|
16682
16796
|
Flex,
|
16683
16797
|
{
|
16684
16798
|
ref: controlsRef,
|
@@ -16698,14 +16812,14 @@ var init_HLSView = __esm({
|
|
16698
16812
|
opacity: controlsVisible ? `1` : "0"
|
16699
16813
|
}
|
16700
16814
|
},
|
16701
|
-
!isMobile && /* @__PURE__ */
|
16815
|
+
!isMobile && /* @__PURE__ */ import_react163.default.createElement(
|
16702
16816
|
HMSVideoPlayer.Controls.Root,
|
16703
16817
|
{
|
16704
16818
|
css: {
|
16705
16819
|
p: "$4 $8"
|
16706
16820
|
}
|
16707
16821
|
},
|
16708
|
-
/* @__PURE__ */
|
16822
|
+
/* @__PURE__ */ import_react163.default.createElement(HMSVideoPlayer.Controls.Left, null, /* @__PURE__ */ import_react163.default.createElement(
|
16709
16823
|
HMSVideoPlayer.PlayButton,
|
16710
16824
|
{
|
16711
16825
|
onClick: () => __async(void 0, null, function* () {
|
@@ -16713,7 +16827,7 @@ var init_HLSView = __esm({
|
|
16713
16827
|
}),
|
16714
16828
|
isPaused
|
16715
16829
|
}
|
16716
|
-
), /* @__PURE__ */
|
16830
|
+
), /* @__PURE__ */ import_react163.default.createElement(HMSVideoPlayer.Duration, { hlsPlayer }), /* @__PURE__ */ import_react163.default.createElement(HMSVideoPlayer.Volume, { hlsPlayer }), /* @__PURE__ */ import_react163.default.createElement(
|
16717
16831
|
IconButton,
|
16718
16832
|
{
|
16719
16833
|
variant: "standard",
|
@@ -16725,7 +16839,7 @@ var init_HLSView = __esm({
|
|
16725
16839
|
key: "jump-to-live_btn",
|
16726
16840
|
"data-testid": "jump-to-live_btn"
|
16727
16841
|
},
|
16728
|
-
/* @__PURE__ */
|
16842
|
+
/* @__PURE__ */ import_react163.default.createElement(Tooltip, { title: "Go to Live", side: "top" }, /* @__PURE__ */ import_react163.default.createElement(Flex, { justify: "center", gap: 2, align: "center" }, /* @__PURE__ */ import_react163.default.createElement(
|
16729
16843
|
Box,
|
16730
16844
|
{
|
16731
16845
|
css: {
|
@@ -16735,7 +16849,7 @@ var init_HLSView = __esm({
|
|
16735
16849
|
r: "$1"
|
16736
16850
|
}
|
16737
16851
|
}
|
16738
|
-
), /* @__PURE__ */
|
16852
|
+
), /* @__PURE__ */ import_react163.default.createElement(
|
16739
16853
|
Text,
|
16740
16854
|
{
|
16741
16855
|
variant: {
|
@@ -16748,7 +16862,7 @@ var init_HLSView = __esm({
|
|
16748
16862
|
isVideoLive ? "LIVE" : "GO LIVE"
|
16749
16863
|
)))
|
16750
16864
|
)),
|
16751
|
-
/* @__PURE__ */
|
16865
|
+
/* @__PURE__ */ import_react163.default.createElement(HMSVideoPlayer.Controls.Right, null, availableLayers.length > 0 ? /* @__PURE__ */ import_react163.default.createElement(
|
16752
16866
|
HLSQualitySelector,
|
16753
16867
|
{
|
16754
16868
|
layers: availableLayers,
|
@@ -16758,18 +16872,18 @@ var init_HLSView = __esm({
|
|
16758
16872
|
onQualityChange: handleQuality,
|
16759
16873
|
isAuto: isUserSelectedAuto
|
16760
16874
|
}
|
16761
|
-
) : null, isFullScreenSupported ? /* @__PURE__ */
|
16875
|
+
) : null, isFullScreenSupported ? /* @__PURE__ */ import_react163.default.createElement(
|
16762
16876
|
FullScreenButton2,
|
16763
16877
|
{
|
16764
16878
|
isFullScreen,
|
16765
16879
|
onToggle: toggle,
|
16766
|
-
icon: isFullScreen ? /* @__PURE__ */
|
16880
|
+
icon: isFullScreen ? /* @__PURE__ */ import_react163.default.createElement(import_react_icons72.ShrinkIcon, null) : /* @__PURE__ */ import_react163.default.createElement(import_react_icons72.ExpandIcon, null)
|
16767
16881
|
}
|
16768
16882
|
) : null)
|
16769
16883
|
)
|
16770
16884
|
)
|
16771
16885
|
)
|
16772
|
-
) : /* @__PURE__ */
|
16886
|
+
) : /* @__PURE__ */ import_react163.default.createElement(Flex, { align: "center", justify: "center", direction: "column", css: { size: "100%", px: "$10" } }, /* @__PURE__ */ import_react163.default.createElement(Flex, { css: { c: "$on_surface_high", r: "$round", bg: "$surface_default", p: "$2" } }, streamEnded ? /* @__PURE__ */ import_react163.default.createElement(import_react_icons72.ColoredHandIcon, { height: 56, width: 56 }) : /* @__PURE__ */ import_react163.default.createElement(import_react_icons72.RadioIcon, { height: 56, width: 56 })), /* @__PURE__ */ import_react163.default.createElement(Text, { variant: "h5", css: { c: "$on_surface_high", mt: "$10", mb: 0, textAlign: "center" } }, streamEnded ? "Stream has ended" : "Stream yet to start"), /* @__PURE__ */ import_react163.default.createElement(Text, { variant: "md", css: { textAlign: "center", mt: "$4", c: "$on_surface_medium" } }, streamEnded ? "Have a nice day!" : "Sit back and relax"))
|
16773
16887
|
);
|
16774
16888
|
};
|
16775
16889
|
HLSView_default = HLSView;
|
@@ -16777,12 +16891,12 @@ var init_HLSView = __esm({
|
|
16777
16891
|
});
|
16778
16892
|
|
16779
16893
|
// src/Prebuilt/layouts/VideoStreamingSection.tsx
|
16780
|
-
var
|
16894
|
+
var import_react164, import_react_sdk90, HLSView2, VideoStreamingSection;
|
16781
16895
|
var init_VideoStreamingSection = __esm({
|
16782
16896
|
"src/Prebuilt/layouts/VideoStreamingSection.tsx"() {
|
16783
16897
|
"use strict";
|
16784
16898
|
init_define_process_env();
|
16785
|
-
|
16899
|
+
import_react164 = __toESM(require("react"));
|
16786
16900
|
import_react_sdk90 = require("@100mslive/react-sdk");
|
16787
16901
|
init_FullPageProgress();
|
16788
16902
|
init_GridLayout();
|
@@ -16793,7 +16907,7 @@ var init_VideoStreamingSection = __esm({
|
|
16793
16907
|
init_WaitingView();
|
16794
16908
|
init_useUISettings();
|
16795
16909
|
init_constants();
|
16796
|
-
HLSView2 =
|
16910
|
+
HLSView2 = import_react164.default.lazy(() => Promise.resolve().then(() => (init_HLSView(), HLSView_exports)));
|
16797
16911
|
VideoStreamingSection = ({
|
16798
16912
|
screenType,
|
16799
16913
|
elements,
|
@@ -16806,7 +16920,7 @@ var init_VideoStreamingSection = __esm({
|
|
16806
16920
|
const waitingViewerRole = useWaitingViewerRole();
|
16807
16921
|
const urlToIframe = useUrlToEmbed();
|
16808
16922
|
const pdfAnnotatorActive = usePDFAnnotator();
|
16809
|
-
(0,
|
16923
|
+
(0, import_react164.useEffect)(() => {
|
16810
16924
|
if (!isConnected) {
|
16811
16925
|
return;
|
16812
16926
|
}
|
@@ -16817,17 +16931,17 @@ var init_VideoStreamingSection = __esm({
|
|
16817
16931
|
}
|
16818
16932
|
let ViewComponent;
|
16819
16933
|
if (screenType === "hls_live_streaming") {
|
16820
|
-
ViewComponent = /* @__PURE__ */
|
16934
|
+
ViewComponent = /* @__PURE__ */ import_react164.default.createElement(HLSView2, null);
|
16821
16935
|
} else if (localPeerRole === waitingViewerRole) {
|
16822
|
-
ViewComponent = /* @__PURE__ */
|
16936
|
+
ViewComponent = /* @__PURE__ */ import_react164.default.createElement(WaitingView, null);
|
16823
16937
|
} else if (pdfAnnotatorActive) {
|
16824
|
-
ViewComponent = /* @__PURE__ */
|
16938
|
+
ViewComponent = /* @__PURE__ */ import_react164.default.createElement(PDFView, null);
|
16825
16939
|
} else if (urlToIframe) {
|
16826
|
-
ViewComponent = /* @__PURE__ */
|
16940
|
+
ViewComponent = /* @__PURE__ */ import_react164.default.createElement(EmbedView, null);
|
16827
16941
|
} else {
|
16828
|
-
ViewComponent = /* @__PURE__ */
|
16942
|
+
ViewComponent = /* @__PURE__ */ import_react164.default.createElement(GridLayout, __spreadValues({}, (_a7 = elements == null ? void 0 : elements.video_tile_layout) == null ? void 0 : _a7.grid));
|
16829
16943
|
}
|
16830
|
-
return /* @__PURE__ */
|
16944
|
+
return /* @__PURE__ */ import_react164.default.createElement(import_react164.Suspense, { fallback: /* @__PURE__ */ import_react164.default.createElement(FullPageProgress_default, null) }, /* @__PURE__ */ import_react164.default.createElement(
|
16831
16945
|
Flex,
|
16832
16946
|
{
|
16833
16947
|
css: {
|
@@ -16837,7 +16951,7 @@ var init_VideoStreamingSection = __esm({
|
|
16837
16951
|
}
|
16838
16952
|
},
|
16839
16953
|
ViewComponent,
|
16840
|
-
/* @__PURE__ */
|
16954
|
+
/* @__PURE__ */ import_react164.default.createElement(
|
16841
16955
|
SidePane_default,
|
16842
16956
|
{
|
16843
16957
|
screenType,
|
@@ -16850,108 +16964,30 @@ var init_VideoStreamingSection = __esm({
|
|
16850
16964
|
}
|
16851
16965
|
});
|
16852
16966
|
|
16853
|
-
// src/Prebuilt/components/RoleChangeRequestModal.tsx
|
16854
|
-
var import_react163, import_react_sdk91, RoleChangeRequestModal, RequestDialog2;
|
16855
|
-
var init_RoleChangeRequestModal = __esm({
|
16856
|
-
"src/Prebuilt/components/RoleChangeRequestModal.tsx"() {
|
16857
|
-
"use strict";
|
16858
|
-
init_define_process_env();
|
16859
|
-
import_react163 = __toESM(require("react"));
|
16860
|
-
import_react_sdk91 = require("@100mslive/react-sdk");
|
16861
|
-
init_PreviewJoin();
|
16862
|
-
init_src();
|
16863
|
-
init_useMetadata();
|
16864
|
-
init_constants();
|
16865
|
-
RoleChangeRequestModal = () => {
|
16866
|
-
const hmsActions = (0, import_react_sdk91.useHMSActions)();
|
16867
|
-
const { updateMetaData } = useMyMetadata();
|
16868
|
-
const currentRole = (0, import_react_sdk91.useHMSStore)(import_react_sdk91.selectLocalPeerRoleName);
|
16869
|
-
const roleChangeRequest = (0, import_react_sdk91.useHMSStore)(import_react_sdk91.selectRoleChangeRequest);
|
16870
|
-
const name = (0, import_react_sdk91.useHMSStore)(import_react_sdk91.selectLocalPeerName);
|
16871
|
-
const { sendEvent } = (0, import_react_sdk91.useCustomEvent)({ type: ROLE_CHANGE_DECLINED });
|
16872
|
-
(0, import_react163.useEffect)(() => {
|
16873
|
-
if (!(roleChangeRequest == null ? void 0 : roleChangeRequest.role)) {
|
16874
|
-
return;
|
16875
|
-
}
|
16876
|
-
(() => __async(void 0, null, function* () {
|
16877
|
-
yield hmsActions.preview({ asRole: roleChangeRequest.role.name });
|
16878
|
-
}))();
|
16879
|
-
}, [hmsActions, roleChangeRequest, currentRole, updateMetaData]);
|
16880
|
-
if (!(roleChangeRequest == null ? void 0 : roleChangeRequest.role)) {
|
16881
|
-
return null;
|
16882
|
-
}
|
16883
|
-
const body = /* @__PURE__ */ import_react163.default.createElement(import_react163.default.Fragment, null, /* @__PURE__ */ import_react163.default.createElement(Text, { css: { fontWeight: 400, c: "$on_surface_medium", textAlign: "center" } }, "Setup your audio and video before joining"), /* @__PURE__ */ import_react163.default.createElement(
|
16884
|
-
Flex,
|
16885
|
-
{
|
16886
|
-
align: "center",
|
16887
|
-
justify: "center",
|
16888
|
-
css: {
|
16889
|
-
"@sm": { width: "100%" },
|
16890
|
-
flexDirection: "column",
|
16891
|
-
mt: "$6"
|
16892
|
-
}
|
16893
|
-
},
|
16894
|
-
/* @__PURE__ */ import_react163.default.createElement(PreviewTile, { name: name || "" }),
|
16895
|
-
/* @__PURE__ */ import_react163.default.createElement(PreviewControls, { hideSettings: true })
|
16896
|
-
));
|
16897
|
-
return /* @__PURE__ */ import_react163.default.createElement(
|
16898
|
-
RequestDialog2,
|
16899
|
-
{
|
16900
|
-
title: `You're invited to join the ${roleChangeRequest.role.name} role`,
|
16901
|
-
onOpenChange: (value) => __async(void 0, null, function* () {
|
16902
|
-
var _a7;
|
16903
|
-
if (!value) {
|
16904
|
-
yield hmsActions.rejectChangeRole(roleChangeRequest);
|
16905
|
-
sendEvent(__spreadProps(__spreadValues({}, roleChangeRequest), { peerName: name }), { peerId: (_a7 = roleChangeRequest.requestedBy) == null ? void 0 : _a7.id });
|
16906
|
-
yield hmsActions.cancelMidCallPreview();
|
16907
|
-
yield hmsActions.lowerLocalPeerHand();
|
16908
|
-
}
|
16909
|
-
}),
|
16910
|
-
body,
|
16911
|
-
onAction: () => __async(void 0, null, function* () {
|
16912
|
-
yield hmsActions.acceptChangeRole(roleChangeRequest);
|
16913
|
-
yield updateMetaData({ prevRole: currentRole });
|
16914
|
-
yield hmsActions.lowerLocalPeerHand();
|
16915
|
-
}),
|
16916
|
-
actionText: "Accept"
|
16917
|
-
}
|
16918
|
-
);
|
16919
|
-
};
|
16920
|
-
RequestDialog2 = ({
|
16921
|
-
open = true,
|
16922
|
-
onOpenChange,
|
16923
|
-
title,
|
16924
|
-
body,
|
16925
|
-
actionText = "Accept",
|
16926
|
-
onAction
|
16927
|
-
}) => /* @__PURE__ */ import_react163.default.createElement(Dialog.Root, { open, onOpenChange }, /* @__PURE__ */ import_react163.default.createElement(Dialog.Portal, null, /* @__PURE__ */ import_react163.default.createElement(Dialog.Overlay, null), /* @__PURE__ */ import_react163.default.createElement(Dialog.Content, { css: { p: "$10" } }, /* @__PURE__ */ import_react163.default.createElement(Dialog.Title, { css: { p: 0, display: "flex", flexDirection: "row", gap: "$md", justifyContent: "center" } }, /* @__PURE__ */ import_react163.default.createElement(Text, { variant: "h6" }, title)), /* @__PURE__ */ import_react163.default.createElement(Box, { css: { mt: "$4", mb: "$10" } }, body), /* @__PURE__ */ import_react163.default.createElement(Flex, { justify: "center", align: "center", css: { width: "100%", gap: "$md" } }, /* @__PURE__ */ import_react163.default.createElement(Box, { css: { width: "50%" } }, /* @__PURE__ */ import_react163.default.createElement(Dialog.Close, { css: { width: "100%" } }, /* @__PURE__ */ import_react163.default.createElement(Button, { variant: "standard", outlined: true, css: { width: "100%" } }, "Cancel"))), /* @__PURE__ */ import_react163.default.createElement(Box, { css: { width: "50%" } }, /* @__PURE__ */ import_react163.default.createElement(Button, { variant: "primary", css: { width: "100%" }, onClick: onAction }, actionText))))));
|
16928
|
-
}
|
16929
|
-
});
|
16930
|
-
|
16931
16967
|
// src/Prebuilt/components/conference.jsx
|
16932
16968
|
var conference_exports = {};
|
16933
16969
|
__export(conference_exports, {
|
16934
16970
|
default: () => conference_default
|
16935
16971
|
});
|
16936
|
-
var
|
16972
|
+
var import_react165, import_react_router_dom5, import_react_use34, import_react_sdk91, Conference, conference_default;
|
16937
16973
|
var init_conference = __esm({
|
16938
16974
|
"src/Prebuilt/components/conference.jsx"() {
|
16939
16975
|
"use strict";
|
16940
16976
|
init_define_process_env();
|
16941
|
-
|
16977
|
+
import_react165 = __toESM(require("react"));
|
16942
16978
|
import_react_router_dom5 = require("react-router-dom");
|
16943
|
-
|
16944
|
-
|
16979
|
+
import_react_use34 = require("react-use");
|
16980
|
+
import_react_sdk91 = require("@100mslive/react-sdk");
|
16945
16981
|
init_Footer3();
|
16946
16982
|
init_HLSFailureModal();
|
16947
16983
|
init_PIPComponent();
|
16948
16984
|
init_PIPManager();
|
16985
|
+
init_RoleChangeRequestModal();
|
16949
16986
|
init_Layout();
|
16950
16987
|
init_AppContext();
|
16951
16988
|
init_VideoStreamingSection();
|
16952
16989
|
init_FullPageProgress();
|
16953
16990
|
init_Header2();
|
16954
|
-
init_RoleChangeRequestModal();
|
16955
16991
|
init_useRoomLayoutScreen();
|
16956
16992
|
init_useUISettings();
|
16957
16993
|
init_constants();
|
@@ -16962,17 +16998,17 @@ var init_conference = __esm({
|
|
16962
16998
|
const { userName, endpoints } = useHMSPrebuiltContext();
|
16963
16999
|
const screenProps = useRoomLayoutConferencingScreen();
|
16964
17000
|
const { isPreviewScreenEnabled } = useRoomLayoutPreviewScreen();
|
16965
|
-
const roomState = (0,
|
16966
|
-
const prevState = (0,
|
16967
|
-
const isConnectedToRoom = (0,
|
16968
|
-
const hmsActions = (0,
|
16969
|
-
const [hideControls, setHideControls] = (0,
|
16970
|
-
const dropdownList = (0,
|
17001
|
+
const roomState = (0, import_react_sdk91.useHMSStore)(import_react_sdk91.selectRoomState);
|
17002
|
+
const prevState = (0, import_react_use34.usePrevious)(roomState);
|
17003
|
+
const isConnectedToRoom = (0, import_react_sdk91.useHMSStore)(import_react_sdk91.selectIsConnectedToRoom);
|
17004
|
+
const hmsActions = (0, import_react_sdk91.useHMSActions)();
|
17005
|
+
const [hideControls, setHideControls] = (0, import_react165.useState)(false);
|
17006
|
+
const dropdownList = (0, import_react_sdk91.useHMSStore)((0, import_react_sdk91.selectAppData)(APP_DATA.dropdownList));
|
16971
17007
|
const authTokenInAppData = useAuthToken();
|
16972
|
-
const headerRef = (0,
|
16973
|
-
const footerRef = (0,
|
17008
|
+
const headerRef = (0, import_react165.useRef)();
|
17009
|
+
const footerRef = (0, import_react165.useRef)();
|
16974
17010
|
const isMobileDevice = isAndroid || isIOS || isIPadOS;
|
16975
|
-
const dropdownListRef = (0,
|
17011
|
+
const dropdownListRef = (0, import_react165.useRef)();
|
16976
17012
|
const [isHLSStarted] = useSetAppDataByKey(APP_DATA.hlsStarted);
|
16977
17013
|
const toggleControls = () => {
|
16978
17014
|
var _a8;
|
@@ -16980,8 +17016,8 @@ var init_conference = __esm({
|
|
16980
17016
|
setHideControls((value) => !value);
|
16981
17017
|
}
|
16982
17018
|
};
|
16983
|
-
const autoRoomJoined = (0,
|
16984
|
-
(0,
|
17019
|
+
const autoRoomJoined = (0, import_react165.useRef)(isPreviewScreenEnabled);
|
17020
|
+
(0, import_react165.useEffect)(() => {
|
16985
17021
|
let timeout = null;
|
16986
17022
|
dropdownListRef.current = dropdownList || [];
|
16987
17023
|
if (dropdownListRef.current.length === 0) {
|
@@ -16996,7 +17032,7 @@ var init_conference = __esm({
|
|
16996
17032
|
clearTimeout(timeout);
|
16997
17033
|
};
|
16998
17034
|
}, [dropdownList, hideControls, isMobileDevice]);
|
16999
|
-
(0,
|
17035
|
+
(0, import_react165.useEffect)(() => {
|
17000
17036
|
if (!roomId) {
|
17001
17037
|
navigate(`/`);
|
17002
17038
|
return;
|
@@ -17004,15 +17040,15 @@ var init_conference = __esm({
|
|
17004
17040
|
if (!isPreviewScreenEnabled) {
|
17005
17041
|
return;
|
17006
17042
|
}
|
17007
|
-
if (!prevState && !(roomState ===
|
17043
|
+
if (!prevState && !(roomState === import_react_sdk91.HMSRoomState.Connecting || roomState === import_react_sdk91.HMSRoomState.Reconnecting || isConnectedToRoom)) {
|
17008
17044
|
if (role)
|
17009
17045
|
navigate(`/preview/${roomId || ""}/${role}`);
|
17010
17046
|
else
|
17011
17047
|
navigate(`/preview/${roomId || ""}`);
|
17012
17048
|
}
|
17013
17049
|
}, [isConnectedToRoom, prevState, roomState, navigate, role, roomId, isPreviewScreenEnabled]);
|
17014
|
-
(0,
|
17015
|
-
if (authTokenInAppData && !isConnectedToRoom && !isPreviewScreenEnabled && roomState !==
|
17050
|
+
(0, import_react165.useEffect)(() => {
|
17051
|
+
if (authTokenInAppData && !isConnectedToRoom && !isPreviewScreenEnabled && roomState !== import_react_sdk91.HMSRoomState.Connecting && !autoRoomJoined.current) {
|
17016
17052
|
hmsActions.join({
|
17017
17053
|
userName,
|
17018
17054
|
authToken: authTokenInAppData,
|
@@ -17026,15 +17062,15 @@ var init_conference = __esm({
|
|
17026
17062
|
autoRoomJoined.current = true;
|
17027
17063
|
}
|
17028
17064
|
}, [authTokenInAppData, endpoints == null ? void 0 : endpoints.init, hmsActions, isConnectedToRoom, isPreviewScreenEnabled, roomState, userName]);
|
17029
|
-
(0,
|
17065
|
+
(0, import_react165.useEffect)(() => {
|
17030
17066
|
return () => {
|
17031
17067
|
PictureInPicture.stop().catch((error) => console.error("stopping pip", error));
|
17032
17068
|
};
|
17033
17069
|
}, []);
|
17034
17070
|
if (!isConnectedToRoom) {
|
17035
|
-
return /* @__PURE__ */
|
17071
|
+
return /* @__PURE__ */ import_react165.default.createElement(FullPageProgress_default, { text: "Joining..." });
|
17036
17072
|
}
|
17037
|
-
return /* @__PURE__ */
|
17073
|
+
return /* @__PURE__ */ import_react165.default.createElement(import_react165.default.Fragment, null, isHLSStarted ? /* @__PURE__ */ import_react165.default.createElement(Box, { css: { position: "fixed", zIndex: 100, w: "100%", h: "100%", left: 0, top: 0 } }, /* @__PURE__ */ import_react165.default.createElement(FullPageProgress_default, { text: "Starting live stream...", css: { opacity: 0.8, bg: "$background_dim" } })) : null, /* @__PURE__ */ import_react165.default.createElement(Flex, { css: { size: "100%", overflow: "hidden" }, direction: "column" }, !screenProps.hideSections.includes("header") && /* @__PURE__ */ import_react165.default.createElement(
|
17038
17074
|
Box,
|
17039
17075
|
{
|
17040
17076
|
ref: headerRef,
|
@@ -17048,8 +17084,8 @@ var init_conference = __esm({
|
|
17048
17084
|
},
|
17049
17085
|
"data-testid": "header"
|
17050
17086
|
},
|
17051
|
-
/* @__PURE__ */
|
17052
|
-
), /* @__PURE__ */
|
17087
|
+
/* @__PURE__ */ import_react165.default.createElement(Header2, { elements: screenProps.elements, screenType: screenProps.screenType })
|
17088
|
+
), /* @__PURE__ */ import_react165.default.createElement(
|
17053
17089
|
Box,
|
17054
17090
|
{
|
17055
17091
|
css: {
|
@@ -17067,7 +17103,7 @@ var init_conference = __esm({
|
|
17067
17103
|
"data-testid": "conferencing",
|
17068
17104
|
onClick: toggleControls
|
17069
17105
|
},
|
17070
|
-
/* @__PURE__ */
|
17106
|
+
/* @__PURE__ */ import_react165.default.createElement(
|
17071
17107
|
VideoStreamingSection,
|
17072
17108
|
{
|
17073
17109
|
screenType: screenProps.screenType,
|
@@ -17075,7 +17111,7 @@ var init_conference = __esm({
|
|
17075
17111
|
hideControls
|
17076
17112
|
}
|
17077
17113
|
)
|
17078
|
-
), !screenProps.hideSections.includes("footer") && /* @__PURE__ */
|
17114
|
+
), !screenProps.hideSections.includes("footer") && /* @__PURE__ */ import_react165.default.createElement(
|
17079
17115
|
Box,
|
17080
17116
|
{
|
17081
17117
|
ref: footerRef,
|
@@ -17092,8 +17128,8 @@ var init_conference = __esm({
|
|
17092
17128
|
},
|
17093
17129
|
"data-testid": "footer"
|
17094
17130
|
},
|
17095
|
-
/* @__PURE__ */
|
17096
|
-
), /* @__PURE__ */
|
17131
|
+
/* @__PURE__ */ import_react165.default.createElement(Footer2, { elements: screenProps.elements, screenType: screenProps.screenType })
|
17132
|
+
), /* @__PURE__ */ import_react165.default.createElement(RoleChangeRequestModal, null), /* @__PURE__ */ import_react165.default.createElement(HLSFailureModal, null), /* @__PURE__ */ import_react165.default.createElement(ActivatedPIP, null)));
|
17097
17133
|
};
|
17098
17134
|
conference_default = Conference;
|
17099
17135
|
}
|
@@ -17106,16 +17142,16 @@ function AppRoutes({
|
|
17106
17142
|
}) {
|
17107
17143
|
const roomLayout = useRoomLayout();
|
17108
17144
|
const isNotificationsDisabled = useIsNotificationDisabled();
|
17109
|
-
return /* @__PURE__ */
|
17145
|
+
return /* @__PURE__ */ import_react166.default.createElement(Router, null, /* @__PURE__ */ import_react166.default.createElement(import_react166.default.Fragment, null, /* @__PURE__ */ import_react166.default.createElement(ToastContainer, null), /* @__PURE__ */ import_react166.default.createElement(Notifications, null), /* @__PURE__ */ import_react166.default.createElement(BackSwipe, null), !isNotificationsDisabled && /* @__PURE__ */ import_react166.default.createElement(FlyingEmoji, null), /* @__PURE__ */ import_react166.default.createElement(RemoteStopScreenshare, null), /* @__PURE__ */ import_react166.default.createElement(KeyboardHandler, null), /* @__PURE__ */ import_react166.default.createElement(AuthToken_default, { authTokenByRoomCodeEndpoint, defaultAuthToken }), roomLayout && /* @__PURE__ */ import_react166.default.createElement(import_react_router_dom6.Routes, null, /* @__PURE__ */ import_react166.default.createElement(import_react_router_dom6.Route, { path: "/*", element: /* @__PURE__ */ import_react166.default.createElement(RouteList, null) }))));
|
17110
17146
|
}
|
17111
|
-
var
|
17147
|
+
var import_react166, import_react_router_dom6, import_react_sdk92, Conference2, HMSPrebuilt, Redirector, RouteList, BackSwipe, Router;
|
17112
17148
|
var init_App = __esm({
|
17113
17149
|
"src/Prebuilt/App.tsx"() {
|
17114
17150
|
"use strict";
|
17115
17151
|
init_define_process_env();
|
17116
|
-
|
17152
|
+
import_react166 = __toESM(require("react"));
|
17117
17153
|
import_react_router_dom6 = require("react-router-dom");
|
17118
|
-
|
17154
|
+
import_react_sdk92 = require("@100mslive/react-sdk");
|
17119
17155
|
init_AppData();
|
17120
17156
|
init_AuthToken();
|
17121
17157
|
init_ErrorBoundary();
|
@@ -17136,8 +17172,8 @@ var init_App = __esm({
|
|
17136
17172
|
init_useAutoStartStreaming();
|
17137
17173
|
init_useRoomLayoutScreen();
|
17138
17174
|
init_FeatureFlags();
|
17139
|
-
Conference2 =
|
17140
|
-
HMSPrebuilt =
|
17175
|
+
Conference2 = import_react166.default.lazy(() => Promise.resolve().then(() => (init_conference(), conference_exports)));
|
17176
|
+
HMSPrebuilt = import_react166.default.forwardRef(
|
17141
17177
|
({
|
17142
17178
|
roomCode = "",
|
17143
17179
|
authToken = "",
|
@@ -17152,11 +17188,11 @@ var init_App = __esm({
|
|
17152
17188
|
}, ref) => {
|
17153
17189
|
var _a7, _b7, _c, _d;
|
17154
17190
|
const metadata = "";
|
17155
|
-
const reactiveStore = (0,
|
17156
|
-
const [hydrated, setHydrated] =
|
17157
|
-
(0,
|
17191
|
+
const reactiveStore = (0, import_react166.useRef)();
|
17192
|
+
const [hydrated, setHydrated] = import_react166.default.useState(false);
|
17193
|
+
(0, import_react166.useEffect)(() => {
|
17158
17194
|
setHydrated(true);
|
17159
|
-
const hms = new
|
17195
|
+
const hms = new import_react_sdk92.HMSReactiveStore();
|
17160
17196
|
const hmsStore = hms.getStore();
|
17161
17197
|
const hmsActions = hms.getActions();
|
17162
17198
|
const hmsNotifications = hms.getNotifications();
|
@@ -17169,13 +17205,13 @@ var init_App = __esm({
|
|
17169
17205
|
hmsNotifications
|
17170
17206
|
};
|
17171
17207
|
}, []);
|
17172
|
-
(0,
|
17208
|
+
(0, import_react166.useEffect)(() => {
|
17173
17209
|
if (!ref || !reactiveStore.current) {
|
17174
17210
|
return;
|
17175
17211
|
}
|
17176
17212
|
ref.current = __spreadValues({}, reactiveStore.current);
|
17177
17213
|
}, [ref]);
|
17178
|
-
(0,
|
17214
|
+
(0, import_react166.useEffect)(
|
17179
17215
|
() => () => {
|
17180
17216
|
var _a8;
|
17181
17217
|
(_a8 = reactiveStore == null ? void 0 : reactiveStore.current) == null ? void 0 : _a8.hmsActions.leave();
|
@@ -17205,7 +17241,7 @@ var init_App = __esm({
|
|
17205
17241
|
return null;
|
17206
17242
|
}
|
17207
17243
|
globalStyles();
|
17208
|
-
return /* @__PURE__ */
|
17244
|
+
return /* @__PURE__ */ import_react166.default.createElement(ErrorBoundary, null, /* @__PURE__ */ import_react166.default.createElement(
|
17209
17245
|
HMSPrebuiltContext.Provider,
|
17210
17246
|
{
|
17211
17247
|
value: {
|
@@ -17223,8 +17259,8 @@ var init_App = __esm({
|
|
17223
17259
|
}
|
17224
17260
|
}
|
17225
17261
|
},
|
17226
|
-
/* @__PURE__ */
|
17227
|
-
|
17262
|
+
/* @__PURE__ */ import_react166.default.createElement(
|
17263
|
+
import_react_sdk92.HMSRoomProvider,
|
17228
17264
|
{
|
17229
17265
|
isHMSStatsOn: FeatureFlags.enableStatsForNerds,
|
17230
17266
|
actions: (_a7 = reactiveStore.current) == null ? void 0 : _a7.hmsActions,
|
@@ -17232,7 +17268,7 @@ var init_App = __esm({
|
|
17232
17268
|
notifications: (_c = reactiveStore.current) == null ? void 0 : _c.hmsNotifications,
|
17233
17269
|
stats: (_d = reactiveStore.current) == null ? void 0 : _d.hmsStats
|
17234
17270
|
},
|
17235
|
-
/* @__PURE__ */
|
17271
|
+
/* @__PURE__ */ import_react166.default.createElement(RoomLayoutProvider, { roomLayoutEndpoint, overrideLayout }, /* @__PURE__ */ import_react166.default.createElement(RoomLayoutContext.Consumer, null, (data3) => {
|
17236
17272
|
var _a8;
|
17237
17273
|
const layout = data3 == null ? void 0 : data3.layout;
|
17238
17274
|
const theme2 = ((_a8 = layout == null ? void 0 : layout.themes) == null ? void 0 : _a8[0]) || {};
|
@@ -17241,7 +17277,7 @@ var init_App = __esm({
|
|
17241
17277
|
if (typography2 == null ? void 0 : typography2.font_family) {
|
17242
17278
|
fontFamily = [`${typography2 == null ? void 0 : typography2.font_family}`, ...fontFamily];
|
17243
17279
|
}
|
17244
|
-
return /* @__PURE__ */
|
17280
|
+
return /* @__PURE__ */ import_react166.default.createElement(
|
17245
17281
|
HMSThemeProvider,
|
17246
17282
|
{
|
17247
17283
|
themeType: `${theme2.name}-${Date.now()}`,
|
@@ -17254,9 +17290,9 @@ var init_App = __esm({
|
|
17254
17290
|
}
|
17255
17291
|
}
|
17256
17292
|
},
|
17257
|
-
/* @__PURE__ */
|
17258
|
-
/* @__PURE__ */
|
17259
|
-
/* @__PURE__ */
|
17293
|
+
/* @__PURE__ */ import_react166.default.createElement(AppData, { appDetails: metadata, tokenEndpoint: tokenByRoomIdRoleEndpoint }),
|
17294
|
+
/* @__PURE__ */ import_react166.default.createElement(Init, null),
|
17295
|
+
/* @__PURE__ */ import_react166.default.createElement(
|
17260
17296
|
Box,
|
17261
17297
|
{
|
17262
17298
|
css: {
|
@@ -17266,7 +17302,7 @@ var init_App = __esm({
|
|
17266
17302
|
"-webkit-text-size-adjust": "100%"
|
17267
17303
|
}
|
17268
17304
|
},
|
17269
|
-
/* @__PURE__ */
|
17305
|
+
/* @__PURE__ */ import_react166.default.createElement(AppRoutes, { authTokenByRoomCodeEndpoint: tokenByRoomCodeEndpoint, defaultAuthToken: authToken })
|
17270
17306
|
)
|
17271
17307
|
);
|
17272
17308
|
}))
|
@@ -17277,42 +17313,42 @@ var init_App = __esm({
|
|
17277
17313
|
HMSPrebuilt.displayName = "HMSPrebuilt";
|
17278
17314
|
Redirector = ({ showPreview }) => {
|
17279
17315
|
const { roomId, role } = (0, import_react_router_dom6.useParams)();
|
17280
|
-
return /* @__PURE__ */
|
17316
|
+
return /* @__PURE__ */ import_react166.default.createElement(import_react_router_dom6.Navigate, { to: `/${showPreview ? "preview" : "meeting"}/${roomId}/${role || ""}` });
|
17281
17317
|
};
|
17282
17318
|
RouteList = () => {
|
17283
17319
|
const { isPreviewScreenEnabled } = useRoomLayoutPreviewScreen();
|
17284
17320
|
const { isLeaveScreenEnabled } = useRoomLayoutLeaveScreen();
|
17285
17321
|
useAutoStartStreaming();
|
17286
|
-
return /* @__PURE__ */
|
17322
|
+
return /* @__PURE__ */ import_react166.default.createElement(import_react_router_dom6.Routes, null, isPreviewScreenEnabled ? /* @__PURE__ */ import_react166.default.createElement(import_react_router_dom6.Route, { path: "preview" }, /* @__PURE__ */ import_react166.default.createElement(
|
17287
17323
|
import_react_router_dom6.Route,
|
17288
17324
|
{
|
17289
17325
|
path: ":roomId/:role",
|
17290
|
-
element: /* @__PURE__ */
|
17326
|
+
element: /* @__PURE__ */ import_react166.default.createElement(import_react166.Suspense, { fallback: /* @__PURE__ */ import_react166.default.createElement(FullPageProgress_default, { text: "Loading preview..." }) }, /* @__PURE__ */ import_react166.default.createElement(PreviewContainer_default, null))
|
17291
17327
|
}
|
17292
|
-
), /* @__PURE__ */
|
17328
|
+
), /* @__PURE__ */ import_react166.default.createElement(
|
17293
17329
|
import_react_router_dom6.Route,
|
17294
17330
|
{
|
17295
17331
|
path: ":roomId",
|
17296
|
-
element: /* @__PURE__ */
|
17332
|
+
element: /* @__PURE__ */ import_react166.default.createElement(import_react166.Suspense, { fallback: /* @__PURE__ */ import_react166.default.createElement(FullPageProgress_default, { text: "Loading preview..." }) }, /* @__PURE__ */ import_react166.default.createElement(PreviewContainer_default, null))
|
17297
17333
|
}
|
17298
|
-
)) : null, /* @__PURE__ */
|
17334
|
+
)) : null, /* @__PURE__ */ import_react166.default.createElement(import_react_router_dom6.Route, { path: "meeting" }, /* @__PURE__ */ import_react166.default.createElement(
|
17299
17335
|
import_react_router_dom6.Route,
|
17300
17336
|
{
|
17301
17337
|
path: ":roomId/:role",
|
17302
|
-
element: /* @__PURE__ */
|
17338
|
+
element: /* @__PURE__ */ import_react166.default.createElement(import_react166.Suspense, { fallback: /* @__PURE__ */ import_react166.default.createElement(FullPageProgress_default, { text: "Joining..." }) }, /* @__PURE__ */ import_react166.default.createElement(Conference2, null))
|
17303
17339
|
}
|
17304
|
-
), /* @__PURE__ */
|
17340
|
+
), /* @__PURE__ */ import_react166.default.createElement(
|
17305
17341
|
import_react_router_dom6.Route,
|
17306
17342
|
{
|
17307
17343
|
path: ":roomId",
|
17308
|
-
element: /* @__PURE__ */
|
17344
|
+
element: /* @__PURE__ */ import_react166.default.createElement(import_react166.Suspense, { fallback: /* @__PURE__ */ import_react166.default.createElement(FullPageProgress_default, { text: "Joining..." }) }, /* @__PURE__ */ import_react166.default.createElement(Conference2, null))
|
17309
17345
|
}
|
17310
|
-
)), isLeaveScreenEnabled ? /* @__PURE__ */
|
17346
|
+
)), isLeaveScreenEnabled ? /* @__PURE__ */ import_react166.default.createElement(import_react_router_dom6.Route, { path: "leave" }, /* @__PURE__ */ import_react166.default.createElement(import_react_router_dom6.Route, { path: ":roomId/:role", element: /* @__PURE__ */ import_react166.default.createElement(PostLeave_default, null) }), /* @__PURE__ */ import_react166.default.createElement(import_react_router_dom6.Route, { path: ":roomId", element: /* @__PURE__ */ import_react166.default.createElement(PostLeave_default, null) })) : null, /* @__PURE__ */ import_react166.default.createElement(import_react_router_dom6.Route, { path: "/:roomId/:role", element: /* @__PURE__ */ import_react166.default.createElement(Redirector, { showPreview: isPreviewScreenEnabled }) }), /* @__PURE__ */ import_react166.default.createElement(import_react_router_dom6.Route, { path: "/:roomId/", element: /* @__PURE__ */ import_react166.default.createElement(Redirector, { showPreview: isPreviewScreenEnabled }) }));
|
17311
17347
|
};
|
17312
17348
|
BackSwipe = () => {
|
17313
|
-
const isConnectedToRoom = (0,
|
17314
|
-
const hmsActions = (0,
|
17315
|
-
(0,
|
17349
|
+
const isConnectedToRoom = (0, import_react_sdk92.useHMSStore)(import_react_sdk92.selectIsConnectedToRoom);
|
17350
|
+
const hmsActions = (0, import_react_sdk92.useHMSActions)();
|
17351
|
+
(0, import_react166.useEffect)(() => {
|
17316
17352
|
const onRouteLeave = () => __async(void 0, null, function* () {
|
17317
17353
|
if (isConnectedToRoom) {
|
17318
17354
|
yield hmsActions.leave();
|
@@ -17327,7 +17363,7 @@ var init_App = __esm({
|
|
17327
17363
|
};
|
17328
17364
|
Router = ({ children }) => {
|
17329
17365
|
const { roomId, role, roomCode } = useHMSPrebuiltContext();
|
17330
|
-
return [roomId, role, roomCode].every((value) => !value) ? /* @__PURE__ */
|
17366
|
+
return [roomId, role, roomCode].every((value) => !value) ? /* @__PURE__ */ import_react166.default.createElement(import_react_router_dom6.BrowserRouter, null, children) : /* @__PURE__ */ import_react166.default.createElement(import_react_router_dom6.MemoryRouter, { initialEntries: [`/${roomCode ? roomCode : `${roomId}/${role || ""}`}`], initialIndex: 0 }, children);
|
17331
17367
|
};
|
17332
17368
|
}
|
17333
17369
|
});
|