@100mslive/roomkit-react 0.3.14-alpha.2 → 0.3.14-alpha.4

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.cjs.js CHANGED
@@ -109,7 +109,7 @@ var __async = (__this, __arguments, generator) => {
109
109
  var define_process_env_default;
110
110
  var init_define_process_env = __esm({
111
111
  "<define:process.env>"() {
112
- define_process_env_default = { GITHUB_STATE: "/home/runner/work/_temp/_runner_file_commands/save_state_76be82cc-aed4-40c4-a051-4ef8a77acfb4", npm_package_devDependencies_ts_node: "^10.4.0", npm_package_devDependencies__types_node: "^16.11.17", npm_package_exports___index_css: "./dist/index.css", npm_package_exports___require: "./dist/index.cjs.js", STATS_TRP: "true", DEPLOYMENT_BASEPATH: "/opt/runner", DOTNET_NOLOGO: "1", npm_package_dependencies_screenfull: "^5.1.0", npm_package_dependencies_react_draggable: "^4.4.5", npm_package_dependencies__radix_ui_react_switch: "1.0.0", npm_package_dependencies__100mslive_hms_whiteboard: "0.0.4-alpha.2", USER: "runner", npm_package_devDependencies_jest: "26.6.0", npm_config_version_commit_hooks: "true", npm_config_user_agent: "yarn/1.22.22 npm/? node/v18.20.3 linux x64", npm_config_always_auth: "", NX_WORKSPACE_ROOT: "/home/runner/work/web-sdks/web-sdks", npm_package_scripts_babel: "npx storybook@latest babelrc", CI: "true", npm_package_devDependencies__size_limit_file: "^5.0.3", npm_config_bin_links: "true", npm_config_wrap_output: "", npm_package_dependencies__radix_ui_react_tabs: "1.0.0", npm_package_dependencies__100mslive_react_sdk: "0.10.14-alpha.2", RUNNER_ENVIRONMENT: "github-hosted", GITHUB_ENV: "/home/runner/work/_temp/_runner_file_commands/set_env_76be82cc-aed4-40c4-a051-4ef8a77acfb4", PIPX_HOME: "/opt/pipx", npm_node_execpath: "/opt/hostedtoolcache/node/18.20.3/x64/bin/node", npm_config_init_version: "1.0.0", npm_package_dependencies__emoji_mart_react: "^1.0.1", npm_package_dependencies__emoji_mart_data: "^1.0.6", npm_package_dependencies__100mslive_hms_virtual_background: "1.13.14-alpha.2", 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.9", npm_package_peerDependencies_react: ">=17.0.2 <19.0.0", npm_package_devDependencies__storybook_addon_links: "^7.0.27", npm_package_files_0: "dist", HOME: "/home/runner", npm_package_devDependencies__typescript_eslint_parser: "^5.4.0", npm_package_dependencies__radix_ui_react_dialog: "1.0.4", npm_package_devDependencies__types_react_window: "^1.8.5", npm_package_files_1: "src", npm_package_repository_directory: "packages/roomkit-react", RUNNER_TEMP: "/home/runner/work/_temp", GITHUB_EVENT_PATH: "/home/runner/work/_temp/_github_workflow/event.json", npm_package_scripts_controller: "cd packages/hls-controller && yarn start", npm_package_dependencies__stitches_react: "^1.2.8", JAVA_HOME_11_X64: "/usr/lib/jvm/temurin-11-jdk-amd64", PIPX_BIN_DIR: "/opt/pipx_bin", GITHUB_REPOSITORY_OWNER: "100mslive", npm_package_engines_node: ">=16", npm_package_devDependencies_typedoc_plugin_markdown: "^3.14.0", npm_config_init_license: "MIT", GRADLE_HOME: "/usr/share/gradle-8.8", ANDROID_NDK_LATEST_HOME: "/usr/local/lib/android/sdk/ndk/26.3.11579264", JAVA_HOME_21_X64: "/usr/lib/jvm/temurin-21-jdk-amd64", STATS_RDCL: "true", GITHUB_RETENTION_DAYS: "90", YARN_WRAP_OUTPUT: "false", npm_config_version_tag_prefix: "v", GITHUB_REPOSITORY_OWNER_ID: "73883131", POWERSHELL_DISTRIBUTION_CHANNEL: "GitHub-Actions-ubuntu22", AZURE_EXTENSION_DIR: "/opt/az/azcliextensions", GITHUB_HEAD_REF: "", npm_package_scripts_lint_fix: "yarn lint --fix", npm_config_userconfig: "/home/runner/work/_temp/.npmrc", npm_package_devDependencies__storybook_addon_a11y: "^7.0.27", SYSTEMD_EXEC_PID: "593", npm_package_scripts_postinstall: "husky install && lerna bootstrap", npm_package_devDependencies_husky: "^6.0.0", npm_package_dependencies_recordrtc: "^5.6.2", npm_package_dependencies_eventemitter2: "^6.4.9", npm_package_dependencies__radix_ui_react_label: "1.0.0", npm_package_dependencies__radix_ui_react_dropdown_menu: "2.0.5", npm_package_keywords_0: "100mslive", GITHUB_GRAPHQL_URL: "https://api.github.com/graphql", npm_package_description: "100ms Room Kit provides simple & easy to use UI components to build Live Streaming & Video Conferencing experiences in your apps.", npm_package_devDependencies_typescript: "~4.7.4", npm_package_devDependencies_typedoc: "^0.24.8", npm_package_devDependencies_babel_loader: "^8.2.5", npm_package_keywords_1: "react", GOROOT_1_20_X64: "/opt/hostedtoolcache/go/1.20.14/x64", NVM_DIR: "/home/runner/.nvm", npm_package_readmeFilename: "README.md", npm_package_devDependencies_react: "^18.1.0", npm_package_devDependencies__babel_preset_env: "^7.22.5", npm_package_keywords_2: "prebuilt", DOTNET_SKIP_FIRST_TIME_EXPERIENCE: "1", GOROOT_1_21_X64: "/opt/hostedtoolcache/go/1.21.11/x64", JAVA_HOME_17_X64: "/usr/lib/jvm/temurin-17-jdk-amd64", ImageVersion: "20240616.1.0", npm_package_devDependencies_prettier: "^2.4.1", npm_package_devDependencies_babel_jest: "^26.6.0", npm_package_scripts_dev: "node ../../scripts/dev", npm_package_keywords_3: "roomkit", RUNNER_OS: "Linux", GITHUB_API_URL: "https://api.github.com", GOROOT_1_22_X64: "/opt/hostedtoolcache/go/1.22.4/x64", SWIFT_PATH: "/usr/share/swift/usr/bin", FORCE_COLOR: "true", npm_package_dependencies__radix_ui_react_toast: "1.0.0", npm_package_dependencies__radix_ui_react_radio_group: "1.0.0", npm_package_dependencies__100mslive_hms_noise_cancellation: "0.0.1", npm_package_devDependencies__babel_preset_typescript: "^7.22.5", npm_package_exports___default: "./dist/index.js", RUNNER_USER: "runner", STATS_V3PS: "true", CHROMEWEBDRIVER: "/usr/local/share/chromedriver-linux64", JOURNAL_STREAM: "8:18256", GITHUB_WORKFLOW: "Publish Packages", _: "/usr/local/bin/yarn", npm_package_devDependencies_ts_jest: "26.5.6", npm_package_devDependencies_lerna: "^5.6.2", npm_package_devDependencies__types_jest: "^27.0.3", npm_package_devDependencies__commitlint_config_conventional: "^15.0.0", npm_package_private: "true", npm_package_dependencies__radix_ui_react_accordion: "1.0.0", npm_package_devDependencies__babel_preset_react: "^7.22.5", npm_package_module: "dist/index.js", npm_package_scripts_lint: "eslint -c .eslintrc --no-error-on-unmatched-pattern src --ext .js --ext .jsx --ext .ts --ext .tsx", npm_package_devDependencies__typescript_eslint_eslint_plugin: "^5.4.0", npm_config_registry: "https://registry.yarnpkg.com", npm_package_dependencies_react_window: "^1.8.7", npm_package_dependencies__100mslive_hls_player: "0.3.14-alpha.2", npm_package_devDependencies__types_lodash_merge: "^4.6.6", npm_package_devDependencies__storybook_cli: "^7.0.27", ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE: "/opt/actionarchivecache", STATS_D: "false", GITHUB_RUN_ID: "9565362254", STATS_VMFE: "true", npm_package_workspaces_0: "packages/*", npm_package_scripts_store: "cd packages/hms-video-store && yarn start", npm_package_devDependencies__babel_core: "^7.18.2", npm_package_dependencies_ts_pattern: "4.3.0", npm_package_devDependencies__storybook_addon_interactions: "^7.0.27", npm_package_devDependencies__storybook_addon_actions: "^7.0.27", GITHUB_REF_TYPE: "branch", BOOTSTRAP_HASKELL_NONINTERACTIVE: "1", GITHUB_WORKFLOW_SHA: "3ef383402ec24ac3a20df2a932179c29cd1c834b", GITHUB_BASE_REF: "", ImageOS: "ubuntu22", npm_package_workspaces_1: "examples/*", npm_package_scripts_start: 'concurrently "yarn dev" "yarn types"', npm_config_ignore_scripts: "", NX_TASK_HASH: "7d8dbf7ec46fd1cf15846800cd9e1a120cb489b7fed23b0442f1e0f8f01996ff", npm_package_exports___import: "./dist/index.js", STATS_BLT: "true", GITHUB_WORKFLOW_REF: "100mslive/web-sdks/.github/workflows/publish.yml@refs/heads/publish-alpha", PERFLOG_LOCATION_SETTING: "RUNNER_PERFLOG", GITHUB_ACTION_REPOSITORY: "", npm_package_scripts_prebuilt: "cd packages/roomkit-react && yarn start", npm_package_devDependencies_postcss_loader: "^6.2.1", npm_package_devDependencies_esbuild_loader: "^4.0.2", PATH: "/tmp/yarn--1718715240634-0.710315727240509:/home/runner/work/web-sdks/web-sdks/packages/roomkit-react/node_modules/.bin:/home/runner/.config/yarn/link/node_modules/.bin:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/opt/hostedtoolcache/node/18.20.3/x64/libexec/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/bin/node_modules/npm/bin/node-gyp-bin:/tmp/yarn--1718715240435-0.675900847441234:/home/runner/work/web-sdks/web-sdks/packages/roomkit-react/node_modules/.bin:/home/runner/.config/yarn/link/node_modules/.bin:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/opt/hostedtoolcache/node/18.20.3/x64/libexec/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/bin/node_modules/npm/bin/node-gyp-bin:/tmp/yarn--1718715214250-0.682858721348816:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/home/runner/.config/yarn/link/node_modules/.bin:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/opt/hostedtoolcache/node/18.20.3/x64/libexec/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/bin/node_modules/npm/bin/node-gyp-bin:/tmp/yarn--1718715214069-0.5533811913222728:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/home/runner/.config/yarn/link/node_modules/.bin:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/opt/hostedtoolcache/node/18.20.3/x64/libexec/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/bin/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin", NODE: "/opt/hostedtoolcache/node/18.20.3/x64/bin/node", ANT_HOME: "/usr/share/ant", DOTNET_MULTILEVEL_LOOKUP: "0", RUNNER_TRACKING_ID: "github_533aaa10-fc76-428e-a550-f49eb71985df", INVOCATION_ID: "026576dd41d444a5bc10484c221b863a", NPM_CONFIG_USERCONFIG: "/home/runner/work/_temp/.npmrc", RUNNER_TOOL_CACHE: "/opt/hostedtoolcache", npm_package_scripts_size: "size-limit", npm_package_devDependencies_size_limit: "^5.0.3", npm_package_name: "@100mslive/roomkit-react", npm_package_devDependencies__storybook_react_webpack5: "^7.0.27", npm_package_repository_type: "git", GITHUB_ACTION: "__run_3", GITHUB_RUN_NUMBER: "579", GITHUB_TRIGGERING_ACTOR: "github-actions[bot]", RUNNER_ARCH: "X64", XDG_RUNTIME_DIR: "/run/user/1001", AGENT_TOOLSDIRECTORY: "/opt/hostedtoolcache", npm_package_lint_staged____js_ts_jsx_tsx_: "eslint", npm_package_devDependencies_babel_plugin_istanbul: "^6.1.1", LERNA_PACKAGE_NAME: "@100mslive/roomkit-react", npm_package_dependencies__radix_ui_react_select: "1.0.0", npm_package_size_limit_0_limit: "20 KB", npm_package_devDependencies__commitlint_cli: "^15.0.0", LANG: "C.UTF-8", VCPKG_INSTALLATION_ROOT: "/usr/local/share/vcpkg", npm_package_size_limit_1_limit: "20 KB", npm_package_devDependencies_eslint_plugin_simple_import_sort: "^8.0.0", npm_package_devDependencies_eslint: "^8.9.0", npm_package_dependencies_react_intersection_observer: "^9.4.3", npm_package_devDependencies__types_mdx: "2.0.2", CONDA: "/usr/share/miniconda", RUNNER_NAME: "GitHub Actions 46", XDG_CONFIG_HOME: "/home/runner/.config", STATS_VMD: "true", GITHUB_REF_NAME: "publish-alpha", GITHUB_REPOSITORY: "100mslive/web-sdks", STATS_D_D: "false", npm_lifecycle_script: "rm -rf dist && node ../../scripts/build-webapp", npm_package_size_limit_2_limit: "400 KB", npm_package_resolutions_loader_utils: "^2.0.4", npm_package_devDependencies_dotenv: "^14.2.0", npm_package_dependencies__radix_ui_react_slider: "1.0.0", npm_package_scripts_types_build: "tsc -p tsconfig.json", npm_package_main: "dist/index.cjs.js", STATS_UE: "true", ANDROID_NDK_ROOT: "/usr/local/lib/android/sdk/ndk/25.2.9519653", GITHUB_ACTION_REF: "", DEBIAN_FRONTEND: "noninteractive", npm_package_size_limit_3_limit: "20 KB", npm_package_size_limit_0_path: "packages/hms-video-store/dist/index.cjs.js", npm_package_scripts_cypress_open: "cypress open", npm_package_scripts_lerna_publish: "lerna publish from-package --dist-tag $PUBLISH_FLAG --yes --no-verify-access", npm_package_scripts_test: "yarn build --no-private && lerna run test", npm_package_devDependencies_concurrently: "^6.4.0", npm_config_version_git_message: "v%s", npm_package_dependencies__radix_ui_react_checkbox: "1.0.0", npm_package_dependencies__100mslive_react_icons: "0.10.14-alpha.2", npm_package_scripts_types: "tsc -w", GITHUB_REPOSITORY_ID: "429826515", GITHUB_ACTIONS: "true", npm_lifecycle_event: "build:only", npm_package_version: "0.3.14-alpha.2", npm_package_size_limit_4_limit: "20 KB", npm_package_size_limit_1_path: "packages/hms-video-store/dist/index.js", npm_package_scripts_build_only: "rm -rf dist && node ../../scripts/build-webapp", npm_package_devDependencies__types_react: "^18.1.0", npm_package_sideEffects: "false", npm_package_repository_url: "https://github.com/100mslive/web-sdks.git", npm_package_source: "src/index.ts", GITHUB_REF_PROTECTED: "true", npm_config_argv: '{"remain":[],"cooked":["run","test"],"original":["test"]}', npm_package_size_limit_5_limit: "20 KB", npm_package_size_limit_2_path: "packages/roomkit-react/dist/index.cjs.js", npm_package_scripts_build: "yarn build:only && yarn types:build", npm_package_devDependencies_tslib: "^2.2.0", npm_package_devDependencies_nx: "^14.5.1", npm_package_devDependencies_lint_staged: "^12.0.3", NX_CLI_SET: "true", npm_package_dependencies_uuid: "^8.3.2", npm_package_dependencies_react_virtualized_auto_sizer: "^1.0.7", npm_package_dependencies_lodash_merge: "^4.6.2", npm_package_dependencies_emoji_mart: "^5.2.2", GITHUB_WORKSPACE: "/home/runner/work/web-sdks/web-sdks", ACCEPT_EULA: "Y", GITHUB_JOB: "publish_packages", RUNNER_PERFLOG: "/home/runner/perflog", npm_package_size_limit_6_limit: "150 KB", npm_package_size_limit_3_path: "packages/roomkit-react/dist/index.js", npm_package_devDependencies_cypress: "^9.5.2", GITHUB_SHA: "3ef383402ec24ac3a20df2a932179c29cd1c834b", GITHUB_RUN_ATTEMPT: "1", npm_package_size_limit_7_limit: "100 KB", npm_package_size_limit_4_path: "packages/hms-virtual-background/dist/index.cjs.js", npm_config_version_git_tag: "true", npm_config_version_git_sign: "", npm_package_dependencies_qrcode_react: "^3.1.0", GITHUB_REF: "refs/heads/publish-alpha", GITHUB_ACTOR: "github-actions[bot]", ANDROID_SDK_ROOT: "/usr/local/lib/android/sdk", npm_package_license: "MIT", npm_package_size_limit_5_path: "packages/hms-virtual-background/dist/index.js", npm_config_strict_ssl: "true", LEIN_HOME: "/usr/local/lib/lein", npm_package_size_limit_6_path: "packages/react-icons/dist/index.cjs.js", npm_package_scripts_format: "prettier -w src/**", npm_package_devDependencies_eslint_plugin_prettier: "^4.0.0", npm_package_devDependencies_eslint_config_react_app: "^7.0.0", NX_TASK_TARGET_PROJECT: "@100mslive/roomkit-react", GITHUB_PATH: "/home/runner/work/_temp/_runner_file_commands/add_path_76be82cc-aed4-40c4-a051-4ef8a77acfb4", JAVA_HOME: "/usr/lib/jvm/temurin-11-jdk-amd64", PWD: "/home/runner/work/web-sdks/web-sdks/packages/roomkit-react", GITHUB_ACTOR_ID: "41898282", RUNNER_WORKSPACE: "/home/runner/work/web-sdks", npm_execpath: "/usr/local/lib/node_modules/yarn/bin/yarn.js", npm_package_size_limit_7_path: "packages/react-icons/dist/index.js", npm_package_scripts_ybys: "yarn && yarn build --no-private && yarn storybook", npm_package_dependencies__radix_ui_react_progress: "1.0.0", HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS: "3650", STATS_TIS: "mining", GITHUB_EVENT_NAME: "workflow_dispatch", HOMEBREW_NO_AUTO_UPDATE: "1", ANDROID_HOME: "/usr/local/lib/android/sdk", GITHUB_SERVER_URL: "https://github.com", GECKOWEBDRIVER: "/usr/local/share/gecko_driver", LEIN_JAR: "/usr/local/lib/lein/self-installs/leiningen-2.11.2-standalone.jar", GHCUP_INSTALL_BASE_PREFIX: "/usr/local", GITHUB_OUTPUT: "/home/runner/work/_temp/_runner_file_commands/set_output_76be82cc-aed4-40c4-a051-4ef8a77acfb4", npm_package_scripts_prestart: "rm -rf dist && yarn types:build", npm_package_author_name: "100ms", EDGEWEBDRIVER: "/usr/local/share/edge_driver", STATS_EXT: "true", npm_package_scripts_build_storybook: "sb build", npm_package_devDependencies_postcss: "^8.4.5", npm_package_devDependencies_esbuild: "^0.18.13", npm_config_save_prefix: "^", npm_config_ignore_optional: "", npm_package_dependencies_worker_timers: "^7.0.40", npm_package_typings: "dist/index.d.ts", ANDROID_NDK: "/usr/local/lib/android/sdk/ndk/25.2.9519653", SGX_AESM_ADDR: "1", CHROME_BIN: "/usr/bin/google-chrome", npm_package_scripts_storybook: "sb dev -p 6006", npm_package_devDependencies_esbuild_plugin_postcss2: "0.1.1", npm_package_dependencies_react_swipeable: "^7.0.1", npm_package_devDependencies_babel_plugin_react_require: "3.1.3", npm_package_devDependencies__storybook_testing_library: "^0.2.0", npm_package_devDependencies__storybook_addon_essentials: "^7.0.27", SELENIUM_JAR_PATH: "/usr/share/java/selenium-server.jar", STATS_EXTP: "https://provjobdsettingscdn.blob.core.windows.net/settings/provjobdsettings-0.5.181+6/provjobd.data", npm_package_scripts_reactsdk: "cd packages/react-sdk && yarn start", npm_package_dependencies_react_use: "^17.4.0", npm_package_dependencies__radix_ui_react_collapsible: "1.0.0", npm_package_devDependencies_storybook_dark_mode: "^3.0.0", npm_package_devDependencies__storybook_react: "^7.0.27", INIT_CWD: "/home/runner/work/web-sdks/web-sdks", ANDROID_NDK_HOME: "/usr/local/lib/android/sdk/ndk/25.2.9519653", GITHUB_STEP_SUMMARY: "/home/runner/work/_temp/_runner_file_commands/step_summary_76be82cc-aed4-40c4-a051-4ef8a77acfb4" };
112
+ define_process_env_default = { GITHUB_STATE: "/home/runner/work/_temp/_runner_file_commands/save_state_efec4bdd-ae9b-4acd-b2f1-fdf170fae8f6", npm_package_devDependencies_ts_node: "^10.4.0", npm_package_devDependencies__types_node: "^16.11.17", npm_package_exports___index_css: "./dist/index.css", npm_package_exports___require: "./dist/index.cjs.js", STATS_TRP: "true", DEPLOYMENT_BASEPATH: "/opt/runner", DOTNET_NOLOGO: "1", npm_package_dependencies_screenfull: "^5.1.0", npm_package_dependencies_react_draggable: "^4.4.5", npm_package_dependencies__radix_ui_react_switch: "1.0.0", npm_package_dependencies__100mslive_hms_whiteboard: "0.0.4-alpha.4", USER: "runner", npm_package_devDependencies_jest: "26.6.0", npm_config_version_commit_hooks: "true", npm_config_user_agent: "yarn/1.22.22 npm/? node/v18.20.3 linux x64", npm_config_always_auth: "", NX_WORKSPACE_ROOT: "/home/runner/work/web-sdks/web-sdks", npm_package_scripts_babel: "npx storybook@latest babelrc", CI: "true", npm_package_devDependencies__size_limit_file: "^5.0.3", npm_config_bin_links: "true", npm_config_wrap_output: "", npm_package_dependencies__radix_ui_react_tabs: "1.0.0", npm_package_dependencies__100mslive_react_sdk: "0.10.14-alpha.4", RUNNER_ENVIRONMENT: "github-hosted", GITHUB_ENV: "/home/runner/work/_temp/_runner_file_commands/set_env_efec4bdd-ae9b-4acd-b2f1-fdf170fae8f6", PIPX_HOME: "/opt/pipx", npm_node_execpath: "/opt/hostedtoolcache/node/18.20.3/x64/bin/node", npm_config_init_version: "1.0.0", npm_package_dependencies__emoji_mart_react: "^1.0.1", npm_package_dependencies__emoji_mart_data: "^1.0.6", npm_package_dependencies__100mslive_hms_virtual_background: "1.13.14-alpha.4", 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.9", npm_package_peerDependencies_react: ">=17.0.2 <19.0.0", npm_package_devDependencies__storybook_addon_links: "^7.0.27", npm_package_files_0: "dist", HOME: "/home/runner", npm_package_devDependencies__typescript_eslint_parser: "^5.4.0", npm_package_dependencies__radix_ui_react_dialog: "1.0.4", npm_package_devDependencies__types_react_window: "^1.8.5", npm_package_files_1: "src", npm_package_repository_directory: "packages/roomkit-react", RUNNER_TEMP: "/home/runner/work/_temp", GITHUB_EVENT_PATH: "/home/runner/work/_temp/_github_workflow/event.json", npm_package_scripts_controller: "cd packages/hls-controller && yarn start", npm_package_dependencies__stitches_react: "^1.2.8", JAVA_HOME_11_X64: "/usr/lib/jvm/temurin-11-jdk-amd64", PIPX_BIN_DIR: "/opt/pipx_bin", GITHUB_REPOSITORY_OWNER: "100mslive", npm_package_engines_node: ">=16", npm_package_devDependencies_typedoc_plugin_markdown: "^3.14.0", npm_config_init_license: "MIT", GRADLE_HOME: "/usr/share/gradle-8.8", ANDROID_NDK_LATEST_HOME: "/usr/local/lib/android/sdk/ndk/26.3.11579264", JAVA_HOME_21_X64: "/usr/lib/jvm/temurin-21-jdk-amd64", STATS_RDCL: "true", GITHUB_RETENTION_DAYS: "90", YARN_WRAP_OUTPUT: "false", npm_config_version_tag_prefix: "v", GITHUB_REPOSITORY_OWNER_ID: "73883131", POWERSHELL_DISTRIBUTION_CHANNEL: "GitHub-Actions-ubuntu22", AZURE_EXTENSION_DIR: "/opt/az/azcliextensions", GITHUB_HEAD_REF: "", npm_package_scripts_lint_fix: "yarn lint --fix", npm_config_userconfig: "/home/runner/work/_temp/.npmrc", npm_package_devDependencies__storybook_addon_a11y: "^7.0.27", SYSTEMD_EXEC_PID: "588", npm_package_scripts_postinstall: "husky install && lerna bootstrap", npm_package_devDependencies_husky: "^6.0.0", npm_package_dependencies_recordrtc: "^5.6.2", npm_package_dependencies_eventemitter2: "^6.4.9", npm_package_dependencies__radix_ui_react_label: "1.0.0", npm_package_dependencies__radix_ui_react_dropdown_menu: "2.0.5", npm_package_keywords_0: "100mslive", GITHUB_GRAPHQL_URL: "https://api.github.com/graphql", npm_package_description: "100ms Room Kit provides simple & easy to use UI components to build Live Streaming & Video Conferencing experiences in your apps.", npm_package_devDependencies_typescript: "~4.7.4", npm_package_devDependencies_typedoc: "^0.24.8", npm_package_devDependencies_babel_loader: "^8.2.5", npm_package_keywords_1: "react", GOROOT_1_20_X64: "/opt/hostedtoolcache/go/1.20.14/x64", NVM_DIR: "/home/runner/.nvm", npm_package_readmeFilename: "README.md", npm_package_devDependencies_react: "^18.1.0", npm_package_devDependencies__babel_preset_env: "^7.22.5", npm_package_keywords_2: "prebuilt", DOTNET_SKIP_FIRST_TIME_EXPERIENCE: "1", GOROOT_1_21_X64: "/opt/hostedtoolcache/go/1.21.11/x64", JAVA_HOME_17_X64: "/usr/lib/jvm/temurin-17-jdk-amd64", ImageVersion: "20240609.1.0", npm_package_devDependencies_prettier: "^2.4.1", npm_package_devDependencies_babel_jest: "^26.6.0", npm_package_scripts_dev: "node ../../scripts/dev", npm_package_keywords_3: "roomkit", RUNNER_OS: "Linux", GITHUB_API_URL: "https://api.github.com", GOROOT_1_22_X64: "/opt/hostedtoolcache/go/1.22.4/x64", SWIFT_PATH: "/usr/share/swift/usr/bin", FORCE_COLOR: "true", npm_package_dependencies__radix_ui_react_toast: "1.0.0", npm_package_dependencies__radix_ui_react_radio_group: "1.0.0", npm_package_dependencies__100mslive_hms_noise_cancellation: "0.0.1", npm_package_devDependencies__babel_preset_typescript: "^7.22.5", npm_package_exports___default: "./dist/index.js", RUNNER_USER: "runner", STATS_V3PS: "true", CHROMEWEBDRIVER: "/usr/local/share/chromedriver-linux64", JOURNAL_STREAM: "8:17226", GITHUB_WORKFLOW: "Publish Packages", _: "/usr/local/bin/yarn", npm_package_devDependencies_ts_jest: "26.5.6", npm_package_devDependencies_lerna: "^5.6.2", npm_package_devDependencies__types_jest: "^27.0.3", npm_package_devDependencies__commitlint_config_conventional: "^15.0.0", npm_package_private: "true", npm_package_dependencies__radix_ui_react_accordion: "1.0.0", npm_package_devDependencies__babel_preset_react: "^7.22.5", npm_package_module: "dist/index.js", npm_package_scripts_lint: "eslint -c .eslintrc --no-error-on-unmatched-pattern src --ext .js --ext .jsx --ext .ts --ext .tsx", npm_package_devDependencies__typescript_eslint_eslint_plugin: "^5.4.0", npm_config_registry: "https://registry.yarnpkg.com", npm_package_dependencies_react_window: "^1.8.7", npm_package_dependencies__100mslive_hls_player: "0.3.14-alpha.4", npm_package_devDependencies__types_lodash_merge: "^4.6.6", npm_package_devDependencies__storybook_cli: "^7.0.27", ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE: "/opt/actionarchivecache", STATS_D: "false", GITHUB_RUN_ID: "9580279498", STATS_VMFE: "true", npm_package_workspaces_0: "packages/*", npm_package_scripts_store: "cd packages/hms-video-store && yarn start", npm_package_devDependencies__babel_core: "^7.18.2", npm_package_dependencies_ts_pattern: "4.3.0", npm_package_devDependencies__storybook_addon_interactions: "^7.0.27", npm_package_devDependencies__storybook_addon_actions: "^7.0.27", GITHUB_REF_TYPE: "branch", BOOTSTRAP_HASKELL_NONINTERACTIVE: "1", GITHUB_WORKFLOW_SHA: "870d07094ed80ee2fefe344a743b4c463b046ccb", GITHUB_BASE_REF: "", ImageOS: "ubuntu22", npm_package_workspaces_1: "examples/*", npm_package_scripts_start: 'concurrently "yarn dev" "yarn types"', npm_config_ignore_scripts: "", NX_TASK_HASH: "5151aafad3bc01901d727208a64191f612df7827b106364cbf8c52be1684aca5", npm_package_exports___import: "./dist/index.js", STATS_BLT: "true", GITHUB_WORKFLOW_REF: "100mslive/web-sdks/.github/workflows/publish.yml@refs/heads/publish-alpha", PERFLOG_LOCATION_SETTING: "RUNNER_PERFLOG", GITHUB_ACTION_REPOSITORY: "", npm_package_scripts_prebuilt: "cd packages/roomkit-react && yarn start", npm_package_devDependencies_postcss_loader: "^6.2.1", npm_package_devDependencies_esbuild_loader: "^4.0.2", PATH: "/tmp/yarn--1718792394507-0.8264113108885849:/home/runner/work/web-sdks/web-sdks/packages/roomkit-react/node_modules/.bin:/home/runner/.config/yarn/link/node_modules/.bin:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/opt/hostedtoolcache/node/18.20.3/x64/libexec/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/bin/node_modules/npm/bin/node-gyp-bin:/tmp/yarn--1718792394307-0.10894602343773996:/home/runner/work/web-sdks/web-sdks/packages/roomkit-react/node_modules/.bin:/home/runner/.config/yarn/link/node_modules/.bin:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/opt/hostedtoolcache/node/18.20.3/x64/libexec/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/bin/node_modules/npm/bin/node-gyp-bin:/tmp/yarn--1718792368955-0.27939866467145813:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/home/runner/.config/yarn/link/node_modules/.bin:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/opt/hostedtoolcache/node/18.20.3/x64/libexec/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/bin/node_modules/npm/bin/node-gyp-bin:/tmp/yarn--1718792368770-0.07416038328431562:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/home/runner/.config/yarn/link/node_modules/.bin:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/opt/hostedtoolcache/node/18.20.3/x64/libexec/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/bin/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin", NODE: "/opt/hostedtoolcache/node/18.20.3/x64/bin/node", ANT_HOME: "/usr/share/ant", DOTNET_MULTILEVEL_LOOKUP: "0", RUNNER_TRACKING_ID: "github_7f84cac7-7af9-4371-8e0b-9dce36e44306", INVOCATION_ID: "42964ff22bc64b2ea5052e09992f1186", NPM_CONFIG_USERCONFIG: "/home/runner/work/_temp/.npmrc", RUNNER_TOOL_CACHE: "/opt/hostedtoolcache", npm_package_scripts_size: "size-limit", npm_package_devDependencies_size_limit: "^5.0.3", npm_package_name: "@100mslive/roomkit-react", npm_package_devDependencies__storybook_react_webpack5: "^7.0.27", npm_package_repository_type: "git", GITHUB_ACTION: "__run_3", GITHUB_RUN_NUMBER: "581", GITHUB_TRIGGERING_ACTOR: "github-actions[bot]", RUNNER_ARCH: "X64", XDG_RUNTIME_DIR: "/run/user/1001", AGENT_TOOLSDIRECTORY: "/opt/hostedtoolcache", npm_package_lint_staged____js_ts_jsx_tsx_: "eslint", npm_package_devDependencies_babel_plugin_istanbul: "^6.1.1", LERNA_PACKAGE_NAME: "@100mslive/roomkit-react", npm_package_dependencies__radix_ui_react_select: "1.0.0", npm_package_size_limit_0_limit: "20 KB", npm_package_devDependencies__commitlint_cli: "^15.0.0", LANG: "C.UTF-8", VCPKG_INSTALLATION_ROOT: "/usr/local/share/vcpkg", npm_package_size_limit_1_limit: "20 KB", npm_package_devDependencies_eslint_plugin_simple_import_sort: "^8.0.0", npm_package_devDependencies_eslint: "^8.9.0", npm_package_dependencies_react_intersection_observer: "^9.4.3", npm_package_devDependencies__types_mdx: "2.0.2", CONDA: "/usr/share/miniconda", RUNNER_NAME: "GitHub Actions 432", XDG_CONFIG_HOME: "/home/runner/.config", STATS_VMD: "true", GITHUB_REF_NAME: "publish-alpha", GITHUB_REPOSITORY: "100mslive/web-sdks", STATS_D_D: "false", npm_lifecycle_script: "rm -rf dist && node ../../scripts/build-webapp", npm_package_size_limit_2_limit: "400 KB", npm_package_resolutions_loader_utils: "^2.0.4", npm_package_devDependencies_dotenv: "^14.2.0", npm_package_dependencies__radix_ui_react_slider: "1.0.0", npm_package_scripts_types_build: "tsc -p tsconfig.json", npm_package_main: "dist/index.cjs.js", STATS_UE: "true", ANDROID_NDK_ROOT: "/usr/local/lib/android/sdk/ndk/25.2.9519653", GITHUB_ACTION_REF: "", DEBIAN_FRONTEND: "noninteractive", npm_package_size_limit_3_limit: "20 KB", npm_package_size_limit_0_path: "packages/hms-video-store/dist/index.cjs.js", npm_package_scripts_cypress_open: "cypress open", npm_package_scripts_lerna_publish: "lerna publish from-package --dist-tag $PUBLISH_FLAG --yes --no-verify-access", npm_package_scripts_test: "yarn build --no-private && lerna run test", npm_package_devDependencies_concurrently: "^6.4.0", npm_config_version_git_message: "v%s", npm_package_dependencies__radix_ui_react_checkbox: "1.0.0", npm_package_dependencies__100mslive_react_icons: "0.10.14-alpha.4", npm_package_scripts_types: "tsc -w", GITHUB_REPOSITORY_ID: "429826515", GITHUB_ACTIONS: "true", npm_lifecycle_event: "build:only", npm_package_version: "0.3.14-alpha.4", npm_package_size_limit_4_limit: "20 KB", npm_package_size_limit_1_path: "packages/hms-video-store/dist/index.js", npm_package_scripts_build_only: "rm -rf dist && node ../../scripts/build-webapp", npm_package_devDependencies__types_react: "^18.1.0", npm_package_sideEffects: "false", npm_package_repository_url: "https://github.com/100mslive/web-sdks.git", npm_package_source: "src/index.ts", GITHUB_REF_PROTECTED: "true", npm_config_argv: '{"remain":[],"cooked":["run","test"],"original":["test"]}', npm_package_size_limit_5_limit: "20 KB", npm_package_size_limit_2_path: "packages/roomkit-react/dist/index.cjs.js", npm_package_scripts_build: "yarn build:only && yarn types:build", npm_package_devDependencies_tslib: "^2.2.0", npm_package_devDependencies_nx: "^14.5.1", npm_package_devDependencies_lint_staged: "^12.0.3", NX_CLI_SET: "true", npm_package_dependencies_uuid: "^8.3.2", npm_package_dependencies_react_virtualized_auto_sizer: "^1.0.7", npm_package_dependencies_lodash_merge: "^4.6.2", npm_package_dependencies_emoji_mart: "^5.2.2", GITHUB_WORKSPACE: "/home/runner/work/web-sdks/web-sdks", ACCEPT_EULA: "Y", GITHUB_JOB: "publish_packages", RUNNER_PERFLOG: "/home/runner/perflog", npm_package_size_limit_6_limit: "150 KB", npm_package_size_limit_3_path: "packages/roomkit-react/dist/index.js", npm_package_devDependencies_cypress: "^9.5.2", GITHUB_SHA: "870d07094ed80ee2fefe344a743b4c463b046ccb", GITHUB_RUN_ATTEMPT: "1", npm_package_size_limit_7_limit: "100 KB", npm_package_size_limit_4_path: "packages/hms-virtual-background/dist/index.cjs.js", npm_config_version_git_tag: "true", npm_config_version_git_sign: "", npm_package_dependencies_qrcode_react: "^3.1.0", GITHUB_REF: "refs/heads/publish-alpha", GITHUB_ACTOR: "github-actions[bot]", ANDROID_SDK_ROOT: "/usr/local/lib/android/sdk", npm_package_license: "MIT", npm_package_size_limit_5_path: "packages/hms-virtual-background/dist/index.js", npm_config_strict_ssl: "true", LEIN_HOME: "/usr/local/lib/lein", npm_package_size_limit_6_path: "packages/react-icons/dist/index.cjs.js", npm_package_scripts_format: "prettier -w src/**", npm_package_devDependencies_eslint_plugin_prettier: "^4.0.0", npm_package_devDependencies_eslint_config_react_app: "^7.0.0", NX_TASK_TARGET_PROJECT: "@100mslive/roomkit-react", GITHUB_PATH: "/home/runner/work/_temp/_runner_file_commands/add_path_efec4bdd-ae9b-4acd-b2f1-fdf170fae8f6", JAVA_HOME: "/usr/lib/jvm/temurin-11-jdk-amd64", PWD: "/home/runner/work/web-sdks/web-sdks/packages/roomkit-react", GITHUB_ACTOR_ID: "41898282", RUNNER_WORKSPACE: "/home/runner/work/web-sdks", npm_execpath: "/usr/local/lib/node_modules/yarn/bin/yarn.js", npm_package_size_limit_7_path: "packages/react-icons/dist/index.js", npm_package_scripts_ybys: "yarn && yarn build --no-private && yarn storybook", npm_package_dependencies__radix_ui_react_progress: "1.0.0", HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS: "3650", STATS_TIS: "mining", GITHUB_EVENT_NAME: "workflow_dispatch", HOMEBREW_NO_AUTO_UPDATE: "1", ANDROID_HOME: "/usr/local/lib/android/sdk", GITHUB_SERVER_URL: "https://github.com", GECKOWEBDRIVER: "/usr/local/share/gecko_driver", LEIN_JAR: "/usr/local/lib/lein/self-installs/leiningen-2.11.2-standalone.jar", GHCUP_INSTALL_BASE_PREFIX: "/usr/local", GITHUB_OUTPUT: "/home/runner/work/_temp/_runner_file_commands/set_output_efec4bdd-ae9b-4acd-b2f1-fdf170fae8f6", npm_package_scripts_prestart: "rm -rf dist && yarn types:build", npm_package_author_name: "100ms", EDGEWEBDRIVER: "/usr/local/share/edge_driver", STATS_EXT: "true", npm_package_scripts_build_storybook: "sb build", npm_package_devDependencies_postcss: "^8.4.5", npm_package_devDependencies_esbuild: "^0.18.13", npm_config_save_prefix: "^", npm_config_ignore_optional: "", npm_package_dependencies_worker_timers: "^7.0.40", npm_package_typings: "dist/index.d.ts", ANDROID_NDK: "/usr/local/lib/android/sdk/ndk/25.2.9519653", SGX_AESM_ADDR: "1", CHROME_BIN: "/usr/bin/google-chrome", npm_package_scripts_storybook: "sb dev -p 6006", npm_package_devDependencies_esbuild_plugin_postcss2: "0.1.1", npm_package_dependencies_react_swipeable: "^7.0.1", npm_package_devDependencies_babel_plugin_react_require: "3.1.3", npm_package_devDependencies__storybook_testing_library: "^0.2.0", npm_package_devDependencies__storybook_addon_essentials: "^7.0.27", SELENIUM_JAR_PATH: "/usr/share/java/selenium-server.jar", STATS_EXTP: "https://provjobdsettingscdn.blob.core.windows.net/settings/provjobdsettings-0.5.181+6/provjobd.data", npm_package_scripts_reactsdk: "cd packages/react-sdk && yarn start", npm_package_dependencies_react_use: "^17.4.0", npm_package_dependencies__radix_ui_react_collapsible: "1.0.0", npm_package_devDependencies_storybook_dark_mode: "^3.0.0", npm_package_devDependencies__storybook_react: "^7.0.27", INIT_CWD: "/home/runner/work/web-sdks/web-sdks", ANDROID_NDK_HOME: "/usr/local/lib/android/sdk/ndk/25.2.9519653", GITHUB_STEP_SUMMARY: "/home/runner/work/_temp/_runner_file_commands/step_summary_efec4bdd-ae9b-4acd-b2f1-fdf170fae8f6" };
113
113
  }
114
114
  });
115
115
 
@@ -20391,7 +20391,7 @@ function ht(a11) {
20391
20391
  function Xa(a11) {
20392
20392
  return a11 && a11.source === "screen";
20393
20393
  }
20394
- function ti(a11) {
20394
+ function ri(a11) {
20395
20395
  return a11 && a11.source === "audioplaylist";
20396
20396
  }
20397
20397
  function mt(a11) {
@@ -20418,7 +20418,7 @@ function io() {
20418
20418
  }
20419
20419
  return "CUSTOM";
20420
20420
  }
20421
- function Sr(a11) {
20421
+ function Tr(a11) {
20422
20422
  switch (a11) {
20423
20423
  case "join":
20424
20424
  return "JOIN";
@@ -20435,7 +20435,7 @@ function Sr(a11) {
20435
20435
  function ee(a11) {
20436
20436
  return a11 != null;
20437
20437
  }
20438
- function gt(a11 = "prod", e) {
20438
+ function ft(a11 = "prod", e) {
20439
20439
  let t2 = "web", i2 = Je !== "LOCAL" && a11 === "prod" ? "prod" : "debug";
20440
20440
  if (Ue)
20441
20441
  return fs({ os: "web_nodejs", os_version: process.version, sdk: t2, sdk_version: Ts, env: i2, domain: Je, is_prebuilt: !!(e != null && e.isPrebuilt), framework: "node", framework_version: process.version, framework_sdk_version: e == null ? void 0 : e.sdkVersion });
@@ -20525,7 +20525,7 @@ function Ps() {
20525
20525
  };
20526
20526
  })) };
20527
20527
  }
20528
- function si(a11, e = 300) {
20528
+ function oi(a11, e = 300) {
20529
20529
  let t2;
20530
20530
  return function(...i2) {
20531
20531
  clearTimeout(t2), t2 = void 0;
@@ -20573,7 +20573,7 @@ function nt(a11) {
20573
20573
  }
20574
20574
  function _a7(a11, e) {
20575
20575
  var r2;
20576
- let t2 = Wt.parse(a11.sdp);
20576
+ let t2 = Kt.parse(a11.sdp);
20577
20577
  if (!((r2 = t2.origin) != null && r2.username.startsWith("mozilla")))
20578
20578
  return a11;
20579
20579
  let i2 = e ? Array.from(e.values()) : [];
@@ -20581,13 +20581,13 @@ function _a7(a11, e) {
20581
20581
  var l2, u2, p2;
20582
20582
  let o2 = (l2 = s2.msid) == null ? void 0 : l2.split(" ")[0], n2 = (u2 = i2.find((h2) => h2.type === s2.type && h2.stream_id === o2)) == null ? void 0 : u2.track_id;
20583
20583
  n2 && (s2.msid = (p2 = s2.msid) == null ? void 0 : p2.replace(/\s(.+)/, ` ${n2}`));
20584
- }), { type: a11.type, sdp: Wt.write(t2) };
20584
+ }), { type: a11.type, sdp: Kt.write(t2) };
20585
20585
  }
20586
20586
  function Na(a11, e) {
20587
20587
  var s2;
20588
20588
  if (!(a11 != null && a11.sdp) || !e)
20589
20589
  return;
20590
- let i2 = Wt.parse(a11.sdp).media.find((o2) => ee(o2.mid) && parseInt(o2.mid) === parseInt(e));
20590
+ let i2 = Kt.parse(a11.sdp).media.find((o2) => ee(o2.mid) && parseInt(o2.mid) === parseInt(e));
20591
20591
  return (s2 = i2 == null ? void 0 : i2.msid) == null ? void 0 : s2.split(" ")[1];
20592
20592
  }
20593
20593
  function Oa(a11) {
@@ -20599,14 +20599,14 @@ function dn2(a11, e, t2, i2) {
20599
20599
  return i2 && i2.trim().length > 0 && r2.searchParams.set("region", i2.trim()), r2.searchParams.set("peer_id", e), r2.searchParams.set("user_agent_v2", t2), r2.toString();
20600
20600
  } catch (r2) {
20601
20601
  let s2 = r2;
20602
- throw d2.e(dr, s2.name, s2.message), s2;
20602
+ throw d2.e(ur, s2.name, s2.message), s2;
20603
20603
  }
20604
20604
  }
20605
20605
  function ln2(a11, e) {
20606
20606
  var t2;
20607
20607
  return M2(m({}, a11), { rtcConfiguration: M2(m({}, a11.rtcConfiguration), { iceServers: xa((t2 = a11.rtcConfiguration) == null ? void 0 : t2.ice_servers, e) }) });
20608
20608
  }
20609
- var import_ua_parser_js, import_lodash3, import_uuid3, import_uuid4, import_lodash4, import_uuid5, import_uuid6, import_uuid7, import_eventemitter2, import_eventemitter22, import_uuid8, import_eventemitter23, Wt, import_eventemitter24, import_uuid9, import_uuid10, Ka, qa, ja, Xt, Ja, ts, is, Qa, es, m, M2, ur, za, Q2, c2, vr, pr, Zt, ei, Ya, rs, hr, ss, ns, Za, d2, je, ge, O2, cs, Ue, to, ec, Te, us, mr, ds, ls, ps, ii, Re, Ie, hs, Je, k2, f2, ro, S2, gr, ms, le, Ss, gs, Tr, fr, Ts, fs, H2, y2, yr, z2, kr, Pr, ne, ri, no, co, Tt, Ae, He, ks, ho, mo, ai, Er, Es, bs, Rs, Is, As, Be, Hs, te, Ve, Y2, Fe, Le, ze, ce, ae, Ye, ft, go, Ds, br, ws, Rr, _s, Xe, Ir, Ar, vt, Ze, Ns, fo, vo, Mt, oi, Mo, ni, Hr, pe, ci, ve, F, et, di, tt, xs, Us, yt, G2, Bs, Vs, Me, Lr, Dr, Fs, Gs, U2, wr, Ge, fe, Ws, $s, Po, Nr, Eo, Ks, qs, kt, _r, Or, li, ui, it, rt, We, Pt, he, pi, st, De, hi, mi, Si, Et, B2, Io, Gh, Wh, q2, gi, js, N2, Js, xr, Ao, we, qh, Ho, me, Co, ie, ye, jh, Jh, oe, X2, Lo, Qs, Qh, zh, Ur, zs, Br, Do, Xh, Zh, em, tm, im, rm, sm, am, bt, wo, om, re, Ys, nm, cm, Se, dm, at, _o, Xs, lm, Zs, um, pm, hm, mm, Sm, gm, Tm, fm, vm, ea, Pm, No, Em, ia, Vr, ra, sa, aa, oa, na, ca, da, la, Rt, b2, Fr, It, ua, Oo, xo, j2, Gr, Uo, Bo, Vo, Fo, Go, Z2, Nm, Um, Bm, Ti, pa, Vm, Fm, Gm, Wo, $o, $m, ha, Km, Ko, qm, jm, Jm, Qm, zm, Ym, ma, Sa, Zm, eS, ga, tS, iS, Ta, rS, sS, aS, fa, va, qo, jo, Jo, oS, nS, cS, dS, lS, Ma, kS, Qo, PS, ES, bS, Yo, Xo, vi, At, Mi, ya, Wr, yi, ki, Pa, Ea, ba, $r, Ra, Kr, $e, qr, Pi, se, Ht, _2, Ct, Ei, bi, Ia, Aa, ot, Ha, en2, de, _e, Ri, tn2, Ca, La, Ii, Ne, Ai, Lt, Hi, Ci, Li, Dt, jr, Pe, wt, _t, Di, wi, Da, Nt, _i, Ot, Ni, V, xt, Oi, xi, Ui, ct, Bi, Vi, C, Fi, Gi, Ut, Wi, Bt, $i, Ki, qi, ji, Ji, Qi, zi, Yi, Xi, J, wa, Zi, er, tr, ir, rr, sr, dt, lt, ar, or, Vt, Ft, Qr, Gt, Yr, cr, Ee, Ke, $t, Kt, qt, xa, dr, jt, Jt, Ua, I2, Qt, Va, lr, ut, Ga, Fa, fn2, vn2, Mn, zt, yn, kn, Pn, En, Wa, bn, $a, Xr, be, Rn, In, An, Hn, Cn, Ln, Dn, wn, _n, Nn, Zr, On, xn, Un, Bn, Vn, Fn;
20609
+ var import_ua_parser_js, import_lodash3, import_uuid3, import_uuid4, import_lodash4, import_uuid5, import_uuid6, import_uuid7, import_eventemitter2, import_eventemitter22, import_uuid8, import_eventemitter23, Kt, import_eventemitter24, import_uuid9, import_uuid10, Ka, qa, ja, ei, Ja, ts, is, Qa, es, m, M2, hr, za, Q2, c2, vr, mr, ti, ii, Ya, rs, Sr, ss, ns, Za, d2, je, ge, O2, cs, Ue, to, ec, Te, us, gr, ds, ls, ps, si, Re, Ie, hs, Je, k2, f2, ro, S2, fr, ms, le, Ss, gs, gt, Tt, Ts, fs, H2, y2, yr, z2, kr, Pr, ne, ai, no, co, vt, Ae, He, ks, ho, mo, ni, Er, Es, bs, Rs, Is, As, Be, Hs, te, Ve, Y2, Fe, Le, ze, ce, ae, Ye, Mt, go, Ds, br, ws, Rr, _s, Xe, Ir, Ar, yt, Ze, Ns, fo, vo, kt, ci, Mo, di, Hr, pe, li, ve, F, et, ui, tt, xs, Us, Pt, G2, Bs, Vs, Me, Lr, Dr, Fs, Gs, U2, wr, Ge, fe, Ws, $s, Po, Nr, Eo, Ks, qs, Et, _r, Or, pi, hi, it, rt, We, bt, he, mi, st, De, Si, gi, Ti, Rt, B2, Io, Gh, Wh, q2, fi, js, N2, Js, xr, Ao, we, qh, Ho, me, Co, ie, ye, jh, Jh, oe, X2, Lo, Qs, Qh, zh, Ur, zs, Br, Do, Xh, Zh, em, tm, im, rm, sm, am, It, wo, om, re, Ys, nm, cm, Se, dm, at, _o, Xs, lm, Zs, um, pm, hm, mm, Sm, gm, Tm, fm, vm, ea, Pm, No, Em, ia, Vr, ra, sa, aa, oa, na, ca, da, la, At, b2, Fr, Ht, ua, Oo, xo, j2, Gr, Uo, Bo, Vo, Fo, Go, Z2, Nm, Um, Bm, vi, pa, Vm, Fm, Gm, Wo, $o, $m, ha, Km, Ko, qm, jm, Jm, Qm, zm, Ym, ma, Sa, Zm, eS, ga, tS, iS, Ta, rS, sS, aS, fa, va, qo, jo, Jo, oS, nS, cS, dS, lS, Ma, kS, Qo, PS, ES, bS, Yo, Xo, yi, Ct, ki, ya, Wr, Pi, Ei, Pa, Ea, ba, $r, Ra, Kr, $e, qr, bi, se, Lt, _2, Dt, Ri, Ii, Ia, Aa, ot, Ha, en2, de, _e, Ai, tn2, Ca, La, Hi, Ne, Ci, wt, Li, Di, wi, _t, jr, Pe, Nt, Ot, _i, Ni, Da, xt, Oi, Ut, xi, V, Bt, Ui, Bi, Vi, ct, Fi, Gi, C, Wi, $i, Vt, Ki, Ft, qi, ji, Ji, Qi, zi, Yi, Xi, Zi, er, J, wa, tr, ir, rr, sr, ar, or, dt, lt, nr, cr, Gt, Wt, Qr, $t, Yr, lr, Ee, Ke, qt, jt, Jt, xa, ur, Qt, zt, Ua, I2, Yt, Va, pr, ut, Ga, Fa, fn2, vn2, Mn, Xt, yn, kn, Pn, En, Wa, bn, $a, Xr, be, Rn, In, An, Hn, Cn, Ln, Dn, wn, _n, Nn, Zr, On, xn, Un, Bn, Vn, Fn;
20610
20610
  var init_dist = __esm({
20611
20611
  "../hms-video-store/dist/index.js"() {
20612
20612
  "use strict";
@@ -20632,7 +20632,7 @@ var init_dist = __esm({
20632
20632
  import_eventemitter22 = require("eventemitter2");
20633
20633
  import_uuid8 = require("uuid");
20634
20634
  import_eventemitter23 = require("eventemitter2");
20635
- Wt = __toESM(require_lib());
20635
+ Kt = __toESM(require_lib());
20636
20636
  import_eventemitter24 = __toESM(require("eventemitter2"));
20637
20637
  import_uuid9 = require("uuid");
20638
20638
  import_uuid10 = require("uuid");
@@ -20640,7 +20640,7 @@ var init_dist = __esm({
20640
20640
  Ka = Object.defineProperty;
20641
20641
  qa = Object.defineProperties;
20642
20642
  ja = Object.getOwnPropertyDescriptors;
20643
- Xt = Object.getOwnPropertySymbols;
20643
+ ei = Object.getOwnPropertySymbols;
20644
20644
  Ja = Object.getPrototypeOf;
20645
20645
  ts = Object.prototype.hasOwnProperty;
20646
20646
  is = Object.prototype.propertyIsEnumerable;
@@ -20649,18 +20649,18 @@ var init_dist = __esm({
20649
20649
  m = (a11, e) => {
20650
20650
  for (var t2 in e || (e = {}))
20651
20651
  ts.call(e, t2) && es(a11, t2, e[t2]);
20652
- if (Xt)
20653
- for (var t2 of Xt(e))
20652
+ if (ei)
20653
+ for (var t2 of ei(e))
20654
20654
  is.call(e, t2) && es(a11, t2, e[t2]);
20655
20655
  return a11;
20656
20656
  };
20657
20657
  M2 = (a11, e) => qa(a11, ja(e));
20658
- ur = (a11, e) => {
20658
+ hr = (a11, e) => {
20659
20659
  var t2 = {};
20660
20660
  for (var i2 in a11)
20661
20661
  ts.call(a11, i2) && e.indexOf(i2) < 0 && (t2[i2] = a11[i2]);
20662
- if (a11 != null && Xt)
20663
- for (var i2 of Xt(a11))
20662
+ if (a11 != null && ei)
20663
+ for (var i2 of ei(a11))
20664
20664
  e.indexOf(i2) < 0 && is.call(a11, i2) && (t2[i2] = a11[i2]);
20665
20665
  return t2;
20666
20666
  };
@@ -20683,14 +20683,14 @@ var init_dist = __esm({
20683
20683
  n2((t2 = t2.apply(a11, e)).next());
20684
20684
  });
20685
20685
  vr = za((Bc, ao) => {
20686
- ao.exports = { version: "0.12.14-alpha.2", license: "MIT", repository: { type: "git", url: "https://github.com/100mslive/web-sdks.git", directory: "packages/hms-video-store" }, main: "dist/index.cjs.js", module: "dist/index.js", typings: "dist/index.d.ts", files: ["dist", "src"], engines: { node: ">=12" }, exports: { ".": { require: "./dist/index.cjs.js", import: "./dist/index.js", default: "./dist/index.js" } }, sideEffects: false, scripts: { prestart: "rm -rf dist && yarn types:build", start: 'concurrently "yarn dev" "yarn types"', dev: "node ../../scripts/dev", "build:only": "node ../../scripts/build", build: "yarn build:only && yarn types:build", types: "tsc -w", "types:build": "tsc -p tsconfig.json", format: "prettier --write src/**/*.ts", test: "jest --maxWorkers=1", "test:watch": "jest --watch", "test:coverage": "jest --coverage", lint: "eslint -c ../../.eslintrc .", "lint:fix": "yarn lint --fix", prepare: "yarn build", size: "size-limit", analyze: "size-limit --why", docs: "rm -rf ./docs && typedoc && rm -f ./docs/README.md && mkdir ./docs/home &&mv ./docs/modules.md ./docs/home/content.md && node ../../scripts/docs-store && npx prettier --write './docs/**/*'" }, name: "@100mslive/hms-video-store", author: "100ms", dependencies: { eventemitter2: "^6.4.9", immer: "^9.0.6", "lodash.isequal": "^4.5.0", reselect: "4.0.0", "sdp-transform": "^2.14.1", "ua-parser-js": "^1.0.1", uuid: "^8.3.2", "webrtc-adapter": "^8.0.0", zustand: "3.5.7" }, devDependencies: { "@types/dom-screen-wake-lock": "^1.0.1", "@types/lodash.isequal": "^4.5.8", "@types/sdp-transform": "^2.4.4", "@types/ua-parser-js": "^0.7.36", "@types/uuid": "^8.3.0", "jest-canvas-mock": "^2.3.1", "jsdom-worker": "^0.3.0", tslib: "^2.2.0" }, description: "@100mslive Core SDK which abstracts the complexities of webRTC while providing a reactive store for data management with a unidirectional data flow", keywords: ["video", "webrtc", "conferencing", "100ms"] };
20686
+ ao.exports = { version: "0.12.14-alpha.4", license: "MIT", repository: { type: "git", url: "https://github.com/100mslive/web-sdks.git", directory: "packages/hms-video-store" }, main: "dist/index.cjs.js", module: "dist/index.js", typings: "dist/index.d.ts", files: ["dist", "src"], engines: { node: ">=12" }, exports: { ".": { require: "./dist/index.cjs.js", import: "./dist/index.js", default: "./dist/index.js" } }, sideEffects: false, scripts: { prestart: "rm -rf dist && yarn types:build", start: 'concurrently "yarn dev" "yarn types"', dev: "node ../../scripts/dev", "build:only": "node ../../scripts/build", build: "yarn build:only && yarn types:build", types: "tsc -w", "types:build": "tsc -p tsconfig.json", format: "prettier --write src/**/*.ts", test: "jest --maxWorkers=1", "test:watch": "jest --watch", "test:coverage": "jest --coverage", lint: "eslint -c ../../.eslintrc .", "lint:fix": "yarn lint --fix", prepare: "yarn build", size: "size-limit", analyze: "size-limit --why", docs: "rm -rf ./docs && typedoc && rm -f ./docs/README.md && mkdir ./docs/home &&mv ./docs/modules.md ./docs/home/content.md && node ../../scripts/docs-store && npx prettier --write './docs/**/*'" }, name: "@100mslive/hms-video-store", author: "100ms", dependencies: { eventemitter2: "^6.4.9", immer: "^9.0.6", "lodash.isequal": "^4.5.0", reselect: "4.0.0", "sdp-transform": "^2.14.1", "ua-parser-js": "^1.0.1", uuid: "^8.3.2", "webrtc-adapter": "^8.0.0", zustand: "3.5.7" }, devDependencies: { "@types/dom-screen-wake-lock": "^1.0.1", "@types/lodash.isequal": "^4.5.8", "@types/sdp-transform": "^2.4.4", "@types/ua-parser-js": "^0.7.36", "@types/uuid": "^8.3.0", "jest-canvas-mock": "^2.3.1", "jsdom-worker": "^0.3.0", tslib: "^2.2.0" }, description: "@100mslive Core SDK which abstracts the complexities of webRTC while providing a reactive store for data management with a unidirectional data flow", keywords: ["video", "webrtc", "conferencing", "100ms"] };
20687
20687
  });
20688
- pr = ((n2) => (n2.Disconnected = "Disconnected", n2.Preview = "Preview", n2.Connecting = "Connecting", n2.Connected = "Connected", n2.Reconnecting = "Reconnecting", n2.Disconnecting = "Disconnecting", n2.Failed = "Failed", n2))(pr || {});
20689
- Zt = () => ({ room: { id: "", isConnected: false, name: "", peers: [], localPeer: "", roomState: "Disconnected", recording: { browser: { running: false }, server: { running: false }, hls: { running: false } }, rtmp: { running: false }, hls: { running: false, variants: [] }, sessionId: "" }, peers: {}, tracks: {}, playlist: { audio: { list: {}, selection: { id: "", hasPrevious: false, hasNext: false }, progress: 0, volume: 0, currentTime: 0, playbackRate: 1 }, video: { list: {}, selection: { id: "", hasPrevious: false, hasNext: false }, progress: 0, volume: 0, currentTime: 0, playbackRate: 1 } }, messages: { byID: {}, allIDs: [] }, speakers: {}, connectionQualities: {}, settings: { audioInputDeviceId: "", audioOutputDeviceId: "", videoInputDeviceId: "" }, devices: { audioInput: [], audioOutput: [], videoInput: [] }, roles: {}, roleChangeRequests: [], errors: [], sessionStore: {}, templateAppData: {}, polls: {}, whiteboards: {}, hideLocalPeer: false });
20690
- ei = () => ({ peerStats: {}, remoteTrackStats: {}, localTrackStats: {}, localPeer: { id: "" } });
20688
+ mr = ((n2) => (n2.Disconnected = "Disconnected", n2.Preview = "Preview", n2.Connecting = "Connecting", n2.Connected = "Connected", n2.Reconnecting = "Reconnecting", n2.Disconnecting = "Disconnecting", n2.Failed = "Failed", n2))(mr || {});
20689
+ ti = () => ({ room: { id: "", isConnected: false, name: "", peers: [], localPeer: "", roomState: "Disconnected", recording: { browser: { running: false }, server: { running: false }, hls: { running: false } }, rtmp: { running: false }, hls: { running: false, variants: [] }, sessionId: "" }, peers: {}, tracks: {}, playlist: { audio: { list: {}, selection: { id: "", hasPrevious: false, hasNext: false }, progress: 0, volume: 0, currentTime: 0, playbackRate: 1 }, video: { list: {}, selection: { id: "", hasPrevious: false, hasNext: false }, progress: 0, volume: 0, currentTime: 0, playbackRate: 1 } }, messages: { byID: {}, allIDs: [] }, speakers: {}, connectionQualities: {}, settings: { audioInputDeviceId: "", audioOutputDeviceId: "", videoInputDeviceId: "" }, devices: { audioInput: [], audioOutput: [], videoInput: [] }, roles: {}, roleChangeRequests: [], errors: [], sessionStore: {}, templateAppData: {}, polls: {}, whiteboards: {}, hideLocalPeer: false });
20690
+ ii = () => ({ peerStats: {}, remoteTrackStats: {}, localTrackStats: {}, localPeer: { id: "" } });
20691
20691
  Ya = ((e) => (e.CHAT = "chat", e))(Ya || {});
20692
20692
  rs = ((t2) => (t2.INFO = "info", t2.ERROR = "error", t2))(rs || {});
20693
- hr = ((D2) => (D2.PEER_JOINED = "PEER_JOINED", D2.PEER_LEFT = "PEER_LEFT", D2.PEER_LIST = "PEER_LIST", D2.NEW_MESSAGE = "NEW_MESSAGE", D2.ERROR = "ERROR", D2.RECONNECTING = "RECONNECTING", D2.RECONNECTED = "RECONNECTED", D2.TRACK_ADDED = "TRACK_ADDED", D2.TRACK_REMOVED = "TRACK_REMOVED", D2.TRACK_MUTED = "TRACK_MUTED", D2.TRACK_UNMUTED = "TRACK_UNMUTED", D2.TRACK_DEGRADED = "TRACK_DEGRADED", D2.TRACK_RESTORED = "TRACK_RESTORED", D2.TRACK_DESCRIPTION_CHANGED = "TRACK_DESCRIPTION_CHANGED", D2.ROLE_UPDATED = "ROLE_UPDATED", D2.CHANGE_TRACK_STATE_REQUEST = "CHANGE_TRACK_STATE_REQUEST", D2.CHANGE_MULTI_TRACK_STATE_REQUEST = "CHANGE_MULTI_TRACK_STATE_REQUEST", D2.ROOM_ENDED = "ROOM_ENDED", D2.REMOVED_FROM_ROOM = "REMOVED_FROM_ROOM", D2.DEVICE_CHANGE_UPDATE = "DEVICE_CHANGE_UPDATE", D2.PLAYLIST_TRACK_ENDED = "PLAYLIST_TRACK_ENDED", D2.NAME_UPDATED = "NAME_UPDATED", D2.METADATA_UPDATED = "METADATA_UPDATED", D2.POLL_CREATED = "POLL_CREATED", D2.POLL_STARTED = "POLL_STARTED", D2.POLL_STOPPED = "POLL_STOPPED", D2.POLL_VOTES_UPDATED = "POLL_VOTES_UPDATED", D2.POLLS_LIST = "POLLS_LIST", D2.HAND_RAISE_CHANGED = "HAND_RAISE_CHANGED", D2.TRANSCRIPTION_STATE_UPDATED = "TRANSCRIPTION_STATE_UPDATED", D2))(hr || {});
20693
+ Sr = ((D2) => (D2.PEER_JOINED = "PEER_JOINED", D2.PEER_LEFT = "PEER_LEFT", D2.PEER_LIST = "PEER_LIST", D2.NEW_MESSAGE = "NEW_MESSAGE", D2.ERROR = "ERROR", D2.RECONNECTING = "RECONNECTING", D2.RECONNECTED = "RECONNECTED", D2.TRACK_ADDED = "TRACK_ADDED", D2.TRACK_REMOVED = "TRACK_REMOVED", D2.TRACK_MUTED = "TRACK_MUTED", D2.TRACK_UNMUTED = "TRACK_UNMUTED", D2.TRACK_DEGRADED = "TRACK_DEGRADED", D2.TRACK_RESTORED = "TRACK_RESTORED", D2.TRACK_DESCRIPTION_CHANGED = "TRACK_DESCRIPTION_CHANGED", D2.ROLE_UPDATED = "ROLE_UPDATED", D2.CHANGE_TRACK_STATE_REQUEST = "CHANGE_TRACK_STATE_REQUEST", D2.CHANGE_MULTI_TRACK_STATE_REQUEST = "CHANGE_MULTI_TRACK_STATE_REQUEST", D2.ROOM_ENDED = "ROOM_ENDED", D2.REMOVED_FROM_ROOM = "REMOVED_FROM_ROOM", D2.DEVICE_CHANGE_UPDATE = "DEVICE_CHANGE_UPDATE", D2.PLAYLIST_TRACK_ENDED = "PLAYLIST_TRACK_ENDED", D2.NAME_UPDATED = "NAME_UPDATED", D2.METADATA_UPDATED = "METADATA_UPDATED", D2.POLL_CREATED = "POLL_CREATED", D2.POLL_STARTED = "POLL_STARTED", D2.POLL_STOPPED = "POLL_STOPPED", D2.POLL_VOTES_UPDATED = "POLL_VOTES_UPDATED", D2.POLLS_LIST = "POLLS_LIST", D2.HAND_RAISE_CHANGED = "HAND_RAISE_CHANGED", D2.TRANSCRIPTION_STATE_UPDATED = "TRANSCRIPTION_STATE_UPDATED", D2))(Sr || {});
20694
20694
  ss = ((t2) => (t2.audio = "audio", t2.video = "video", t2))(ss || {});
20695
20695
  ns = ((l2) => (l2[l2.VERBOSE = 0] = "VERBOSE", l2[l2.DEBUG = 1] = "DEBUG", l2[l2.INFO = 2] = "INFO", l2[l2.WARN = 3] = "WARN", l2[l2.TIME = 4] = "TIME", l2[l2.TIMEEND = 5] = "TIMEEND", l2[l2.ERROR = 6] = "ERROR", l2[l2.NONE = 7] = "NONE", l2))(ns || {});
20696
20696
  Za = typeof window != "undefined" && typeof window.expect != "undefined";
@@ -20776,12 +20776,12 @@ var init_dist = __esm({
20776
20776
  ec = to();
20777
20777
  Te = () => ge.getDevice().type === "mobile";
20778
20778
  us = () => typeof document != "undefined" && document.hidden;
20779
- mr = () => {
20779
+ gr = () => {
20780
20780
  var a11;
20781
20781
  return ((a11 = ge.getOS().name) == null ? void 0 : a11.toLowerCase()) === "ios";
20782
20782
  };
20783
20783
  ps = ((ls = (ds = ge.getBrowser()) == null ? void 0 : ds.name) == null ? void 0 : ls.toLowerCase()) === "firefox";
20784
- ii = (a11) => a11 ? `{
20784
+ si = (a11) => a11 ? `{
20785
20785
  trackId: ${a11.id};
20786
20786
  kind: ${a11.kind};
20787
20787
  enabled: ${a11.enabled};
@@ -20827,7 +20827,7 @@ var init_dist = __esm({
20827
20827
  logIdentifier: ${this.logIdentifier};
20828
20828
  source: ${this.source};
20829
20829
  enabled: ${this.enabled};
20830
- nativeTrack: ${ii(this.nativeTrack)};
20830
+ nativeTrack: ${si(this.nativeTrack)};
20831
20831
  }`;
20832
20832
  }
20833
20833
  };
@@ -21025,7 +21025,7 @@ var init_dist = __esm({
21025
21025
  }, NoEntryPlaying(a11, e) {
21026
21026
  return new f2(k2.PlaylistErrors.NO_ENTRY_IS_PLAYING, "NoEntryIsPlaying", a11, "No entry is playing at this time", e);
21027
21027
  } } };
21028
- gr = class {
21028
+ fr = class {
21029
21029
  constructor() {
21030
21030
  this.valuesMap = /* @__PURE__ */ new Map();
21031
21031
  }
@@ -21052,7 +21052,7 @@ var init_dist = __esm({
21052
21052
  };
21053
21053
  ms = () => {
21054
21054
  try {
21055
- O2 && !localStorage && (window.localStorage = new gr());
21055
+ O2 && !localStorage && (window.localStorage = new fr());
21056
21056
  } catch (a11) {
21057
21057
  d2.e("Error initialising localStorage", S2.GenericErrors.LocalStorageAccessDenied());
21058
21058
  }
@@ -21089,13 +21089,13 @@ var init_dist = __esm({
21089
21089
  return t2 ? a11 = t2 : (a11 = (0, import_uuid4.v4)(), e.set(a11)), a11;
21090
21090
  };
21091
21091
  gs = "[VALIDATIONS]";
21092
- Tr = () => {
21092
+ gt = () => {
21093
21093
  if (!ee(RTCPeerConnection)) {
21094
21094
  let a11 = S2.GenericErrors.MissingRTCPeerConnection();
21095
21095
  throw d2.e(gs, a11), a11;
21096
21096
  }
21097
21097
  };
21098
- fr = () => {
21098
+ Tt = () => {
21099
21099
  if (!ee(navigator.mediaDevices)) {
21100
21100
  let a11 = S2.GenericErrors.MissingMediaDevices();
21101
21101
  throw d2.e(gs, a11), a11;
@@ -21105,7 +21105,7 @@ var init_dist = __esm({
21105
21105
  fs = (a11, e = ",") => Object.keys(a11).filter((t2) => ee(a11[t2])).map((t2) => `${t2}:${a11[t2]}`).join(e);
21106
21106
  H2 = class {
21107
21107
  constructor({ name: e, level: t2, properties: i2, includesPII: r2, timestamp: s2 }) {
21108
- this.metadata = { peer: {}, userAgent: gt() };
21108
+ this.metadata = { peer: {}, userAgent: ft() };
21109
21109
  this.name = e, this.level = t2, this.includesPII = r2 || false, this.properties = i2 || {}, this.timestamp = s2 || (/* @__PURE__ */ new Date()).getTime(), this.event_id = (0, import_uuid3.v4)(), this.device_id = Ss();
21110
21110
  }
21111
21111
  toSignalParams() {
@@ -21122,12 +21122,12 @@ var init_dist = __esm({
21122
21122
  return new H2({ name: i2, level: r2, properties: s2 });
21123
21123
  }
21124
21124
  static preview(i2) {
21125
- var r2 = i2, { error: e } = r2, t2 = ur(r2, ["error"]);
21125
+ var r2 = i2, { error: e } = r2, t2 = hr(r2, ["error"]);
21126
21126
  let s2 = this.eventNameFor("preview", e === void 0), o2 = e ? 2 : 1, n2 = this.getPropertiesWithError(t2, e);
21127
21127
  return new H2({ name: s2, level: o2, properties: n2 });
21128
21128
  }
21129
21129
  static join(i2) {
21130
- var r2 = i2, { error: e } = r2, t2 = ur(r2, ["error"]);
21130
+ var r2 = i2, { error: e } = r2, t2 = hr(r2, ["error"]);
21131
21131
  let s2 = this.eventNameFor("join", e === void 0), o2 = e ? 2 : 1, n2 = this.getPropertiesWithError(M2(m({}, t2), { is_preview_called: !!t2.is_preview_called }), e);
21132
21132
  return new H2({ name: s2, level: o2, properties: n2 });
21133
21133
  }
@@ -21268,7 +21268,7 @@ var init_dist = __esm({
21268
21268
  return new H2({ name: l2, level: u2, properties: p2 });
21269
21269
  }
21270
21270
  };
21271
- ri = class {
21271
+ ai = class {
21272
21272
  constructor(e) {
21273
21273
  this.eventBus = e;
21274
21274
  this.TAG = "[AudioPluginsAnalytics]";
@@ -21314,12 +21314,12 @@ var init_dist = __esm({
21314
21314
  };
21315
21315
  no = 48e3;
21316
21316
  co = () => navigator.userAgent.indexOf("Firefox") !== -1;
21317
- Tt = class {
21317
+ vt = class {
21318
21318
  constructor(e, t2, i2) {
21319
21319
  this.eventBus = t2;
21320
21320
  this.TAG = "[AudioPluginsManager]";
21321
21321
  this.pluginAddInProgress = false;
21322
- this.hmsTrack = e, this.pluginsMap = /* @__PURE__ */ new Map(), this.analytics = new ri(t2), this.createAudioContext(), this.room = i2;
21322
+ this.hmsTrack = e, this.pluginsMap = /* @__PURE__ */ new Map(), this.analytics = new ai(t2), this.createAudioContext(), this.room = i2;
21323
21323
  }
21324
21324
  getPlugins() {
21325
21325
  return Array.from(this.pluginsMap.keys());
@@ -21530,7 +21530,7 @@ var init_dist = __esm({
21530
21530
  })()`;
21531
21531
  ho = 35;
21532
21532
  mo = 5;
21533
- ai = class {
21533
+ ni = class {
21534
21534
  constructor(e, t2, i2) {
21535
21535
  this.track = e;
21536
21536
  this.audioLevelEvent = t2;
@@ -21633,6 +21633,7 @@ var init_dist = __esm({
21633
21633
  this._codec = "opus";
21634
21634
  this._maxBitrate = 32;
21635
21635
  this._deviceId = "default";
21636
+ this._audioMode = "voice";
21636
21637
  this._advanced = [{ googEchoCancellation: { exact: true } }, { googExperimentalEchoCancellation: { exact: true } }, { autoGainControl: { exact: true } }, { noiseSuppression: { exact: true } }, { googHighpassFilter: { exact: true } }, { googAudioMirroring: { exact: true } }];
21637
21638
  }
21638
21639
  volume(e) {
@@ -21646,24 +21647,27 @@ var init_dist = __esm({
21646
21647
  maxBitrate(e) {
21647
21648
  if (e && e <= 0)
21648
21649
  throw Error("maxBitrate should be >= 1");
21649
- return this._maxBitrate = e, this;
21650
+ return this._maxBitrate = this._audioMode === "music" ? 320 : e, this;
21650
21651
  }
21651
21652
  deviceId(e) {
21652
21653
  return this._deviceId = e, this;
21653
21654
  }
21655
+ audioMode(e = "voice") {
21656
+ return this._audioMode = e, this._audioMode === "music" && (this._maxBitrate = 320), this;
21657
+ }
21654
21658
  advanced(e) {
21655
21659
  return this._advanced = e, this;
21656
21660
  }
21657
21661
  build() {
21658
- return new Ve(this._volume, this._codec, this._maxBitrate, this._deviceId, this._advanced);
21662
+ return new Ve(this._volume, this._codec, this._maxBitrate, this._deviceId, this._advanced, this._audioMode);
21659
21663
  }
21660
21664
  };
21661
21665
  Ve = class {
21662
- constructor(e, t2, i2, r2, s2) {
21663
- this.volume = e, this.codec = t2, this.maxBitrate = i2, this.deviceId = r2, this.advanced = s2;
21666
+ constructor(e, t2, i2, r2, s2, o2) {
21667
+ this.volume = e, this.codec = t2, this.maxBitrate = i2, this.deviceId = r2, this.advanced = s2, this.audioMode = o2, this.audioMode === "music" && (this.maxBitrate = 320);
21664
21668
  }
21665
21669
  toConstraints() {
21666
- return { deviceId: this.deviceId, advanced: this.advanced };
21670
+ return { deviceId: this.deviceId, advanced: this.audioMode === "music" ? [] : this.advanced };
21667
21671
  }
21668
21672
  toAnalyticsProperties() {
21669
21673
  return { audio_bitrate: this.maxBitrate, audio_codec: this.codec };
@@ -21781,7 +21785,7 @@ var init_dist = __esm({
21781
21785
  });
21782
21786
  this.handleSettingsChange = (t3) => c2(this, null, function* () {
21783
21787
  let i3 = this.stream, r3 = Ls(t3, this.settings);
21784
- r3("maxBitrate") && t3.maxBitrate && (yield i3.setMaxBitrateAndFramerate(this)), r3("advanced") && (yield this.replaceTrackWith(t3));
21788
+ (r3("maxBitrate") || r3("audioMode")) && t3.maxBitrate && (yield i3.setMaxBitrateAndFramerate(this, t3)), (r3("advanced") || r3("audioMode")) && (yield this.replaceTrackWith(t3));
21785
21789
  });
21786
21790
  this.handleDeviceChange = (t3, i3 = false) => c2(this, null, function* () {
21787
21791
  if (Ls(t3, this.settings)("deviceId")) {
@@ -21790,7 +21794,7 @@ var init_dist = __esm({
21790
21794
  !i3 && t3.deviceId && (z2.updateSelection("audioInput", { deviceId: t3.deviceId, groupId: s3 }), this.eventBus.deviceChange.publish({ isUserSelection: true, type: "audioInput", selection: { deviceId: t3.deviceId, groupId: s3 } }));
21791
21795
  }
21792
21796
  });
21793
- t2.tracks.push(this), this.settings = o2, o2.deviceId !== i2.getSettings().deviceId && !ue(i2) && (this.settings = this.buildNewSettings({ deviceId: i2.getSettings().deviceId })), this.pluginsManager = new Tt(this, s2, n2), this.setFirstTrackId(i2.id), mr() && O2 && document.addEventListener("visibilitychange", this.handleVisibilityChange);
21797
+ t2.tracks.push(this), this.settings = o2, o2.deviceId !== i2.getSettings().deviceId && !ue(i2) && (this.settings = this.buildNewSettings({ deviceId: i2.getSettings().deviceId })), this.pluginsManager = new vt(this, s2, n2), this.setFirstTrackId(i2.id), gr() && O2 && document.addEventListener("visibilitychange", this.handleVisibilityChange);
21794
21798
  }
21795
21799
  getManuallySelectedDeviceId() {
21796
21800
  return this.manuallySelectedDeviceId;
@@ -21856,7 +21860,7 @@ var init_dist = __esm({
21856
21860
  });
21857
21861
  }
21858
21862
  initAudioLevelMonitor() {
21859
- this.audioLevelMonitor && this.destroyAudioLevelMonitor(), d2.d(this.TAG, "Monitor Audio Level for", this, this.getMediaTrackSettings().deviceId), this.audioLevelMonitor = new ai(this, this.eventBus.trackAudioLevelUpdate, this.eventBus.localAudioSilence), this.audioLevelMonitor.start(), this.audioLevelMonitor.detectSilence();
21863
+ this.audioLevelMonitor && this.destroyAudioLevelMonitor(), d2.d(this.TAG, "Monitor Audio Level for", this, this.getMediaTrackSettings().deviceId), this.audioLevelMonitor = new ni(this, this.eventBus.trackAudioLevelUpdate, this.eventBus.localAudioSilence), this.audioLevelMonitor.start(), this.audioLevelMonitor.detectSilence();
21860
21864
  }
21861
21865
  destroyAudioLevelMonitor() {
21862
21866
  var t2;
@@ -21865,7 +21869,7 @@ var init_dist = __esm({
21865
21869
  cleanup() {
21866
21870
  return c2(this, null, function* () {
21867
21871
  var t2;
21868
- Q2(a3.prototype, this, "cleanup").call(this), yield this.pluginsManager.cleanup(), yield this.pluginsManager.closeContext(), this.transceiver = void 0, (t2 = this.processedTrack) == null || t2.stop(), this.isPublished = false, this.destroyAudioLevelMonitor(), mr() && O2 && document.removeEventListener("visibilitychange", this.handleVisibilityChange);
21872
+ Q2(a3.prototype, this, "cleanup").call(this), yield this.pluginsManager.cleanup(), yield this.pluginsManager.closeContext(), this.transceiver = void 0, (t2 = this.processedTrack) == null || t2.stop(), this.isPublished = false, this.destroyAudioLevelMonitor(), gr() && O2 && document.removeEventListener("visibilitychange", this.handleVisibilityChange);
21869
21873
  });
21870
21874
  }
21871
21875
  getTrackIDBeingSent() {
@@ -21875,8 +21879,8 @@ var init_dist = __esm({
21875
21879
  return this.processedTrack || this.nativeTrack;
21876
21880
  }
21877
21881
  buildNewSettings(t2) {
21878
- let { volume: i2, codec: r2, maxBitrate: s2, deviceId: o2, advanced: n2 } = m(m({}, this.settings), t2);
21879
- return new Ve(i2, r2, s2, o2, n2);
21882
+ let { volume: i2, codec: r2, maxBitrate: s2, deviceId: o2, advanced: n2, audioMode: l2 } = m(m({}, this.settings), t2);
21883
+ return new Ve(i2, r2, s2, o2, n2, l2);
21880
21884
  }
21881
21885
  };
21882
21886
  ae = class a4 extends Ie {
@@ -21944,10 +21948,10 @@ var init_dist = __esm({
21944
21948
  this.sinkCount > 0 && this.sinkCount--;
21945
21949
  }
21946
21950
  };
21947
- ft = { none: -1, low: 0, medium: 1, high: 2 };
21951
+ Mt = { none: -1, low: 0, medium: 1, high: 2 };
21948
21952
  go = 0.5;
21949
21953
  Ds = (a11, e) => {
21950
- let t2 = "high", i2 = e.width > e.height ? "width" : "height", r2 = [...a11].sort((o2, n2) => ft[o2.layer] - ft[n2.layer]), s2 = e[i2] * ((window == null ? void 0 : window.devicePixelRatio) || 1);
21954
+ let t2 = "high", i2 = e.width > e.height ? "width" : "height", r2 = [...a11].sort((o2, n2) => Mt[o2.layer] - Mt[n2.layer]), s2 = e[i2] * ((window == null ? void 0 : window.devicePixelRatio) || 1);
21951
21955
  for (let o2 = 0; o2 < r2.length; o2++) {
21952
21956
  let { resolution: n2, layer: l2 } = r2[o2], u2 = n2[i2];
21953
21957
  if (s2 <= u2) {
@@ -22004,7 +22008,7 @@ var init_dist = __esm({
22004
22008
  (t2 = this.resizeObserver) == null || t2.unobserve(e), this.listeners.delete(e);
22005
22009
  };
22006
22010
  this.createObserver = () => {
22007
- this.isSupported() && !this.resizeObserver && (this.resizeObserver = new ResizeObserver(si(this.handleResize, 300)));
22011
+ this.isSupported() && !this.resizeObserver && (this.resizeObserver = new ResizeObserver(oi(this.handleResize, 300)));
22008
22012
  };
22009
22013
  this.handleResize = (e) => {
22010
22014
  var t2;
@@ -22083,7 +22087,7 @@ var init_dist = __esm({
22083
22087
  if (r2 === 0 || s2 === 0)
22084
22088
  continue;
22085
22089
  let o2 = Ds(this.track.getSimulcastDefinitions(), { width: r2, height: s2 });
22086
- e ? e = ft[o2] > ft[e] ? o2 : e : e = o2;
22090
+ e ? e = Mt[o2] > Mt[e] ? o2 : e : e = o2;
22087
22091
  }
22088
22092
  e && (d2.d(this.TAG, `selecting max layer ${e} for the track`, `${this.track}`), yield this.track.setPreferredLayer(e));
22089
22093
  });
@@ -22091,7 +22095,7 @@ var init_dist = __esm({
22091
22095
  };
22092
22096
  Ir = ((t2) => (t2.TRANSFORM = "TRANSFORM", t2.ANALYZE = "ANALYZE", t2))(Ir || {});
22093
22097
  Ar = ((t2) => (t2["2D"] = "2d", t2.WEBGL = "webgl", t2.WEBGL2 = "webgl2", t2))(Ar || {});
22094
- vt = class {
22098
+ yt = class {
22095
22099
  constructor() {
22096
22100
  this.total = 0;
22097
22101
  this.count = 0;
@@ -22110,10 +22114,10 @@ var init_dist = __esm({
22110
22114
  constructor(e) {
22111
22115
  this.eventBus = e;
22112
22116
  this.TAG = "[VideoPluginsAnalytics]";
22113
- this.initTime = {}, this.preProcessingAvgs = new vt(), this.addedTimestamps = {}, this.processingAvgs = {}, this.pluginAdded = {}, this.pluginInputFrameRate = {}, this.pluginFrameRate = {};
22117
+ this.initTime = {}, this.preProcessingAvgs = new yt(), this.addedTimestamps = {}, this.processingAvgs = {}, this.pluginAdded = {}, this.pluginInputFrameRate = {}, this.pluginFrameRate = {};
22114
22118
  }
22115
22119
  added(e, t2, i2) {
22116
- this.pluginAdded[e] = true, this.addedTimestamps[e] = Date.now(), this.initTime[e] = 0, this.processingAvgs[e] = new vt(), t2 && (this.pluginInputFrameRate[e] = t2, this.pluginFrameRate[e] = i2 || t2), this.eventBus.analytics.publish(ne.added(e, this.addedTimestamps[e]));
22120
+ this.pluginAdded[e] = true, this.addedTimestamps[e] = Date.now(), this.initTime[e] = 0, this.processingAvgs[e] = new yt(), t2 && (this.pluginInputFrameRate[e] = t2, this.pluginFrameRate[e] = i2 || t2), this.eventBus.analytics.publish(ne.added(e, this.addedTimestamps[e]));
22117
22121
  }
22118
22122
  removed(e) {
22119
22123
  var t2;
@@ -22173,7 +22177,7 @@ var init_dist = __esm({
22173
22177
  Ns = 24;
22174
22178
  fo = 320;
22175
22179
  vo = 240;
22176
- Mt = class {
22180
+ kt = class {
22177
22181
  constructor(e, t2) {
22178
22182
  this.TAG = "[VideoPluginsManager]";
22179
22183
  this.pluginsLoopRunning = false;
@@ -22396,7 +22400,7 @@ var init_dist = __esm({
22396
22400
  return this.pluginNumFramesSkipped[e] < this.pluginNumFramesToSkip[e] ? (this.pluginNumFramesSkipped[e]++, t2 = true) : (t2 = false, this.pluginNumFramesSkipped[e] = 0), t2;
22397
22401
  }
22398
22402
  };
22399
- oi = class {
22403
+ ci = class {
22400
22404
  constructor(e, t2) {
22401
22405
  this.TAG = "[MediaStreamPluginsManager]";
22402
22406
  this.plugins = /* @__PURE__ */ new Set(), this.analytics = new Ze(e), this.room = t2;
@@ -22441,7 +22445,7 @@ var init_dist = __esm({
22441
22445
  }
22442
22446
  };
22443
22447
  Mo = ["init_response_time", "ws_connect_time", "on_policy_change_time", "local_audio_track_time", "local_video_track_time", "peer_list_time", "room_state_time", "join_response_time"];
22444
- ni = class {
22448
+ di = class {
22445
22449
  constructor() {
22446
22450
  this.eventPerformanceMeasures = {};
22447
22451
  }
@@ -22586,7 +22590,7 @@ var init_dist = __esm({
22586
22590
  static getEmptyVideoTrack(e) {
22587
22591
  var n2, l2, u2;
22588
22592
  let t2 = ((n2 = e == null ? void 0 : e.getSettings()) == null ? void 0 : n2.width) || 320, i2 = ((l2 = e == null ? void 0 : e.getSettings()) == null ? void 0 : l2.height) || 240, r2 = 1;
22589
- pe || (pe = document.createElement("canvas"), pe.width = t2, pe.height = i2, (u2 = pe.getContext("2d")) == null || u2.fillRect(0, 0, t2, i2)), ci || (ci = setInterval(() => {
22593
+ pe || (pe = document.createElement("canvas"), pe.width = t2, pe.height = i2, (u2 = pe.getContext("2d")) == null || u2.fillRect(0, 0, t2, i2)), li || (li = setInterval(() => {
22590
22594
  let p2 = pe == null ? void 0 : pe.getContext("2d");
22591
22595
  p2 && p2.fillRect(0, 0, 1, 1);
22592
22596
  }, 1e3 / r2));
@@ -22600,7 +22604,7 @@ var init_dist = __esm({
22600
22604
  return r2.enabled = false, r2;
22601
22605
  }
22602
22606
  static cleanup() {
22603
- clearInterval(ci), ci = void 0, pe = void 0;
22607
+ clearInterval(li), li = void 0, pe = void 0;
22604
22608
  }
22605
22609
  getAVTracks(e) {
22606
22610
  return c2(this, null, function* () {
@@ -22761,7 +22765,7 @@ var init_dist = __esm({
22761
22765
  this.handleVisibilityChange = () => c2(this, null, function* () {
22762
22766
  document.visibilityState === "hidden" && this.source === "regular" ? (this.enabledStateBeforeBackground = this.enabled, this.nativeTrack.enabled = false, this.replaceSenderTrack(this.nativeTrack)) : (this.nativeTrack.enabled = this.enabledStateBeforeBackground, this.replaceSenderTrack(this.processedTrack || this.nativeTrack)), this.eventBus.localVideoEnabled.publish({ enabled: this.nativeTrack.enabled, track: this });
22763
22767
  });
22764
- t2.tracks.push(this), this.setVideoHandler(new Xe(this)), this.settings = o2, o2.deviceId !== i2.getSettings().deviceId && i2.enabled && (this.settings = this.buildNewSettings({ deviceId: i2.getSettings().deviceId })), this.pluginsManager = new Mt(this, s2), this.mediaStreamPluginsManager = new oi(s2, n2), this.setFirstTrackId(this.trackId), O2 && Te() && document.addEventListener("visibilitychange", this.handleVisibilityChange);
22768
+ t2.tracks.push(this), this.setVideoHandler(new Xe(this)), this.settings = o2, o2.deviceId !== i2.getSettings().deviceId && i2.enabled && (this.settings = this.buildNewSettings({ deviceId: i2.getSettings().deviceId })), this.pluginsManager = new kt(this, s2), this.mediaStreamPluginsManager = new ci(s2, n2), this.setFirstTrackId(this.trackId), O2 && Te() && document.addEventListener("visibilitychange", this.handleVisibilityChange);
22765
22769
  }
22766
22770
  setSimulcastDefinitons(t2) {
22767
22771
  this._layerDefinitions = t2;
@@ -22917,11 +22921,11 @@ var init_dist = __esm({
22917
22921
  }
22918
22922
  };
22919
22923
  et = "renegotiation-callback-id";
22920
- di = "ion-sfu";
22924
+ ui = "ion-sfu";
22921
22925
  tt = "SUBSCRIBE_ICE_CONNECTION_CALLBACK_ID";
22922
22926
  xs = "https://event.100ms.live/v2/client/report";
22923
22927
  Us = "https://event-nonprod.100ms.live/v2/client/report";
22924
- yt = Math.pow(2, 31) - 1;
22928
+ Pt = Math.pow(2, 31) - 1;
22925
22929
  G2 = { DEVICE_CHANGE: "device-change", LOCAL_AUDIO_ENABLED: "local-audio-enabled", LOCAL_VIDEO_ENABLED: "local-video-enabled", STATS_UPDATE: "stats-update", RTC_STATS_UPDATE: "rtc-stats-update", TRACK_DEGRADED: "track-degraded", TRACK_RESTORED: "track-restored", TRACK_AUDIO_LEVEL_UPDATE: "track-audio-level-update", LOCAL_AUDIO_SILENCE: "local-audio-silence", ANALYTICS: "analytics", AUDIO_PLUGIN_FAILED: "audio-plugin-failed", POLICY_CHANGE: "policy-change", LOCAL_ROLE_UPDATE: "local-role-update", AUDIO_TRACK_UPDATE: "audio-track-update", AUDIO_TRACK_ADDED: "audio-track-added", AUDIO_TRACK_REMOVED: "audio-track-removed", AUTOPLAY_ERROR: "autoplay-error", LEAVE: "leave" };
22926
22930
  Bs = "2.5";
22927
22931
  Vs = "20240521";
@@ -23071,10 +23075,10 @@ var init_dist = __esm({
23071
23075
  let r2 = this.connection.addTransceiver(t2.getTrackBeingSent(), { streams: [this.nativeStream], direction: "sendonly", sendEncodings: this.getTrackEncodings(t2, i2) });
23072
23076
  return this.setPreferredCodec(r2, t2.nativeTrack.kind), t2.transceiver = r2, r2;
23073
23077
  }
23074
- setMaxBitrateAndFramerate(t2) {
23078
+ setMaxBitrateAndFramerate(t2, i2) {
23075
23079
  return c2(this, null, function* () {
23076
- var i2;
23077
- yield (i2 = this.connection) == null ? void 0 : i2.setMaxBitrateAndFramerate(t2);
23080
+ var r2;
23081
+ yield (r2 = this.connection) == null ? void 0 : r2.setMaxBitrateAndFramerate(t2, i2);
23078
23082
  });
23079
23083
  }
23080
23084
  setPreferredCodec(t2, i2) {
@@ -23172,7 +23176,7 @@ var init_dist = __esm({
23172
23176
  let h2 = (P8 = l2[p2]) == null ? void 0 : P8.codecId, T = h2 ? n2[h2] : void 0, g2;
23173
23177
  T && (g2 = T.substring(T.indexOf("/") + 1));
23174
23178
  let v2 = M2(m({}, l2[p2]), { rid: (w2 = l2[p2]) == null ? void 0 : w2.rid }), E2 = u2[v2.ssrc];
23175
- s2[p2] = M2(m({}, v2), { bitrate: kt("bytesSent", v2, i2 == null ? void 0 : i2[p2]), packetsLost: E2 == null ? void 0 : E2.packetsLost, jitter: E2 == null ? void 0 : E2.jitter, roundTripTime: E2 == null ? void 0 : E2.roundTripTime, totalRoundTripTime: E2 == null ? void 0 : E2.totalRoundTripTime, peerName: t2, peerID: e.peerId, enabled: e.enabled, codec: g2 });
23179
+ s2[p2] = M2(m({}, v2), { bitrate: Et("bytesSent", v2, i2 == null ? void 0 : i2[p2]), packetsLost: E2 == null ? void 0 : E2.packetsLost, jitter: E2 == null ? void 0 : E2.jitter, roundTripTime: E2 == null ? void 0 : E2.roundTripTime, totalRoundTripTime: E2 == null ? void 0 : E2.totalRoundTripTime, peerName: t2, peerID: e.peerId, enabled: e.enabled, codec: g2 });
23176
23180
  });
23177
23181
  } catch (n2) {
23178
23182
  a11.analytics.publish(y2.rtcStatsFailed(S2.WebrtcErrors.StatsFailed("TRACK", `Error getting local track stats ${e.trackId} - ${n2.message}`))), d2.w("[HMSWebrtcStats]", "Error in getting local track stats", e, n2, n2.name);
@@ -23188,7 +23192,7 @@ var init_dist = __esm({
23188
23192
  } catch (u2) {
23189
23193
  a11.analytics.publish(y2.rtcStatsFailed(S2.WebrtcErrors.StatsFailed("TRACK", `Error getting remote track stats ${e.trackId} - ${u2.message}`))), d2.w("[HMSWebrtcStats]", "Error in getting remote track stats", e, u2);
23190
23194
  }
23191
- let s2 = Po(r2), o2 = kt("bytesReceived", s2, i2), n2 = _r("packetsLost", s2, i2);
23195
+ let s2 = Po(r2), o2 = Et("bytesReceived", s2, i2), n2 = _r("packetsLost", s2, i2);
23192
23196
  return s2 != null && s2.remote && Object.assign(s2.remote, { packetsLostRate: _r("packetsLost", s2.remote, i2 == null ? void 0 : i2.remote) }), s2 && M2(m({}, s2), { bitrate: o2, packetsLostRate: n2, peerID: e.peerId, enabled: e.enabled, peerName: t2, codec: s2.codec });
23193
23197
  });
23194
23198
  Po = (a11) => {
@@ -23215,7 +23219,7 @@ var init_dist = __esm({
23215
23219
  return r2 && (s2 = r2.substring(r2.indexOf("/") + 1)), e && Object.assign(e, { remote: t2, codec: s2 });
23216
23220
  };
23217
23221
  Nr = (a11, e, t2) => {
23218
- let i2 = Eo(e), r2 = kt(a11 === "publish" ? "bytesSent" : "bytesReceived", i2, t2 && t2[a11]);
23222
+ let i2 = Eo(e), r2 = Et(a11 === "publish" ? "bytesSent" : "bytesReceived", i2, t2 && t2[a11]);
23219
23223
  return i2 && Object.assign(i2, { bitrate: r2 });
23220
23224
  };
23221
23225
  Eo = (a11) => {
@@ -23233,13 +23237,13 @@ var init_dist = __esm({
23233
23237
  }), e;
23234
23238
  };
23235
23239
  qs = (a11, e) => Array.from(new Set(a11.concat(e)));
23236
- kt = (a11, e, t2) => _r(a11, e, t2) * 8;
23240
+ Et = (a11, e, t2) => _r(a11, e, t2) * 8;
23237
23241
  _r = (a11, e, t2) => {
23238
23242
  let i2 = e && e[a11], r2 = t2 ? t2[a11] : null;
23239
23243
  return [e, t2, ee(i2), ee(r2)].every((o2) => !!o2) ? Or(i2, r2, e == null ? void 0 : e.timestamp, t2 == null ? void 0 : t2.timestamp) * 1e3 : 0;
23240
23244
  };
23241
23245
  Or = (a11, e, t2, i2) => ee(a11) && ee(e) && t2 && i2 ? (a11 - e) / (t2 - i2) : 0;
23242
- li = class {
23246
+ pi = class {
23243
23247
  constructor(e, t2, i2) {
23244
23248
  this.getStats = e;
23245
23249
  this.store = t2;
@@ -23299,7 +23303,7 @@ var init_dist = __esm({
23299
23303
  this.localPeerID = (r2 = this.store.getLocalPeer()) == null ? void 0 : r2.peerId;
23300
23304
  }
23301
23305
  };
23302
- ui = class {
23306
+ hi = class {
23303
23307
  constructor(e, t2, i2, r2) {
23304
23308
  this.store = e;
23305
23309
  this.eventBus = t2;
@@ -23329,7 +23333,7 @@ var init_dist = __esm({
23329
23333
  }
23330
23334
  setPeerConnections({ publish: e, subscribe: t2 }) {
23331
23335
  var i2, r2;
23332
- this.publishConnection = e, this.subscribeConnection = t2, this.hmsStats = new li({ publish: (i2 = this.publishConnection) == null ? void 0 : i2.getStats.bind(this.publishConnection), subscribe: (r2 = this.subscribeConnection) == null ? void 0 : r2.getStats.bind(this.subscribeConnection) }, this.store, this.eventBus);
23336
+ this.publishConnection = e, this.subscribeConnection = t2, this.hmsStats = new pi({ publish: (i2 = this.publishConnection) == null ? void 0 : i2.getStats.bind(this.publishConnection), subscribe: (r2 = this.subscribeConnection) == null ? void 0 : r2.getStats.bind(this.subscribeConnection) }, this.store, this.eventBus);
23333
23337
  }
23334
23338
  start() {
23335
23339
  return c2(this, null, function* () {
@@ -23420,7 +23424,7 @@ var init_dist = __esm({
23420
23424
  }`;
23421
23425
  }
23422
23426
  };
23423
- Pt = class extends it {
23427
+ bt = class extends it {
23424
23428
  constructor(t2) {
23425
23429
  super(M2(m({}, t2), { isLocal: false }));
23426
23430
  this.isLocal = false;
@@ -23429,8 +23433,8 @@ var init_dist = __esm({
23429
23433
  this.fromRoomState = !!t2.fromRoomState;
23430
23434
  }
23431
23435
  };
23432
- he = (a11, e) => new Pt({ peerId: a11.peer_id, name: a11.info.name, role: e.getPolicyForRole(a11.role), customerUserId: a11.info.user_id, metadata: a11.info.data, groups: a11.groups, type: a11.info.type });
23433
- pi = class {
23436
+ he = (a11, e) => new bt({ peerId: a11.peer_id, name: a11.info.name, role: e.getPolicyForRole(a11.role), customerUserId: a11.info.user_id, metadata: a11.info.data, groups: a11.groups, type: a11.info.type });
23437
+ mi = class {
23434
23438
  constructor(e, t2, i2) {
23435
23439
  this.transport = e;
23436
23440
  this.store = t2;
@@ -23510,7 +23514,7 @@ var init_dist = __esm({
23510
23514
  return super.listeners(e);
23511
23515
  }
23512
23516
  };
23513
- hi = class extends De {
23517
+ Si = class extends De {
23514
23518
  constructor() {
23515
23519
  super(...arguments);
23516
23520
  this.audioElement = null;
@@ -23562,7 +23566,7 @@ var init_dist = __esm({
23562
23566
  }), this.audioContextManager = new st(t2), t2;
23563
23567
  }
23564
23568
  };
23565
- mi = class extends De {
23569
+ gi = class extends De {
23566
23570
  constructor() {
23567
23571
  super(...arguments);
23568
23572
  this.TAG = "[PlaylistVideoManager]";
@@ -23636,13 +23640,13 @@ var init_dist = __esm({
23636
23640
  this.canvas || (this.canvas = document.createElement("canvas"), this.canvasContext = this.canvas.getContext("2d"));
23637
23641
  }
23638
23642
  };
23639
- Si = { audio: { list: [], currentIndex: -1, isAutoplayOn: true }, video: { list: [], currentIndex: -1, isAutoplayOn: true } };
23640
- Et = class extends De {
23643
+ Ti = { audio: { list: [], currentIndex: -1, isAutoplayOn: true }, video: { list: [], currentIndex: -1, isAutoplayOn: true } };
23644
+ Rt = class extends De {
23641
23645
  constructor(t2, i2) {
23642
23646
  super();
23643
23647
  this.sdk = t2;
23644
23648
  this.eventBus = i2;
23645
- this.state = { audio: m({}, Si.audio), video: m({}, Si.video) };
23649
+ this.state = { audio: m({}, Ti.audio), video: m({}, Ti.video) };
23646
23650
  this.TAG = "[PlaylistManager]";
23647
23651
  this.handlePausePlaylist = (r2) => c2(this, [r2], function* ({ enabled: t3, track: i3 }) {
23648
23652
  var o2;
@@ -23652,12 +23656,12 @@ var init_dist = __esm({
23652
23656
  i3.source === "audioplaylist" && (s2 = "audio"), i3.source === "videoplaylist" && (s2 = "video"), s2 && ((o2 = this.getElement(s2)) == null || o2.pause());
23653
23657
  });
23654
23658
  this.addTrack = (t3, i3) => c2(this, null, function* () {
23655
- yield this.sdk.addTrack(t3, i3), d2.d(this.TAG, "Playlist track added", ii(t3));
23659
+ yield this.sdk.addTrack(t3, i3), d2.d(this.TAG, "Playlist track added", si(t3));
23656
23660
  });
23657
23661
  this.removeTrack = (t3) => c2(this, null, function* () {
23658
23662
  yield this.sdk.removeTrack(t3, true), d2.d(this.TAG, "Playlist track removed", t3);
23659
23663
  });
23660
- this.audioManager = new hi(), this.videoManager = new mi(), this.addListeners();
23664
+ this.audioManager = new Si(), this.videoManager = new gi(), this.addListeners();
23661
23665
  }
23662
23666
  getList(t2 = "audio") {
23663
23667
  return this.state[t2].list;
@@ -23780,7 +23784,7 @@ var init_dist = __esm({
23780
23784
  });
23781
23785
  }
23782
23786
  cleanup() {
23783
- this.state = { audio: m({}, Si.audio), video: m({}, Si.video) }, this.eventBus.localAudioEnabled.unsubscribe(this.handlePausePlaylist), this.eventBus.localVideoEnabled.unsubscribe(this.handlePausePlaylist), this.audioManager.stop(), this.videoManager.stop();
23787
+ this.state = { audio: m({}, Ti.audio), video: m({}, Ti.video) }, this.eventBus.localAudioEnabled.unsubscribe(this.handlePausePlaylist), this.eventBus.localVideoEnabled.unsubscribe(this.handlePausePlaylist), this.audioManager.stop(), this.videoManager.stop();
23784
23788
  }
23785
23789
  onProgress(t2) {
23786
23790
  this.videoManager.on("progress", () => {
@@ -23862,7 +23866,7 @@ var init_dist = __esm({
23862
23866
  Gh = createSelector(Io, (a11) => a11.length === 0 ? null : a11.at(-1));
23863
23867
  Wh = createSelector(B2, (a11) => a11.id);
23864
23868
  q2 = (a11) => a11.peers;
23865
- gi = (a11) => a11.messages.byID;
23869
+ fi = (a11) => a11.messages.byID;
23866
23870
  js = (a11) => a11.messages.allIDs;
23867
23871
  N2 = (a11) => a11.tracks;
23868
23872
  Js = (a11) => a11.settings;
@@ -23946,20 +23950,20 @@ var init_dist = __esm({
23946
23950
  im = createSelector(q2, N2, (a11, e) => {
23947
23951
  for (let t2 in e) {
23948
23952
  let i2 = e[t2];
23949
- if (ti(i2) && i2.peerId)
23953
+ if (ri(i2) && i2.peerId)
23950
23954
  return a11[i2.peerId];
23951
23955
  }
23952
23956
  });
23953
23957
  rm = createSelector(Co, (a11) => a11.filter(as));
23954
23958
  sm = createSelector(js, (a11) => a11.length);
23955
- am = createSelector(gi, (a11) => Object.values(a11).filter((e) => !e.read).length);
23956
- bt = createSelector(js, gi, (a11, e) => {
23959
+ am = createSelector(fi, (a11) => Object.values(a11).filter((e) => !e.read).length);
23960
+ It = createSelector(js, fi, (a11, e) => {
23957
23961
  let t2 = [];
23958
23962
  return a11.forEach((i2) => {
23959
23963
  t2.push(e[i2]);
23960
23964
  }), t2;
23961
23965
  });
23962
- wo = createSelector(bt, (a11) => a11.filter((e) => {
23966
+ wo = createSelector(It, (a11) => a11.filter((e) => {
23963
23967
  var t2;
23964
23968
  return !e.recipientPeer && !(e.recipientRoles && ((t2 = e.recipientRoles) == null ? void 0 : t2.length) > 0);
23965
23969
  }));
@@ -24007,7 +24011,7 @@ var init_dist = __esm({
24007
24011
  });
24008
24012
  da = { selection: Vr("audio"), progress: ra("audio"), currentTime: sa("audio"), playbackRate: aa("audio"), volume: oa("audio"), list: na("audio"), selectedItem: ca("audio") };
24009
24013
  la = { selection: Vr("video"), progress: ra("video"), currentTime: sa("video"), playbackRate: aa("video"), volume: oa("video"), list: na("video"), selectedItem: ca("video") };
24010
- Rt = "HMS-Store:";
24014
+ At = "HMS-Store:";
24011
24015
  b2 = class {
24012
24016
  static v(e, ...t2) {
24013
24017
  this.log(0, e, ...t2);
@@ -24037,23 +24041,23 @@ var init_dist = __esm({
24037
24041
  if (!(this.level.valueOf() > e.valueOf()))
24038
24042
  switch (e) {
24039
24043
  case 0: {
24040
- console.log(Rt, ...t2);
24044
+ console.log(At, ...t2);
24041
24045
  break;
24042
24046
  }
24043
24047
  case 1: {
24044
- console.debug(Rt, ...t2);
24048
+ console.debug(At, ...t2);
24045
24049
  break;
24046
24050
  }
24047
24051
  case 2: {
24048
- console.info(Rt, ...t2);
24052
+ console.info(At, ...t2);
24049
24053
  break;
24050
24054
  }
24051
24055
  case 3: {
24052
- console.warn(Rt, ...t2);
24056
+ console.warn(At, ...t2);
24053
24057
  break;
24054
24058
  }
24055
24059
  case 6: {
24056
- console.error(Rt, ...t2);
24060
+ console.error(At, ...t2);
24057
24061
  break;
24058
24062
  }
24059
24063
  case 4: {
@@ -24075,31 +24079,31 @@ var init_dist = __esm({
24075
24079
  };
24076
24080
  b2.level = 0;
24077
24081
  Fr = (a11, e) => e;
24078
- It = (a11, e) => e;
24082
+ Ht = (a11, e) => e;
24079
24083
  ua = (a11, e) => e;
24080
24084
  Oo = (a11, e) => e;
24081
24085
  xo = (a11, e) => e;
24082
24086
  j2 = createSelector([q2, Fr], (a11, e) => e ? a11[e] : null);
24083
- Gr = createSelector([N2, It], (a11, e) => e ? a11[e] : null);
24084
- Uo = createSelector([N2, It], (a11, e) => {
24087
+ Gr = createSelector([N2, Ht], (a11, e) => e ? a11[e] : null);
24088
+ Uo = createSelector([N2, Ht], (a11, e) => {
24085
24089
  if (!e)
24086
24090
  return null;
24087
24091
  let t2 = a11[e];
24088
24092
  return (t2 == null ? void 0 : t2.type) === "video" ? t2 : null;
24089
24093
  });
24090
- Bo = createSelector([N2, It], (a11, e) => {
24094
+ Bo = createSelector([N2, Ht], (a11, e) => {
24091
24095
  if (!e)
24092
24096
  return null;
24093
24097
  let t2 = a11[e];
24094
24098
  return (t2 == null ? void 0 : t2.type) === "audio" ? t2 : null;
24095
24099
  });
24096
- Vo = createSelector([N2, It], (a11, e) => {
24100
+ Vo = createSelector([N2, Ht], (a11, e) => {
24097
24101
  if (!e)
24098
24102
  return null;
24099
24103
  let t2 = a11[e];
24100
24104
  return (t2 == null ? void 0 : t2.type) === "audio" && (t2 == null ? void 0 : t2.source) === "screen" ? t2 : null;
24101
24105
  });
24102
- Fo = createSelector([N2, It], (a11, e) => {
24106
+ Fo = createSelector([N2, Ht], (a11, e) => {
24103
24107
  if (!e)
24104
24108
  return null;
24105
24109
  let t2 = a11[e];
@@ -24113,7 +24117,7 @@ var init_dist = __esm({
24113
24117
  }));
24114
24118
  Um = A2(createSelector(j2, (a11) => a11 == null ? void 0 : a11.name));
24115
24119
  Bm = A2(createSelector(j2, (a11) => a11 == null ? void 0 : a11.type));
24116
- Ti = A2(Gr);
24120
+ vi = A2(Gr);
24117
24121
  pa = A2(Uo);
24118
24122
  Vm = A2(Bo);
24119
24123
  Fm = A2(Vo);
@@ -24167,7 +24171,7 @@ var init_dist = __esm({
24167
24171
  Ym = A2(createSelector(N2, j2, (a11, e) => {
24168
24172
  let t2 = e == null ? void 0 : e.auxiliaryTracks.find((i2) => {
24169
24173
  let r2 = a11[i2];
24170
- return ti(r2) && pt(r2);
24174
+ return ri(r2) && pt(r2);
24171
24175
  });
24172
24176
  return t2 ? a11[t2] : void 0;
24173
24177
  }));
@@ -24221,21 +24225,21 @@ var init_dist = __esm({
24221
24225
  return t2.layer;
24222
24226
  }
24223
24227
  });
24224
- fa = createSelector([bt, ye, Fr], (a11, e, t2) => {
24228
+ fa = createSelector([It, ye, Fr], (a11, e, t2) => {
24225
24229
  if (t2)
24226
24230
  return a11.filter((i2) => {
24227
24231
  var r2;
24228
24232
  return !i2.recipientPeer && !((r2 = i2.recipientRoles) != null && r2.length) || i2.sender && ![e, t2].includes(i2.sender) ? false : [e, t2].includes(i2.recipientPeer);
24229
24233
  });
24230
24234
  });
24231
- va = createSelector([bt, ua], (a11, e) => {
24235
+ va = createSelector([It, ua], (a11, e) => {
24232
24236
  if (e)
24233
24237
  return a11.filter((t2) => {
24234
24238
  var i2, r2;
24235
24239
  return (i2 = t2.recipientRoles) != null && i2.length ? (r2 = t2.recipientRoles) == null ? void 0 : r2.includes(e) : false;
24236
24240
  });
24237
24241
  });
24238
- qo = createSelector(bt, (a11) => a11.filter((e) => {
24242
+ qo = createSelector(It, (a11) => a11.filter((e) => {
24239
24243
  var t2;
24240
24244
  return !e.recipientPeer && !((t2 = e.recipientRoles) != null && t2.length);
24241
24245
  }));
@@ -24263,12 +24267,12 @@ var init_dist = __esm({
24263
24267
  let t2 = null;
24264
24268
  return a11 && (t2 = e[a11]), (t2 == null ? void 0 : t2.plugins) || [];
24265
24269
  });
24266
- vi = { 0: "PEER_JOINED", 1: "PEER_LEFT", 8: "ROLE_UPDATED", 10: "NAME_UPDATED", 11: "METADATA_UPDATED", 12: "HAND_RAISE_CHANGED" };
24267
- At = { 0: "TRACK_ADDED", 1: "TRACK_REMOVED", 2: "TRACK_MUTED", 3: "TRACK_UNMUTED", 5: "TRACK_DEGRADED", 6: "TRACK_RESTORED", 4: "TRACK_DESCRIPTION_CHANGED" };
24268
- Mi = { 0: "POLL_CREATED", 1: "POLL_STARTED", 2: "POLL_STOPPED", 4: "POLL_VOTES_UPDATED", 3: "POLLS_LIST" };
24270
+ yi = { 0: "PEER_JOINED", 1: "PEER_LEFT", 8: "ROLE_UPDATED", 10: "NAME_UPDATED", 11: "METADATA_UPDATED", 12: "HAND_RAISE_CHANGED" };
24271
+ Ct = { 0: "TRACK_ADDED", 1: "TRACK_REMOVED", 2: "TRACK_MUTED", 3: "TRACK_UNMUTED", 5: "TRACK_DEGRADED", 6: "TRACK_RESTORED", 4: "TRACK_DESCRIPTION_CHANGED" };
24272
+ ki = { 0: "POLL_CREATED", 1: "POLL_STARTED", 2: "POLL_STOPPED", 4: "POLL_VOTES_UPDATED", 3: "POLLS_LIST" };
24269
24273
  ya = { TRANSCRIPTION_STATE_UPDATED: "TRANSCRIPTION_STATE_UPDATED" };
24270
24274
  Wr = "hmsNotification";
24271
- yi = class {
24275
+ Pi = class {
24272
24276
  constructor(e) {
24273
24277
  this.id = 0;
24274
24278
  this.onNotification = (e2, t2) => {
@@ -24284,7 +24288,7 @@ var init_dist = __esm({
24284
24288
  this.eventEmitter.removeListener(Wr, i2);
24285
24289
  };
24286
24290
  };
24287
- this.store = e, this.eventEmitter = new import_eventemitter22.EventEmitter2({ maxListeners: Object.keys(hr).length });
24291
+ this.store = e, this.eventEmitter = new import_eventemitter22.EventEmitter2({ maxListeners: Object.keys(Sr).length });
24288
24292
  }
24289
24293
  sendPlaylistTrackEnded(e) {
24290
24294
  let t2 = this.createNotification("PLAYLIST_TRACK_ENDED", e, "info");
@@ -24307,14 +24311,14 @@ var init_dist = __esm({
24307
24311
  this.emitEvent(t2);
24308
24312
  }
24309
24313
  sendPeerUpdate(e, t2) {
24310
- let i2 = this.store.getState(Z2(t2 == null ? void 0 : t2.id)) || t2, r2 = vi[e];
24314
+ let i2 = this.store.getState(Z2(t2 == null ? void 0 : t2.id)) || t2, r2 = yi[e];
24311
24315
  if (r2 && i2) {
24312
24316
  let s2 = this.createNotification(r2, i2, "info");
24313
24317
  this.emitEvent(s2);
24314
24318
  }
24315
24319
  }
24316
24320
  sendTrackUpdate(e, t2) {
24317
- let i2 = this.store.getState(Ti(t2)), r2 = At[e];
24321
+ let i2 = this.store.getState(vi(t2)), r2 = Ct[e];
24318
24322
  if (r2) {
24319
24323
  let s2 = this.createNotification(r2, i2, "info");
24320
24324
  this.emitEvent(s2);
@@ -24345,7 +24349,7 @@ var init_dist = __esm({
24345
24349
  this.emitEvent(t2);
24346
24350
  }
24347
24351
  sendPollUpdate(e, t2) {
24348
- let i2 = Mi[e], r2 = this.store.getState(Ma(t2));
24352
+ let i2 = ki[e], r2 = this.store.getState(Ma(t2));
24349
24353
  if (i2) {
24350
24354
  let s2 = this.createNotification(i2, r2, "info");
24351
24355
  this.emitEvent(s2);
@@ -24362,7 +24366,7 @@ var init_dist = __esm({
24362
24366
  return this.id++, { id: this.id, type: e, message: r2, data: t2, severity: i2 };
24363
24367
  }
24364
24368
  };
24365
- ki = class {
24369
+ Ei = class {
24366
24370
  constructor(e) {
24367
24371
  this.queuedUpdates = {};
24368
24372
  this.timers = {};
@@ -24390,35 +24394,35 @@ var init_dist = __esm({
24390
24394
  }
24391
24395
  };
24392
24396
  Pa = (a11, e) => {
24393
- let t2 = Ht(Object.keys(a11), Object.keys(e));
24397
+ let t2 = Lt(Object.keys(a11), Object.keys(e));
24394
24398
  for (let i2 of t2) {
24395
24399
  let r2 = a11[i2], s2 = e[i2];
24396
- $e(r2, s2) ? (se(r2.auxiliaryTracks, s2.auxiliaryTracks) && (s2.auxiliaryTracks = r2.auxiliaryTracks), r2.groups && se(r2.groups, s2.groups) && (s2.groups = r2.groups), Object.assign(r2, s2)) : qr(r2, s2) ? delete a11[i2] : Pi(r2, s2) && (a11[i2] = s2);
24400
+ $e(r2, s2) ? (se(r2.auxiliaryTracks, s2.auxiliaryTracks) && (s2.auxiliaryTracks = r2.auxiliaryTracks), r2.groups && se(r2.groups, s2.groups) && (s2.groups = r2.groups), Object.assign(r2, s2)) : qr(r2, s2) ? delete a11[i2] : bi(r2, s2) && (a11[i2] = s2);
24397
24401
  }
24398
24402
  };
24399
24403
  Ea = (a11, e) => {
24400
- let t2 = Ht(Object.keys(a11), Object.keys(e));
24404
+ let t2 = Lt(Object.keys(a11), Object.keys(e));
24401
24405
  for (let i2 of t2) {
24402
24406
  let r2 = a11[i2], s2 = e[i2];
24403
- $e(r2, s2) ? (Kr(r2, s2), Object.assign(r2, s2)) : qr(r2, s2) ? delete a11[i2] : Pi(r2, s2) && (a11[i2] = s2);
24407
+ $e(r2, s2) ? (Kr(r2, s2), Object.assign(r2, s2)) : qr(r2, s2) ? delete a11[i2] : bi(r2, s2) && (a11[i2] = s2);
24404
24408
  }
24405
24409
  };
24406
24410
  ba = (a11, e) => {
24407
- let t2 = Ht(Object.keys(a11), Object.keys(e));
24411
+ let t2 = Lt(Object.keys(a11), Object.keys(e));
24408
24412
  for (let i2 of t2) {
24409
24413
  let r2 = a11[i2], s2 = e[i2];
24410
- $e(r2, s2) ? (r2.questions && se(r2.questions, s2.questions) && (s2.questions = r2.questions), Object.assign(r2, s2)) : Pi(r2, s2) && (a11[i2] = s2);
24414
+ $e(r2, s2) ? (r2.questions && se(r2.questions, s2.questions) && (s2.questions = r2.questions), Object.assign(r2, s2)) : bi(r2, s2) && (a11[i2] = s2);
24411
24415
  }
24412
24416
  };
24413
24417
  $r = (a11, e) => {
24414
- let t2 = Ht(Object.keys(a11), Object.keys(e));
24418
+ let t2 = Lt(Object.keys(a11), Object.keys(e));
24415
24419
  for (let i2 of t2) {
24416
24420
  let r2 = a11[i2], s2 = e[i2];
24417
- $e(r2, s2) ? Object.assign(r2, s2) : qr(r2, s2) ? delete a11[i2] : Pi(r2, s2) && (a11[i2] = s2);
24421
+ $e(r2, s2) ? Object.assign(r2, s2) : qr(r2, s2) ? delete a11[i2] : bi(r2, s2) && (a11[i2] = s2);
24418
24422
  }
24419
24423
  };
24420
24424
  Ra = (a11, e, t2) => {
24421
- let i2 = t2.reduce((s2, o2) => (s2[o2.firstTrackId] = Object.values(e[o2.getTrackIDBeingSent()] || {}).sort((n2, l2) => !n2.rid || !l2.rid ? 0 : n2.rid < l2.rid ? -1 : 1), s2), {}), r2 = Ht(Object.keys(a11), Object.keys(i2));
24425
+ let i2 = t2.reduce((s2, o2) => (s2[o2.firstTrackId] = Object.values(e[o2.getTrackIDBeingSent()] || {}).sort((n2, l2) => !n2.rid || !l2.rid ? 0 : n2.rid < l2.rid ? -1 : 1), s2), {}), r2 = Lt(Object.keys(a11), Object.keys(i2));
24422
24426
  for (let s2 of r2) {
24423
24427
  if (!i2[s2]) {
24424
24428
  delete a11[s2];
@@ -24432,7 +24436,7 @@ var init_dist = __esm({
24432
24436
  };
24433
24437
  $e = (a11, e) => a11 && e;
24434
24438
  qr = (a11, e) => a11 && !e;
24435
- Pi = (a11, e) => !a11 && e;
24439
+ bi = (a11, e) => !a11 && e;
24436
24440
  se = (a11, e) => {
24437
24441
  if (a11 === e || a11.length === 0 && (e == null ? void 0 : e.length) === 0)
24438
24442
  return true;
@@ -24443,7 +24447,7 @@ var init_dist = __esm({
24443
24447
  return false;
24444
24448
  return true;
24445
24449
  };
24446
- Ht = (a11, e) => {
24450
+ Lt = (a11, e) => {
24447
24451
  let t2 = /* @__PURE__ */ new Set();
24448
24452
  for (let i2 of a11)
24449
24453
  t2.add(i2);
@@ -24528,7 +24532,7 @@ var init_dist = __esm({
24528
24532
  return { recording: { browser: m({ running: false }, e == null ? void 0 : e.browser), server: m({ running: false }, e == null ? void 0 : e.server), hls: m({ running: false }, e == null ? void 0 : e.hls) }, rtmp: m({ running: false }, t2), hls: { variants: ((s2 = i2 == null ? void 0 : i2.variants) == null ? void 0 : s2.map((o2) => o2)) || [], running: !!(i2 != null && i2.running), error: i2 == null ? void 0 : i2.error }, transcriptions: r2 || [] };
24529
24533
  }
24530
24534
  };
24531
- Ct = class {
24535
+ Dt = class {
24532
24536
  constructor(e, t2, i2, r2) {
24533
24537
  this.playlistManager = e;
24534
24538
  this.syncPlaylistState = i2;
@@ -24599,7 +24603,7 @@ var init_dist = __esm({
24599
24603
  });
24600
24604
  }
24601
24605
  };
24602
- Ei = class {
24606
+ Ri = class {
24603
24607
  constructor(e, t2) {
24604
24608
  this.sdk = e;
24605
24609
  this.setLocally = t2;
@@ -24626,7 +24630,7 @@ var init_dist = __esm({
24626
24630
  });
24627
24631
  }
24628
24632
  };
24629
- bi = class {
24633
+ Ii = class {
24630
24634
  constructor(e, t2) {
24631
24635
  this.intervalMs = 100, this.shouldMonitor = false, this.hasStarted = false, this.unsubs = [], this.analysers = {}, this.store = e, this.actions = t2;
24632
24636
  }
@@ -24712,7 +24716,7 @@ var init_dist = __esm({
24712
24716
  let t2 = a11.filter((i2) => en2(e(i2)));
24713
24717
  return t2.reduce((i2, r2) => i2 + (e(r2) || 0), 0) / t2.length;
24714
24718
  };
24715
- Ri = class {
24719
+ Ai = class {
24716
24720
  constructor(e) {
24717
24721
  this.sdk = e;
24718
24722
  this.peerStatsList = [];
@@ -24731,14 +24735,14 @@ var init_dist = __esm({
24731
24735
  let o2 = yield (T = (h2 = this.sdk.getWebrtcInternals()) == null ? void 0 : h2.getSubscribePeerConnection()) == null ? void 0 : T.getStats();
24732
24736
  o2 == null || o2.forEach((g2) => {
24733
24737
  if (g2.type === "inbound-rtp") {
24734
- let v2 = g2.kind === "audio" ? this.remoteAudioTrackStatsList : this.remoteVideoTrackStatsList, E2 = kt("bytesReceived", g2, de(v2));
24738
+ let v2 = g2.kind === "audio" ? this.remoteAudioTrackStatsList : this.remoteVideoTrackStatsList, E2 = Et("bytesReceived", g2, de(v2));
24735
24739
  v2.push(M2(m({}, g2), { bitrate: E2 }));
24736
24740
  }
24737
24741
  });
24738
24742
  });
24739
24743
  }
24740
24744
  buildReport() {
24741
- var T, g2, v2, E2, P8, w2, Oe, Yt;
24745
+ var T, g2, v2, E2, P8, w2, Oe, Zt;
24742
24746
  let e = (T = de(this.peerStatsList)) == null ? void 0 : T.publish, t2 = (g2 = de(this.peerStatsList)) == null ? void 0 : g2.subscribe, i2 = e != null && e.responsesReceived ? ((e == null ? void 0 : e.totalRoundTripTime) || 0) / e.responsesReceived : 0, r2 = t2 != null && t2.responsesReceived ? ((t2 == null ? void 0 : t2.totalRoundTripTime) || 0) / t2.responsesReceived : 0, s2 = Number(((i2 + r2) / 2 * 1e3).toFixed(2)), o2 = ((v2 = de(this.remoteAudioTrackStatsList)) == null ? void 0 : v2.packetsReceived) || 0, n2 = ((E2 = de(this.remoteVideoTrackStatsList)) == null ? void 0 : E2.packetsReceived) || 0, l2 = this.localAudioTrackStatsList.map((x2) => x2 ? _e(Object.values(x2), ($) => $.bitrate) : 0), u2 = this.localVideoTrackStatsList.map((x2) => x2 ? _e(Object.values(x2), ($) => $.bitrate) : 0), p2 = de(this.localAudioTrackStatsList), h2 = de(this.localVideoTrackStatsList);
24743
24747
  return { combined: { roundTripTime: s2, packetsReceived: o2 + n2, packetsLost: (t2 == null ? void 0 : t2.packetsLost) || 0, bytesSent: (e == null ? void 0 : e.bytesSent) || 0, bytesReceived: (t2 == null ? void 0 : t2.bytesReceived) || 0, bitrateSent: _e(this.peerStatsList, (x2) => {
24744
24748
  var $;
@@ -24746,11 +24750,11 @@ var init_dist = __esm({
24746
24750
  }), bitrateReceived: _e(this.peerStatsList, (x2) => {
24747
24751
  var $;
24748
24752
  return ($ = x2.subscribe) == null ? void 0 : $.bitrate;
24749
- }) }, audio: { roundTripTime: s2, packetsReceived: o2, packetsLost: ((P8 = de(this.remoteAudioTrackStatsList)) == null ? void 0 : P8.packetsLost) || 0, bytesReceived: ((w2 = de(this.remoteAudioTrackStatsList)) == null ? void 0 : w2.bytesReceived) || 0, bitrateSent: _e(l2, (x2) => x2), bitrateReceived: _e(this.remoteAudioTrackStatsList, (x2) => x2.bitrate), bytesSent: p2 ? Object.values(p2).reduce((x2, $) => x2 + ($.bytesSent || 0), 0) : 0 }, video: { roundTripTime: s2, packetsLost: ((Oe = de(this.remoteVideoTrackStatsList)) == null ? void 0 : Oe.packetsLost) || 0, bytesReceived: ((Yt = de(this.remoteVideoTrackStatsList)) == null ? void 0 : Yt.bytesReceived) || 0, packetsReceived: n2, bitrateSent: _e(u2, (x2) => x2), bitrateReceived: _e(this.remoteVideoTrackStatsList, (x2) => x2.bitrate), bytesSent: h2 ? Object.values(h2).reduce((x2, $) => x2 + ($.bytesSent || 0), 0) : 0 } };
24753
+ }) }, audio: { roundTripTime: s2, packetsReceived: o2, packetsLost: ((P8 = de(this.remoteAudioTrackStatsList)) == null ? void 0 : P8.packetsLost) || 0, bytesReceived: ((w2 = de(this.remoteAudioTrackStatsList)) == null ? void 0 : w2.bytesReceived) || 0, bitrateSent: _e(l2, (x2) => x2), bitrateReceived: _e(this.remoteAudioTrackStatsList, (x2) => x2.bitrate), bytesSent: p2 ? Object.values(p2).reduce((x2, $) => x2 + ($.bytesSent || 0), 0) : 0 }, video: { roundTripTime: s2, packetsLost: ((Oe = de(this.remoteVideoTrackStatsList)) == null ? void 0 : Oe.packetsLost) || 0, bytesReceived: ((Zt = de(this.remoteVideoTrackStatsList)) == null ? void 0 : Zt.bytesReceived) || 0, packetsReceived: n2, bitrateSent: _e(u2, (x2) => x2), bitrateReceived: _e(this.remoteVideoTrackStatsList, (x2) => x2.bitrate), bytesSent: h2 ? Object.values(h2).reduce((x2, $) => x2 + ($.bytesSent || 0), 0) : 0 } };
24750
24754
  }
24751
24755
  };
24752
24756
  tn2 = ((n2) => (n2[n2.STARTING = 0] = "STARTING", n2[n2.INIT_FETCHED = 1] = "INIT_FETCHED", n2[n2.SIGNAL_CONNECTED = 2] = "SIGNAL_CONNECTED", n2[n2.ICE_ESTABLISHED = 3] = "ICE_ESTABLISHED", n2[n2.MEDIA_CAPTURED = 4] = "MEDIA_CAPTURED", n2[n2.MEDIA_PUBLISHED = 5] = "MEDIA_PUBLISHED", n2[n2.COMPLETED = 6] = "COMPLETED", n2))(tn2 || {});
24753
- Ii = class {
24757
+ Hi = class {
24754
24758
  constructor(e, t2, i2, r2) {
24755
24759
  this.sdk = e;
24756
24760
  this.sdkListener = t2;
@@ -24785,7 +24789,6 @@ var init_dist = __esm({
24785
24789
  this.onSessionStoreUpdate = this.sdkListener.onSessionStoreUpdate.bind(this.sdkListener);
24786
24790
  this.onPollsUpdate = this.sdkListener.onPollsUpdate.bind(this.sdkListener);
24787
24791
  this.onWhiteboardUpdate = this.sdkListener.onWhiteboardUpdate.bind(this.sdkListener);
24788
- this._state = 0;
24789
24792
  this.handleConnectionQualityUpdate = (e2) => {
24790
24793
  let t3 = e2.find((i3) => {
24791
24794
  var r3, s2;
@@ -24793,14 +24796,14 @@ var init_dist = __esm({
24793
24796
  });
24794
24797
  this.networkScores.push(ee(t3 == null ? void 0 : t3.downlinkQuality) ? t3.downlinkQuality : -1);
24795
24798
  };
24796
- this.statsCollector = new Ri(e);
24799
+ this.statsCollector = new Ai(e), this.state = 0;
24797
24800
  }
24798
24801
  get state() {
24799
24802
  return this._state;
24800
24803
  }
24801
24804
  set state(e) {
24802
24805
  var t2;
24803
- e < this._state || (this._state = e, (t2 = this.progressCallback) == null || t2.call(this, e));
24806
+ e === void 0 || this._state !== void 0 && e < this._state || (this._state = e, (t2 = this.progressCallback) == null || t2.call(this, e));
24804
24807
  }
24805
24808
  onICESuccess(e) {
24806
24809
  e ? this.isPublishICEConnected = true : this.isSubscribeICEConnected = true, this.isPublishICEConnected && this.isSubscribeICEConnected && (this.state = 3);
@@ -24872,7 +24875,7 @@ var init_dist = __esm({
24872
24875
  this.id = e;
24873
24876
  }
24874
24877
  };
24875
- Ai = (a11, e, t2) => c2(void 0, null, function* () {
24878
+ Ci = (a11, e, t2) => c2(void 0, null, function* () {
24876
24879
  let r2 = Error("something went wrong during fetch");
24877
24880
  for (let s2 = 0; s2 < 4; s2++)
24878
24881
  try {
@@ -24885,18 +24888,20 @@ var init_dist = __esm({
24885
24888
  }
24886
24889
  throw ["Failed to fetch", "NetworkError"].some((s2) => r2.message.includes(s2)) ? S2.APIErrors.EndpointUnreachable("GET_TOKEN", r2.message) : r2;
24887
24890
  });
24888
- Lt = class {
24891
+ wt = class {
24889
24892
  constructor(e, t2) {
24890
24893
  this.sdk = e;
24891
24894
  this.sdkListener = t2;
24892
24895
  this.recordedAudio = Ha;
24893
- this.isConnectivityCheckInProgress = false;
24894
24896
  this.initSdkWithLocalPeer();
24895
24897
  }
24896
24898
  get localPeer() {
24897
24899
  var e;
24898
24900
  return (e = this.sdk) == null ? void 0 : e.store.getLocalPeer();
24899
24901
  }
24902
+ checkBrowserSupport() {
24903
+ Tt(), gt();
24904
+ }
24900
24905
  requestPermission(e) {
24901
24906
  return c2(this, null, function* () {
24902
24907
  let t2 = yield navigator.mediaDevices.getUserMedia(e);
@@ -24953,16 +24958,9 @@ var init_dist = __esm({
24953
24958
  var n2;
24954
24959
  if (!this.sdk)
24955
24960
  throw new Error("SDK not found");
24956
- if (this.isConnectivityCheckInProgress)
24957
- return;
24958
- this.isConnectivityCheckInProgress = true;
24959
- let r2 = yield this.getAuthToken(i2), { roomId: s2 } = nt(r2);
24960
- (n2 = this.sdk) == null || n2.store.setRoom(new Ne(s2)), yield this.sdk.leave();
24961
- let o2 = new Ii(this.sdk, this.sdkListener, e, (l2) => {
24962
- this.isConnectivityCheckInProgress = false, t2(l2);
24963
- });
24964
- yield this.sdk.join({ authToken: r2, userName: "diagonistic-test", initEndpoint: "https://qa-in2-ipv6.100ms.live/init" }, o2), this.sdk.addConnectionQualityListener({ onConnectionQualityUpdate(l2) {
24965
- o2.handleConnectionQualityUpdate(l2);
24961
+ let r2 = new Hi(this.sdk, this.sdkListener, e, t2), s2 = yield this.getAuthToken(i2), { roomId: o2 } = nt(s2);
24962
+ (n2 = this.sdk) == null || n2.store.setRoom(new Ne(o2)), yield this.sdk.leave(), yield this.sdk.join({ authToken: s2, userName: "diagonistic-test", initEndpoint: "https://qa-in2-ipv6.100ms.live/init" }, r2), this.sdk.addConnectionQualityListener({ onConnectionQualityUpdate(l2) {
24963
+ r2.handleConnectionQualityUpdate(l2);
24966
24964
  } });
24967
24965
  });
24968
24966
  }
@@ -24981,7 +24979,7 @@ var init_dist = __esm({
24981
24979
  return c2(this, null, function* () {
24982
24980
  let t2 = new URL("https://api-nonprod.100ms.live/v2/diagnostics/token");
24983
24981
  e && t2.searchParams.append("region", e);
24984
- let i2 = yield Ai(t2.toString(), { method: "GET" }, [429, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511]), r2 = yield i2.json();
24982
+ let i2 = yield Ci(t2.toString(), { method: "GET" }, [429, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511]), r2 = yield i2.json();
24985
24983
  if (!i2.ok)
24986
24984
  throw S2.APIErrors.ServerErrors(r2.code, "GET_TOKEN", r2.message, false);
24987
24985
  let { token: s2 } = r2;
@@ -25001,7 +24999,7 @@ var init_dist = __esm({
25001
24999
  });
25002
25000
  }
25003
25001
  };
25004
- Hi = class {
25002
+ Li = class {
25005
25003
  constructor(e, t2, i2) {
25006
25004
  this.isRoomJoinCalled = false;
25007
25005
  this.ignoredMessageTypes = [];
@@ -25016,7 +25014,7 @@ var init_dist = __esm({
25016
25014
  }, e2);
25017
25015
  };
25018
25016
  this.sendPeerUpdateNotification = (e2, t3) => {
25019
- let i3 = this.store.getState(Z2(t3.peerId)), r2 = vi[e2] || "peerUpdate";
25017
+ let i3 = this.store.getState(Z2(t3.peerId)), r2 = yi[e2] || "peerUpdate";
25020
25018
  if (e2 === 8)
25021
25019
  this.syncRoomState(r2), this.updateMidCallPreviewRoomState(e2, t3);
25022
25020
  else if ([0, 1].includes(e2))
@@ -25034,7 +25032,7 @@ var init_dist = __esm({
25034
25032
  };
25035
25033
  this.getSDKHMSPeer = (e2) => this.sdk.getPeerMap()[e2];
25036
25034
  this.setState = (e2, t3) => this.store.namedSetState(e2, t3);
25037
- this.store = e, this.sdk = t2, this.hmsNotifications = i2, this.sessionStore = new Ei(this.sdk, this.setSessionStoreValueLocally.bind(this)), this.actionBatcher = new ki(e);
25035
+ this.store = e, this.sdk = t2, this.hmsNotifications = i2, this.sessionStore = new Ri(this.sdk, this.setSessionStoreValueLocally.bind(this)), this.actionBatcher = new Ei(e);
25038
25036
  }
25039
25037
  getLocalTrack(e) {
25040
25038
  return this.sdk.store.getLocalPeerTracks().find((t2) => t2.trackId === e);
@@ -25538,16 +25536,16 @@ var init_dist = __esm({
25538
25536
  }
25539
25537
  enableBeamSpeakerLabelsLogging() {
25540
25538
  return c2(this, null, function* () {
25541
- this.beamSpeakerLabelsLogger || (b2.i("enabling beam speaker labels logging"), this.beamSpeakerLabelsLogger = new bi(this.store, this), yield this.beamSpeakerLabelsLogger.start());
25539
+ this.beamSpeakerLabelsLogger || (b2.i("enabling beam speaker labels logging"), this.beamSpeakerLabelsLogger = new Ii(this.store, this), yield this.beamSpeakerLabelsLogger.start());
25542
25540
  });
25543
25541
  }
25544
25542
  initDiagnostics() {
25545
- let e = new Lt(this.sdk, { onJoin: this.onJoin.bind(this), onPreview: this.onPreview.bind(this), onRoomUpdate: this.onRoomUpdate.bind(this), onPeerUpdate: this.onPeerUpdate.bind(this), onTrackUpdate: this.onTrackUpdate.bind(this), onMessageReceived: this.onMessageReceived.bind(this), onError: this.onError.bind(this), onReconnected: this.onReconnected.bind(this), onReconnecting: this.onReconnecting.bind(this), onRoleChangeRequest: this.onRoleChangeRequest.bind(this), onRoleUpdate: this.onRoleUpdate.bind(this), onDeviceChange: this.onDeviceChange.bind(this), onChangeTrackStateRequest: this.onChangeTrackStateRequest.bind(this), onChangeMultiTrackStateRequest: this.onChangeMultiTrackStateRequest.bind(this), onRemovedFromRoom: this.onRemovedFromRoom.bind(this), onNetworkQuality: this.onNetworkQuality.bind(this), onSessionStoreUpdate: this.onSessionStoreUpdate.bind(this), onPollsUpdate: this.onPollsUpdate.bind(this), onWhiteboardUpdate: this.onWhiteboardUpdate.bind(this) });
25543
+ let e = new wt(this.sdk, { onJoin: this.onJoin.bind(this), onPreview: this.onPreview.bind(this), onRoomUpdate: this.onRoomUpdate.bind(this), onPeerUpdate: this.onPeerUpdate.bind(this), onTrackUpdate: this.onTrackUpdate.bind(this), onMessageReceived: this.onMessageReceived.bind(this), onError: this.onError.bind(this), onReconnected: this.onReconnected.bind(this), onReconnecting: this.onReconnecting.bind(this), onRoleChangeRequest: this.onRoleChangeRequest.bind(this), onRoleUpdate: this.onRoleUpdate.bind(this), onDeviceChange: this.onDeviceChange.bind(this), onChangeTrackStateRequest: this.onChangeTrackStateRequest.bind(this), onChangeMultiTrackStateRequest: this.onChangeMultiTrackStateRequest.bind(this), onRemovedFromRoom: this.onRemovedFromRoom.bind(this), onNetworkQuality: this.onNetworkQuality.bind(this), onSessionStoreUpdate: this.onSessionStoreUpdate.bind(this), onPollsUpdate: this.onPollsUpdate.bind(this), onWhiteboardUpdate: this.onWhiteboardUpdate.bind(this) });
25546
25544
  return this.sdk.addAudioListener({ onAudioLevelUpdate: this.onAudioLevelUpdate.bind(this) }), this.sdk.addConnectionQualityListener({ onConnectionQualityUpdate: this.onConnectionQualityUpdate.bind(this) }), e;
25547
25545
  }
25548
25546
  resetState(e = "resetState") {
25549
25547
  this.isRoomJoinCalled = false, b2.cleanup(), this.setState((t2) => {
25550
- Object.assign(t2, Zt());
25548
+ Object.assign(t2, ti());
25551
25549
  }, e);
25552
25550
  }
25553
25551
  sdkJoinWithListeners(e) {
@@ -25592,7 +25590,7 @@ var init_dist = __esm({
25592
25590
  this.setSessionStoreValueLocally(e, "sessionStoreUpdate");
25593
25591
  }
25594
25592
  onPollsUpdate(e, t2) {
25595
- let i2 = Mi[e];
25593
+ let i2 = ki[e];
25596
25594
  this.setState((r2) => {
25597
25595
  let s2 = t2.reduce((o2, n2) => {
25598
25596
  var l2;
@@ -25659,7 +25657,7 @@ var init_dist = __esm({
25659
25657
  }
25660
25658
  onJoin(e) {
25661
25659
  let t2 = this.sdk.getPlaylistManager();
25662
- this.audioPlaylist = new Ct(t2, "audio", this.syncPlaylistState.bind(this), this.store), this.videoPlaylist = new Ct(t2, "video", this.syncRoomState.bind(this), this.store), this.syncRoomState("joinSync"), this.setState((i2) => {
25660
+ this.audioPlaylist = new Dt(t2, "audio", this.syncPlaylistState.bind(this), this.store), this.videoPlaylist = new Dt(t2, "video", this.syncRoomState.bind(this), this.store), this.syncRoomState("joinSync"), this.setState((i2) => {
25663
25661
  var r2;
25664
25662
  Object.assign(i2.room, _2.convertRoom(e, (r2 = this.sdk.getLocalPeer()) == null ? void 0 : r2.peerId)), i2.room.isConnected = true, i2.room.roomState = "Connected";
25665
25663
  }, "joined"), t2.onProgress(this.setProgress), t2.onNewTrackStart((i2) => {
@@ -25701,10 +25699,10 @@ var init_dist = __esm({
25701
25699
  if (e === 1)
25702
25700
  this.hmsNotifications.sendTrackUpdate(e, t2.trackId), this.handleTrackRemove(t2, i2);
25703
25701
  else if ([0, 1].includes(e)) {
25704
- let r2 = At[e];
25702
+ let r2 = Ct[e];
25705
25703
  this.syncRoomState(r2), this.hmsNotifications.sendTrackUpdate(e, t2.trackId);
25706
25704
  } else {
25707
- let r2 = At[e] || "trackUpdate", s2 = _2.convertTrack(t2);
25705
+ let r2 = Ct[e] || "trackUpdate", s2 = _2.convertTrack(t2);
25708
25706
  this.setState((o2) => {
25709
25707
  let n2 = o2.tracks[s2.id];
25710
25708
  $e(n2, s2) && (Kr(n2, s2), Object.assign(n2, s2));
@@ -25744,7 +25742,7 @@ var init_dist = __esm({
25744
25742
  }
25745
25743
  onChangeTrackStateRequest(e) {
25746
25744
  var s2;
25747
- let t2 = this.store.getState(Z2((s2 = e.requestedBy) == null ? void 0 : s2.peerId)), i2 = this.getStoreLocalTrackIDfromSDKTrack(e.track), r2 = this.store.getState(Ti(i2));
25745
+ let t2 = this.store.getState(Z2((s2 = e.requestedBy) == null ? void 0 : s2.peerId)), i2 = this.getStoreLocalTrackIDfromSDKTrack(e.track), r2 = this.store.getState(vi(i2));
25748
25746
  if (!r2)
25749
25747
  return this.logPossibleInconsistency(`Not found track for which track state change was requested, ${e.track}`);
25750
25748
  e.enabled || this.syncRoomState("changeTrackStateRequest"), this.hmsNotifications.sendChangeTrackStateRequest({ requestedBy: t2 || void 0, track: r2, enabled: e.enabled });
@@ -25916,8 +25914,8 @@ var init_dist = __esm({
25916
25914
  }, t2);
25917
25915
  }
25918
25916
  };
25919
- Ci = (a11) => O2 ? `${a11} ${document.title}` : a11;
25920
- Li = class {
25917
+ Di = (a11) => O2 ? `${a11} ${document.title}` : a11;
25918
+ wi = class {
25921
25919
  constructor(e, t2) {
25922
25920
  this.eventBus = e;
25923
25921
  this.listener = t2;
@@ -25972,7 +25970,7 @@ var init_dist = __esm({
25972
25970
  e !== this.score && (this.score = e, (i2 = (t2 = this.listener) == null ? void 0 : t2.onNetworkQuality) == null || i2.call(t2, e));
25973
25971
  }
25974
25972
  };
25975
- Dt = class {
25973
+ _t = class {
25976
25974
  constructor(e, t2, i2, r2, s2, o2) {
25977
25975
  this.store = e;
25978
25976
  this.transport = t2;
@@ -26094,12 +26092,12 @@ var init_dist = __esm({
26094
26092
  }
26095
26093
  };
26096
26094
  Pe = new jr();
26097
- wt = class {
26095
+ Nt = class {
26098
26096
  constructor(e) {
26099
26097
  this.type = e.type, this.source = e.source || "regular", this.description = "", e instanceof Re ? (this.mute = !e.enabled, this.track_id = e.publishedTrackId, this.stream_id = e.stream.id) : (this.mute = e.mute, this.track_id = e.track_id, this.stream_id = e.stream_id);
26100
26098
  }
26101
26099
  };
26102
- _t = class {
26100
+ Ot = class {
26103
26101
  constructor() {
26104
26102
  this.TAG = "[Store]:";
26105
26103
  this.knownRoles = {};
@@ -26110,7 +26108,7 @@ var init_dist = __esm({
26110
26108
  this.roleDetailsArrived = false;
26111
26109
  this.env = "prod";
26112
26110
  this.simulcastEnabled = false;
26113
- this.userAgent = gt(this.env);
26111
+ this.userAgent = ft(this.env);
26114
26112
  this.polls = /* @__PURE__ */ new Map();
26115
26113
  this.whiteboards = /* @__PURE__ */ new Map();
26116
26114
  this.addPermissionToRole = (e, t2, i2, r2) => {
@@ -26230,7 +26228,7 @@ var init_dist = __esm({
26230
26228
  return this.userAgent;
26231
26229
  }
26232
26230
  createAndSetUserAgent(e) {
26233
- this.userAgent = gt(this.env, e);
26231
+ this.userAgent = ft(this.env, e);
26234
26232
  }
26235
26233
  setRoom(e) {
26236
26234
  this.room = e;
@@ -26370,7 +26368,7 @@ var init_dist = __esm({
26370
26368
  t2.startsWith("prod") ? i2 = "prod" : t2.startsWith("qa") ? i2 = "qa" : t2.startsWith("dev") && (i2 = "dev"), this.env = i2, Pe.setEnv(i2);
26371
26369
  }
26372
26370
  };
26373
- Di = class {
26371
+ _i = class {
26374
26372
  constructor() {
26375
26373
  this.TAG = "[WakeLockManager]";
26376
26374
  this.wakeLock = null;
@@ -26404,7 +26402,7 @@ var init_dist = __esm({
26404
26402
  });
26405
26403
  }
26406
26404
  };
26407
- wi = class {
26405
+ Ni = class {
26408
26406
  constructor(e) {
26409
26407
  this.store = e;
26410
26408
  this.bufferSize = 100;
@@ -26447,7 +26445,7 @@ var init_dist = __esm({
26447
26445
  }
26448
26446
  };
26449
26447
  Da = { autoplayFailed: void 0, initialized: false, autoplayCheckPromise: void 0 };
26450
- Nt = class {
26448
+ xt = class {
26451
26449
  constructor(e, t2, i2) {
26452
26450
  this.store = e;
26453
26451
  this.deviceManager = t2;
@@ -26585,7 +26583,7 @@ var init_dist = __esm({
26585
26583
  });
26586
26584
  }
26587
26585
  };
26588
- _i = class {
26586
+ Oi = class {
26589
26587
  constructor(e) {
26590
26588
  this.eventBus = e;
26591
26589
  this.pluginUsage = /* @__PURE__ */ new Map();
@@ -26624,7 +26622,7 @@ var init_dist = __esm({
26624
26622
  this.eventBus.analytics.subscribe((t2) => this.updatePluginUsageData(t2));
26625
26623
  }
26626
26624
  };
26627
- Ot = class {
26625
+ Ut = class {
26628
26626
  constructor(e, t2) {
26629
26627
  this.store = e;
26630
26628
  this.eventBus = t2;
@@ -26662,7 +26660,7 @@ var init_dist = __esm({
26662
26660
  let e2 = this.store.getLocalPeer();
26663
26661
  !((s2 = (r2 = this.store.getConfig()) == null ? void 0 : r2.settings) == null ? void 0 : s2.videoDeviceId) && (e2 != null && e2.videoTrack) && (yield e2.videoTrack.setSettings({ deviceId: (o2 = this.videoInput[0]) == null ? void 0 : o2.deviceId }, true)), !((l2 = (n2 = this.store.getConfig()) == null ? void 0 : n2.settings) == null ? void 0 : l2.audioInputDeviceId) && (e2 != null && e2.audioTrack) && (yield e2.audioTrack.setSettings({ deviceId: (u2 = this.audioInput[0]) == null ? void 0 : u2.deviceId }, true));
26664
26662
  });
26665
- this.handleDeviceChange = si(() => c2(this, null, function* () {
26663
+ this.handleDeviceChange = oi(() => c2(this, null, function* () {
26666
26664
  yield this.enumerateDevices(), this.logDevices("After Device Change");
26667
26665
  let e2 = this.store.getLocalPeer();
26668
26666
  yield this.setOutputDevice(true), yield this.handleAudioInputDeviceChange(e2 == null ? void 0 : e2.audioTrack), yield this.handleVideoInputDeviceChange(e2 == null ? void 0 : e2.videoTrack), this.eventBus.analytics.publish(y2.deviceChange({ selection: this.getCurrentSelection(), type: "change", devices: this.getDevices() }));
@@ -26681,7 +26679,7 @@ var init_dist = __esm({
26681
26679
  this.eventBus.analytics.publish(y2.deviceChange({ selection: { audioInput: t3 }, error: S2.TracksErrors.SelectedDeviceMissing("audio"), devices: this.getDevices(), type: "audioInput" })), d2.e(this.TAG, "Audio device not found");
26682
26680
  return;
26683
26681
  }
26684
- let { settings: i3 } = e2, r2 = new te().codec(i3.codec).maxBitrate(i3.maxBitrate).deviceId(t3.deviceId).build();
26682
+ let { settings: i3 } = e2, r2 = new te().codec(i3.codec).maxBitrate(i3.maxBitrate).deviceId(t3.deviceId).audioMode(i3.audioMode).build();
26685
26683
  try {
26686
26684
  yield e2.setSettings(r2, true), this.eventBus.deviceChange.publish({ devices: this.getDevices(), selection: t3, type: "audioInput" }), this.logDevices("Audio Device Change Success");
26687
26685
  } catch (s2) {
@@ -26768,7 +26766,7 @@ var init_dist = __esm({
26768
26766
  d2.d(this.TAG, e, JSON.stringify({ videoInput: [...this.videoInput], audioInput: [...this.audioInput], audioOutput: [...this.audioOutput], selected: this.getCurrentSelection() }, null, 4));
26769
26767
  }
26770
26768
  };
26771
- Ni = class {
26769
+ xi = class {
26772
26770
  constructor(e, t2) {
26773
26771
  this.deviceManager = e;
26774
26772
  this.audioSinkManager = t2;
@@ -26815,7 +26813,7 @@ var init_dist = __esm({
26815
26813
  };
26816
26814
  }
26817
26815
  };
26818
- xt = class {
26816
+ Bt = class {
26819
26817
  constructor() {
26820
26818
  this.eventEmitter = new import_eventemitter23.EventEmitter2();
26821
26819
  this.analytics = new V(G2.ANALYTICS, this.eventEmitter);
@@ -26837,7 +26835,7 @@ var init_dist = __esm({
26837
26835
  this.leave = new V(G2.LEAVE, this.eventEmitter);
26838
26836
  }
26839
26837
  };
26840
- Oi = class {
26838
+ Ui = class {
26841
26839
  constructor(e, t2, i2) {
26842
26840
  this.store = e;
26843
26841
  this.listener = t2;
@@ -26855,7 +26853,7 @@ var init_dist = __esm({
26855
26853
  (n2 = this.listener) == null || n2.onPeerUpdate(5, null);
26856
26854
  }
26857
26855
  };
26858
- xi = class {
26856
+ Bi = class {
26859
26857
  constructor(e) {
26860
26858
  this.listener = e;
26861
26859
  this.TAG = "[BroadcastManager]";
@@ -26868,7 +26866,7 @@ var init_dist = __esm({
26868
26866
  d2.d(this.TAG, `Received Message from sender=${(t2 = e == null ? void 0 : e.peer) == null ? void 0 : t2.peer_id}: ${e}`), (i2 = this.listener) == null || i2.onMessageReceived(e);
26869
26867
  }
26870
26868
  };
26871
- Ui = class {
26869
+ Vi = class {
26872
26870
  constructor(e, t2) {
26873
26871
  this.store = e;
26874
26872
  this.listener = t2;
@@ -27014,7 +27012,7 @@ var init_dist = __esm({
27014
27012
  return t2.mute !== i2.mute ? (r2 = i2.mute ? 2 : 3, e.type === "audio" && this.eventBus.audioTrackUpdate.publish({ track: e, enabled: !i2.mute })) : t2.description !== i2.description && (r2 = 4), r2;
27015
27013
  }
27016
27014
  };
27017
- Bi = class extends ct {
27015
+ Fi = class extends ct {
27018
27016
  constructor(t2, i2, r2, s2) {
27019
27017
  super(t2, i2, s2);
27020
27018
  this.transport = r2;
@@ -27054,7 +27052,7 @@ var init_dist = __esm({
27054
27052
  return r2 && ((l2 = (o2 = (s2 = i2 == null ? void 0 : i2.role) == null ? void 0 : s2.subscribeParams) == null ? void 0 : o2.subscribeToRoles) == null ? void 0 : l2.includes((n2 = r2.role) == null ? void 0 : n2.name));
27055
27053
  }
27056
27054
  };
27057
- Vi = class {
27055
+ Gi = class {
27058
27056
  constructor(e, t2, i2, r2) {
27059
27057
  this.store = e;
27060
27058
  this.peerManager = t2;
@@ -27121,7 +27119,7 @@ var init_dist = __esm({
27121
27119
  }
27122
27120
  };
27123
27121
  C = (a11) => a11 ? new Date(a11) : void 0;
27124
- Fi = class {
27122
+ Wi = class {
27125
27123
  constructor(e, t2, i2) {
27126
27124
  this.store = e;
27127
27125
  this.trackManager = t2;
@@ -27220,7 +27218,7 @@ var init_dist = __esm({
27220
27218
  });
27221
27219
  }
27222
27220
  };
27223
- Gi = class {
27221
+ $i = class {
27224
27222
  constructor(e, t2) {
27225
27223
  this.store = e;
27226
27224
  this.eventBus = t2;
@@ -27244,11 +27242,11 @@ var init_dist = __esm({
27244
27242
  }
27245
27243
  }
27246
27244
  };
27247
- Ut = (a11, e, t2) => {
27245
+ Vt = (a11, e, t2) => {
27248
27246
  let i2 = t2 === "qa" ? Gs : Fs, r2 = new URL(i2);
27249
27247
  return r2.searchParams.set("endpoint", `https://${e}`), r2.searchParams.set("token", a11), r2.toString();
27250
27248
  };
27251
- Wi = class {
27249
+ Ki = class {
27252
27250
  constructor(e, t2, i2) {
27253
27251
  this.transport = e;
27254
27252
  this.store = t2;
@@ -27266,7 +27264,7 @@ var init_dist = __esm({
27266
27264
  let t2 = this.store.getWhiteboard(e == null ? void 0 : e.id), i2 = t2 == null ? void 0 : t2.id;
27267
27265
  if (t2 || (i2 = (yield this.transport.signal.createWhiteboard(this.getCreateOptionsWithDefaults(e))).id), !i2)
27268
27266
  throw new Error(`Whiteboard ID: ${i2} not found`);
27269
- let r2 = yield this.transport.signal.getWhiteboard({ id: i2 }), s2 = M2(m({}, t2), { title: e == null ? void 0 : e.title, attributes: e == null ? void 0 : e.attributes, id: r2.id, url: Ut(r2.token, r2.addr, this.store.getEnv()), token: r2.token, addr: r2.addr, owner: r2.owner, permissions: r2.permissions || [], open: true });
27267
+ let r2 = yield this.transport.signal.getWhiteboard({ id: i2 }), s2 = M2(m({}, t2), { title: e == null ? void 0 : e.title, attributes: e == null ? void 0 : e.attributes, id: r2.id, url: Vt(r2.token, r2.addr, this.store.getEnv()), token: r2.token, addr: r2.addr, owner: r2.owner, permissions: r2.permissions || [], open: true });
27270
27268
  this.store.setWhiteboard(s2), (o2 = this.listener) == null || o2.onWhiteboardUpdate(s2);
27271
27269
  });
27272
27270
  }
@@ -27291,7 +27289,7 @@ var init_dist = __esm({
27291
27289
  let e = this.store.getWhiteboards();
27292
27290
  for (let s2 of e.values())
27293
27291
  if (s2.url) {
27294
- let o2 = yield this.transport.signal.getWhiteboard({ id: s2.id }), n2 = this.store.getLocalPeer(), u2 = (n2 == null ? void 0 : n2.customerUserId) === o2.owner ? (i2 = (t2 = n2.role) == null ? void 0 : t2.permissions.whiteboard) == null ? void 0 : i2.includes("admin") : o2.permissions.length > 0, p2 = M2(m({}, s2), { id: o2.id, url: Ut(o2.token, o2.addr, this.store.getEnv()), token: o2.token, addr: o2.addr, owner: o2.owner, permissions: o2.permissions, open: u2 });
27292
+ let o2 = yield this.transport.signal.getWhiteboard({ id: s2.id }), n2 = this.store.getLocalPeer(), u2 = (n2 == null ? void 0 : n2.customerUserId) === o2.owner ? (i2 = (t2 = n2.role) == null ? void 0 : t2.permissions.whiteboard) == null ? void 0 : i2.includes("admin") : o2.permissions.length > 0, p2 = M2(m({}, s2), { id: o2.id, url: Vt(o2.token, o2.addr, this.store.getEnv()), token: o2.token, addr: o2.addr, owner: o2.owner, permissions: o2.permissions, open: u2 });
27295
27293
  this.store.setWhiteboard(p2), (r2 = this.listener) == null || r2.onWhiteboardUpdate(p2);
27296
27294
  }
27297
27295
  });
@@ -27305,12 +27303,12 @@ var init_dist = __esm({
27305
27303
  }), { title: (e == null ? void 0 : e.title) || `${(o2 = this.store.getRoom()) == null ? void 0 : o2.id} Whiteboard`, reader: (e == null ? void 0 : e.reader) || i2, writer: (e == null ? void 0 : e.writer) || r2, admin: (e == null ? void 0 : e.admin) || s2 };
27306
27304
  }
27307
27305
  };
27308
- Bt = class {
27306
+ Ft = class {
27309
27307
  constructor(e, t2, i2) {
27310
27308
  this.transport = e;
27311
27309
  this.store = t2;
27312
27310
  this.listener = i2;
27313
- this.whiteboard = new Wi(e, t2, i2);
27311
+ this.whiteboard = new Ki(e, t2, i2);
27314
27312
  }
27315
27313
  setListener(e) {
27316
27314
  this.listener = e, this.whiteboard.setListener(e);
@@ -27320,7 +27318,7 @@ var init_dist = __esm({
27320
27318
  var o2, n2;
27321
27319
  let t2 = { customerID: "userid", peerID: "peerid", userName: "username" }, { poll_id: i2 } = yield this.transport.signal.setPollInfo(M2(m({}, e), { mode: e.mode ? t2[e.mode] : void 0, poll_id: e.id, vote: e.rolesThatCanVote, responses: e.rolesThatCanViewResponses }));
27322
27320
  e.id || (e.id = i2), Array.isArray(e.questions) && (yield this.addQuestionsToPoll(e.id, e.questions));
27323
- let r2 = yield this.transport.signal.getPollQuestions({ poll_id: e.id, index: 0, count: 50 }), s2 = $i(M2(m({}, e), { poll_id: e.id, state: "created", created_by: (o2 = this.store.getLocalPeer()) == null ? void 0 : o2.peerId }));
27321
+ let r2 = yield this.transport.signal.getPollQuestions({ poll_id: e.id, index: 0, count: 50 }), s2 = qi(M2(m({}, e), { poll_id: e.id, state: "created", created_by: (o2 = this.store.getLocalPeer()) == null ? void 0 : o2.peerId }));
27324
27322
  s2.questions = r2.questions.map(({ question: l2, options: u2, answer: p2 }) => M2(m({}, l2), { options: u2, answer: p2 })), (n2 = this.listener) == null || n2.onPollsUpdate(0, [s2]);
27325
27323
  });
27326
27324
  }
@@ -27388,7 +27386,7 @@ var init_dist = __esm({
27388
27386
  r2 = [...l2.polls, ...r2, ...u2.polls];
27389
27387
  }
27390
27388
  for (let l2 of r2) {
27391
- let u2 = yield this.transport.signal.getPollQuestions({ poll_id: l2.poll_id, index: 0, count: 50 }), p2 = $i(l2), h2 = this.store.getPoll(l2.poll_id);
27389
+ let u2 = yield this.transport.signal.getPollQuestions({ poll_id: l2.poll_id, index: 0, count: 50 }), p2 = qi(l2), h2 = this.store.getPoll(l2.poll_id);
27392
27390
  p2.questions = u2.questions.map(({ question: T, options: g2, answer: v2 }, E2) => {
27393
27391
  var P8, w2;
27394
27392
  return M2(m({}, T), { options: g2, answer: v2, responses: (w2 = (P8 = h2 == null ? void 0 : h2.questions) == null ? void 0 : P8[E2]) == null ? void 0 : w2.responses });
@@ -27414,11 +27412,11 @@ var init_dist = __esm({
27414
27412
  return i2;
27415
27413
  }
27416
27414
  };
27417
- $i = (a11) => {
27415
+ qi = (a11) => {
27418
27416
  let e = { userid: "customerID", peerid: "peerID", username: "userName" };
27419
27417
  return { id: a11.poll_id, title: a11.title, startedBy: a11.started_by, createdBy: a11.created_by, anonymous: a11.anonymous, type: a11.type, duration: a11.duration, locked: a11.locked, mode: a11.mode ? e[a11.mode] : void 0, visibility: a11.visibility, rolesThatCanVote: a11.vote || [], rolesThatCanViewResponses: a11.responses || [], state: a11.state, stoppedBy: a11.stopped_by, startedAt: C(a11.started_at), stoppedAt: C(a11.stopped_at), createdAt: C(a11.created_at) };
27420
27418
  };
27421
- Ki = class {
27419
+ ji = class {
27422
27420
  constructor(e, t2, i2) {
27423
27421
  this.store = e;
27424
27422
  this.transport = t2;
@@ -27451,7 +27449,7 @@ var init_dist = __esm({
27451
27449
  (i2 = this.listener) == null || i2.onPollsUpdate(1, [o2]);
27452
27450
  return;
27453
27451
  }
27454
- let n2 = yield this.transport.signal.getPollQuestions({ poll_id: s2.poll_id, index: 0, count: 50 }), l2 = $i(s2);
27452
+ let n2 = yield this.transport.signal.getPollQuestions({ poll_id: s2.poll_id, index: 0, count: 50 }), l2 = qi(s2);
27455
27453
  l2.questions = n2.questions.map(({ question: u2, options: p2, answer: h2 }) => M2(m({}, u2), { options: p2, answer: h2 })), yield this.updatePollResponses(l2, true), t2.push(l2), this.store.setPoll(l2);
27456
27454
  }
27457
27455
  (r2 = this.listener) == null || r2.onPollsUpdate(1, t2);
@@ -27511,7 +27509,7 @@ var init_dist = __esm({
27511
27509
  });
27512
27510
  }
27513
27511
  };
27514
- qi = class {
27512
+ Ji = class {
27515
27513
  constructor(e, t2) {
27516
27514
  this.store = e;
27517
27515
  this.listener = t2;
@@ -27572,7 +27570,7 @@ var init_dist = __esm({
27572
27570
  return e && (s2 = s2.filter((o2) => o2.type === e)), t2 && (s2 = s2.filter((o2) => o2.source === t2)), s2.filter((o2) => o2.enabled !== i2);
27573
27571
  }
27574
27572
  };
27575
- ji = class {
27573
+ Qi = class {
27576
27574
  constructor(e, t2) {
27577
27575
  this.store = e;
27578
27576
  this.listener = t2;
@@ -27729,7 +27727,7 @@ var init_dist = __esm({
27729
27727
  return d2.e(this.TAG, "error in streaming/recording", i2), i2;
27730
27728
  }
27731
27729
  };
27732
- Ji = class {
27730
+ zi = class {
27733
27731
  constructor(e, t2) {
27734
27732
  this.store = e;
27735
27733
  this.listener = t2;
@@ -27743,7 +27741,7 @@ var init_dist = __esm({
27743
27741
  (i2 = this.listener) == null || i2.onSessionStoreUpdate(t2);
27744
27742
  }
27745
27743
  };
27746
- Qi = class {
27744
+ Yi = class {
27747
27745
  constructor(e, t2, i2) {
27748
27746
  this.store = e;
27749
27747
  this.transport = t2;
@@ -27768,13 +27766,13 @@ var init_dist = __esm({
27768
27766
  o2.url = i2 == null ? void 0 : i2.url, o2.token = i2 == null ? void 0 : i2.token, o2.addr = i2 == null ? void 0 : i2.addr, o2.permissions = i2 == null ? void 0 : i2.permissions;
27769
27767
  else {
27770
27768
  let l2 = yield this.transport.signal.getWhiteboard({ id: e.id });
27771
- o2.url = Ut(l2.token, l2.addr, this.store.getEnv()), o2.token = l2.token, o2.addr = l2.addr, o2.permissions = l2.permissions, o2.open = l2.permissions.length > 0;
27769
+ o2.url = Vt(l2.token, l2.addr, this.store.getEnv()), o2.token = l2.token, o2.addr = l2.addr, o2.permissions = l2.permissions, o2.open = l2.permissions.length > 0;
27772
27770
  }
27773
27771
  this.store.setWhiteboard(o2), (n2 = this.listener) == null || n2.onWhiteboardUpdate(o2);
27774
27772
  });
27775
27773
  }
27776
27774
  };
27777
- zi = class {
27775
+ Xi = class {
27778
27776
  constructor(e, t2, i2, r2, s2, o2) {
27779
27777
  this.store = e;
27780
27778
  this.transport = i2;
@@ -27801,7 +27799,7 @@ var init_dist = __esm({
27801
27799
  this.peerManager.handlePeerInfoUpdate({ peer: i3, name: e2, data: t3 });
27802
27800
  };
27803
27801
  let n2 = this.transport.isFlagEnabled("onDemandTracks");
27804
- this.trackManager = n2 ? new Bi(this.store, t2, this.transport, this.listener) : new ct(this.store, t2, this.listener), this.peerManager = new Fi(this.store, this.trackManager, this.listener), this.peerListManager = new Vi(this.store, this.peerManager, this.trackManager, this.listener), this.broadcastManager = new xi(this.listener), this.policyChangeManager = new Gi(this.store, t2), this.requestManager = new qi(this.store, this.listener), this.activeSpeakerManager = new Oi(this.store, this.listener, this.audioListener), this.connectionQualityManager = new Ui(this.store, this.connectionQualityListener), this.roomUpdateManager = new ji(this.store, this.listener), this.sessionMetadataManager = new Ji(this.store, this.listener), this.pollsManager = new Ki(this.store, this.transport, this.listener), this.whiteboardManager = new Qi(this.store, this.transport, this.listener);
27802
+ this.trackManager = n2 ? new Fi(this.store, t2, this.transport, this.listener) : new ct(this.store, t2, this.listener), this.peerManager = new Wi(this.store, this.trackManager, this.listener), this.peerListManager = new Gi(this.store, this.peerManager, this.trackManager, this.listener), this.broadcastManager = new Bi(this.listener), this.policyChangeManager = new $i(this.store, t2), this.requestManager = new Ji(this.store, this.listener), this.activeSpeakerManager = new Ui(this.store, this.listener, this.audioListener), this.connectionQualityManager = new Vi(this.store, this.connectionQualityListener), this.roomUpdateManager = new Qi(this.store, this.listener), this.sessionMetadataManager = new zi(this.store, this.listener), this.pollsManager = new ji(this.store, this.transport, this.listener), this.whiteboardManager = new Yi(this.store, this.transport, this.listener);
27805
27803
  }
27806
27804
  setListener(e) {
27807
27805
  this.listener = e, this.trackManager.listener = e, this.peerManager.listener = e, this.peerListManager.listener = e, this.broadcastManager.listener = e, this.requestManager.listener = e, this.activeSpeakerManager.listener = e, this.roomUpdateManager.listener = e, this.sessionMetadataManager.listener = e, this.pollsManager.listener = e, this.whiteboardManager.listener = e;
@@ -27853,7 +27851,7 @@ var init_dist = __esm({
27853
27851
  }
27854
27852
  }
27855
27853
  };
27856
- Yi = class {
27854
+ Zi = class {
27857
27855
  constructor(e) {
27858
27856
  this.transport = e;
27859
27857
  this.observedKeys = /* @__PURE__ */ new Set();
@@ -27893,7 +27891,7 @@ var init_dist = __esm({
27893
27891
  });
27894
27892
  }
27895
27893
  };
27896
- Xi = class {
27894
+ er = class {
27897
27895
  constructor(e, t2, i2 = "", r2 = "", s2 = "https://prod-init.100ms.live/init", o2 = false, n2) {
27898
27896
  this.authToken = e;
27899
27897
  this.peerId = t2;
@@ -27906,15 +27904,15 @@ var init_dist = __esm({
27906
27904
  };
27907
27905
  J = ((s2) => (s2[s2.ConnectFailed = 0] = "ConnectFailed", s2[s2.SignalDisconnect = 1] = "SignalDisconnect", s2[s2.JoinWSMessageFailed = 2] = "JoinWSMessageFailed", s2[s2.PublishIceConnectionFailed = 3] = "PublishIceConnectionFailed", s2[s2.SubscribeIceConnectionFailed = 4] = "SubscribeIceConnectionFailed", s2))(J || {});
27908
27906
  wa = { 0: [], 1: [], 2: [1], 3: [1], 4: [1] };
27909
- Zi = ((n2) => (n2.Disconnected = "Disconnected", n2.Connecting = "Connecting", n2.Joined = "Joined", n2.Preview = "Preview", n2.Failed = "Failed", n2.Reconnecting = "Reconnecting", n2.Leaving = "Leaving", n2))(Zi || {});
27910
- er = class {
27907
+ tr = ((n2) => (n2.Disconnected = "Disconnected", n2.Connecting = "Connecting", n2.Joined = "Joined", n2.Preview = "Preview", n2.Failed = "Failed", n2.Reconnecting = "Reconnecting", n2.Leaving = "Leaving", n2))(tr || {});
27908
+ ir = class {
27911
27909
  constructor(e) {
27912
27910
  this.promise = new Promise((t2, i2) => {
27913
27911
  this.resolve = t2, this.reject = i2, e(t2, i2);
27914
27912
  });
27915
27913
  }
27916
27914
  };
27917
- tr = class {
27915
+ rr = class {
27918
27916
  constructor(e, t2) {
27919
27917
  this.onStateChange = e;
27920
27918
  this.sendEvent = t2;
@@ -27941,7 +27939,7 @@ var init_dist = __esm({
27941
27939
  d2.d(this.TAG, `schedule: Already a task for ${J[e]} scheduled, waiting for its completion`), yield g2.promise;
27942
27940
  return;
27943
27941
  }
27944
- let v2 = new er((E2, P8) => {
27942
+ let v2 = new ir((E2, P8) => {
27945
27943
  });
27946
27944
  this.inProgress.set(e, v2), this.sendEvent(t2, e);
27947
27945
  }
@@ -28002,7 +28000,7 @@ var init_dist = __esm({
28002
28000
  });
28003
28001
  }
28004
28002
  };
28005
- ir = class extends He {
28003
+ sr = class extends He {
28006
28004
  constructor() {
28007
28005
  super(100);
28008
28006
  this.localStorage = new le("hms-analytics");
@@ -28023,7 +28021,7 @@ var init_dist = __esm({
28023
28021
  });
28024
28022
  }
28025
28023
  };
28026
- rr = class {
28024
+ ar = class {
28027
28025
  constructor() {
28028
28026
  this.TAG = "[AnalyticsTransport]";
28029
28027
  }
@@ -28053,11 +28051,11 @@ var init_dist = __esm({
28053
28051
  }
28054
28052
  }
28055
28053
  };
28056
- sr = class extends rr {
28054
+ or = class extends ar {
28057
28055
  constructor(t2) {
28058
28056
  super();
28059
28057
  this.transportProvider = t2;
28060
- this.failedEvents = new ir();
28058
+ this.failedEvents = new sr();
28061
28059
  }
28062
28060
  };
28063
28061
  dt = class {
@@ -28138,10 +28136,10 @@ var init_dist = __esm({
28138
28136
  return this.tempStats.reduce((r2, s2) => r2 + ((s2[e] || 0) > t2 ? 1 : 0), 0);
28139
28137
  }
28140
28138
  };
28141
- ar = (a11, e) => a11 && e && (a11.frameWidth !== e.frameWidth || a11.frameHeight !== e.frameHeight);
28142
- or = (a11, e) => a11 && e && a11.enabled !== e.enabled;
28143
- Vt = (a11) => Object.entries(a11).filter(([, e]) => e !== void 0).reduce((e, [t2, i2]) => (e[t2] = i2, e), {});
28144
- Ft = class extends dt {
28139
+ nr = (a11, e) => a11 && e && (a11.frameWidth !== e.frameWidth || a11.frameHeight !== e.frameHeight);
28140
+ cr = (a11, e) => a11 && e && a11.enabled !== e.enabled;
28141
+ Gt = (a11) => Object.entries(a11).filter(([, e]) => e !== void 0).reduce((e, [t2, i2]) => (e[t2] = i2, e), {});
28142
+ Wt = class extends dt {
28145
28143
  constructor() {
28146
28144
  super(...arguments);
28147
28145
  this.trackAnalytics = /* @__PURE__ */ new Map();
@@ -28187,16 +28185,16 @@ var init_dist = __esm({
28187
28185
  this.samples = [];
28188
28186
  this.collateSample = () => {
28189
28187
  let t2 = this.getLatestStat(), i2 = t2.qualityLimitationDurations, r2 = i2 && { bandwidth_sec: i2.bandwidth, cpu_sec: i2.cpu, other_sec: i2.other }, s2 = t2.frameHeight ? { height_px: this.getLatestStat().frameHeight, width_px: this.getLatestStat().frameWidth } : void 0, o2 = this.calculateAverage("jitter", false), n2 = o2 ? Math.round(o2 * 1e3) : void 0, l2 = this.calculateAverage("roundTripTime", false), u2 = l2 ? Math.round(l2 * 1e3) : void 0;
28190
- return Vt({ timestamp: Date.now(), avg_available_outgoing_bitrate_bps: this.calculateAverage("availableOutgoingBitrate"), avg_bitrate_bps: this.calculateAverage("bitrate"), avg_fps: this.calculateAverage("framesPerSecond"), total_packets_lost: this.getLatestStat().packetsLost, total_packets_sent: this.getLatestStat().packetsSent, total_packet_sent_delay_sec: parseFloat(this.calculateDifferenceForSample("totalPacketSendDelay").toFixed(4)), total_fir_count: this.calculateDifferenceForSample("firCount"), total_pli_count: this.calculateDifferenceForSample("pliCount"), total_nack_count: this.calculateDifferenceForSample("nackCount"), avg_jitter_ms: n2, avg_round_trip_time_ms: u2, total_quality_limitation: r2, resolution: s2 });
28188
+ return Gt({ timestamp: Date.now(), avg_available_outgoing_bitrate_bps: this.calculateAverage("availableOutgoingBitrate"), avg_bitrate_bps: this.calculateAverage("bitrate"), avg_fps: this.calculateAverage("framesPerSecond"), total_packets_lost: this.getLatestStat().packetsLost, total_packets_sent: this.getLatestStat().packetsSent, total_packet_sent_delay_sec: parseFloat(this.calculateDifferenceForSample("totalPacketSendDelay").toFixed(4)), total_fir_count: this.calculateDifferenceForSample("firCount"), total_pli_count: this.calculateDifferenceForSample("pliCount"), total_nack_count: this.calculateDifferenceForSample("nackCount"), avg_jitter_ms: n2, avg_round_trip_time_ms: u2, total_quality_limitation: r2, resolution: s2 });
28191
28189
  };
28192
28190
  this.shouldCreateSample = () => {
28193
28191
  let t2 = this.tempStats.length, i2 = this.tempStats[t2 - 1], r2 = this.tempStats[t2 - 2];
28194
- return t2 === 30 || or(i2, r2) || i2.kind === "video" && ar(i2, r2);
28192
+ return t2 === 30 || cr(i2, r2) || i2.kind === "video" && nr(i2, r2);
28195
28193
  };
28196
28194
  this.toAnalytics = () => ({ track_id: this.track_id, ssrc: this.ssrc, source: this.source, rid: this.rid, samples: this.samples });
28197
28195
  }
28198
28196
  };
28199
- Gt = class extends dt {
28197
+ $t = class extends dt {
28200
28198
  constructor() {
28201
28199
  super(...arguments);
28202
28200
  this.trackAnalytics = /* @__PURE__ */ new Map();
@@ -28216,7 +28214,7 @@ var init_dist = __esm({
28216
28214
  Object.keys(i2).forEach((s2) => {
28217
28215
  var v2, E2;
28218
28216
  let o2 = this.store.getTrackById(s2), n2 = i2[s2], l2 = (v2 = this.trackAnalytics.get(s2)) == null ? void 0 : v2.getLatestStat(), p2 = ((P8, w2) => {
28219
- let Oe = (w2 == null ? void 0 : w2.jitterBufferDelay) || 0, Yt = (w2 == null ? void 0 : w2.jitterBufferEmittedCount) || 0, x2 = ((P8 == null ? void 0 : P8.jitterBufferDelay) || 0) - Oe, $ = ((P8 == null ? void 0 : P8.jitterBufferEmittedCount) || 0) - Yt;
28217
+ let Oe = (w2 == null ? void 0 : w2.jitterBufferDelay) || 0, Zt = (w2 == null ? void 0 : w2.jitterBufferEmittedCount) || 0, x2 = ((P8 == null ? void 0 : P8.jitterBufferDelay) || 0) - Oe, $ = ((P8 == null ? void 0 : P8.jitterBufferEmittedCount) || 0) - Zt;
28220
28218
  return $ > 0 ? x2 * 1e3 / $ : (w2 == null ? void 0 : w2.calculatedJitterBufferDelay) || 0;
28221
28219
  })(n2, l2), h2 = this.calculateAvSyncForStat(n2, t2), T = M2(m({}, n2), { calculatedJitterBufferDelay: p2, avSync: h2 });
28222
28220
  if (n2.kind === "video") {
@@ -28238,10 +28236,10 @@ var init_dist = __esm({
28238
28236
  return;
28239
28237
  let r2 = this.store.getPeerById(t2.peerID), s2 = r2 == null ? void 0 : r2.audioTrack, o2 = r2 == null ? void 0 : r2.videoTrack;
28240
28238
  if (!(s2 && o2 && s2.enabled && o2.enabled))
28241
- return yt;
28239
+ return Pt;
28242
28240
  let l2 = i2.getRemoteTrackStats(s2.trackId);
28243
28241
  if (!l2)
28244
- return yt;
28242
+ return Pt;
28245
28243
  if (l2.estimatedPlayoutTimestamp)
28246
28244
  return l2.estimatedPlayoutTimestamp - t2.estimatedPlayoutTimestamp;
28247
28245
  }
@@ -28253,24 +28251,24 @@ var init_dist = __esm({
28253
28251
  this.collateSample = () => {
28254
28252
  let t2 = this.getLatestStat(), i2 = this.getFirstStat(), r2 = { timestamp: Date.now(), total_pli_count: this.calculateDifferenceForSample("pliCount"), total_nack_count: this.calculateDifferenceForSample("nackCount"), avg_jitter_buffer_delay: this.calculateAverage("calculatedJitterBufferDelay", false) };
28255
28253
  if (t2.kind === "video")
28256
- return Vt(M2(m({}, r2), { avg_av_sync_ms: this.calculateAvgAvSyncForSample(), avg_frames_received_per_sec: this.calculateDifferenceAverage("framesReceived"), avg_frames_dropped_per_sec: this.calculateDifferenceAverage("framesDropped"), avg_frames_decoded_per_sec: this.calculateDifferenceAverage("framesDecoded"), frame_width: this.calculateAverage("frameWidth"), frame_height: this.calculateAverage("frameHeight"), expected_frame_width: this.calculateAverage("expectedFrameWidth"), expected_frame_height: this.calculateAverage("expectedFrameHeight"), pause_count: this.calculateDifferenceForSample("pauseCount"), pause_duration_seconds: this.calculateDifferenceForSample("totalPausesDuration"), freeze_count: this.calculateDifferenceForSample("freezeCount"), freeze_duration_seconds: this.calculateDifferenceForSample("totalFreezesDuration") }));
28254
+ return Gt(M2(m({}, r2), { avg_av_sync_ms: this.calculateAvgAvSyncForSample(), avg_frames_received_per_sec: this.calculateDifferenceAverage("framesReceived"), avg_frames_dropped_per_sec: this.calculateDifferenceAverage("framesDropped"), avg_frames_decoded_per_sec: this.calculateDifferenceAverage("framesDecoded"), frame_width: this.calculateAverage("frameWidth"), frame_height: this.calculateAverage("frameHeight"), expected_frame_width: this.calculateAverage("expectedFrameWidth"), expected_frame_height: this.calculateAverage("expectedFrameHeight"), pause_count: this.calculateDifferenceForSample("pauseCount"), pause_duration_seconds: this.calculateDifferenceForSample("totalPausesDuration"), freeze_count: this.calculateDifferenceForSample("freezeCount"), freeze_duration_seconds: this.calculateDifferenceForSample("totalFreezesDuration") }));
28257
28255
  {
28258
28256
  let s2 = (t2.concealedSamples || 0) - (t2.silentConcealedSamples || 0) - ((i2.concealedSamples || 0) - (i2.silentConcealedSamples || 0));
28259
- return Vt(M2(m({}, r2), { audio_level: this.calculateInstancesOfHigh("audioLevel", 0.05), audio_concealed_samples: s2, audio_total_samples_received: this.calculateDifferenceForSample("totalSamplesReceived"), audio_concealment_events: this.calculateDifferenceForSample("concealmentEvents"), fec_packets_discarded: this.calculateDifferenceForSample("fecPacketsDiscarded"), fec_packets_received: this.calculateDifferenceForSample("fecPacketsReceived"), total_samples_duration: this.calculateDifferenceForSample("totalSamplesDuration"), total_packets_received: this.calculateDifferenceForSample("packetsReceived"), total_packets_lost: this.calculateDifferenceForSample("packetsLost") }));
28257
+ return Gt(M2(m({}, r2), { audio_level: this.calculateInstancesOfHigh("audioLevel", 0.05), audio_concealed_samples: s2, audio_total_samples_received: this.calculateDifferenceForSample("totalSamplesReceived"), audio_concealment_events: this.calculateDifferenceForSample("concealmentEvents"), fec_packets_discarded: this.calculateDifferenceForSample("fecPacketsDiscarded"), fec_packets_received: this.calculateDifferenceForSample("fecPacketsReceived"), total_samples_duration: this.calculateDifferenceForSample("totalSamplesDuration"), total_packets_received: this.calculateDifferenceForSample("packetsReceived"), total_packets_lost: this.calculateDifferenceForSample("packetsLost") }));
28260
28258
  }
28261
28259
  };
28262
28260
  this.shouldCreateSample = () => {
28263
28261
  let t2 = this.tempStats.length, i2 = this.tempStats[t2 - 1], r2 = this.tempStats[t2 - 2];
28264
- return t2 === 10 || or(i2, r2) || i2.kind === "video" && ar(i2, r2);
28262
+ return t2 === 10 || cr(i2, r2) || i2.kind === "video" && nr(i2, r2);
28265
28263
  };
28266
28264
  this.toAnalytics = () => ({ track_id: this.track_id, ssrc: this.ssrc, source: this.source, rid: this.rid, samples: this.samples });
28267
28265
  }
28268
28266
  calculateAvgAvSyncForSample() {
28269
- let i2 = this.tempStats.map((r2) => r2.avSync).filter((r2) => r2 !== void 0 && r2 !== yt);
28270
- return i2.length === 0 ? yt : i2.reduce((r2, s2) => r2 + s2, 0) / i2.length;
28267
+ let i2 = this.tempStats.map((r2) => r2.avSync).filter((r2) => r2 !== void 0 && r2 !== Pt);
28268
+ return i2.length === 0 ? Pt : i2.reduce((r2, s2) => r2 + s2, 0) / i2.length;
28271
28269
  }
28272
28270
  };
28273
- cr = ((t2) => (t2[t2.Publish = 0] = "Publish", t2[t2.Subscribe = 1] = "Subscribe", t2))(cr || {});
28271
+ lr = ((t2) => (t2[t2.Publish = 0] = "Publish", t2[t2.Subscribe = 1] = "Subscribe", t2))(lr || {});
28274
28272
  Ee = "[HMSConnection]";
28275
28273
  Ke = class {
28276
28274
  constructor(e, t2) {
@@ -28349,27 +28347,27 @@ var init_dist = __esm({
28349
28347
  let i2 = (r2 = t2.track) == null ? void 0 : r2.kind;
28350
28348
  if (t2.transport) {
28351
28349
  let s2 = t2.transport.iceTransport, o2 = () => {
28352
- typeof s2.getSelectedCandidatePair == "function" && (this.selectedCandidatePair = s2.getSelectedCandidatePair(), this.selectedCandidatePair && (this.observer.onSelectedCandidatePairChange(this.selectedCandidatePair), d2.d(Ee, `${cr[this.role]} connection`, `selected ${i2 || "unknown"} candidate pair`, JSON.stringify(this.selectedCandidatePair, null, 2))));
28350
+ typeof s2.getSelectedCandidatePair == "function" && (this.selectedCandidatePair = s2.getSelectedCandidatePair(), this.selectedCandidatePair && (this.observer.onSelectedCandidatePairChange(this.selectedCandidatePair), d2.d(Ee, `${lr[this.role]} connection`, `selected ${i2 || "unknown"} candidate pair`, JSON.stringify(this.selectedCandidatePair, null, 2))));
28353
28351
  };
28354
28352
  typeof s2.onselectedcandidatepairchange == "function" && (s2.onselectedcandidatepairchange = o2), o2();
28355
28353
  }
28356
28354
  });
28357
28355
  } catch (e) {
28358
- d2.w(Ee, `Error in logging selected ice candidate pair for ${cr[this.role]} connection`, e);
28356
+ d2.w(Ee, `Error in logging selected ice candidate pair for ${lr[this.role]} connection`, e);
28359
28357
  }
28360
28358
  }
28361
28359
  removeTrack(e) {
28362
28360
  this.nativeConnection.signalingState !== "closed" && this.nativeConnection.removeTrack(e);
28363
28361
  }
28364
- setMaxBitrateAndFramerate(e) {
28362
+ setMaxBitrateAndFramerate(e, t2) {
28365
28363
  return c2(this, null, function* () {
28366
- let t2 = e.settings.maxBitrate, i2 = e instanceof F && e.settings.maxFramerate, r2 = this.getSenders().find((s2) => {
28367
- var o2;
28368
- return ((o2 = s2 == null ? void 0 : s2.track) == null ? void 0 : o2.id) === e.getTrackIDBeingSent();
28364
+ let i2 = (t2 == null ? void 0 : t2.maxBitrate) || e.settings.maxBitrate, r2 = e instanceof F && e.settings.maxFramerate, s2 = this.getSenders().find((o2) => {
28365
+ var n2;
28366
+ return ((n2 = o2 == null ? void 0 : o2.track) == null ? void 0 : n2.id) === e.getTrackIDBeingSent();
28369
28367
  });
28370
- if (r2) {
28371
- let s2 = r2.getParameters();
28372
- s2.encodings.length === 1 && (t2 && (s2.encodings[0].maxBitrate = t2 * 1e3), i2 && (s2.encodings[0].maxFramerate = i2)), yield r2.setParameters(s2);
28368
+ if (s2) {
28369
+ let o2 = s2.getParameters();
28370
+ o2.encodings.length === 1 && (i2 && (o2.encodings[0].maxBitrate = i2 * 1e3), r2 && (o2.encodings[0].maxFramerate = r2)), yield s2.setParameters(o2);
28373
28371
  } else
28374
28372
  d2.w(Ee, `no sender found to setMaxBitrate for track - ${e.trackId}, sentTrackId - ${e.getTrackIDBeingSent()}`);
28375
28373
  });
@@ -28388,11 +28386,11 @@ var init_dist = __esm({
28388
28386
  return this.nativeConnection.getReceivers();
28389
28387
  }
28390
28388
  };
28391
- $t = class extends Ke {
28389
+ qt = class extends Ke {
28392
28390
  constructor(t2, i2, r2) {
28393
28391
  super(0, t2);
28394
28392
  this.TAG = "[HMSPublishConnection]";
28395
- this.observer = r2, this.nativeConnection = new RTCPeerConnection(i2), this.channel = this.nativeConnection.createDataChannel(di, { protocol: "SCTP" }), this.channel.onerror = (s2) => d2.e(this.TAG, `publish data channel onerror ${s2}`, s2), this.nativeConnection.onicecandidate = ({ candidate: s2 }) => {
28393
+ this.observer = r2, this.nativeConnection = new RTCPeerConnection(i2), this.channel = this.nativeConnection.createDataChannel(ui, { protocol: "SCTP" }), this.channel.onerror = (s2) => d2.e(this.TAG, `publish data channel onerror ${s2}`, s2), this.nativeConnection.onicecandidate = ({ candidate: s2 }) => {
28396
28394
  s2 && (this.observer.onIceCandidate(s2), t2.trickle(this.role, s2));
28397
28395
  }, this.nativeConnection.oniceconnectionstatechange = () => {
28398
28396
  this.observer.onIceConnectionChange(this.nativeConnection.iceConnectionState);
@@ -28412,7 +28410,7 @@ var init_dist = __esm({
28412
28410
  });
28413
28411
  }
28414
28412
  };
28415
- Kt = class {
28413
+ jt = class {
28416
28414
  constructor(e, t2, i2 = "") {
28417
28415
  this.TAG = "[HMSDataChannel]";
28418
28416
  this.nativeChannel = e, this.observer = t2, this.metadata = i2, e.onmessage = (r2) => {
@@ -28435,7 +28433,7 @@ var init_dist = __esm({
28435
28433
  this.nativeChannel.close();
28436
28434
  }
28437
28435
  };
28438
- qt = class a9 extends Ke {
28436
+ Jt = class a9 extends Ke {
28439
28437
  constructor(t2, i2, r2, s2) {
28440
28438
  super(1, t2);
28441
28439
  this.isFlagEnabled = r2;
@@ -28482,7 +28480,7 @@ var init_dist = __esm({
28482
28480
  }, this.nativeConnection.onconnectionstatechange = () => {
28483
28481
  this.observer.onConnectionStateChange(this.nativeConnection.connectionState);
28484
28482
  }, this.nativeConnection.ondatachannel = (t2) => {
28485
- t2.channel.label === di && (this.apiChannel = new Kt(t2.channel, { onMessage: (i2) => {
28483
+ t2.channel.label === ui && (this.apiChannel = new jt(t2.channel, { onMessage: (i2) => {
28486
28484
  this.eventEmitter.emit("message", i2), this.observer.onApiChannelMessage(i2);
28487
28485
  } }, `role=${this.role}`), t2.channel.onopen = this.handlePendingApiMessages);
28488
28486
  }, this.nativeConnection.onicecandidate = (t2) => {
@@ -28532,8 +28530,8 @@ var init_dist = __esm({
28532
28530
  }
28533
28531
  };
28534
28532
  xa = (a11, e) => !e || e.length === 0 ? a11 : e.map((i2) => ({ urls: i2.urls, credentialType: "password", credential: i2.password, username: i2.userName }));
28535
- dr = "[InitService]";
28536
- jt = class {
28533
+ ur = "[InitService]";
28534
+ Qt = class {
28537
28535
  static handleError(e, t2) {
28538
28536
  switch (e.status) {
28539
28537
  case 404:
@@ -28546,16 +28544,16 @@ var init_dist = __esm({
28546
28544
  }
28547
28545
  static fetchInitConfig(n2) {
28548
28546
  return c2(this, arguments, function* ({ token: e, peerId: t2, userAgent: i2, initEndpoint: r2 = "https://prod-init.100ms.live", region: s2 = "", iceServers: o2 }) {
28549
- d2.d(dr, `fetchInitConfig: initEndpoint=${r2} token=${e} peerId=${t2} region=${s2} `);
28547
+ d2.d(ur, `fetchInitConfig: initEndpoint=${r2} token=${e} peerId=${t2} region=${s2} `);
28550
28548
  let l2 = dn2(r2, t2, i2, s2);
28551
28549
  try {
28552
28550
  let u2 = yield fetch(l2, { headers: { Authorization: `Bearer ${e}` } });
28553
28551
  try {
28554
28552
  let p2 = yield u2.clone().json();
28555
- return this.handleError(u2, p2), d2.d(dr, `config is ${JSON.stringify(p2, null, 2)}`), ln2(p2, o2);
28553
+ return this.handleError(u2, p2), d2.d(ur, `config is ${JSON.stringify(p2, null, 2)}`), ln2(p2, o2);
28556
28554
  } catch (p2) {
28557
28555
  let h2 = yield u2.text();
28558
- throw d2.e(dr, "json error", p2.message, h2), p2 instanceof f2 ? p2 : S2.APIErrors.ServerErrors(u2.status, "INIT", p2.message);
28556
+ throw d2.e(ur, "json error", p2.message, h2), p2 instanceof f2 ? p2 : S2.APIErrors.ServerErrors(u2.status, "INIT", p2.message);
28559
28557
  }
28560
28558
  } catch (u2) {
28561
28559
  let p2 = u2;
@@ -28564,7 +28562,7 @@ var init_dist = __esm({
28564
28562
  });
28565
28563
  }
28566
28564
  };
28567
- Jt = class {
28565
+ zt = class {
28568
28566
  constructor(e) {
28569
28567
  this.TAG = "[SIGNAL]: ";
28570
28568
  this.pongResponseTimes = new He(5);
@@ -28612,7 +28610,7 @@ var init_dist = __esm({
28612
28610
  if (o2 instanceof f2)
28613
28611
  throw o2;
28614
28612
  let n2 = o2;
28615
- throw S2.WebsocketMethodErrors.ServerErrors(Number(n2.code), Sr(e), n2.message);
28613
+ throw S2.WebsocketMethodErrors.ServerErrors(Number(n2.code), Tr(e), n2.message);
28616
28614
  }
28617
28615
  });
28618
28616
  }
@@ -28898,7 +28896,7 @@ var init_dist = __esm({
28898
28896
  rejectPendingCalls(e = "") {
28899
28897
  this.callbacks.forEach((t2, i2) => {
28900
28898
  var r2, s2, o2, n2;
28901
- ((r2 = t2.metadata) == null ? void 0 : r2.method) !== "ping" && (d2.e(this.TAG, `rejecting pending callback ${(s2 = t2.metadata) == null ? void 0 : s2.method}, id=${i2}`), t2.reject(S2.WebSocketConnectionErrors.WebSocketConnectionLost((o2 = t2.metadata) != null && o2.method ? Sr((n2 = t2.metadata) == null ? void 0 : n2.method) : "RECONNECT_SIGNAL", e)), this.callbacks.delete(i2));
28899
+ ((r2 = t2.metadata) == null ? void 0 : r2.method) !== "ping" && (d2.e(this.TAG, `rejecting pending callback ${(s2 = t2.metadata) == null ? void 0 : s2.method}, id=${i2}`), t2.reject(S2.WebSocketConnectionErrors.WebSocketConnectionLost((o2 = t2.metadata) != null && o2.method ? Tr((n2 = t2.metadata) == null ? void 0 : n2.method) : "RECONNECT_SIGNAL", e)), this.callbacks.delete(i2));
28902
28900
  });
28903
28901
  }
28904
28902
  pingPongLoop(e) {
@@ -28936,7 +28934,7 @@ var init_dist = __esm({
28936
28934
  return { downlink: a11.downlink, downlinkMax: a11.downlinkMax, effectiveType: a11.effectiveType, rtt: a11.rtt, saveData: a11.saveData, type: a11.type };
28937
28935
  };
28938
28936
  I2 = "[HMSTransport]:";
28939
- Qt = class {
28937
+ Yt = class {
28940
28938
  constructor(e, t2, i2, r2, s2, o2, n2) {
28941
28939
  this.observer = e;
28942
28940
  this.deviceManager = t2;
@@ -28975,7 +28973,7 @@ var init_dist = __esm({
28975
28973
  }), onFailure: (e2) => {
28976
28974
  this.joinParameters && this.retryScheduler.schedule({ category: 1, error: e2, task: this.retrySignalDisconnectTask, originalState: this.state });
28977
28975
  }, onOffline: (e2) => c2(this, null, function* () {
28978
- d2.d(I2, "socket offline", Zi[this.state]);
28976
+ d2.d(I2, "socket offline", tr[this.state]);
28979
28977
  try {
28980
28978
  this.state !== "Leaving" && this.joinParameters && this.retryScheduler.schedule({ category: 1, error: S2.WebSocketConnectionErrors.WebSocketConnectionLost("RECONNECT_SIGNAL", e2), task: this.retrySignalDisconnectTask, originalState: this.state });
28981
28979
  } catch (t3) {
@@ -28983,12 +28981,12 @@ var init_dist = __esm({
28983
28981
  }
28984
28982
  }), onOnline: () => {
28985
28983
  var e2;
28986
- d2.d(I2, "socket online", Zi[this.state]), this.analyticsSignalTransport.flushFailedEvents((e2 = this.store.getLocalPeer()) == null ? void 0 : e2.peerId);
28984
+ d2.d(I2, "socket online", tr[this.state]), this.analyticsSignalTransport.flushFailedEvents((e2 = this.store.getLocalPeer()) == null ? void 0 : e2.peerId);
28987
28985
  }, onNetworkOnline: () => {
28988
28986
  this.analyticsEventsService.flushFailedClientEvents();
28989
28987
  } };
28990
- this.signal = new Jt(this.signalObserver);
28991
- this.analyticsSignalTransport = new sr(this.signal);
28988
+ this.signal = new zt(this.signalObserver);
28989
+ this.analyticsSignalTransport = new or(this.signal);
28992
28990
  this.publishDtlsStateTimer = 0;
28993
28991
  this.lastPublishDtlsState = "new";
28994
28992
  this.publishConnectionObserver = { onRenegotiationNeeded: () => c2(this, null, function* () {
@@ -29078,11 +29076,11 @@ var init_dist = __esm({
29078
29076
  return this.signal.trackUpdate(this.trackStates), e2;
29079
29077
  });
29080
29078
  var u2, p2;
29081
- this.webrtcInternals = new ui(this.store, this.eventBus, (u2 = this.publishConnection) == null ? void 0 : u2.nativeConnection, (p2 = this.subscribeConnection) == null ? void 0 : p2.nativeConnection);
29079
+ this.webrtcInternals = new hi(this.store, this.eventBus, (u2 = this.publishConnection) == null ? void 0 : u2.nativeConnection, (p2 = this.subscribeConnection) == null ? void 0 : p2.nativeConnection);
29082
29080
  let l2 = (h2, T) => c2(this, null, function* () {
29083
29081
  h2 !== this.state && (this.state = h2, yield this.observer.onStateChange(this.state, T));
29084
29082
  });
29085
- this.retryScheduler = new tr(l2, this.sendErrorAnalyticsEvent.bind(this)), this.eventBus.statsUpdate.subscribe((h2) => {
29083
+ this.retryScheduler = new rr(l2, this.sendErrorAnalyticsEvent.bind(this)), this.eventBus.statsUpdate.subscribe((h2) => {
29086
29084
  var g2, v2;
29087
29085
  let T = ((v2 = (g2 = h2.getLocalPeerStats()) == null ? void 0 : g2.subscribe) == null ? void 0 : v2.bitrate) || 0;
29088
29086
  this.maxSubscribeBitrate = Math.max(this.maxSubscribeBitrate, T);
@@ -29120,7 +29118,7 @@ var init_dist = __esm({
29120
29118
  }
29121
29119
  connect(e, t2, i2, r2, s2 = false, o2) {
29122
29120
  return c2(this, null, function* () {
29123
- this.setTransportStateForConnect(), this.joinParameters = new Xi(e, i2, r2.name, r2.metaData, t2, s2, o2);
29121
+ this.setTransportStateForConnect(), this.joinParameters = new er(e, i2, r2.name, r2.metaData, t2, s2, o2);
29124
29122
  try {
29125
29123
  return yield this.internalConnect(e, t2, i2, o2);
29126
29124
  } catch (n2) {
@@ -29174,13 +29172,13 @@ var init_dist = __esm({
29174
29172
  trackUpdate(e) {
29175
29173
  let i2 = Array.from(this.trackStates.values()).find((r2) => e.type === r2.type && e.source === r2.source);
29176
29174
  if (i2) {
29177
- let r2 = new wt(M2(m({}, i2), { mute: !e.enabled }));
29175
+ let r2 = new Nt(M2(m({}, i2), { mute: !e.enabled }));
29178
29176
  this.trackStates.set(i2.track_id, r2), d2.d(I2, "Track Update", this.trackStates, e), this.signal.trackUpdate(/* @__PURE__ */ new Map([[i2.track_id, r2]]));
29179
29177
  }
29180
29178
  }
29181
29179
  publishTrack(e) {
29182
29180
  return c2(this, null, function* () {
29183
- e.publishedTrackId = e.getTrackIDBeingSent(), d2.d(I2, `\u23F3 publishTrack: trackId=${e.trackId}, toPublishTrackId=${e.publishedTrackId}`, `${e}`), this.trackStates.set(e.publishedTrackId, new wt(e));
29181
+ e.publishedTrackId = e.getTrackIDBeingSent(), d2.d(I2, `\u23F3 publishTrack: trackId=${e.trackId}, toPublishTrackId=${e.publishedTrackId}`, `${e}`), this.trackStates.set(e.publishedTrackId, new Nt(e));
29184
29182
  let t2 = new Promise((s2, o2) => {
29185
29183
  this.callbacks.set(et, { promise: { resolve: s2, reject: o2 }, action: "PUBLISH", extra: {} });
29186
29184
  }), i2 = e.stream;
@@ -29218,7 +29216,7 @@ var init_dist = __esm({
29218
29216
  });
29219
29217
  }
29220
29218
  createPeerConnections() {
29221
- this.initConfig && (this.publishConnection || (this.publishConnection = new $t(this.signal, this.initConfig.rtcConfiguration, this.publishConnectionObserver)), this.subscribeConnection || (this.subscribeConnection = new qt(this.signal, this.initConfig.rtcConfiguration, this.isFlagEnabled.bind(this), this.subscribeConnectionObserver)));
29219
+ this.initConfig && (this.publishConnection || (this.publishConnection = new qt(this.signal, this.initConfig.rtcConfiguration, this.publishConnectionObserver)), this.subscribeConnection || (this.subscribeConnection = new Jt(this.signal, this.initConfig.rtcConfiguration, this.isFlagEnabled.bind(this), this.subscribeConnectionObserver)));
29222
29220
  }
29223
29221
  negotiateJoinWithRetry(s2) {
29224
29222
  return c2(this, arguments, function* ({ name: e, data: t2, autoSubscribeVideo: i2, isWebRTC: r2 = true }) {
@@ -29308,7 +29306,7 @@ var init_dist = __esm({
29308
29306
  d2.d(I2, "connect: started \u23F0");
29309
29307
  let s2 = /* @__PURE__ */ new Date();
29310
29308
  try {
29311
- this.analyticsTimer.start("init_response_time"), this.initConfig = yield jt.fetchInitConfig({ token: e, peerId: i2, userAgent: this.store.getUserAgent(), initEndpoint: t2, iceServers: r2 }), (o2 = this.connectivityListener) == null || o2.onInitSuccess(this.initConfig.endpoint);
29309
+ this.analyticsTimer.start("init_response_time"), this.initConfig = yield Qt.fetchInitConfig({ token: e, peerId: i2, userAgent: this.store.getUserAgent(), initEndpoint: t2, iceServers: r2 }), (o2 = this.connectivityListener) == null || o2.onInitSuccess(this.initConfig.endpoint);
29312
29310
  let u2 = this.store.getRoom();
29313
29311
  return u2 && (u2.effectsKey = (n2 = this.initConfig.config.vb) == null ? void 0 : n2.effectsKey, u2.isEffectsEnabled = this.isFlagEnabled("effectsSDKEnabled"), u2.isHipaaEnabled = this.isFlagEnabled("hipaa"), u2.isNoiseCancellationEnabled = this.isFlagEnabled("noiseCancellation")), this.analyticsTimer.end("init_response_time"), Pe.setWebsocketEndpoint(this.initConfig.endpoint), this.validateNotDisconnected("post init"), yield this.openSignal(e, i2), this.observer.onConnected(), (l2 = this.connectivityListener) == null || l2.onSignallingSuccess(), this.store.setSimulcastEnabled(this.isFlagEnabled("simulcast")), d2.d(I2, "Adding Analytics Transport: JsonRpcSignal"), this.analyticsEventsService.setTransport(this.analyticsSignalTransport), this.analyticsEventsService.flush(), this.initConfig;
29314
29312
  } catch (u2) {
@@ -29337,7 +29335,7 @@ var init_dist = __esm({
29337
29335
  }
29338
29336
  initStatsAnalytics() {
29339
29337
  var e, t2;
29340
- this.isFlagEnabled("publishStats") && (this.publishStatsAnalytics = new Ft(this.store, this.eventBus, this.getValueFromInitConfig("publishStats", "maxSampleWindowSize", 30), this.getValueFromInitConfig("publishStats", "maxSamplePushInterval", 300)), (e = this.getWebrtcInternals()) == null || e.start()), this.isFlagEnabled("subscribeStats") && (this.subscribeStatsAnalytics = new Gt(this.store, this.eventBus, this.getValueFromInitConfig("subscribeStats", "maxSampleWindowSize", 10), this.getValueFromInitConfig("subscribeStats", "maxSamplePushInterval", 60)), (t2 = this.getWebrtcInternals()) == null || t2.start());
29338
+ this.isFlagEnabled("publishStats") && (this.publishStatsAnalytics = new Wt(this.store, this.eventBus, this.getValueFromInitConfig("publishStats", "maxSampleWindowSize", 30), this.getValueFromInitConfig("publishStats", "maxSamplePushInterval", 300)), (e = this.getWebrtcInternals()) == null || e.start()), this.isFlagEnabled("subscribeStats") && (this.subscribeStatsAnalytics = new $t(this.store, this.eventBus, this.getValueFromInitConfig("subscribeStats", "maxSampleWindowSize", 10), this.getValueFromInitConfig("subscribeStats", "maxSamplePushInterval", 60)), (t2 = this.getWebrtcInternals()) == null || t2.start());
29341
29339
  }
29342
29340
  getValueFromInitConfig(e, t2, i2) {
29343
29341
  var r2, s2;
@@ -29397,11 +29395,11 @@ var init_dist = __esm({
29397
29395
  }
29398
29396
  };
29399
29397
  Va = { published: false, isInitialised: false, isReconnecting: false, isPreviewInProgress: false, isPreviewCalled: false, isJoinInProgress: false, deviceManagersInitialised: false };
29400
- lr = class {
29398
+ pr = class {
29401
29399
  constructor() {
29402
29400
  this.TAG = "[HMSSdk]:";
29403
29401
  this.transportState = "Disconnected";
29404
- this.analyticsTimer = new ni();
29402
+ this.analyticsTimer = new di();
29405
29403
  this.sdkState = m({}, Va);
29406
29404
  this.playlistSettings = { video: { bitrate: Lr }, audio: { bitrate: Dr } };
29407
29405
  this.handleAutoplayError = (e) => {
@@ -29498,7 +29496,7 @@ var init_dist = __esm({
29498
29496
  };
29499
29497
  }
29500
29498
  initNotificationManager() {
29501
- this.notificationManager || (this.notificationManager = new zi(this.store, this.eventBus, this.transport, this.listener, this.audioListener));
29499
+ this.notificationManager || (this.notificationManager = new Xi(this.store, this.eventBus, this.transport, this.listener, this.audioListener));
29502
29500
  }
29503
29501
  initStoreAndManagers(e) {
29504
29502
  var t2, i2;
@@ -29506,7 +29504,7 @@ var init_dist = __esm({
29506
29504
  (i2 = this.notificationManager) == null || i2.setListener(this.listener), this.audioSinkManager.setListener(this.listener), this.interactivityCenter.setListener(this.listener);
29507
29505
  return;
29508
29506
  }
29509
- this.sdkState.isInitialised = true, this.store = new _t(), this.eventBus = new xt(), this.pluginUsageTracker = new _i(this.eventBus), this.wakeLockManager = new Di(), this.networkTestManager = new Li(this.eventBus, this.listener), this.playlistManager = new Et(this, this.eventBus), this.deviceManager = new Ot(this.store, this.eventBus), this.audioSinkManager = new Nt(this.store, this.deviceManager, this.eventBus), this.audioOutput = new Ni(this.deviceManager, this.audioSinkManager), this.audioSinkManager.setListener(this.listener), this.eventBus.autoplayError.subscribe(this.handleAutoplayError), this.localTrackManager = new ve(this.store, this.observer, this.deviceManager, this.eventBus, this.analyticsTimer), this.analyticsEventsService = new wi(this.store), this.transport = new Qt(this.observer, this.deviceManager, this.store, this.eventBus, this.analyticsEventsService, this.analyticsTimer, this.pluginUsageTracker), e.onInitSuccess && this.transport.setConnectivityListener(e), this.sessionStore = new Yi(this.transport), this.interactivityCenter = new Bt(this.transport, this.store, this.listener), this.eventBus.analytics.subscribe(this.sendAnalyticsEvent), this.eventBus.deviceChange.subscribe(this.handleDeviceChange), this.eventBus.audioPluginFailed.subscribe(this.handleAudioPluginError);
29507
+ this.sdkState.isInitialised = true, this.store = new Ot(), this.eventBus = new Bt(), this.pluginUsageTracker = new Oi(this.eventBus), this.wakeLockManager = new _i(), this.networkTestManager = new wi(this.eventBus, this.listener), this.playlistManager = new Rt(this, this.eventBus), this.deviceManager = new Ut(this.store, this.eventBus), this.audioSinkManager = new xt(this.store, this.deviceManager, this.eventBus), this.audioOutput = new xi(this.deviceManager, this.audioSinkManager), this.audioSinkManager.setListener(this.listener), this.eventBus.autoplayError.subscribe(this.handleAutoplayError), this.localTrackManager = new ve(this.store, this.observer, this.deviceManager, this.eventBus, this.analyticsTimer), this.analyticsEventsService = new Ni(this.store), this.transport = new Yt(this.observer, this.deviceManager, this.store, this.eventBus, this.analyticsEventsService, this.analyticsTimer, this.pluginUsageTracker), e.onInitSuccess && this.transport.setConnectivityListener(e), this.sessionStore = new Zi(this.transport), this.interactivityCenter = new Ft(this.transport, this.store, this.listener), this.eventBus.analytics.subscribe(this.sendAnalyticsEvent), this.eventBus.deviceChange.subscribe(this.handleDeviceChange), this.eventBus.audioPluginFailed.subscribe(this.handleAudioPluginError);
29510
29508
  }
29511
29509
  validateJoined(e) {
29512
29510
  if (!this.localPeer)
@@ -29553,7 +29551,7 @@ var init_dist = __esm({
29553
29551
  return this.interactivityCenter;
29554
29552
  }
29555
29553
  getPeerListIterator(e) {
29556
- return new pi(this.transport, this.store, e);
29554
+ return new mi(this.transport, this.store, e);
29557
29555
  }
29558
29556
  updatePlaylistSettings(e) {
29559
29557
  e.video && Object.assign(this.playlistSettings.video, e.video), e.audio && Object.assign(this.playlistSettings.audio, e.audio);
@@ -29564,7 +29562,7 @@ var init_dist = __esm({
29564
29562
  }
29565
29563
  preview(e, t2) {
29566
29564
  return c2(this, null, function* () {
29567
- if (fr(), Tr(), this.sdkState.isPreviewInProgress)
29565
+ if (Tt(), gt(), this.sdkState.isPreviewInProgress)
29568
29566
  return Promise.reject(S2.GenericErrors.PreviewAlreadyInProgress("PREVIEW", "Preview already called"));
29569
29567
  if (["Joined", "Reconnecting"].includes(this.transportState))
29570
29568
  return this.midCallPreview(e.asRole, e.settings);
@@ -29624,13 +29622,13 @@ var init_dist = __esm({
29624
29622
  join(e, t2) {
29625
29623
  return c2(this, null, function* () {
29626
29624
  var l2, u2, p2, h2, T, g2;
29627
- if (fr(), Tr(), this.sdkState.isPreviewInProgress)
29625
+ if (Tt(), gt(), this.sdkState.isPreviewInProgress)
29628
29626
  throw S2.GenericErrors.NotReady("JOIN", "Preview is in progress, can't join");
29629
29627
  this.analyticsTimer.start("join_time"), this.sdkState.isJoinInProgress = true;
29630
29628
  let { roomId: i2, userId: r2, role: s2 } = nt(e.authToken), o2 = ((u2 = (l2 = this.localPeer) == null ? void 0 : l2.asRole) == null ? void 0 : u2.name) || ((h2 = (p2 = this.localPeer) == null ? void 0 : p2.role) == null ? void 0 : h2.name);
29631
29629
  (T = this.networkTestManager) == null || T.stop(), this.commonSetup(e, i2, t2), this.removeDevicesFromConfig(e), this.store.setConfig(e), this.store.createAndSetUserAgent(this.frameworkInfo), Ae.resumeContext();
29632
29630
  let n2 = this.store.getConfig();
29633
- n2 != null && n2.autoManageWakeLock && this.wakeLockManager.acquireLock(), this.localPeer ? (this.localPeer.name = e.userName, this.localPeer.role = this.store.getPolicyForRole(s2), this.localPeer.customerUserId = r2, this.localPeer.metadata = e.metaData, delete this.localPeer.asRole) : this.createAndAddLocalPeerToStore(e, s2, r2), this.roleChangeManager = new Dt(this.store, this.transport, this.deviceManager, this.getAndPublishTracks.bind(this), this.removeTrack.bind(this), this.listener), this.eventBus.localRoleUpdate.subscribe(this.handleLocalRoleUpdate), d2.d(this.TAG, `\u23F3 Joining room ${i2}`), d2.time(`join-room-${i2}`);
29631
+ n2 != null && n2.autoManageWakeLock && this.wakeLockManager.acquireLock(), this.localPeer ? (this.localPeer.name = e.userName, this.localPeer.role = this.store.getPolicyForRole(s2), this.localPeer.customerUserId = r2, this.localPeer.metadata = e.metaData, delete this.localPeer.asRole) : this.createAndAddLocalPeerToStore(e, s2, r2), this.roleChangeManager = new _t(this.store, this.transport, this.deviceManager, this.getAndPublishTracks.bind(this), this.removeTrack.bind(this), this.listener), this.eventBus.localRoleUpdate.subscribe(this.handleLocalRoleUpdate), d2.d(this.TAG, `\u23F3 Joining room ${i2}`), d2.time(`join-room-${i2}`);
29634
29632
  try {
29635
29633
  yield this.transport.join(e.authToken, this.localPeer.peerId, { name: e.userName, metaData: e.metaData }, e.initEndpoint, e.autoVideoSubscribe, e.iceServers), d2.d(this.TAG, `\u2705 Joined room ${i2}`), this.analyticsTimer.start("peer_list_time"), yield this.notifyJoin(), this.sdkState.isJoinInProgress = false, yield this.publish(e.settings, o2);
29636
29634
  } catch (v2) {
@@ -29665,7 +29663,7 @@ var init_dist = __esm({
29665
29663
  return c2(this, null, function* () {
29666
29664
  let i2 = (t2 || {}).endpoint || "https://auth.100ms.live/v2/token";
29667
29665
  this.analyticsTimer.start("GET_TOKEN");
29668
- let r2 = yield Ai(i2, { method: "POST", body: JSON.stringify({ code: e.roomCode, user_id: e.userId }) }, [429, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511]), s2 = yield r2.json();
29666
+ let r2 = yield Ci(i2, { method: "POST", body: JSON.stringify({ code: e.roomCode, user_id: e.userId }) }, [429, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511]), s2 = yield r2.json();
29669
29667
  if (this.analyticsTimer.end("GET_TOKEN"), !r2.ok)
29670
29668
  throw S2.APIErrors.ServerErrors(s2.code, "GET_TOKEN", s2.message, false);
29671
29669
  let { token: o2 } = s2;
@@ -30163,9 +30161,9 @@ var init_dist = __esm({
30163
30161
  };
30164
30162
  ut = class a10 {
30165
30163
  constructor(e, t2, i2) {
30166
- this.getStats = () => (this.stats || (this.stats = new zt(this.store, this.sdk)), this.stats);
30164
+ this.getStats = () => (this.stats || (this.stats = new Xt(this.store, this.sdk)), this.stats);
30167
30165
  this.getDiagnosticsSDK = () => (this.diagnostics || (this.diagnostics = this.actions.initDiagnostics()), this.diagnostics);
30168
- e ? this.store = e : this.store = a10.createNewHMSStore(Ci("HMSStore"), Zt), i2 ? this.notifications = i2 : this.notifications = new yi(this.store), t2 ? this.actions = t2 : (this.sdk = new lr(), this.actions = new Hi(this.store, this.sdk, this.notifications)), this.actions.setFrameworkInfo({ type: "js", sdkVersion: vr().version }), this.initialTriggerOnSubscribe = false, O2 && (window.__hms = this);
30166
+ e ? this.store = e : this.store = a10.createNewHMSStore(Di("HMSStore"), ti), i2 ? this.notifications = i2 : this.notifications = new Pi(this.store), t2 ? this.actions = t2 : (this.sdk = new pr(), this.actions = new Li(this.store, this.sdk, this.notifications)), this.actions.setFrameworkInfo({ type: "js", sdkVersion: vr().version }), this.initialTriggerOnSubscribe = false, O2 && (window.__hms = this);
30169
30167
  }
30170
30168
  triggerOnSubscribe() {
30171
30169
  this.initialTriggerOnSubscribe || (a10.makeStoreTriggerOnSubscribe(this.store), this.initialTriggerOnSubscribe = true);
@@ -30296,14 +30294,14 @@ var init_dist = __esm({
30296
30294
  };
30297
30295
  Mn = (a11, e = "resetState") => {
30298
30296
  a11.namedSetState((t2) => {
30299
- Object.assign(t2, ei());
30297
+ Object.assign(t2, ii());
30300
30298
  }, e);
30301
30299
  };
30302
- zt = class {
30300
+ Xt = class {
30303
30301
  constructor(e, t2) {
30304
30302
  this.hmsStore = e;
30305
30303
  this.sdk = t2;
30306
- this.store = ut.createNewHMSStore(Ci("HMSStatsStore"), ei), this.getState = this.store.getState, this.subscribe = this.store.subscribe, this.getPublishPeerConnection = () => new Promise((i2) => {
30304
+ this.store = ut.createNewHMSStore(Di("HMSStatsStore"), ii), this.getState = this.store.getState, this.subscribe = this.store.subscribe, this.getPublishPeerConnection = () => new Promise((i2) => {
30307
30305
  var r2, s2;
30308
30306
  this.hmsStore.getState(re) === "Connected" ? i2((s2 = (r2 = this.sdk) == null ? void 0 : r2.getWebrtcInternals()) == null ? void 0 : s2.getPublishPeerConnection()) : this.hmsStore.subscribe((o2) => {
30309
30307
  var n2, l2;
@@ -40076,9 +40074,9 @@ var init_ScreenshareLayout = __esm({
40076
40074
  }
40077
40075
  });
40078
40076
 
40079
- // ../../../../../../../tmp/tmp-2799-eb95rLIFiJGh/1902b6952460/index.css
40080
- var init_b6952460 = __esm({
40081
- "../../../../../../../tmp/tmp-2799-eb95rLIFiJGh/1902b6952460/index.css"() {
40077
+ // ../../../../../../../tmp/tmp-2775-gsUiZ4fOlmVq/190300298fb1/index.css
40078
+ var init_fb1 = __esm({
40079
+ "../../../../../../../tmp/tmp-2775-gsUiZ4fOlmVq/190300298fb1/index.css"() {
40082
40080
  }
40083
40081
  });
40084
40082
 
@@ -40100,7 +40098,7 @@ var init_WhiteboardLayout = __esm({
40100
40098
  init_ProminenceLayout();
40101
40099
  init_useUISettings();
40102
40100
  init_constants();
40103
- init_b6952460();
40101
+ init_fb1();
40104
40102
  WhiteboardEmbed = () => {
40105
40103
  const isMobile = (0, import_react_use42.useMedia)(config.media.md);
40106
40104
  const { token, endpoint, zoomToContent } = (0, import_react_sdk93.useWhiteboard)(isMobile);
@@ -42800,6 +42798,8 @@ var init_common2 = __esm({
42800
42798
  AudioIcon = /* @__PURE__ */ import_react205.default.createElement(import_react_icons99.BluetoothIcon, null);
42801
42799
  } else if (currentSelection && currentSelection.label.toLowerCase().includes("wired")) {
42802
42800
  AudioIcon = /* @__PURE__ */ import_react205.default.createElement(import_react_icons99.HeadphonesIcon, null);
42801
+ } else if (currentSelection && currentSelection.label.toLowerCase().includes("earpiece")) {
42802
+ AudioIcon = /* @__PURE__ */ import_react205.default.createElement(import_react_icons99.TelePhoneIcon, null);
42803
42803
  }
42804
42804
  return /* @__PURE__ */ import_react205.default.createElement(
42805
42805
  AudioSelectionSheet,
@@ -45298,9 +45298,9 @@ var init_components = __esm({
45298
45298
  init_Text2();
45299
45299
  init_hms();
45300
45300
  DiagnosticsSteps = {
45301
+ browser: "Browser Support",
45301
45302
  video: "Test Video",
45302
45303
  audio: "Test Audio",
45303
- // browser: 'Browser Support',
45304
45304
  connectivity: "Connection Quality"
45305
45305
  };
45306
45306
  DiagnosticsContext = import_react239.default.createContext({
@@ -46506,14 +46506,131 @@ var init_AudioTest = __esm({
46506
46506
  }
46507
46507
  });
46508
46508
 
46509
+ // src/Diagnostics/BrowserTest.tsx
46510
+ var import_react242, import_react_sdk129, CMS_MEDIA_SERVER, operatingSystemIconInfo, browserTypeIconInfo, CheckDetails, BrowserTest;
46511
+ var init_BrowserTest = __esm({
46512
+ "src/Diagnostics/BrowserTest.tsx"() {
46513
+ "use strict";
46514
+ init_define_process_env();
46515
+ import_react242 = __toESM(require("react"));
46516
+ import_react_sdk129 = require("@100mslive/react-sdk");
46517
+ init_components();
46518
+ init_Layout();
46519
+ init_Text2();
46520
+ init_hms();
46521
+ CMS_MEDIA_SERVER = "https://storage.googleapis.com/100ms-cms-prod/";
46522
+ operatingSystemIconInfo = {
46523
+ tizen: {
46524
+ key: "tizen",
46525
+ val: "Tizen",
46526
+ icon: `${CMS_MEDIA_SERVER}cms/Tizen_b99350214e/Tizen_b99350214e.svg`
46527
+ },
46528
+ "mac os": {
46529
+ key: "macos",
46530
+ val: "Mac OS",
46531
+ icon: `${CMS_MEDIA_SERVER}cms/mac_OS_804456afd8/mac_OS_804456afd8.png`
46532
+ },
46533
+ windows: {
46534
+ key: "windows",
46535
+ val: "Windows",
46536
+ icon: `${CMS_MEDIA_SERVER}cms/Windows_fdfe6749b6/Windows_fdfe6749b6.svg`
46537
+ },
46538
+ linux: {
46539
+ key: "linux",
46540
+ val: "Linux",
46541
+ icon: `${CMS_MEDIA_SERVER}cms/Linux_31f8353a2e/Linux_31f8353a2e.svg`
46542
+ },
46543
+ chromium: {
46544
+ key: "chromium",
46545
+ val: "Chromium",
46546
+ icon: `${CMS_MEDIA_SERVER}cms/Chromium_3df17710bd/Chromium_3df17710bd.svg`
46547
+ },
46548
+ ubuntu: {
46549
+ key: "ubuntu",
46550
+ val: "Ubuntu",
46551
+ icon: `${CMS_MEDIA_SERVER}cms/Ubuntu_966dd923c5/Ubuntu_966dd923c5.svg`
46552
+ },
46553
+ ios: {
46554
+ key: "ios",
46555
+ val: "iOS",
46556
+ icon: `${CMS_MEDIA_SERVER}cms/i_OS_3cdc9d9b71/i_OS_3cdc9d9b71.svg`
46557
+ },
46558
+ android: {
46559
+ key: "android",
46560
+ val: "Android",
46561
+ icon: `${CMS_MEDIA_SERVER}cms/Android_49dcfdc934/Android_49dcfdc934.svg`
46562
+ }
46563
+ };
46564
+ browserTypeIconInfo = {
46565
+ brave: {
46566
+ key: "brave",
46567
+ val: "Brave",
46568
+ icon: `${CMS_MEDIA_SERVER}cms/Brave_7e66131f09/Brave_7e66131f09.svg`
46569
+ },
46570
+ chrome: {
46571
+ key: "chrome",
46572
+ val: "Chrome",
46573
+ icon: `${CMS_MEDIA_SERVER}cms/Chrome_7bf77fbdd7/Chrome_7bf77fbdd7.svg`
46574
+ },
46575
+ firefox: {
46576
+ key: "firefox",
46577
+ val: "Firefox",
46578
+ icon: `${CMS_MEDIA_SERVER}cms/Firefox_30f3976fb8/Firefox_30f3976fb8.svg`
46579
+ },
46580
+ safari: {
46581
+ key: "safari",
46582
+ val: "Safari",
46583
+ icon: `${CMS_MEDIA_SERVER}cms/Safari_254e74ed94/Safari_254e74ed94.svg`
46584
+ },
46585
+ edge: {
46586
+ key: "edge",
46587
+ val: "Edge",
46588
+ icon: `${CMS_MEDIA_SERVER}cms/Edge_23add4a83f/Edge_23add4a83f.svg`
46589
+ },
46590
+ opera: {
46591
+ key: "opera",
46592
+ val: "Opera",
46593
+ icon: `${CMS_MEDIA_SERVER}cms/Opera_0f3bf4eb19/Opera_0f3bf4eb19.svg`
46594
+ }
46595
+ };
46596
+ CheckDetails = ({ title, value, iconURL }) => /* @__PURE__ */ import_react242.default.createElement(Box, { css: { w: "100%", my: "$10", p: "$10", r: "$1", bg: "$surface_default", "@lg": { w: "auto" } } }, /* @__PURE__ */ import_react242.default.createElement(Text, { css: { c: "$on_primary_medium", mb: "$6" } }, title), /* @__PURE__ */ import_react242.default.createElement(Flex, { align: "center" }, iconURL && /* @__PURE__ */ import_react242.default.createElement(Box, { css: { size: "2rem", r: "$round", bg: "$surface_brighter" } }, /* @__PURE__ */ import_react242.default.createElement("img", { style: { objectFit: "contain", width: "2rem" }, src: iconURL, alt: value })), /* @__PURE__ */ import_react242.default.createElement(Text, { css: { ml: "$4" } }, value)));
46597
+ BrowserTest = () => {
46598
+ var _a8, _b7;
46599
+ const [error, setError] = (0, import_react242.useState)();
46600
+ (0, import_react242.useEffect)(() => {
46601
+ try {
46602
+ hmsDiagnostics.checkBrowserSupport();
46603
+ } catch (err) {
46604
+ setError(err);
46605
+ }
46606
+ }, []);
46607
+ return /* @__PURE__ */ import_react242.default.createElement(import_react242.default.Fragment, null, /* @__PURE__ */ import_react242.default.createElement(TestContainer, { css: { display: "flex", gap: "$8", "@lg": { display: "block" } } }, /* @__PURE__ */ import_react242.default.createElement(
46608
+ CheckDetails,
46609
+ {
46610
+ title: "Browser",
46611
+ iconURL: import_react_sdk129.parsedUserAgent.getBrowser().name && browserTypeIconInfo[(_a8 = import_react_sdk129.parsedUserAgent.getBrowser().name) == null ? void 0 : _a8.toLowerCase()].icon,
46612
+ value: `${import_react_sdk129.parsedUserAgent.getBrowser().name} ${import_react_sdk129.parsedUserAgent.getBrowser().version}`
46613
+ }
46614
+ ), /* @__PURE__ */ import_react242.default.createElement(
46615
+ CheckDetails,
46616
+ {
46617
+ title: "Operating system",
46618
+ iconURL: import_react_sdk129.parsedUserAgent.getOS().name && operatingSystemIconInfo[(_b7 = import_react_sdk129.parsedUserAgent.getOS().name) == null ? void 0 : _b7.toLowerCase()].icon,
46619
+ value: `${import_react_sdk129.parsedUserAgent.getOS().name} ${import_react_sdk129.parsedUserAgent.getOS().version}`
46620
+ }
46621
+ )), /* @__PURE__ */ import_react242.default.createElement(TestFooter, { error, ctaText: "Is your device information correct?" }));
46622
+ };
46623
+ }
46624
+ });
46625
+
46509
46626
  // src/Diagnostics/ConnectivityTest.tsx
46510
- var import_react242, import_react_sdk129, import_react_icons111, Regions, ConnectivityStateMessage, ConnectivityTestStepResult, DetailedInfo, MediaServerResult, SignallingResult, AudioStats, VideoStats, Footer3, ConnectivityTestReport, RegionSelector, ConnectivityTest, downloadJson;
46627
+ var import_react243, import_react_sdk130, import_react_icons111, Regions, ConnectivityStateMessage, ConnectivityTestStepResult, DetailedInfo, MediaServerResult, SignallingResult, AudioStats, VideoStats, Footer3, ConnectivityTestReport, RegionSelector, ConnectivityTest, downloadJson;
46511
46628
  var init_ConnectivityTest = __esm({
46512
46629
  "src/Diagnostics/ConnectivityTest.tsx"() {
46513
46630
  "use strict";
46514
46631
  init_define_process_env();
46515
- import_react242 = __toESM(require("react"));
46516
- import_react_sdk129 = require("@100mslive/react-sdk");
46632
+ import_react243 = __toESM(require("react"));
46633
+ import_react_sdk130 = require("@100mslive/react-sdk");
46517
46634
  import_react_icons111 = require("@100mslive/react-icons");
46518
46635
  init_components();
46519
46636
  init_Button2();
@@ -46528,51 +46645,51 @@ var init_ConnectivityTest = __esm({
46528
46645
  us: "United States"
46529
46646
  };
46530
46647
  ConnectivityStateMessage = {
46531
- [import_react_sdk129.ConnectivityState.STARTING]: "Fetching Init",
46532
- [import_react_sdk129.ConnectivityState.INIT_FETCHED]: "Connecting to signal server",
46533
- [import_react_sdk129.ConnectivityState.SIGNAL_CONNECTED]: "Establishing ICE connection",
46534
- [import_react_sdk129.ConnectivityState.ICE_ESTABLISHED]: "Capturing Media",
46535
- [import_react_sdk129.ConnectivityState.MEDIA_CAPTURED]: "Publishing Media",
46536
- [import_react_sdk129.ConnectivityState.MEDIA_PUBLISHED]: "Finishing Up",
46537
- [import_react_sdk129.ConnectivityState.COMPLETED]: "Completed"
46648
+ [import_react_sdk130.ConnectivityState.STARTING]: "Fetching Init",
46649
+ [import_react_sdk130.ConnectivityState.INIT_FETCHED]: "Connecting to signal server",
46650
+ [import_react_sdk130.ConnectivityState.SIGNAL_CONNECTED]: "Establishing ICE connection",
46651
+ [import_react_sdk130.ConnectivityState.ICE_ESTABLISHED]: "Capturing Media",
46652
+ [import_react_sdk130.ConnectivityState.MEDIA_CAPTURED]: "Publishing Media",
46653
+ [import_react_sdk130.ConnectivityState.MEDIA_PUBLISHED]: "Finishing Up",
46654
+ [import_react_sdk130.ConnectivityState.COMPLETED]: "Completed"
46538
46655
  };
46539
46656
  ConnectivityTestStepResult = ({
46540
46657
  title,
46541
46658
  success,
46542
46659
  children
46543
46660
  }) => {
46544
- return /* @__PURE__ */ import_react242.default.createElement(Box, { css: { my: "$10", p: "$10", r: "$1", bg: "$surface_bright" } }, /* @__PURE__ */ import_react242.default.createElement(Text, { css: { c: "$on_primary_medium", mb: "$6" } }, title), success ? /* @__PURE__ */ import_react242.default.createElement(Flex, null, /* @__PURE__ */ import_react242.default.createElement(Text, { css: { c: "$alert_success" } }, /* @__PURE__ */ import_react242.default.createElement(import_react_icons111.CheckCircleIcon, { width: "1.5rem", height: "1.5rem" })), /* @__PURE__ */ import_react242.default.createElement(Text, { variant: "lg", css: { ml: "$4" } }, "Connected")) : /* @__PURE__ */ import_react242.default.createElement(Flex, null, /* @__PURE__ */ import_react242.default.createElement(Text, { css: { c: "$alert_error_bright" } }, /* @__PURE__ */ import_react242.default.createElement(import_react_icons111.CrossCircleIcon, { width: "1.5rem", height: "1.5rem" })), /* @__PURE__ */ import_react242.default.createElement(Text, { variant: "lg", css: { ml: "$4" } }, "Failed")), /* @__PURE__ */ import_react242.default.createElement(Box, null, children));
46661
+ return /* @__PURE__ */ import_react243.default.createElement(Box, { css: { my: "$10", p: "$10", r: "$1", bg: "$surface_bright" } }, /* @__PURE__ */ import_react243.default.createElement(Text, { css: { c: "$on_primary_medium", mb: "$6" } }, title), success ? /* @__PURE__ */ import_react243.default.createElement(Flex, null, /* @__PURE__ */ import_react243.default.createElement(Text, { css: { c: "$alert_success" } }, /* @__PURE__ */ import_react243.default.createElement(import_react_icons111.CheckCircleIcon, { width: "1.5rem", height: "1.5rem" })), /* @__PURE__ */ import_react243.default.createElement(Text, { variant: "lg", css: { ml: "$4" } }, "Connected")) : /* @__PURE__ */ import_react243.default.createElement(Flex, null, /* @__PURE__ */ import_react243.default.createElement(Text, { css: { c: "$alert_error_bright" } }, /* @__PURE__ */ import_react243.default.createElement(import_react_icons111.CrossCircleIcon, { width: "1.5rem", height: "1.5rem" })), /* @__PURE__ */ import_react243.default.createElement(Text, { variant: "lg", css: { ml: "$4" } }, "Failed")), /* @__PURE__ */ import_react243.default.createElement(Box, null, children));
46545
46662
  };
46546
46663
  DetailedInfo = ({
46547
46664
  title,
46548
46665
  value,
46549
46666
  Icon: Icon4
46550
46667
  }) => {
46551
- return /* @__PURE__ */ import_react242.default.createElement(Box, { css: { flex: "50%", mt: "$6" } }, /* @__PURE__ */ import_react242.default.createElement(Text, { variant: "caption", css: { fontWeight: "$semiBold", c: "$on_primary_medium" } }, title), /* @__PURE__ */ import_react242.default.createElement(Flex, { css: { mt: "$xs", alignItems: "flex-start" } }, Icon4 && /* @__PURE__ */ import_react242.default.createElement(Text, { css: { mr: "$4" } }, /* @__PURE__ */ import_react242.default.createElement(Icon4, { width: "1rem", height: "1rem" })), /* @__PURE__ */ import_react242.default.createElement(Text, { variant: "caption" }, value)));
46668
+ return /* @__PURE__ */ import_react243.default.createElement(Box, { css: { flex: "50%", mt: "$6" } }, /* @__PURE__ */ import_react243.default.createElement(Text, { variant: "caption", css: { fontWeight: "$semiBold", c: "$on_primary_medium" } }, title), /* @__PURE__ */ import_react243.default.createElement(Flex, { css: { mt: "$xs", alignItems: "flex-start" } }, Icon4 && /* @__PURE__ */ import_react243.default.createElement(Text, { css: { mr: "$4" } }, /* @__PURE__ */ import_react243.default.createElement(Icon4, { width: "1rem", height: "1rem" })), /* @__PURE__ */ import_react243.default.createElement(Text, { variant: "caption" }, value)));
46552
46669
  };
46553
46670
  MediaServerResult = ({ result }) => {
46554
46671
  var _a8, _b7, _c, _d;
46555
- return /* @__PURE__ */ import_react242.default.createElement(
46672
+ return /* @__PURE__ */ import_react243.default.createElement(
46556
46673
  ConnectivityTestStepResult,
46557
46674
  {
46558
46675
  title: "Media server connection test",
46559
46676
  success: (result == null ? void 0 : result.isPublishICEConnected) && result.isSubscribeICEConnected
46560
46677
  },
46561
- /* @__PURE__ */ import_react242.default.createElement(Flex, { css: { flexWrap: "wrap" } }, /* @__PURE__ */ import_react242.default.createElement(
46678
+ /* @__PURE__ */ import_react243.default.createElement(Flex, { css: { flexWrap: "wrap" } }, /* @__PURE__ */ import_react243.default.createElement(
46562
46679
  DetailedInfo,
46563
46680
  {
46564
46681
  title: "Media Captured",
46565
46682
  value: ((_a8 = result == null ? void 0 : result.stats) == null ? void 0 : _a8.audio.bytesSent) ? "Yes" : "No",
46566
46683
  Icon: ((_b7 = result == null ? void 0 : result.stats) == null ? void 0 : _b7.audio.bytesSent) ? import_react_icons111.CheckCircleIcon : import_react_icons111.CrossCircleIcon
46567
46684
  }
46568
- ), /* @__PURE__ */ import_react242.default.createElement(
46685
+ ), /* @__PURE__ */ import_react243.default.createElement(
46569
46686
  DetailedInfo,
46570
46687
  {
46571
46688
  title: "Media Published",
46572
46689
  value: ((_c = result == null ? void 0 : result.stats) == null ? void 0 : _c.audio.bitrateSent) ? "Yes" : "No",
46573
46690
  Icon: ((_d = result == null ? void 0 : result.stats) == null ? void 0 : _d.audio.bytesSent) ? import_react_icons111.CheckCircleIcon : import_react_icons111.CrossCircleIcon
46574
46691
  }
46575
- ), (result == null ? void 0 : result.connectionQualityScore) ? /* @__PURE__ */ import_react242.default.createElement(
46692
+ ), (result == null ? void 0 : result.connectionQualityScore) ? /* @__PURE__ */ import_react243.default.createElement(
46576
46693
  DetailedInfo,
46577
46694
  {
46578
46695
  title: "Connection Quality Score (CQS)",
@@ -46582,27 +46699,27 @@ var init_ConnectivityTest = __esm({
46582
46699
  );
46583
46700
  };
46584
46701
  SignallingResult = ({ result }) => {
46585
- return /* @__PURE__ */ import_react242.default.createElement(ConnectivityTestStepResult, { title: "Signalling server connection test", success: result == null ? void 0 : result.isConnected }, /* @__PURE__ */ import_react242.default.createElement(Flex, { css: { flexWrap: "wrap" } }, /* @__PURE__ */ import_react242.default.createElement(
46702
+ return /* @__PURE__ */ import_react243.default.createElement(ConnectivityTestStepResult, { title: "Signalling server connection test", success: result == null ? void 0 : result.isConnected }, /* @__PURE__ */ import_react243.default.createElement(Flex, { css: { flexWrap: "wrap" } }, /* @__PURE__ */ import_react243.default.createElement(
46586
46703
  DetailedInfo,
46587
46704
  {
46588
46705
  title: "Signalling Gateway",
46589
46706
  value: (result == null ? void 0 : result.isConnected) ? "Reachable" : "Unreachable",
46590
46707
  Icon: (result == null ? void 0 : result.isConnected) ? import_react_icons111.CheckCircleIcon : import_react_icons111.CrossCircleIcon
46591
46708
  }
46592
- ), /* @__PURE__ */ import_react242.default.createElement(DetailedInfo, { title: "Websocket URL", value: (result == null ? void 0 : result.websocketUrl) || "N/A", Icon: import_react_icons111.LinkIcon })));
46709
+ ), /* @__PURE__ */ import_react243.default.createElement(DetailedInfo, { title: "Websocket URL", value: (result == null ? void 0 : result.websocketUrl) || "N/A", Icon: import_react_icons111.LinkIcon })));
46593
46710
  };
46594
46711
  AudioStats = ({ stats }) => {
46595
- return /* @__PURE__ */ import_react242.default.createElement(ConnectivityTestStepResult, { title: "Audio", success: !!(stats == null ? void 0 : stats.bytesSent) }, stats && /* @__PURE__ */ import_react242.default.createElement(Flex, { css: { flexWrap: "wrap" } }, /* @__PURE__ */ import_react242.default.createElement(DetailedInfo, { title: "Bytes Sent", value: formatBytes(stats.bytesSent) }), /* @__PURE__ */ import_react242.default.createElement(DetailedInfo, { title: "Bytes Received", value: formatBytes(stats.bytesReceived) }), /* @__PURE__ */ import_react242.default.createElement(DetailedInfo, { title: "Packets Received", value: stats.packetsReceived.toString() }), /* @__PURE__ */ import_react242.default.createElement(DetailedInfo, { title: "Packets Lost", value: stats.packetsLost.toString() }), /* @__PURE__ */ import_react242.default.createElement(DetailedInfo, { title: "Bitrate Sent", value: formatBytes(stats.bitrateSent, "b/s") }), /* @__PURE__ */ import_react242.default.createElement(DetailedInfo, { title: "Bitrate Received", value: formatBytes(stats.bitrateReceived, "b/s") }), /* @__PURE__ */ import_react242.default.createElement(DetailedInfo, { title: "Round Trip Time", value: `${stats.roundTripTime} ms` })));
46712
+ return /* @__PURE__ */ import_react243.default.createElement(ConnectivityTestStepResult, { title: "Audio", success: !!(stats == null ? void 0 : stats.bytesSent) }, stats && /* @__PURE__ */ import_react243.default.createElement(Flex, { css: { flexWrap: "wrap" } }, /* @__PURE__ */ import_react243.default.createElement(DetailedInfo, { title: "Bytes Sent", value: formatBytes(stats.bytesSent) }), /* @__PURE__ */ import_react243.default.createElement(DetailedInfo, { title: "Bytes Received", value: formatBytes(stats.bytesReceived) }), /* @__PURE__ */ import_react243.default.createElement(DetailedInfo, { title: "Packets Received", value: stats.packetsReceived.toString() }), /* @__PURE__ */ import_react243.default.createElement(DetailedInfo, { title: "Packets Lost", value: stats.packetsLost.toString() }), /* @__PURE__ */ import_react243.default.createElement(DetailedInfo, { title: "Bitrate Sent", value: formatBytes(stats.bitrateSent, "b/s") }), /* @__PURE__ */ import_react243.default.createElement(DetailedInfo, { title: "Bitrate Received", value: formatBytes(stats.bitrateReceived, "b/s") }), /* @__PURE__ */ import_react243.default.createElement(DetailedInfo, { title: "Round Trip Time", value: `${stats.roundTripTime} ms` })));
46596
46713
  };
46597
46714
  VideoStats = ({ stats }) => {
46598
- return /* @__PURE__ */ import_react242.default.createElement(ConnectivityTestStepResult, { title: "Video", success: !!(stats == null ? void 0 : stats.bytesSent) }, stats && /* @__PURE__ */ import_react242.default.createElement(Flex, { css: { flexWrap: "wrap" } }, /* @__PURE__ */ import_react242.default.createElement(DetailedInfo, { title: "Bytes Sent", value: formatBytes(stats.bytesSent) }), /* @__PURE__ */ import_react242.default.createElement(DetailedInfo, { title: "Bytes Received", value: formatBytes(stats.bytesReceived) }), /* @__PURE__ */ import_react242.default.createElement(DetailedInfo, { title: "Packets Received", value: stats.packetsReceived.toString() }), /* @__PURE__ */ import_react242.default.createElement(DetailedInfo, { title: "Packets Lost", value: stats.packetsLost.toString() }), /* @__PURE__ */ import_react242.default.createElement(DetailedInfo, { title: "Bitrate Sent", value: formatBytes(stats.bitrateSent, "b/s") }), /* @__PURE__ */ import_react242.default.createElement(DetailedInfo, { title: "Bitrate Received", value: formatBytes(stats.bitrateReceived, "b/s") }), /* @__PURE__ */ import_react242.default.createElement(DetailedInfo, { title: "Round Trip Time", value: `${stats.roundTripTime} ms` })));
46715
+ return /* @__PURE__ */ import_react243.default.createElement(ConnectivityTestStepResult, { title: "Video", success: !!(stats == null ? void 0 : stats.bytesSent) }, stats && /* @__PURE__ */ import_react243.default.createElement(Flex, { css: { flexWrap: "wrap" } }, /* @__PURE__ */ import_react243.default.createElement(DetailedInfo, { title: "Bytes Sent", value: formatBytes(stats.bytesSent) }), /* @__PURE__ */ import_react243.default.createElement(DetailedInfo, { title: "Bytes Received", value: formatBytes(stats.bytesReceived) }), /* @__PURE__ */ import_react243.default.createElement(DetailedInfo, { title: "Packets Received", value: stats.packetsReceived.toString() }), /* @__PURE__ */ import_react243.default.createElement(DetailedInfo, { title: "Packets Lost", value: stats.packetsLost.toString() }), /* @__PURE__ */ import_react243.default.createElement(DetailedInfo, { title: "Bitrate Sent", value: formatBytes(stats.bitrateSent, "b/s") }), /* @__PURE__ */ import_react243.default.createElement(DetailedInfo, { title: "Bitrate Received", value: formatBytes(stats.bitrateReceived, "b/s") }), /* @__PURE__ */ import_react243.default.createElement(DetailedInfo, { title: "Round Trip Time", value: `${stats.roundTripTime} ms` })));
46599
46716
  };
46600
46717
  Footer3 = ({
46601
46718
  error,
46602
46719
  result,
46603
46720
  restart
46604
46721
  }) => {
46605
- return /* @__PURE__ */ import_react242.default.createElement(TestFooter, { error }, /* @__PURE__ */ import_react242.default.createElement(Flex, { css: { gap: "$8", "@lg": { flexDirection: "column" } } }, /* @__PURE__ */ import_react242.default.createElement(Button, { variant: "standard", onClick: restart }, "Restart Test"), /* @__PURE__ */ import_react242.default.createElement(Button, { disabled: !result, onClick: () => result && downloadJson(result, "hms_diagnostics_results") }, "Download Test Report")));
46722
+ return /* @__PURE__ */ import_react243.default.createElement(TestFooter, { error }, /* @__PURE__ */ import_react243.default.createElement(Flex, { css: { gap: "$8", "@lg": { flexDirection: "column" } } }, /* @__PURE__ */ import_react243.default.createElement(Button, { variant: "standard", onClick: restart }, "Restart Test"), /* @__PURE__ */ import_react243.default.createElement(Button, { disabled: !result, onClick: () => result && downloadJson(result, "hms_diagnostics_results") }, "Download Test Report")));
46606
46723
  };
46607
46724
  ConnectivityTestReport = ({
46608
46725
  error,
@@ -46612,13 +46729,14 @@ var init_ConnectivityTest = __esm({
46612
46729
  }) => {
46613
46730
  var _a8, _b7, _c, _d;
46614
46731
  if (error) {
46615
- return /* @__PURE__ */ import_react242.default.createElement(import_react242.default.Fragment, null, /* @__PURE__ */ import_react242.default.createElement(TestContainer, { css: { textAlign: "center" } }, /* @__PURE__ */ import_react242.default.createElement(Text, { css: { c: "$alert_error_default", mb: "$4" } }, /* @__PURE__ */ import_react242.default.createElement(import_react_icons111.CrossCircleIcon, null)), /* @__PURE__ */ import_react242.default.createElement(Text, { variant: "h6" }, "Connectivity Test Failed"), /* @__PURE__ */ import_react242.default.createElement(Text, { variant: "body2", css: { c: "$on_primary_medium" } }, error.message)), /* @__PURE__ */ import_react242.default.createElement(Footer3, { restart: startTest, error }));
46732
+ return /* @__PURE__ */ import_react243.default.createElement(import_react243.default.Fragment, null, /* @__PURE__ */ import_react243.default.createElement(TestContainer, { css: { textAlign: "center" } }, /* @__PURE__ */ import_react243.default.createElement(Text, { css: { c: "$alert_error_default", mb: "$4" } }, /* @__PURE__ */ import_react243.default.createElement(import_react_icons111.CrossCircleIcon, null)), /* @__PURE__ */ import_react243.default.createElement(Text, { variant: "h6" }, "Connectivity Test Failed"), /* @__PURE__ */ import_react243.default.createElement(Text, { variant: "body2", css: { c: "$on_primary_medium" } }, error.message)), /* @__PURE__ */ import_react243.default.createElement(Footer3, { restart: startTest, error }));
46616
46733
  }
46617
46734
  if (result) {
46618
- return /* @__PURE__ */ import_react242.default.createElement(import_react242.default.Fragment, null, /* @__PURE__ */ import_react242.default.createElement(TestContainer, null, /* @__PURE__ */ import_react242.default.createElement(Text, { css: { c: "$on_primary_medium" } }, "Connectivity test has been completed."), /* @__PURE__ */ import_react242.default.createElement(SignallingResult, { result: result == null ? void 0 : result.signallingReport }), /* @__PURE__ */ import_react242.default.createElement(MediaServerResult, { result: result == null ? void 0 : result.mediaServerReport }), /* @__PURE__ */ import_react242.default.createElement(AudioStats, { stats: (_b7 = (_a8 = result == null ? void 0 : result.mediaServerReport) == null ? void 0 : _a8.stats) == null ? void 0 : _b7.audio }), /* @__PURE__ */ import_react242.default.createElement(VideoStats, { stats: (_d = (_c = result == null ? void 0 : result.mediaServerReport) == null ? void 0 : _c.stats) == null ? void 0 : _d.video })), /* @__PURE__ */ import_react242.default.createElement(Footer3, { result, restart: startTest, error }));
46735
+ console.log(result);
46736
+ return /* @__PURE__ */ import_react243.default.createElement(import_react243.default.Fragment, null, /* @__PURE__ */ import_react243.default.createElement(TestContainer, null, /* @__PURE__ */ import_react243.default.createElement(Text, { css: { c: "$on_primary_medium" } }, "Connectivity test has been completed."), /* @__PURE__ */ import_react243.default.createElement(SignallingResult, { result: result == null ? void 0 : result.signallingReport }), /* @__PURE__ */ import_react243.default.createElement(MediaServerResult, { result: result == null ? void 0 : result.mediaServerReport }), /* @__PURE__ */ import_react243.default.createElement(AudioStats, { stats: (_b7 = (_a8 = result == null ? void 0 : result.mediaServerReport) == null ? void 0 : _a8.stats) == null ? void 0 : _b7.audio }), /* @__PURE__ */ import_react243.default.createElement(VideoStats, { stats: (_d = (_c = result == null ? void 0 : result.mediaServerReport) == null ? void 0 : _c.stats) == null ? void 0 : _d.video })), /* @__PURE__ */ import_react243.default.createElement(Footer3, { result, restart: startTest, error }));
46619
46737
  }
46620
- if (progress) {
46621
- return /* @__PURE__ */ import_react242.default.createElement(TestContainer, { css: { textAlign: "center" } }, /* @__PURE__ */ import_react242.default.createElement(Text, { css: { c: "$primary_bright" } }, /* @__PURE__ */ import_react242.default.createElement(Loading, { size: "3.5rem", color: "currentColor" })), /* @__PURE__ */ import_react242.default.createElement(Text, { variant: "h6", css: { mt: "$8" } }, "Checking your connection..."), /* @__PURE__ */ import_react242.default.createElement(
46738
+ if (progress !== void 0) {
46739
+ return /* @__PURE__ */ import_react243.default.createElement(TestContainer, { css: { textAlign: "center" } }, /* @__PURE__ */ import_react243.default.createElement(Text, { css: { c: "$primary_bright" } }, /* @__PURE__ */ import_react243.default.createElement(Loading, { size: "3.5rem", color: "currentColor" })), /* @__PURE__ */ import_react243.default.createElement(Text, { variant: "h6", css: { mt: "$8" } }, "Checking your connection..."), /* @__PURE__ */ import_react243.default.createElement(
46622
46740
  Text,
46623
46741
  {
46624
46742
  variant: "body2",
@@ -46634,7 +46752,7 @@ var init_ConnectivityTest = __esm({
46634
46752
  setRegion,
46635
46753
  startTest
46636
46754
  }) => {
46637
- return /* @__PURE__ */ import_react242.default.createElement(TestContainer, { css: { borderBottom: "1px solid $border_default" } }, /* @__PURE__ */ import_react242.default.createElement(Text, { variant: "body1" }, "Select a region"), /* @__PURE__ */ import_react242.default.createElement(Text, { variant: "body2", css: { c: "$on_secondary_low" } }, "Select the closest region for best results"), /* @__PURE__ */ import_react242.default.createElement(
46755
+ return /* @__PURE__ */ import_react243.default.createElement(TestContainer, { css: { borderBottom: "1px solid $border_default" } }, /* @__PURE__ */ import_react243.default.createElement(Text, { variant: "body1" }, "Select a region"), /* @__PURE__ */ import_react243.default.createElement(Text, { variant: "body2", css: { c: "$on_secondary_low" } }, "Select the closest region for best results"), /* @__PURE__ */ import_react243.default.createElement(
46638
46756
  Flex,
46639
46757
  {
46640
46758
  justify: "between",
@@ -46646,7 +46764,7 @@ var init_ConnectivityTest = __esm({
46646
46764
  }
46647
46765
  }
46648
46766
  },
46649
- /* @__PURE__ */ import_react242.default.createElement(
46767
+ /* @__PURE__ */ import_react243.default.createElement(
46650
46768
  Flex,
46651
46769
  {
46652
46770
  css: {
@@ -46656,7 +46774,7 @@ var init_ConnectivityTest = __esm({
46656
46774
  }
46657
46775
  }
46658
46776
  },
46659
- Object.entries(Regions).map(([key, value]) => /* @__PURE__ */ import_react242.default.createElement(
46777
+ Object.entries(Regions).map(([key, value]) => /* @__PURE__ */ import_react243.default.createElement(
46660
46778
  Button,
46661
46779
  {
46662
46780
  key,
@@ -46668,17 +46786,16 @@ var init_ConnectivityTest = __esm({
46668
46786
  value
46669
46787
  ))
46670
46788
  ),
46671
- /* @__PURE__ */ import_react242.default.createElement(Flex, { css: { "@lg": { flexDirection: "column" } } }, /* @__PURE__ */ import_react242.default.createElement(Button, { variant: "primary", onClick: startTest, disabled: !startTest }, startTest ? "Start Test" : "Testing..."))
46789
+ /* @__PURE__ */ import_react243.default.createElement(Flex, { css: { "@lg": { flexDirection: "column" } } }, /* @__PURE__ */ import_react243.default.createElement(Button, { variant: "primary", onClick: startTest, disabled: !startTest }, startTest ? "Start Test" : "Testing..."))
46672
46790
  ));
46673
46791
  };
46674
46792
  ConnectivityTest = () => {
46675
- const [region, setRegion] = (0, import_react242.useState)(Object.keys(Regions)[0]);
46676
- const [error, setError] = (0, import_react242.useState)();
46677
- const [progress, setProgress] = (0, import_react242.useState)();
46678
- const [result, setResult] = (0, import_react242.useState)();
46793
+ const [region, setRegion] = (0, import_react243.useState)(Object.keys(Regions)[0]);
46794
+ const [error, setError] = (0, import_react243.useState)();
46795
+ const [progress, setProgress] = (0, import_react243.useState)();
46796
+ const [result, setResult] = (0, import_react243.useState)();
46679
46797
  const startTest = () => {
46680
46798
  setError(void 0);
46681
- setProgress(import_react_sdk129.ConnectivityState.STARTING);
46682
46799
  setResult(void 0);
46683
46800
  hmsDiagnostics.startConnectivityCheck(
46684
46801
  (state) => {
@@ -46692,14 +46809,14 @@ var init_ConnectivityTest = __esm({
46692
46809
  setError(error2);
46693
46810
  });
46694
46811
  };
46695
- return /* @__PURE__ */ import_react242.default.createElement(import_react242.default.Fragment, null, /* @__PURE__ */ import_react242.default.createElement(
46812
+ return /* @__PURE__ */ import_react243.default.createElement(import_react243.default.Fragment, null, /* @__PURE__ */ import_react243.default.createElement(
46696
46813
  RegionSelector,
46697
46814
  {
46698
46815
  region,
46699
46816
  setRegion,
46700
- startTest: !progress || progress === import_react_sdk129.ConnectivityState.COMPLETED ? startTest : void 0
46817
+ startTest: progress === void 0 || progress === import_react_sdk130.ConnectivityState.COMPLETED ? startTest : void 0
46701
46818
  }
46702
- ), /* @__PURE__ */ import_react242.default.createElement(ConnectivityTestReport, { error, result, progress, startTest }));
46819
+ ), /* @__PURE__ */ import_react243.default.createElement(ConnectivityTestReport, { error, result, progress, startTest }));
46703
46820
  };
46704
46821
  downloadJson = (obj, fileName) => {
46705
46822
  const a11 = document.createElement("a");
@@ -46714,13 +46831,13 @@ var init_ConnectivityTest = __esm({
46714
46831
  });
46715
46832
 
46716
46833
  // src/Diagnostics/VideoTest.tsx
46717
- var import_react243, import_react_sdk130, import_react_icons112, VideoTest;
46834
+ var import_react244, import_react_sdk131, import_react_icons112, VideoTest;
46718
46835
  var init_VideoTest = __esm({
46719
46836
  "src/Diagnostics/VideoTest.tsx"() {
46720
46837
  "use strict";
46721
46838
  init_define_process_env();
46722
- import_react243 = __toESM(require("react"));
46723
- import_react_sdk130 = require("@100mslive/react-sdk");
46839
+ import_react244 = __toESM(require("react"));
46840
+ import_react_sdk131 = require("@100mslive/react-sdk");
46724
46841
  import_react_icons112 = require("@100mslive/react-icons");
46725
46842
  init_components();
46726
46843
  init_Layout();
@@ -46730,15 +46847,15 @@ var init_VideoTest = __esm({
46730
46847
  init_DeviceSelector();
46731
46848
  init_hms();
46732
46849
  VideoTest = () => {
46733
- const allDevices = (0, import_react_sdk130.useHMSStore)(import_react_sdk130.selectDevices);
46850
+ const allDevices = (0, import_react_sdk131.useHMSStore)(import_react_sdk131.selectDevices);
46734
46851
  const { videoInput } = allDevices;
46735
- const trackID = (0, import_react_sdk130.useHMSStore)(import_react_sdk130.selectLocalVideoTrackID);
46736
- const sdkSelectedDevices = (0, import_react_sdk130.useHMSStore)(import_react_sdk130.selectLocalMediaSettings);
46737
- const [error, setError] = (0, import_react243.useState)();
46738
- (0, import_react243.useEffect)(() => {
46852
+ const trackID = (0, import_react_sdk131.useHMSStore)(import_react_sdk131.selectLocalVideoTrackID);
46853
+ const sdkSelectedDevices = (0, import_react_sdk131.useHMSStore)(import_react_sdk131.selectLocalMediaSettings);
46854
+ const [error, setError] = (0, import_react244.useState)();
46855
+ (0, import_react244.useEffect)(() => {
46739
46856
  hmsDiagnostics.startCameraCheck().catch((err) => setError(err));
46740
46857
  }, []);
46741
- return /* @__PURE__ */ import_react243.default.createElement(import_react243.default.Fragment, null, /* @__PURE__ */ import_react243.default.createElement(TestContainer, { css: { display: "flex", "@lg": { flexDirection: "column", alignItems: "center" } } }, trackID && /* @__PURE__ */ import_react243.default.createElement(
46858
+ return /* @__PURE__ */ import_react244.default.createElement(import_react244.default.Fragment, null, /* @__PURE__ */ import_react244.default.createElement(TestContainer, { css: { display: "flex", "@lg": { flexDirection: "column", alignItems: "center" } } }, trackID && /* @__PURE__ */ import_react244.default.createElement(
46742
46859
  StyledVideoTile.Container,
46743
46860
  {
46744
46861
  css: {
@@ -46748,48 +46865,49 @@ var init_VideoTest = __esm({
46748
46865
  "@lg": { mr: 0, mb: "$10" }
46749
46866
  }
46750
46867
  },
46751
- /* @__PURE__ */ import_react243.default.createElement(Video, { mirror: true, trackId: trackID })
46752
- ), /* @__PURE__ */ import_react243.default.createElement(Flex, { direction: "column", css: { w: "100%" } }, /* @__PURE__ */ import_react243.default.createElement(Text, { variant: "body2", css: { c: "$on_primary_medium", mb: "$10" } }, "Move in front of your camera to make sure it's working. If you don't see your video, try changing the selected camera. If the camera isn't part of your computer, check your settings to make sure your system recognizes it."), /* @__PURE__ */ import_react243.default.createElement(
46868
+ /* @__PURE__ */ import_react244.default.createElement(Video, { mirror: true, trackId: trackID })
46869
+ ), /* @__PURE__ */ import_react244.default.createElement(Flex, { direction: "column", css: { w: "100%" } }, /* @__PURE__ */ import_react244.default.createElement(Text, { variant: "body2", css: { c: "$on_primary_medium", mb: "$10" } }, "Move in front of your camera to make sure it's working. If you don't see your video, try changing the selected camera. If the camera isn't part of your computer, check your settings to make sure your system recognizes it."), /* @__PURE__ */ import_react244.default.createElement(
46753
46870
  DeviceSelector2,
46754
46871
  {
46755
46872
  title: "Video",
46756
46873
  devices: videoInput || [],
46757
- icon: /* @__PURE__ */ import_react243.default.createElement(import_react_icons112.VideoOnIcon, null),
46874
+ icon: /* @__PURE__ */ import_react244.default.createElement(import_react_icons112.VideoOnIcon, null),
46758
46875
  selection: sdkSelectedDevices.videoInputDeviceId,
46759
46876
  onChange: (deviceId) => __async(void 0, null, function* () {
46760
46877
  hmsDiagnostics.stopCameraCheck();
46761
46878
  hmsDiagnostics.startCameraCheck(deviceId);
46762
46879
  })
46763
46880
  }
46764
- ))), /* @__PURE__ */ import_react243.default.createElement(TestFooter, { error, ctaText: "Does your video look good?" }));
46881
+ ))), /* @__PURE__ */ import_react244.default.createElement(TestFooter, { error, ctaText: "Does your video look good?" }));
46765
46882
  };
46766
46883
  }
46767
46884
  });
46768
46885
 
46769
46886
  // src/Diagnostics/Diagnostics.tsx
46770
- var import_react244, import_react_sdk131, import_react_icons113, DiagnosticsStepIcon, Container5, DiagnosticsStepTest, DiagnosticsStepHeader, DiagnosticsStep, DiagnosticsStepsList, Diagnostics;
46887
+ var import_react245, import_react_sdk132, import_react_icons113, DiagnosticsStepIcon, Container5, DiagnosticsStepTest, DiagnosticsStepHeader, DiagnosticsStep, DiagnosticsStepsList, Diagnostics;
46771
46888
  var init_Diagnostics = __esm({
46772
46889
  "src/Diagnostics/Diagnostics.tsx"() {
46773
46890
  "use strict";
46774
46891
  init_define_process_env();
46775
- import_react244 = __toESM(require("react"));
46776
- import_react_sdk131 = require("@100mslive/react-sdk");
46892
+ import_react245 = __toESM(require("react"));
46893
+ import_react_sdk132 = require("@100mslive/react-sdk");
46777
46894
  import_react_icons113 = require("@100mslive/react-icons");
46778
46895
  init_components();
46779
46896
  init_Layout();
46780
46897
  init_Text2();
46781
46898
  init_Theme();
46782
46899
  init_AudioTest();
46900
+ init_BrowserTest();
46783
46901
  init_ConnectivityTest();
46784
46902
  init_hms();
46785
46903
  init_VideoTest();
46786
46904
  DiagnosticsStepIcon = {
46787
- video: /* @__PURE__ */ import_react244.default.createElement(import_react_icons113.VideoOnIcon, { width: "2rem", height: "2rem" }),
46788
- audio: /* @__PURE__ */ import_react244.default.createElement(import_react_icons113.MicOnIcon, { width: "2rem", height: "2rem" }),
46789
- browser: /* @__PURE__ */ import_react244.default.createElement(import_react_icons113.GlobeIcon, { width: "2rem", height: "2rem" }),
46790
- connectivity: /* @__PURE__ */ import_react244.default.createElement(import_react_icons113.ConnectivityIcon, { width: "2rem", height: "2rem" })
46905
+ video: /* @__PURE__ */ import_react245.default.createElement(import_react_icons113.VideoOnIcon, { width: "2rem", height: "2rem" }),
46906
+ audio: /* @__PURE__ */ import_react245.default.createElement(import_react_icons113.MicOnIcon, { width: "2rem", height: "2rem" }),
46907
+ browser: /* @__PURE__ */ import_react245.default.createElement(import_react_icons113.GlobeIcon, { width: "2rem", height: "2rem" }),
46908
+ connectivity: /* @__PURE__ */ import_react245.default.createElement(import_react_icons113.ConnectivityIcon, { width: "2rem", height: "2rem" })
46791
46909
  };
46792
- Container5 = ({ children }) => /* @__PURE__ */ import_react244.default.createElement(
46910
+ Container5 = ({ children }) => /* @__PURE__ */ import_react245.default.createElement(
46793
46911
  Box,
46794
46912
  {
46795
46913
  css: {
@@ -46808,31 +46926,46 @@ var init_Diagnostics = __esm({
46808
46926
  children
46809
46927
  );
46810
46928
  DiagnosticsStepTest = () => {
46811
- const { activeStep } = (0, import_react244.useContext)(DiagnosticsContext);
46812
- let TestComponent = () => /* @__PURE__ */ import_react244.default.createElement(import_react244.default.Fragment, null);
46929
+ const { activeStep } = (0, import_react245.useContext)(DiagnosticsContext);
46930
+ let TestComponent = () => /* @__PURE__ */ import_react245.default.createElement(import_react245.default.Fragment, null);
46813
46931
  if (activeStep === "audio") {
46814
46932
  TestComponent = AudioTest;
46815
46933
  } else if (activeStep === "video") {
46816
46934
  TestComponent = VideoTest;
46935
+ } else if (activeStep === "browser") {
46936
+ TestComponent = BrowserTest;
46817
46937
  } else if (activeStep === "connectivity") {
46818
46938
  TestComponent = ConnectivityTest;
46819
46939
  }
46820
- return /* @__PURE__ */ import_react244.default.createElement(TestComponent, { key: activeStep });
46940
+ return /* @__PURE__ */ import_react245.default.createElement(TestComponent, { key: activeStep });
46821
46941
  };
46822
46942
  DiagnosticsStepHeader = () => {
46823
- const { activeStep } = (0, import_react244.useContext)(DiagnosticsContext);
46824
- return /* @__PURE__ */ import_react244.default.createElement(Flex, { css: { py: "$8", px: "$10", alignItems: "center", borderBottom: "1px solid $border_default" } }, /* @__PURE__ */ import_react244.default.createElement(Text, { css: { c: "$primary_bright", mt: "$xs" } }, DiagnosticsStepIcon[activeStep]), /* @__PURE__ */ import_react244.default.createElement(Text, { css: { fontSize: "$h6", ml: "$9" } }, DiagnosticsSteps[activeStep]));
46943
+ const { activeStep } = (0, import_react245.useContext)(DiagnosticsContext);
46944
+ return /* @__PURE__ */ import_react245.default.createElement(Flex, { css: { py: "$8", px: "$10", alignItems: "center", borderBottom: "1px solid $border_default" } }, /* @__PURE__ */ import_react245.default.createElement(Text, { css: { c: "$primary_bright", mt: "$xs" } }, DiagnosticsStepIcon[activeStep]), /* @__PURE__ */ import_react245.default.createElement(Text, { css: { fontSize: "$h6", ml: "$9" } }, DiagnosticsSteps[activeStep]));
46825
46945
  };
46826
46946
  DiagnosticsStep = () => {
46827
- return /* @__PURE__ */ import_react244.default.createElement(Box, { css: { border: "1px solid $border_default", r: "$1", w: "75%", "@lg": { w: "100%" } } }, /* @__PURE__ */ import_react244.default.createElement(DiagnosticsStepHeader, null), /* @__PURE__ */ import_react244.default.createElement(DiagnosticsStepTest, null));
46947
+ return /* @__PURE__ */ import_react245.default.createElement(Box, { css: { border: "1px solid $border_default", r: "$1", w: "75%", "@lg": { w: "100%" } } }, /* @__PURE__ */ import_react245.default.createElement(DiagnosticsStepHeader, null), /* @__PURE__ */ import_react245.default.createElement(Box, { css: { maxHeight: "55vh", overflowY: "auto" } }, /* @__PURE__ */ import_react245.default.createElement(DiagnosticsStepTest, null)));
46828
46948
  };
46829
46949
  DiagnosticsStepsList = () => {
46830
- const { activeStep } = (0, import_react244.useContext)(DiagnosticsContext);
46831
- return /* @__PURE__ */ import_react244.default.createElement(Box, { css: { w: "25%", "@lg": { display: "none" } } }, /* @__PURE__ */ import_react244.default.createElement("ul", null, Object.keys(DiagnosticsSteps).map((key) => /* @__PURE__ */ import_react244.default.createElement("li", { key }, /* @__PURE__ */ import_react244.default.createElement(Text, { variant: "md", css: { mb: "$10", c: activeStep === key ? "$on_primary_high" : "$on_primary_low" } }, DiagnosticsSteps[key])))));
46950
+ const { activeStep } = (0, import_react245.useContext)(DiagnosticsContext);
46951
+ return /* @__PURE__ */ import_react245.default.createElement(Box, { css: { w: "25%", "@lg": { display: "none" } } }, Object.keys(DiagnosticsSteps).map((key) => {
46952
+ const keys = Object.keys(DiagnosticsSteps);
46953
+ const activeStepIndex = keys.indexOf(activeStep);
46954
+ const keyIndex = keys.indexOf(key);
46955
+ const isStepCompleted = activeStepIndex > keyIndex;
46956
+ let color = "$on_primary_low";
46957
+ if (isStepCompleted) {
46958
+ color = "$primary_bright";
46959
+ }
46960
+ if (activeStep === key) {
46961
+ color = "$on_primary_high";
46962
+ }
46963
+ return /* @__PURE__ */ import_react245.default.createElement(Flex, { css: { mb: "$10", c: color, gap: "$4", alignItems: "center" } }, isStepCompleted ? /* @__PURE__ */ import_react245.default.createElement(import_react_icons113.CheckCircleIcon, { width: "1rem", height: "1rem" }) : /* @__PURE__ */ import_react245.default.createElement(Text, { css: { c: color, fontSize: "1.75rem" } }, "\u2022"), /* @__PURE__ */ import_react245.default.createElement(Text, { css: { c: color } }, DiagnosticsSteps[key]));
46964
+ }));
46832
46965
  };
46833
46966
  Diagnostics = () => {
46834
- const [activeStep, setActiveStep] = import_react244.default.useState(Object.keys(DiagnosticsSteps)[0]);
46835
- return /* @__PURE__ */ import_react244.default.createElement(import_react_sdk131.HMSRoomProvider, { store: hmsStore, actions: hmsActions, notifications: hmsNotifications, stats: hmsStats }, /* @__PURE__ */ import_react244.default.createElement(HMSThemeProvider, { themeType: "default" }, /* @__PURE__ */ import_react244.default.createElement(DiagnosticsContext.Provider, { value: { activeStep, setActiveStep } }, /* @__PURE__ */ import_react244.default.createElement(Container5, null, /* @__PURE__ */ import_react244.default.createElement(Text, { variant: "h4" }, "Pre-call Test"), /* @__PURE__ */ import_react244.default.createElement(Text, { variant: "md", css: { c: "$on_primary_medium" } }, "Make sure your devices and network are good to go, let's get started."), /* @__PURE__ */ import_react244.default.createElement(Flex, { css: { direction: "column", mt: "$12", justifyItems: "center" } }, /* @__PURE__ */ import_react244.default.createElement(DiagnosticsStepsList, null), /* @__PURE__ */ import_react244.default.createElement(DiagnosticsStep, null))))));
46967
+ const [activeStep, setActiveStep] = import_react245.default.useState(Object.keys(DiagnosticsSteps)[0]);
46968
+ return /* @__PURE__ */ import_react245.default.createElement(import_react_sdk132.HMSRoomProvider, { store: hmsStore, actions: hmsActions, notifications: hmsNotifications, stats: hmsStats }, /* @__PURE__ */ import_react245.default.createElement(HMSThemeProvider, { themeType: "default" }, /* @__PURE__ */ import_react245.default.createElement(DiagnosticsContext.Provider, { value: { activeStep, setActiveStep } }, /* @__PURE__ */ import_react245.default.createElement(Container5, null, /* @__PURE__ */ import_react245.default.createElement(Text, { variant: "h4" }, "Pre-call Test"), /* @__PURE__ */ import_react245.default.createElement(Text, { variant: "md", css: { c: "$on_primary_medium" } }, "Make sure your devices and network are good to go, let's get started."), /* @__PURE__ */ import_react245.default.createElement(Flex, { css: { direction: "column", mt: "$12", justifyItems: "center" } }, /* @__PURE__ */ import_react245.default.createElement(DiagnosticsStepsList, null), /* @__PURE__ */ import_react245.default.createElement(DiagnosticsStep, null))))));
46836
46969
  };
46837
46970
  }
46838
46971
  });