@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/Diagnostics/BrowserTest.d.ts +76 -0
- package/dist/{HLSView-4UFNO3KZ.css → HLSView-5DK2ZOZY.css} +3 -3
- package/dist/{HLSView-4UFNO3KZ.css.map → HLSView-5DK2ZOZY.css.map} +1 -1
- package/dist/{HLSView-42MLSPUI.js → HLSView-PALIXUNG.js} +2 -2
- package/dist/{chunk-VNHKDQOM.js → chunk-MBMF75ZJ.js} +454 -331
- package/dist/{chunk-VNHKDQOM.js.map → chunk-MBMF75ZJ.js.map} +4 -4
- package/dist/index.cjs.css +2 -2
- package/dist/index.cjs.css.map +1 -1
- package/dist/index.cjs.js +483 -350
- package/dist/index.cjs.js.map +4 -4
- package/dist/index.css +2 -2
- package/dist/index.css.map +1 -1
- package/dist/index.js +1 -1
- package/dist/meta.cjs.json +81 -22
- package/dist/meta.esbuild.json +91 -32
- package/package.json +7 -7
- package/src/Diagnostics/BrowserTest.tsx +134 -0
- package/src/Diagnostics/ConnectivityTest.tsx +4 -3
- package/src/Diagnostics/Diagnostics.tsx +32 -11
- package/src/Diagnostics/components.tsx +1 -1
- package/src/Prebuilt/components/Header/common.jsx +3 -0
- /package/dist/{HLSView-42MLSPUI.js.map → HLSView-PALIXUNG.js.map} +0 -0
@@ -107,7 +107,7 @@ var __async = (__this, __arguments, generator) => {
|
|
107
107
|
var define_process_env_default;
|
108
108
|
var init_define_process_env = __esm({
|
109
109
|
"<define:process.env>"() {
|
110
|
-
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" };
|
110
|
+
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" };
|
111
111
|
}
|
112
112
|
});
|
113
113
|
|
@@ -20327,7 +20327,7 @@ function create(createState) {
|
|
20327
20327
|
var vanilla_default = create;
|
20328
20328
|
|
20329
20329
|
// ../hms-video-store/dist/index.js
|
20330
|
-
var
|
20330
|
+
var Kt = __toESM(require_lib());
|
20331
20331
|
import { EventEmitter2 as Zo } from "eventemitter2";
|
20332
20332
|
import { v4 as an2 } from "uuid";
|
20333
20333
|
import { EventEmitter2 as on2 } from "eventemitter2";
|
@@ -20337,7 +20337,7 @@ import { v4 as un2 } from "uuid";
|
|
20337
20337
|
var Ka = Object.defineProperty;
|
20338
20338
|
var qa = Object.defineProperties;
|
20339
20339
|
var ja = Object.getOwnPropertyDescriptors;
|
20340
|
-
var
|
20340
|
+
var ei = Object.getOwnPropertySymbols;
|
20341
20341
|
var Ja = Object.getPrototypeOf;
|
20342
20342
|
var ts = Object.prototype.hasOwnProperty;
|
20343
20343
|
var is = Object.prototype.propertyIsEnumerable;
|
@@ -20346,18 +20346,18 @@ var es = (a11, e, t2) => e in a11 ? Ka(a11, e, { enumerable: true, configurable:
|
|
20346
20346
|
var m = (a11, e) => {
|
20347
20347
|
for (var t2 in e || (e = {}))
|
20348
20348
|
ts.call(e, t2) && es(a11, t2, e[t2]);
|
20349
|
-
if (
|
20350
|
-
for (var t2 of
|
20349
|
+
if (ei)
|
20350
|
+
for (var t2 of ei(e))
|
20351
20351
|
is.call(e, t2) && es(a11, t2, e[t2]);
|
20352
20352
|
return a11;
|
20353
20353
|
};
|
20354
20354
|
var M2 = (a11, e) => qa(a11, ja(e));
|
20355
|
-
var
|
20355
|
+
var hr = (a11, e) => {
|
20356
20356
|
var t2 = {};
|
20357
20357
|
for (var i2 in a11)
|
20358
20358
|
ts.call(a11, i2) && e.indexOf(i2) < 0 && (t2[i2] = a11[i2]);
|
20359
|
-
if (a11 != null &&
|
20360
|
-
for (var i2 of
|
20359
|
+
if (a11 != null && ei)
|
20360
|
+
for (var i2 of ei(a11))
|
20361
20361
|
e.indexOf(i2) < 0 && is.call(a11, i2) && (t2[i2] = a11[i2]);
|
20362
20362
|
return t2;
|
20363
20363
|
};
|
@@ -20380,14 +20380,14 @@ var c2 = (a11, e, t2) => new Promise((i2, r2) => {
|
|
20380
20380
|
n2((t2 = t2.apply(a11, e)).next());
|
20381
20381
|
});
|
20382
20382
|
var vr = za((Bc, ao) => {
|
20383
|
-
ao.exports = { version: "0.12.14-alpha.
|
20383
|
+
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"] };
|
20384
20384
|
});
|
20385
|
-
var
|
20386
|
-
var
|
20387
|
-
var
|
20385
|
+
var 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 || {});
|
20386
|
+
var 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 });
|
20387
|
+
var ii = () => ({ peerStats: {}, remoteTrackStats: {}, localTrackStats: {}, localPeer: { id: "" } });
|
20388
20388
|
var Ya = ((e) => (e.CHAT = "chat", e))(Ya || {});
|
20389
20389
|
var rs = ((t2) => (t2.INFO = "info", t2.ERROR = "error", t2))(rs || {});
|
20390
|
-
var
|
20390
|
+
var 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 || {});
|
20391
20391
|
var ss = ((t2) => (t2.audio = "audio", t2.video = "video", t2))(ss || {});
|
20392
20392
|
function xe(a11, e) {
|
20393
20393
|
let t2, i2;
|
@@ -20407,7 +20407,7 @@ function ht(a11) {
|
|
20407
20407
|
function Xa(a11) {
|
20408
20408
|
return a11 && a11.source === "screen";
|
20409
20409
|
}
|
20410
|
-
function
|
20410
|
+
function ri(a11) {
|
20411
20411
|
return a11 && a11.source === "audioplaylist";
|
20412
20412
|
}
|
20413
20413
|
function mt(a11) {
|
@@ -20512,14 +20512,14 @@ var to = () => !Ue;
|
|
20512
20512
|
var ec = to();
|
20513
20513
|
var Te = () => ge.getDevice().type === "mobile";
|
20514
20514
|
var us = () => typeof document != "undefined" && document.hidden;
|
20515
|
-
var
|
20515
|
+
var gr = () => {
|
20516
20516
|
var a11;
|
20517
20517
|
return ((a11 = ge.getOS().name) == null ? void 0 : a11.toLowerCase()) === "ios";
|
20518
20518
|
};
|
20519
20519
|
var ds;
|
20520
20520
|
var ls;
|
20521
20521
|
var ps = ((ls = (ds = ge.getBrowser()) == null ? void 0 : ds.name) == null ? void 0 : ls.toLowerCase()) === "firefox";
|
20522
|
-
var
|
20522
|
+
var si = (a11) => a11 ? `{
|
20523
20523
|
trackId: ${a11.id};
|
20524
20524
|
kind: ${a11.kind};
|
20525
20525
|
enabled: ${a11.enabled};
|
@@ -20565,7 +20565,7 @@ var Re = class {
|
|
20565
20565
|
logIdentifier: ${this.logIdentifier};
|
20566
20566
|
source: ${this.source};
|
20567
20567
|
enabled: ${this.enabled};
|
20568
|
-
nativeTrack: ${
|
20568
|
+
nativeTrack: ${si(this.nativeTrack)};
|
20569
20569
|
}`;
|
20570
20570
|
}
|
20571
20571
|
};
|
@@ -20662,7 +20662,7 @@ var f2 = class a2 extends Error {
|
|
20662
20662
|
}`;
|
20663
20663
|
}
|
20664
20664
|
};
|
20665
|
-
function
|
20665
|
+
function Tr(a11) {
|
20666
20666
|
switch (a11) {
|
20667
20667
|
case "join":
|
20668
20668
|
return "JOIN";
|
@@ -20784,7 +20784,7 @@ var S2 = { WebSocketConnectionErrors: { FailedToConnect(a11, e = "") {
|
|
20784
20784
|
}, NoEntryPlaying(a11, e) {
|
20785
20785
|
return new f2(k2.PlaylistErrors.NO_ENTRY_IS_PLAYING, "NoEntryIsPlaying", a11, "No entry is playing at this time", e);
|
20786
20786
|
} } };
|
20787
|
-
var
|
20787
|
+
var fr = class {
|
20788
20788
|
constructor() {
|
20789
20789
|
this.valuesMap = /* @__PURE__ */ new Map();
|
20790
20790
|
}
|
@@ -20811,7 +20811,7 @@ var gr = class {
|
|
20811
20811
|
};
|
20812
20812
|
var ms = () => {
|
20813
20813
|
try {
|
20814
|
-
O2 && !localStorage && (window.localStorage = new
|
20814
|
+
O2 && !localStorage && (window.localStorage = new fr());
|
20815
20815
|
} catch (a11) {
|
20816
20816
|
d2.e("Error initialising localStorage", S2.GenericErrors.LocalStorageAccessDenied());
|
20817
20817
|
}
|
@@ -20851,20 +20851,20 @@ var gs = "[VALIDATIONS]";
|
|
20851
20851
|
function ee(a11) {
|
20852
20852
|
return a11 != null;
|
20853
20853
|
}
|
20854
|
-
var
|
20854
|
+
var gt = () => {
|
20855
20855
|
if (!ee(RTCPeerConnection)) {
|
20856
20856
|
let a11 = S2.GenericErrors.MissingRTCPeerConnection();
|
20857
20857
|
throw d2.e(gs, a11), a11;
|
20858
20858
|
}
|
20859
20859
|
};
|
20860
|
-
var
|
20860
|
+
var Tt = () => {
|
20861
20861
|
if (!ee(navigator.mediaDevices)) {
|
20862
20862
|
let a11 = S2.GenericErrors.MissingMediaDevices();
|
20863
20863
|
throw d2.e(gs, a11), a11;
|
20864
20864
|
}
|
20865
20865
|
};
|
20866
20866
|
var Ts = vr().version;
|
20867
|
-
function
|
20867
|
+
function ft(a11 = "prod", e) {
|
20868
20868
|
let t2 = "web", i2 = Je !== "LOCAL" && a11 === "prod" ? "prod" : "debug";
|
20869
20869
|
if (Ue)
|
20870
20870
|
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 });
|
@@ -20877,7 +20877,7 @@ function Mr(a11) {
|
|
20877
20877
|
var fs = (a11, e = ",") => Object.keys(a11).filter((t2) => ee(a11[t2])).map((t2) => `${t2}:${a11[t2]}`).join(e);
|
20878
20878
|
var H2 = class {
|
20879
20879
|
constructor({ name: e, level: t2, properties: i2, includesPII: r2, timestamp: s2 }) {
|
20880
|
-
this.metadata = { peer: {}, userAgent:
|
20880
|
+
this.metadata = { peer: {}, userAgent: ft() };
|
20881
20881
|
this.name = e, this.level = t2, this.includesPII = r2 || false, this.properties = i2 || {}, this.timestamp = s2 || (/* @__PURE__ */ new Date()).getTime(), this.event_id = oo(), this.device_id = Ss();
|
20882
20882
|
}
|
20883
20883
|
toSignalParams() {
|
@@ -20894,12 +20894,12 @@ var y2 = class {
|
|
20894
20894
|
return new H2({ name: i2, level: r2, properties: s2 });
|
20895
20895
|
}
|
20896
20896
|
static preview(i2) {
|
20897
|
-
var r2 = i2, { error: e } = r2, t2 =
|
20897
|
+
var r2 = i2, { error: e } = r2, t2 = hr(r2, ["error"]);
|
20898
20898
|
let s2 = this.eventNameFor("preview", e === void 0), o2 = e ? 2 : 1, n2 = this.getPropertiesWithError(t2, e);
|
20899
20899
|
return new H2({ name: s2, level: o2, properties: n2 });
|
20900
20900
|
}
|
20901
20901
|
static join(i2) {
|
20902
|
-
var r2 = i2, { error: e } = r2, t2 =
|
20902
|
+
var r2 = i2, { error: e } = r2, t2 = hr(r2, ["error"]);
|
20903
20903
|
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);
|
20904
20904
|
return new H2({ name: s2, level: o2, properties: n2 });
|
20905
20905
|
}
|
@@ -21040,7 +21040,7 @@ var ne = class {
|
|
21040
21040
|
return new H2({ name: l2, level: u2, properties: p2 });
|
21041
21041
|
}
|
21042
21042
|
};
|
21043
|
-
var
|
21043
|
+
var ai = class {
|
21044
21044
|
constructor(e) {
|
21045
21045
|
this.eventBus = e;
|
21046
21046
|
this.TAG = "[AudioPluginsAnalytics]";
|
@@ -21086,12 +21086,12 @@ var ri = class {
|
|
21086
21086
|
};
|
21087
21087
|
var no = 48e3;
|
21088
21088
|
var co = () => navigator.userAgent.indexOf("Firefox") !== -1;
|
21089
|
-
var
|
21089
|
+
var vt = class {
|
21090
21090
|
constructor(e, t2, i2) {
|
21091
21091
|
this.eventBus = t2;
|
21092
21092
|
this.TAG = "[AudioPluginsManager]";
|
21093
21093
|
this.pluginAddInProgress = false;
|
21094
|
-
this.hmsTrack = e, this.pluginsMap = /* @__PURE__ */ new Map(), this.analytics = new
|
21094
|
+
this.hmsTrack = e, this.pluginsMap = /* @__PURE__ */ new Map(), this.analytics = new ai(t2), this.createAudioContext(), this.room = i2;
|
21095
21095
|
}
|
21096
21096
|
getPlugins() {
|
21097
21097
|
return Array.from(this.pluginsMap.keys());
|
@@ -21380,7 +21380,7 @@ function Ps() {
|
|
21380
21380
|
};
|
21381
21381
|
})) };
|
21382
21382
|
}
|
21383
|
-
function
|
21383
|
+
function oi(a11, e = 300) {
|
21384
21384
|
let t2;
|
21385
21385
|
return function(...i2) {
|
21386
21386
|
clearTimeout(t2), t2 = void 0;
|
@@ -21392,7 +21392,7 @@ function si(a11, e = 300) {
|
|
21392
21392
|
}
|
21393
21393
|
var ho = 35;
|
21394
21394
|
var mo = 5;
|
21395
|
-
var
|
21395
|
+
var ni = class {
|
21396
21396
|
constructor(e, t2, i2) {
|
21397
21397
|
this.track = e;
|
21398
21398
|
this.audioLevelEvent = t2;
|
@@ -21495,6 +21495,7 @@ var te = class {
|
|
21495
21495
|
this._codec = "opus";
|
21496
21496
|
this._maxBitrate = 32;
|
21497
21497
|
this._deviceId = "default";
|
21498
|
+
this._audioMode = "voice";
|
21498
21499
|
this._advanced = [{ googEchoCancellation: { exact: true } }, { googExperimentalEchoCancellation: { exact: true } }, { autoGainControl: { exact: true } }, { noiseSuppression: { exact: true } }, { googHighpassFilter: { exact: true } }, { googAudioMirroring: { exact: true } }];
|
21499
21500
|
}
|
21500
21501
|
volume(e) {
|
@@ -21508,24 +21509,27 @@ var te = class {
|
|
21508
21509
|
maxBitrate(e) {
|
21509
21510
|
if (e && e <= 0)
|
21510
21511
|
throw Error("maxBitrate should be >= 1");
|
21511
|
-
return this._maxBitrate = e, this;
|
21512
|
+
return this._maxBitrate = this._audioMode === "music" ? 320 : e, this;
|
21512
21513
|
}
|
21513
21514
|
deviceId(e) {
|
21514
21515
|
return this._deviceId = e, this;
|
21515
21516
|
}
|
21517
|
+
audioMode(e = "voice") {
|
21518
|
+
return this._audioMode = e, this._audioMode === "music" && (this._maxBitrate = 320), this;
|
21519
|
+
}
|
21516
21520
|
advanced(e) {
|
21517
21521
|
return this._advanced = e, this;
|
21518
21522
|
}
|
21519
21523
|
build() {
|
21520
|
-
return new Ve(this._volume, this._codec, this._maxBitrate, this._deviceId, this._advanced);
|
21524
|
+
return new Ve(this._volume, this._codec, this._maxBitrate, this._deviceId, this._advanced, this._audioMode);
|
21521
21525
|
}
|
21522
21526
|
};
|
21523
21527
|
var Ve = class {
|
21524
|
-
constructor(e, t2, i2, r2, s2) {
|
21525
|
-
this.volume = e, this.codec = t2, this.maxBitrate = i2, this.deviceId = r2, this.advanced = s2;
|
21528
|
+
constructor(e, t2, i2, r2, s2, o2) {
|
21529
|
+
this.volume = e, this.codec = t2, this.maxBitrate = i2, this.deviceId = r2, this.advanced = s2, this.audioMode = o2, this.audioMode === "music" && (this.maxBitrate = 320);
|
21526
21530
|
}
|
21527
21531
|
toConstraints() {
|
21528
|
-
return { deviceId: this.deviceId, advanced: this.advanced };
|
21532
|
+
return { deviceId: this.deviceId, advanced: this.audioMode === "music" ? [] : this.advanced };
|
21529
21533
|
}
|
21530
21534
|
toAnalyticsProperties() {
|
21531
21535
|
return { audio_bitrate: this.maxBitrate, audio_codec: this.codec };
|
@@ -21648,7 +21652,7 @@ var ce = class a3 extends Ie {
|
|
21648
21652
|
});
|
21649
21653
|
this.handleSettingsChange = (t3) => c2(this, null, function* () {
|
21650
21654
|
let i3 = this.stream, r3 = Ls(t3, this.settings);
|
21651
|
-
r3("maxBitrate") && t3.maxBitrate && (yield i3.setMaxBitrateAndFramerate(this)), r3("advanced") && (yield this.replaceTrackWith(t3));
|
21655
|
+
(r3("maxBitrate") || r3("audioMode")) && t3.maxBitrate && (yield i3.setMaxBitrateAndFramerate(this, t3)), (r3("advanced") || r3("audioMode")) && (yield this.replaceTrackWith(t3));
|
21652
21656
|
});
|
21653
21657
|
this.handleDeviceChange = (t3, i3 = false) => c2(this, null, function* () {
|
21654
21658
|
if (Ls(t3, this.settings)("deviceId")) {
|
@@ -21657,7 +21661,7 @@ var ce = class a3 extends Ie {
|
|
21657
21661
|
!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 } }));
|
21658
21662
|
}
|
21659
21663
|
});
|
21660
|
-
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
|
21664
|
+
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);
|
21661
21665
|
}
|
21662
21666
|
getManuallySelectedDeviceId() {
|
21663
21667
|
return this.manuallySelectedDeviceId;
|
@@ -21723,7 +21727,7 @@ var ce = class a3 extends Ie {
|
|
21723
21727
|
});
|
21724
21728
|
}
|
21725
21729
|
initAudioLevelMonitor() {
|
21726
|
-
this.audioLevelMonitor && this.destroyAudioLevelMonitor(), d2.d(this.TAG, "Monitor Audio Level for", this, this.getMediaTrackSettings().deviceId), this.audioLevelMonitor = new
|
21730
|
+
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();
|
21727
21731
|
}
|
21728
21732
|
destroyAudioLevelMonitor() {
|
21729
21733
|
var t2;
|
@@ -21732,7 +21736,7 @@ var ce = class a3 extends Ie {
|
|
21732
21736
|
cleanup() {
|
21733
21737
|
return c2(this, null, function* () {
|
21734
21738
|
var t2;
|
21735
|
-
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(),
|
21739
|
+
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);
|
21736
21740
|
});
|
21737
21741
|
}
|
21738
21742
|
getTrackIDBeingSent() {
|
@@ -21742,8 +21746,8 @@ var ce = class a3 extends Ie {
|
|
21742
21746
|
return this.processedTrack || this.nativeTrack;
|
21743
21747
|
}
|
21744
21748
|
buildNewSettings(t2) {
|
21745
|
-
let { volume: i2, codec: r2, maxBitrate: s2, deviceId: o2, advanced: n2 } = m(m({}, this.settings), t2);
|
21746
|
-
return new Ve(i2, r2, s2, o2, n2);
|
21749
|
+
let { volume: i2, codec: r2, maxBitrate: s2, deviceId: o2, advanced: n2, audioMode: l2 } = m(m({}, this.settings), t2);
|
21750
|
+
return new Ve(i2, r2, s2, o2, n2, l2);
|
21747
21751
|
}
|
21748
21752
|
};
|
21749
21753
|
var ae = class a4 extends Ie {
|
@@ -21811,10 +21815,10 @@ var Ye = class extends Re {
|
|
21811
21815
|
this.sinkCount > 0 && this.sinkCount--;
|
21812
21816
|
}
|
21813
21817
|
};
|
21814
|
-
var
|
21818
|
+
var Mt = { none: -1, low: 0, medium: 1, high: 2 };
|
21815
21819
|
var go = 0.5;
|
21816
21820
|
var Ds = (a11, e) => {
|
21817
|
-
let t2 = "high", i2 = e.width > e.height ? "width" : "height", r2 = [...a11].sort((o2, n2) =>
|
21821
|
+
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);
|
21818
21822
|
for (let o2 = 0; o2 < r2.length; o2++) {
|
21819
21823
|
let { resolution: n2, layer: l2 } = r2[o2], u2 = n2[i2];
|
21820
21824
|
if (s2 <= u2) {
|
@@ -21871,7 +21875,7 @@ var Rr = class {
|
|
21871
21875
|
(t2 = this.resizeObserver) == null || t2.unobserve(e), this.listeners.delete(e);
|
21872
21876
|
};
|
21873
21877
|
this.createObserver = () => {
|
21874
|
-
this.isSupported() && !this.resizeObserver && (this.resizeObserver = new ResizeObserver(
|
21878
|
+
this.isSupported() && !this.resizeObserver && (this.resizeObserver = new ResizeObserver(oi(this.handleResize, 300)));
|
21875
21879
|
};
|
21876
21880
|
this.handleResize = (e) => {
|
21877
21881
|
var t2;
|
@@ -21950,7 +21954,7 @@ var Xe = class {
|
|
21950
21954
|
if (r2 === 0 || s2 === 0)
|
21951
21955
|
continue;
|
21952
21956
|
let o2 = Ds(this.track.getSimulcastDefinitions(), { width: r2, height: s2 });
|
21953
|
-
e ? e =
|
21957
|
+
e ? e = Mt[o2] > Mt[e] ? o2 : e : e = o2;
|
21954
21958
|
}
|
21955
21959
|
e && (d2.d(this.TAG, `selecting max layer ${e} for the track`, `${this.track}`), yield this.track.setPreferredLayer(e));
|
21956
21960
|
});
|
@@ -21958,7 +21962,7 @@ var Xe = class {
|
|
21958
21962
|
};
|
21959
21963
|
var Ir = ((t2) => (t2.TRANSFORM = "TRANSFORM", t2.ANALYZE = "ANALYZE", t2))(Ir || {});
|
21960
21964
|
var Ar = ((t2) => (t2["2D"] = "2d", t2.WEBGL = "webgl", t2.WEBGL2 = "webgl2", t2))(Ar || {});
|
21961
|
-
var
|
21965
|
+
var yt = class {
|
21962
21966
|
constructor() {
|
21963
21967
|
this.total = 0;
|
21964
21968
|
this.count = 0;
|
@@ -21977,10 +21981,10 @@ var Ze = class {
|
|
21977
21981
|
constructor(e) {
|
21978
21982
|
this.eventBus = e;
|
21979
21983
|
this.TAG = "[VideoPluginsAnalytics]";
|
21980
|
-
this.initTime = {}, this.preProcessingAvgs = new
|
21984
|
+
this.initTime = {}, this.preProcessingAvgs = new yt(), this.addedTimestamps = {}, this.processingAvgs = {}, this.pluginAdded = {}, this.pluginInputFrameRate = {}, this.pluginFrameRate = {};
|
21981
21985
|
}
|
21982
21986
|
added(e, t2, i2) {
|
21983
|
-
this.pluginAdded[e] = true, this.addedTimestamps[e] = Date.now(), this.initTime[e] = 0, this.processingAvgs[e] = new
|
21987
|
+
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]));
|
21984
21988
|
}
|
21985
21989
|
removed(e) {
|
21986
21990
|
var t2;
|
@@ -22040,7 +22044,7 @@ var Ze = class {
|
|
22040
22044
|
var Ns = 24;
|
22041
22045
|
var fo = 320;
|
22042
22046
|
var vo = 240;
|
22043
|
-
var
|
22047
|
+
var kt = class {
|
22044
22048
|
constructor(e, t2) {
|
22045
22049
|
this.TAG = "[VideoPluginsManager]";
|
22046
22050
|
this.pluginsLoopRunning = false;
|
@@ -22263,7 +22267,7 @@ var Mt = class {
|
|
22263
22267
|
return this.pluginNumFramesSkipped[e] < this.pluginNumFramesToSkip[e] ? (this.pluginNumFramesSkipped[e]++, t2 = true) : (t2 = false, this.pluginNumFramesSkipped[e] = 0), t2;
|
22264
22268
|
}
|
22265
22269
|
};
|
22266
|
-
var
|
22270
|
+
var ci = class {
|
22267
22271
|
constructor(e, t2) {
|
22268
22272
|
this.TAG = "[MediaStreamPluginsManager]";
|
22269
22273
|
this.plugins = /* @__PURE__ */ new Set(), this.analytics = new Ze(e), this.room = t2;
|
@@ -22308,7 +22312,7 @@ var oi = class {
|
|
22308
22312
|
}
|
22309
22313
|
};
|
22310
22314
|
var 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"];
|
22311
|
-
var
|
22315
|
+
var di = class {
|
22312
22316
|
constructor() {
|
22313
22317
|
this.eventPerformanceMeasures = {};
|
22314
22318
|
}
|
@@ -22336,7 +22340,7 @@ var ni = class {
|
|
22336
22340
|
};
|
22337
22341
|
var Hr = { isAudioMuted: false, isVideoMuted: false, audioInputDeviceId: "default", audioOutputDeviceId: "default", videoDeviceId: "default" };
|
22338
22342
|
var pe;
|
22339
|
-
var
|
22343
|
+
var li;
|
22340
22344
|
var ve = class a5 {
|
22341
22345
|
constructor(e, t2, i2, r2, s2) {
|
22342
22346
|
this.store = e;
|
@@ -22455,7 +22459,7 @@ var ve = class a5 {
|
|
22455
22459
|
static getEmptyVideoTrack(e) {
|
22456
22460
|
var n2, l2, u2;
|
22457
22461
|
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;
|
22458
|
-
pe || (pe = document.createElement("canvas"), pe.width = t2, pe.height = i2, (u2 = pe.getContext("2d")) == null || u2.fillRect(0, 0, t2, i2)),
|
22462
|
+
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(() => {
|
22459
22463
|
let p2 = pe == null ? void 0 : pe.getContext("2d");
|
22460
22464
|
p2 && p2.fillRect(0, 0, 1, 1);
|
22461
22465
|
}, 1e3 / r2));
|
@@ -22469,7 +22473,7 @@ var ve = class a5 {
|
|
22469
22473
|
return r2.enabled = false, r2;
|
22470
22474
|
}
|
22471
22475
|
static cleanup() {
|
22472
|
-
clearInterval(
|
22476
|
+
clearInterval(li), li = void 0, pe = void 0;
|
22473
22477
|
}
|
22474
22478
|
getAVTracks(e) {
|
22475
22479
|
return c2(this, null, function* () {
|
@@ -22635,7 +22639,7 @@ var F = class a6 extends Ye {
|
|
22635
22639
|
this.handleVisibilityChange = () => c2(this, null, function* () {
|
22636
22640
|
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 });
|
22637
22641
|
});
|
22638
|
-
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
|
22642
|
+
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);
|
22639
22643
|
}
|
22640
22644
|
setSimulcastDefinitons(t2) {
|
22641
22645
|
this._layerDefinitions = t2;
|
@@ -22791,11 +22795,11 @@ var F = class a6 extends Ye {
|
|
22791
22795
|
}
|
22792
22796
|
};
|
22793
22797
|
var et = "renegotiation-callback-id";
|
22794
|
-
var
|
22798
|
+
var ui = "ion-sfu";
|
22795
22799
|
var tt = "SUBSCRIBE_ICE_CONNECTION_CALLBACK_ID";
|
22796
22800
|
var xs = "https://event.100ms.live/v2/client/report";
|
22797
22801
|
var Us = "https://event-nonprod.100ms.live/v2/client/report";
|
22798
|
-
var
|
22802
|
+
var Pt = Math.pow(2, 31) - 1;
|
22799
22803
|
var 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" };
|
22800
22804
|
var Bs = "2.5";
|
22801
22805
|
var Vs = "20240521";
|
@@ -22945,10 +22949,10 @@ var Ge = class extends je {
|
|
22945
22949
|
let r2 = this.connection.addTransceiver(t2.getTrackBeingSent(), { streams: [this.nativeStream], direction: "sendonly", sendEncodings: this.getTrackEncodings(t2, i2) });
|
22946
22950
|
return this.setPreferredCodec(r2, t2.nativeTrack.kind), t2.transceiver = r2, r2;
|
22947
22951
|
}
|
22948
|
-
setMaxBitrateAndFramerate(t2) {
|
22952
|
+
setMaxBitrateAndFramerate(t2, i2) {
|
22949
22953
|
return c2(this, null, function* () {
|
22950
|
-
var
|
22951
|
-
yield (
|
22954
|
+
var r2;
|
22955
|
+
yield (r2 = this.connection) == null ? void 0 : r2.setMaxBitrateAndFramerate(t2, i2);
|
22952
22956
|
});
|
22953
22957
|
}
|
22954
22958
|
setPreferredCodec(t2, i2) {
|
@@ -23046,7 +23050,7 @@ var Ws = (a11, e, t2, i2) => c2(void 0, null, function* () {
|
|
23046
23050
|
let h2 = (P7 = l2[p2]) == null ? void 0 : P7.codecId, T = h2 ? n2[h2] : void 0, g2;
|
23047
23051
|
T && (g2 = T.substring(T.indexOf("/") + 1));
|
23048
23052
|
let v2 = M2(m({}, l2[p2]), { rid: (w2 = l2[p2]) == null ? void 0 : w2.rid }), E2 = u2[v2.ssrc];
|
23049
|
-
s2[p2] = M2(m({}, v2), { bitrate:
|
23053
|
+
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 });
|
23050
23054
|
});
|
23051
23055
|
} catch (n2) {
|
23052
23056
|
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);
|
@@ -23062,7 +23066,7 @@ var $s = (a11, e, t2, i2) => c2(void 0, null, function* () {
|
|
23062
23066
|
} catch (u2) {
|
23063
23067
|
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);
|
23064
23068
|
}
|
23065
|
-
let s2 = Po(r2), o2 =
|
23069
|
+
let s2 = Po(r2), o2 = Et("bytesReceived", s2, i2), n2 = _r("packetsLost", s2, i2);
|
23066
23070
|
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 });
|
23067
23071
|
});
|
23068
23072
|
var Po = (a11) => {
|
@@ -23089,7 +23093,7 @@ var Po = (a11) => {
|
|
23089
23093
|
return r2 && (s2 = r2.substring(r2.indexOf("/") + 1)), e && Object.assign(e, { remote: t2, codec: s2 });
|
23090
23094
|
};
|
23091
23095
|
var Nr = (a11, e, t2) => {
|
23092
|
-
let i2 = Eo(e), r2 =
|
23096
|
+
let i2 = Eo(e), r2 = Et(a11 === "publish" ? "bytesSent" : "bytesReceived", i2, t2 && t2[a11]);
|
23093
23097
|
return i2 && Object.assign(i2, { bitrate: r2 });
|
23094
23098
|
};
|
23095
23099
|
var Eo = (a11) => {
|
@@ -23107,13 +23111,13 @@ var Ks = (a11) => {
|
|
23107
23111
|
}), e;
|
23108
23112
|
};
|
23109
23113
|
var qs = (a11, e) => Array.from(new Set(a11.concat(e)));
|
23110
|
-
var
|
23114
|
+
var Et = (a11, e, t2) => _r(a11, e, t2) * 8;
|
23111
23115
|
var _r = (a11, e, t2) => {
|
23112
23116
|
let i2 = e && e[a11], r2 = t2 ? t2[a11] : null;
|
23113
23117
|
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;
|
23114
23118
|
};
|
23115
23119
|
var Or = (a11, e, t2, i2) => ee(a11) && ee(e) && t2 && i2 ? (a11 - e) / (t2 - i2) : 0;
|
23116
|
-
var
|
23120
|
+
var pi = class {
|
23117
23121
|
constructor(e, t2, i2) {
|
23118
23122
|
this.getStats = e;
|
23119
23123
|
this.store = t2;
|
@@ -23173,7 +23177,7 @@ var li = class {
|
|
23173
23177
|
this.localPeerID = (r2 = this.store.getLocalPeer()) == null ? void 0 : r2.peerId;
|
23174
23178
|
}
|
23175
23179
|
};
|
23176
|
-
var
|
23180
|
+
var hi = class {
|
23177
23181
|
constructor(e, t2, i2, r2) {
|
23178
23182
|
this.store = e;
|
23179
23183
|
this.eventBus = t2;
|
@@ -23203,7 +23207,7 @@ var ui = class {
|
|
23203
23207
|
}
|
23204
23208
|
setPeerConnections({ publish: e, subscribe: t2 }) {
|
23205
23209
|
var i2, r2;
|
23206
|
-
this.publishConnection = e, this.subscribeConnection = t2, this.hmsStats = new
|
23210
|
+
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);
|
23207
23211
|
}
|
23208
23212
|
start() {
|
23209
23213
|
return c2(this, null, function* () {
|
@@ -23294,7 +23298,7 @@ var We = class extends it {
|
|
23294
23298
|
}`;
|
23295
23299
|
}
|
23296
23300
|
};
|
23297
|
-
var
|
23301
|
+
var bt = class extends it {
|
23298
23302
|
constructor(t2) {
|
23299
23303
|
super(M2(m({}, t2), { isLocal: false }));
|
23300
23304
|
this.isLocal = false;
|
@@ -23303,8 +23307,8 @@ var Pt = class extends it {
|
|
23303
23307
|
this.fromRoomState = !!t2.fromRoomState;
|
23304
23308
|
}
|
23305
23309
|
};
|
23306
|
-
var he = (a11, e) => new
|
23307
|
-
var
|
23310
|
+
var 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 });
|
23311
|
+
var mi = class {
|
23308
23312
|
constructor(e, t2, i2) {
|
23309
23313
|
this.transport = e;
|
23310
23314
|
this.store = t2;
|
@@ -23384,7 +23388,7 @@ var De = class extends Ro {
|
|
23384
23388
|
return super.listeners(e);
|
23385
23389
|
}
|
23386
23390
|
};
|
23387
|
-
var
|
23391
|
+
var Si = class extends De {
|
23388
23392
|
constructor() {
|
23389
23393
|
super(...arguments);
|
23390
23394
|
this.audioElement = null;
|
@@ -23436,7 +23440,7 @@ var hi = class extends De {
|
|
23436
23440
|
}), this.audioContextManager = new st(t2), t2;
|
23437
23441
|
}
|
23438
23442
|
};
|
23439
|
-
var
|
23443
|
+
var gi = class extends De {
|
23440
23444
|
constructor() {
|
23441
23445
|
super(...arguments);
|
23442
23446
|
this.TAG = "[PlaylistVideoManager]";
|
@@ -23510,13 +23514,13 @@ var mi = class extends De {
|
|
23510
23514
|
this.canvas || (this.canvas = document.createElement("canvas"), this.canvasContext = this.canvas.getContext("2d"));
|
23511
23515
|
}
|
23512
23516
|
};
|
23513
|
-
var
|
23514
|
-
var
|
23517
|
+
var Ti = { audio: { list: [], currentIndex: -1, isAutoplayOn: true }, video: { list: [], currentIndex: -1, isAutoplayOn: true } };
|
23518
|
+
var Rt = class extends De {
|
23515
23519
|
constructor(t2, i2) {
|
23516
23520
|
super();
|
23517
23521
|
this.sdk = t2;
|
23518
23522
|
this.eventBus = i2;
|
23519
|
-
this.state = { audio: m({},
|
23523
|
+
this.state = { audio: m({}, Ti.audio), video: m({}, Ti.video) };
|
23520
23524
|
this.TAG = "[PlaylistManager]";
|
23521
23525
|
this.handlePausePlaylist = (r2) => c2(this, [r2], function* ({ enabled: t3, track: i3 }) {
|
23522
23526
|
var o2;
|
@@ -23526,12 +23530,12 @@ var Et = class extends De {
|
|
23526
23530
|
i3.source === "audioplaylist" && (s2 = "audio"), i3.source === "videoplaylist" && (s2 = "video"), s2 && ((o2 = this.getElement(s2)) == null || o2.pause());
|
23527
23531
|
});
|
23528
23532
|
this.addTrack = (t3, i3) => c2(this, null, function* () {
|
23529
|
-
yield this.sdk.addTrack(t3, i3), d2.d(this.TAG, "Playlist track added",
|
23533
|
+
yield this.sdk.addTrack(t3, i3), d2.d(this.TAG, "Playlist track added", si(t3));
|
23530
23534
|
});
|
23531
23535
|
this.removeTrack = (t3) => c2(this, null, function* () {
|
23532
23536
|
yield this.sdk.removeTrack(t3, true), d2.d(this.TAG, "Playlist track removed", t3);
|
23533
23537
|
});
|
23534
|
-
this.audioManager = new
|
23538
|
+
this.audioManager = new Si(), this.videoManager = new gi(), this.addListeners();
|
23535
23539
|
}
|
23536
23540
|
getList(t2 = "audio") {
|
23537
23541
|
return this.state[t2].list;
|
@@ -23654,7 +23658,7 @@ var Et = class extends De {
|
|
23654
23658
|
});
|
23655
23659
|
}
|
23656
23660
|
cleanup() {
|
23657
|
-
this.state = { audio: m({},
|
23661
|
+
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();
|
23658
23662
|
}
|
23659
23663
|
onProgress(t2) {
|
23660
23664
|
this.videoManager.on("progress", () => {
|
@@ -23736,7 +23740,7 @@ var Io = (a11) => a11.errors;
|
|
23736
23740
|
var Gh = createSelector(Io, (a11) => a11.length === 0 ? null : a11.at(-1));
|
23737
23741
|
var Wh = createSelector(B2, (a11) => a11.id);
|
23738
23742
|
var q2 = (a11) => a11.peers;
|
23739
|
-
var
|
23743
|
+
var fi = (a11) => a11.messages.byID;
|
23740
23744
|
var js = (a11) => a11.messages.allIDs;
|
23741
23745
|
var N2 = (a11) => a11.tracks;
|
23742
23746
|
var Js = (a11) => a11.settings;
|
@@ -23820,20 +23824,20 @@ var tm = createSelector(q2, N2, (a11, e) => {
|
|
23820
23824
|
var im = createSelector(q2, N2, (a11, e) => {
|
23821
23825
|
for (let t2 in e) {
|
23822
23826
|
let i2 = e[t2];
|
23823
|
-
if (
|
23827
|
+
if (ri(i2) && i2.peerId)
|
23824
23828
|
return a11[i2.peerId];
|
23825
23829
|
}
|
23826
23830
|
});
|
23827
23831
|
var rm = createSelector(Co, (a11) => a11.filter(as));
|
23828
23832
|
var sm = createSelector(js, (a11) => a11.length);
|
23829
|
-
var am = createSelector(
|
23830
|
-
var
|
23833
|
+
var am = createSelector(fi, (a11) => Object.values(a11).filter((e) => !e.read).length);
|
23834
|
+
var It = createSelector(js, fi, (a11, e) => {
|
23831
23835
|
let t2 = [];
|
23832
23836
|
return a11.forEach((i2) => {
|
23833
23837
|
t2.push(e[i2]);
|
23834
23838
|
}), t2;
|
23835
23839
|
});
|
23836
|
-
var wo = createSelector(
|
23840
|
+
var wo = createSelector(It, (a11) => a11.filter((e) => {
|
23837
23841
|
var t2;
|
23838
23842
|
return !e.recipientPeer && !(e.recipientRoles && ((t2 = e.recipientRoles) == null ? void 0 : t2.length) > 0);
|
23839
23843
|
}));
|
@@ -23884,7 +23888,7 @@ var la = { selection: Vr("video"), progress: ra("video"), currentTime: sa("video
|
|
23884
23888
|
function A2(a11) {
|
23885
23889
|
return (e) => (t2) => a11(t2, e);
|
23886
23890
|
}
|
23887
|
-
var
|
23891
|
+
var At = "HMS-Store:";
|
23888
23892
|
var b2 = class {
|
23889
23893
|
static v(e, ...t2) {
|
23890
23894
|
this.log(0, e, ...t2);
|
@@ -23914,23 +23918,23 @@ var b2 = class {
|
|
23914
23918
|
if (!(this.level.valueOf() > e.valueOf()))
|
23915
23919
|
switch (e) {
|
23916
23920
|
case 0: {
|
23917
|
-
console.log(
|
23921
|
+
console.log(At, ...t2);
|
23918
23922
|
break;
|
23919
23923
|
}
|
23920
23924
|
case 1: {
|
23921
|
-
console.debug(
|
23925
|
+
console.debug(At, ...t2);
|
23922
23926
|
break;
|
23923
23927
|
}
|
23924
23928
|
case 2: {
|
23925
|
-
console.info(
|
23929
|
+
console.info(At, ...t2);
|
23926
23930
|
break;
|
23927
23931
|
}
|
23928
23932
|
case 3: {
|
23929
|
-
console.warn(
|
23933
|
+
console.warn(At, ...t2);
|
23930
23934
|
break;
|
23931
23935
|
}
|
23932
23936
|
case 6: {
|
23933
|
-
console.error(
|
23937
|
+
console.error(At, ...t2);
|
23934
23938
|
break;
|
23935
23939
|
}
|
23936
23940
|
case 4: {
|
@@ -23952,31 +23956,31 @@ var b2 = class {
|
|
23952
23956
|
};
|
23953
23957
|
b2.level = 0;
|
23954
23958
|
var Fr = (a11, e) => e;
|
23955
|
-
var
|
23959
|
+
var Ht = (a11, e) => e;
|
23956
23960
|
var ua = (a11, e) => e;
|
23957
23961
|
var Oo = (a11, e) => e;
|
23958
23962
|
var xo = (a11, e) => e;
|
23959
23963
|
var j2 = createSelector([q2, Fr], (a11, e) => e ? a11[e] : null);
|
23960
|
-
var Gr = createSelector([N2,
|
23961
|
-
var Uo = createSelector([N2,
|
23964
|
+
var Gr = createSelector([N2, Ht], (a11, e) => e ? a11[e] : null);
|
23965
|
+
var Uo = createSelector([N2, Ht], (a11, e) => {
|
23962
23966
|
if (!e)
|
23963
23967
|
return null;
|
23964
23968
|
let t2 = a11[e];
|
23965
23969
|
return (t2 == null ? void 0 : t2.type) === "video" ? t2 : null;
|
23966
23970
|
});
|
23967
|
-
var Bo = createSelector([N2,
|
23971
|
+
var Bo = createSelector([N2, Ht], (a11, e) => {
|
23968
23972
|
if (!e)
|
23969
23973
|
return null;
|
23970
23974
|
let t2 = a11[e];
|
23971
23975
|
return (t2 == null ? void 0 : t2.type) === "audio" ? t2 : null;
|
23972
23976
|
});
|
23973
|
-
var Vo = createSelector([N2,
|
23977
|
+
var Vo = createSelector([N2, Ht], (a11, e) => {
|
23974
23978
|
if (!e)
|
23975
23979
|
return null;
|
23976
23980
|
let t2 = a11[e];
|
23977
23981
|
return (t2 == null ? void 0 : t2.type) === "audio" && (t2 == null ? void 0 : t2.source) === "screen" ? t2 : null;
|
23978
23982
|
});
|
23979
|
-
var Fo = createSelector([N2,
|
23983
|
+
var Fo = createSelector([N2, Ht], (a11, e) => {
|
23980
23984
|
if (!e)
|
23981
23985
|
return null;
|
23982
23986
|
let t2 = a11[e];
|
@@ -23996,7 +24000,7 @@ function Om(a11) {
|
|
23996
24000
|
}
|
23997
24001
|
var Um = A2(createSelector(j2, (a11) => a11 == null ? void 0 : a11.name));
|
23998
24002
|
var Bm = A2(createSelector(j2, (a11) => a11 == null ? void 0 : a11.type));
|
23999
|
-
var
|
24003
|
+
var vi = A2(Gr);
|
24000
24004
|
var pa = A2(Uo);
|
24001
24005
|
var Vm = A2(Bo);
|
24002
24006
|
var Fm = A2(Vo);
|
@@ -24050,7 +24054,7 @@ var zm = A2(createSelector(N2, j2, (a11, e) => {
|
|
24050
24054
|
var Ym = A2(createSelector(N2, j2, (a11, e) => {
|
24051
24055
|
let t2 = e == null ? void 0 : e.auxiliaryTracks.find((i2) => {
|
24052
24056
|
let r2 = a11[i2];
|
24053
|
-
return
|
24057
|
+
return ri(r2) && pt(r2);
|
24054
24058
|
});
|
24055
24059
|
return t2 ? a11[t2] : void 0;
|
24056
24060
|
}));
|
@@ -24104,21 +24108,21 @@ var aS = A2((a11, e) => {
|
|
24104
24108
|
return t2.layer;
|
24105
24109
|
}
|
24106
24110
|
});
|
24107
|
-
var fa = createSelector([
|
24111
|
+
var fa = createSelector([It, ye, Fr], (a11, e, t2) => {
|
24108
24112
|
if (t2)
|
24109
24113
|
return a11.filter((i2) => {
|
24110
24114
|
var r2;
|
24111
24115
|
return !i2.recipientPeer && !((r2 = i2.recipientRoles) != null && r2.length) || i2.sender && ![e, t2].includes(i2.sender) ? false : [e, t2].includes(i2.recipientPeer);
|
24112
24116
|
});
|
24113
24117
|
});
|
24114
|
-
var va = createSelector([
|
24118
|
+
var va = createSelector([It, ua], (a11, e) => {
|
24115
24119
|
if (e)
|
24116
24120
|
return a11.filter((t2) => {
|
24117
24121
|
var i2, r2;
|
24118
24122
|
return (i2 = t2.recipientRoles) != null && i2.length ? (r2 = t2.recipientRoles) == null ? void 0 : r2.includes(e) : false;
|
24119
24123
|
});
|
24120
24124
|
});
|
24121
|
-
var qo = createSelector(
|
24125
|
+
var qo = createSelector(It, (a11) => a11.filter((e) => {
|
24122
24126
|
var t2;
|
24123
24127
|
return !e.recipientPeer && !((t2 = e.recipientRoles) != null && t2.length);
|
24124
24128
|
}));
|
@@ -24146,12 +24150,12 @@ var Xo = createSelector([oe, N2], (a11, e) => {
|
|
24146
24150
|
let t2 = null;
|
24147
24151
|
return a11 && (t2 = e[a11]), (t2 == null ? void 0 : t2.plugins) || [];
|
24148
24152
|
});
|
24149
|
-
var
|
24150
|
-
var
|
24151
|
-
var
|
24153
|
+
var yi = { 0: "PEER_JOINED", 1: "PEER_LEFT", 8: "ROLE_UPDATED", 10: "NAME_UPDATED", 11: "METADATA_UPDATED", 12: "HAND_RAISE_CHANGED" };
|
24154
|
+
var Ct = { 0: "TRACK_ADDED", 1: "TRACK_REMOVED", 2: "TRACK_MUTED", 3: "TRACK_UNMUTED", 5: "TRACK_DEGRADED", 6: "TRACK_RESTORED", 4: "TRACK_DESCRIPTION_CHANGED" };
|
24155
|
+
var ki = { 0: "POLL_CREATED", 1: "POLL_STARTED", 2: "POLL_STOPPED", 4: "POLL_VOTES_UPDATED", 3: "POLLS_LIST" };
|
24152
24156
|
var ya = { TRANSCRIPTION_STATE_UPDATED: "TRANSCRIPTION_STATE_UPDATED" };
|
24153
24157
|
var Wr = "hmsNotification";
|
24154
|
-
var
|
24158
|
+
var Pi = class {
|
24155
24159
|
constructor(e) {
|
24156
24160
|
this.id = 0;
|
24157
24161
|
this.onNotification = (e2, t2) => {
|
@@ -24167,7 +24171,7 @@ var yi = class {
|
|
24167
24171
|
this.eventEmitter.removeListener(Wr, i2);
|
24168
24172
|
};
|
24169
24173
|
};
|
24170
|
-
this.store = e, this.eventEmitter = new Zo({ maxListeners: Object.keys(
|
24174
|
+
this.store = e, this.eventEmitter = new Zo({ maxListeners: Object.keys(Sr).length });
|
24171
24175
|
}
|
24172
24176
|
sendPlaylistTrackEnded(e) {
|
24173
24177
|
let t2 = this.createNotification("PLAYLIST_TRACK_ENDED", e, "info");
|
@@ -24190,14 +24194,14 @@ var yi = class {
|
|
24190
24194
|
this.emitEvent(t2);
|
24191
24195
|
}
|
24192
24196
|
sendPeerUpdate(e, t2) {
|
24193
|
-
let i2 = this.store.getState(Z2(t2 == null ? void 0 : t2.id)) || t2, r2 =
|
24197
|
+
let i2 = this.store.getState(Z2(t2 == null ? void 0 : t2.id)) || t2, r2 = yi[e];
|
24194
24198
|
if (r2 && i2) {
|
24195
24199
|
let s2 = this.createNotification(r2, i2, "info");
|
24196
24200
|
this.emitEvent(s2);
|
24197
24201
|
}
|
24198
24202
|
}
|
24199
24203
|
sendTrackUpdate(e, t2) {
|
24200
|
-
let i2 = this.store.getState(
|
24204
|
+
let i2 = this.store.getState(vi(t2)), r2 = Ct[e];
|
24201
24205
|
if (r2) {
|
24202
24206
|
let s2 = this.createNotification(r2, i2, "info");
|
24203
24207
|
this.emitEvent(s2);
|
@@ -24228,7 +24232,7 @@ var yi = class {
|
|
24228
24232
|
this.emitEvent(t2);
|
24229
24233
|
}
|
24230
24234
|
sendPollUpdate(e, t2) {
|
24231
|
-
let i2 =
|
24235
|
+
let i2 = ki[e], r2 = this.store.getState(Ma(t2));
|
24232
24236
|
if (i2) {
|
24233
24237
|
let s2 = this.createNotification(i2, r2, "info");
|
24234
24238
|
this.emitEvent(s2);
|
@@ -24245,7 +24249,7 @@ var yi = class {
|
|
24245
24249
|
return this.id++, { id: this.id, type: e, message: r2, data: t2, severity: i2 };
|
24246
24250
|
}
|
24247
24251
|
};
|
24248
|
-
var
|
24252
|
+
var Ei = class {
|
24249
24253
|
constructor(e) {
|
24250
24254
|
this.queuedUpdates = {};
|
24251
24255
|
this.timers = {};
|
@@ -24276,35 +24280,35 @@ function ka(a11) {
|
|
24276
24280
|
return a11 instanceof ae || a11 instanceof U2;
|
24277
24281
|
}
|
24278
24282
|
var Pa = (a11, e) => {
|
24279
|
-
let t2 =
|
24283
|
+
let t2 = Lt(Object.keys(a11), Object.keys(e));
|
24280
24284
|
for (let i2 of t2) {
|
24281
24285
|
let r2 = a11[i2], s2 = e[i2];
|
24282
|
-
$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] :
|
24286
|
+
$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);
|
24283
24287
|
}
|
24284
24288
|
};
|
24285
24289
|
var Ea = (a11, e) => {
|
24286
|
-
let t2 =
|
24290
|
+
let t2 = Lt(Object.keys(a11), Object.keys(e));
|
24287
24291
|
for (let i2 of t2) {
|
24288
24292
|
let r2 = a11[i2], s2 = e[i2];
|
24289
|
-
$e(r2, s2) ? (Kr(r2, s2), Object.assign(r2, s2)) : qr(r2, s2) ? delete a11[i2] :
|
24293
|
+
$e(r2, s2) ? (Kr(r2, s2), Object.assign(r2, s2)) : qr(r2, s2) ? delete a11[i2] : bi(r2, s2) && (a11[i2] = s2);
|
24290
24294
|
}
|
24291
24295
|
};
|
24292
24296
|
var ba = (a11, e) => {
|
24293
|
-
let t2 =
|
24297
|
+
let t2 = Lt(Object.keys(a11), Object.keys(e));
|
24294
24298
|
for (let i2 of t2) {
|
24295
24299
|
let r2 = a11[i2], s2 = e[i2];
|
24296
|
-
$e(r2, s2) ? (r2.questions && se(r2.questions, s2.questions) && (s2.questions = r2.questions), Object.assign(r2, s2)) :
|
24300
|
+
$e(r2, s2) ? (r2.questions && se(r2.questions, s2.questions) && (s2.questions = r2.questions), Object.assign(r2, s2)) : bi(r2, s2) && (a11[i2] = s2);
|
24297
24301
|
}
|
24298
24302
|
};
|
24299
24303
|
var $r = (a11, e) => {
|
24300
|
-
let t2 =
|
24304
|
+
let t2 = Lt(Object.keys(a11), Object.keys(e));
|
24301
24305
|
for (let i2 of t2) {
|
24302
24306
|
let r2 = a11[i2], s2 = e[i2];
|
24303
|
-
$e(r2, s2) ? Object.assign(r2, s2) : qr(r2, s2) ? delete a11[i2] :
|
24307
|
+
$e(r2, s2) ? Object.assign(r2, s2) : qr(r2, s2) ? delete a11[i2] : bi(r2, s2) && (a11[i2] = s2);
|
24304
24308
|
}
|
24305
24309
|
};
|
24306
24310
|
var Ra = (a11, e, t2) => {
|
24307
|
-
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 =
|
24311
|
+
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));
|
24308
24312
|
for (let s2 of r2) {
|
24309
24313
|
if (!i2[s2]) {
|
24310
24314
|
delete a11[s2];
|
@@ -24318,7 +24322,7 @@ var Kr = (a11, e) => {
|
|
24318
24322
|
};
|
24319
24323
|
var $e = (a11, e) => a11 && e;
|
24320
24324
|
var qr = (a11, e) => a11 && !e;
|
24321
|
-
var
|
24325
|
+
var bi = (a11, e) => !a11 && e;
|
24322
24326
|
var se = (a11, e) => {
|
24323
24327
|
if (a11 === e || a11.length === 0 && (e == null ? void 0 : e.length) === 0)
|
24324
24328
|
return true;
|
@@ -24329,7 +24333,7 @@ var se = (a11, e) => {
|
|
24329
24333
|
return false;
|
24330
24334
|
return true;
|
24331
24335
|
};
|
24332
|
-
var
|
24336
|
+
var Lt = (a11, e) => {
|
24333
24337
|
let t2 = /* @__PURE__ */ new Set();
|
24334
24338
|
for (let i2 of a11)
|
24335
24339
|
t2.add(i2);
|
@@ -24414,7 +24418,7 @@ var _2 = class a8 {
|
|
24414
24418
|
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 || [] };
|
24415
24419
|
}
|
24416
24420
|
};
|
24417
|
-
var
|
24421
|
+
var Dt = class {
|
24418
24422
|
constructor(e, t2, i2, r2) {
|
24419
24423
|
this.playlistManager = e;
|
24420
24424
|
this.syncPlaylistState = i2;
|
@@ -24485,7 +24489,7 @@ var Ct = class {
|
|
24485
24489
|
});
|
24486
24490
|
}
|
24487
24491
|
};
|
24488
|
-
var
|
24492
|
+
var Ri = class {
|
24489
24493
|
constructor(e, t2) {
|
24490
24494
|
this.sdk = e;
|
24491
24495
|
this.setLocally = t2;
|
@@ -24512,7 +24516,7 @@ var Ei = class {
|
|
24512
24516
|
});
|
24513
24517
|
}
|
24514
24518
|
};
|
24515
|
-
var
|
24519
|
+
var Ii = class {
|
24516
24520
|
constructor(e, t2) {
|
24517
24521
|
this.intervalMs = 100, this.shouldMonitor = false, this.hasStarted = false, this.unsubs = [], this.analysers = {}, this.store = e, this.actions = t2;
|
24518
24522
|
}
|
@@ -24598,7 +24602,7 @@ var _e = (a11, e) => {
|
|
24598
24602
|
let t2 = a11.filter((i2) => en2(e(i2)));
|
24599
24603
|
return t2.reduce((i2, r2) => i2 + (e(r2) || 0), 0) / t2.length;
|
24600
24604
|
};
|
24601
|
-
var
|
24605
|
+
var Ai = class {
|
24602
24606
|
constructor(e) {
|
24603
24607
|
this.sdk = e;
|
24604
24608
|
this.peerStatsList = [];
|
@@ -24617,14 +24621,14 @@ var Ri = class {
|
|
24617
24621
|
let o2 = yield (T = (h2 = this.sdk.getWebrtcInternals()) == null ? void 0 : h2.getSubscribePeerConnection()) == null ? void 0 : T.getStats();
|
24618
24622
|
o2 == null || o2.forEach((g2) => {
|
24619
24623
|
if (g2.type === "inbound-rtp") {
|
24620
|
-
let v2 = g2.kind === "audio" ? this.remoteAudioTrackStatsList : this.remoteVideoTrackStatsList, E2 =
|
24624
|
+
let v2 = g2.kind === "audio" ? this.remoteAudioTrackStatsList : this.remoteVideoTrackStatsList, E2 = Et("bytesReceived", g2, de(v2));
|
24621
24625
|
v2.push(M2(m({}, g2), { bitrate: E2 }));
|
24622
24626
|
}
|
24623
24627
|
});
|
24624
24628
|
});
|
24625
24629
|
}
|
24626
24630
|
buildReport() {
|
24627
|
-
var T, g2, v2, E2, P7, w2, Oe,
|
24631
|
+
var T, g2, v2, E2, P7, w2, Oe, Zt;
|
24628
24632
|
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);
|
24629
24633
|
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) => {
|
24630
24634
|
var $;
|
@@ -24632,13 +24636,13 @@ var Ri = class {
|
|
24632
24636
|
}), bitrateReceived: _e(this.peerStatsList, (x2) => {
|
24633
24637
|
var $;
|
24634
24638
|
return ($ = x2.subscribe) == null ? void 0 : $.bitrate;
|
24635
|
-
}) }, audio: { roundTripTime: s2, packetsReceived: o2, packetsLost: ((P7 = de(this.remoteAudioTrackStatsList)) == null ? void 0 : P7.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: ((
|
24639
|
+
}) }, audio: { roundTripTime: s2, packetsReceived: o2, packetsLost: ((P7 = de(this.remoteAudioTrackStatsList)) == null ? void 0 : P7.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 } };
|
24636
24640
|
}
|
24637
24641
|
};
|
24638
24642
|
var 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 || {});
|
24639
24643
|
var Ca;
|
24640
24644
|
var La;
|
24641
|
-
var
|
24645
|
+
var Hi = class {
|
24642
24646
|
constructor(e, t2, i2, r2) {
|
24643
24647
|
this.sdk = e;
|
24644
24648
|
this.sdkListener = t2;
|
@@ -24673,7 +24677,6 @@ var Ii = class {
|
|
24673
24677
|
this.onSessionStoreUpdate = this.sdkListener.onSessionStoreUpdate.bind(this.sdkListener);
|
24674
24678
|
this.onPollsUpdate = this.sdkListener.onPollsUpdate.bind(this.sdkListener);
|
24675
24679
|
this.onWhiteboardUpdate = this.sdkListener.onWhiteboardUpdate.bind(this.sdkListener);
|
24676
|
-
this._state = 0;
|
24677
24680
|
this.handleConnectionQualityUpdate = (e2) => {
|
24678
24681
|
let t3 = e2.find((i3) => {
|
24679
24682
|
var r3, s2;
|
@@ -24681,14 +24684,14 @@ var Ii = class {
|
|
24681
24684
|
});
|
24682
24685
|
this.networkScores.push(ee(t3 == null ? void 0 : t3.downlinkQuality) ? t3.downlinkQuality : -1);
|
24683
24686
|
};
|
24684
|
-
this.statsCollector = new
|
24687
|
+
this.statsCollector = new Ai(e), this.state = 0;
|
24685
24688
|
}
|
24686
24689
|
get state() {
|
24687
24690
|
return this._state;
|
24688
24691
|
}
|
24689
24692
|
set state(e) {
|
24690
24693
|
var t2;
|
24691
|
-
e < this._state || (this._state = e, (t2 = this.progressCallback) == null || t2.call(this, e));
|
24694
|
+
e === void 0 || this._state !== void 0 && e < this._state || (this._state = e, (t2 = this.progressCallback) == null || t2.call(this, e));
|
24692
24695
|
}
|
24693
24696
|
onICESuccess(e) {
|
24694
24697
|
e ? this.isPublishICEConnected = true : this.isSubscribeICEConnected = true, this.isPublishICEConnected && this.isSubscribeICEConnected && (this.state = 3);
|
@@ -24760,7 +24763,7 @@ var Ne = class {
|
|
24760
24763
|
this.id = e;
|
24761
24764
|
}
|
24762
24765
|
};
|
24763
|
-
var
|
24766
|
+
var Ci = (a11, e, t2) => c2(void 0, null, function* () {
|
24764
24767
|
let r2 = Error("something went wrong during fetch");
|
24765
24768
|
for (let s2 = 0; s2 < 4; s2++)
|
24766
24769
|
try {
|
@@ -24787,18 +24790,20 @@ function nt(a11) {
|
|
24787
24790
|
throw S2.APIErrors.InvalidTokenFormat("INIT", `couldn't parse to json - ${i2.message}`);
|
24788
24791
|
}
|
24789
24792
|
}
|
24790
|
-
var
|
24793
|
+
var wt = class {
|
24791
24794
|
constructor(e, t2) {
|
24792
24795
|
this.sdk = e;
|
24793
24796
|
this.sdkListener = t2;
|
24794
24797
|
this.recordedAudio = Ha;
|
24795
|
-
this.isConnectivityCheckInProgress = false;
|
24796
24798
|
this.initSdkWithLocalPeer();
|
24797
24799
|
}
|
24798
24800
|
get localPeer() {
|
24799
24801
|
var e;
|
24800
24802
|
return (e = this.sdk) == null ? void 0 : e.store.getLocalPeer();
|
24801
24803
|
}
|
24804
|
+
checkBrowserSupport() {
|
24805
|
+
Tt(), gt();
|
24806
|
+
}
|
24802
24807
|
requestPermission(e) {
|
24803
24808
|
return c2(this, null, function* () {
|
24804
24809
|
let t2 = yield navigator.mediaDevices.getUserMedia(e);
|
@@ -24855,16 +24860,9 @@ var Lt = class {
|
|
24855
24860
|
var n2;
|
24856
24861
|
if (!this.sdk)
|
24857
24862
|
throw new Error("SDK not found");
|
24858
|
-
|
24859
|
-
|
24860
|
-
|
24861
|
-
let r2 = yield this.getAuthToken(i2), { roomId: s2 } = nt(r2);
|
24862
|
-
(n2 = this.sdk) == null || n2.store.setRoom(new Ne(s2)), yield this.sdk.leave();
|
24863
|
-
let o2 = new Ii(this.sdk, this.sdkListener, e, (l2) => {
|
24864
|
-
this.isConnectivityCheckInProgress = false, t2(l2);
|
24865
|
-
});
|
24866
|
-
yield this.sdk.join({ authToken: r2, userName: "diagonistic-test", initEndpoint: "https://qa-in2-ipv6.100ms.live/init" }, o2), this.sdk.addConnectionQualityListener({ onConnectionQualityUpdate(l2) {
|
24867
|
-
o2.handleConnectionQualityUpdate(l2);
|
24863
|
+
let r2 = new Hi(this.sdk, this.sdkListener, e, t2), s2 = yield this.getAuthToken(i2), { roomId: o2 } = nt(s2);
|
24864
|
+
(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) {
|
24865
|
+
r2.handleConnectionQualityUpdate(l2);
|
24868
24866
|
} });
|
24869
24867
|
});
|
24870
24868
|
}
|
@@ -24883,7 +24881,7 @@ var Lt = class {
|
|
24883
24881
|
return c2(this, null, function* () {
|
24884
24882
|
let t2 = new URL("https://api-nonprod.100ms.live/v2/diagnostics/token");
|
24885
24883
|
e && t2.searchParams.append("region", e);
|
24886
|
-
let i2 = yield
|
24884
|
+
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();
|
24887
24885
|
if (!i2.ok)
|
24888
24886
|
throw S2.APIErrors.ServerErrors(r2.code, "GET_TOKEN", r2.message, false);
|
24889
24887
|
let { token: s2 } = r2;
|
@@ -24903,7 +24901,7 @@ var Lt = class {
|
|
24903
24901
|
});
|
24904
24902
|
}
|
24905
24903
|
};
|
24906
|
-
var
|
24904
|
+
var Li = class {
|
24907
24905
|
constructor(e, t2, i2) {
|
24908
24906
|
this.isRoomJoinCalled = false;
|
24909
24907
|
this.ignoredMessageTypes = [];
|
@@ -24918,7 +24916,7 @@ var Hi = class {
|
|
24918
24916
|
}, e2);
|
24919
24917
|
};
|
24920
24918
|
this.sendPeerUpdateNotification = (e2, t3) => {
|
24921
|
-
let i3 = this.store.getState(Z2(t3.peerId)), r2 =
|
24919
|
+
let i3 = this.store.getState(Z2(t3.peerId)), r2 = yi[e2] || "peerUpdate";
|
24922
24920
|
if (e2 === 8)
|
24923
24921
|
this.syncRoomState(r2), this.updateMidCallPreviewRoomState(e2, t3);
|
24924
24922
|
else if ([0, 1].includes(e2))
|
@@ -24936,7 +24934,7 @@ var Hi = class {
|
|
24936
24934
|
};
|
24937
24935
|
this.getSDKHMSPeer = (e2) => this.sdk.getPeerMap()[e2];
|
24938
24936
|
this.setState = (e2, t3) => this.store.namedSetState(e2, t3);
|
24939
|
-
this.store = e, this.sdk = t2, this.hmsNotifications = i2, this.sessionStore = new
|
24937
|
+
this.store = e, this.sdk = t2, this.hmsNotifications = i2, this.sessionStore = new Ri(this.sdk, this.setSessionStoreValueLocally.bind(this)), this.actionBatcher = new Ei(e);
|
24940
24938
|
}
|
24941
24939
|
getLocalTrack(e) {
|
24942
24940
|
return this.sdk.store.getLocalPeerTracks().find((t2) => t2.trackId === e);
|
@@ -25440,16 +25438,16 @@ var Hi = class {
|
|
25440
25438
|
}
|
25441
25439
|
enableBeamSpeakerLabelsLogging() {
|
25442
25440
|
return c2(this, null, function* () {
|
25443
|
-
this.beamSpeakerLabelsLogger || (b2.i("enabling beam speaker labels logging"), this.beamSpeakerLabelsLogger = new
|
25441
|
+
this.beamSpeakerLabelsLogger || (b2.i("enabling beam speaker labels logging"), this.beamSpeakerLabelsLogger = new Ii(this.store, this), yield this.beamSpeakerLabelsLogger.start());
|
25444
25442
|
});
|
25445
25443
|
}
|
25446
25444
|
initDiagnostics() {
|
25447
|
-
let e = new
|
25445
|
+
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) });
|
25448
25446
|
return this.sdk.addAudioListener({ onAudioLevelUpdate: this.onAudioLevelUpdate.bind(this) }), this.sdk.addConnectionQualityListener({ onConnectionQualityUpdate: this.onConnectionQualityUpdate.bind(this) }), e;
|
25449
25447
|
}
|
25450
25448
|
resetState(e = "resetState") {
|
25451
25449
|
this.isRoomJoinCalled = false, b2.cleanup(), this.setState((t2) => {
|
25452
|
-
Object.assign(t2,
|
25450
|
+
Object.assign(t2, ti());
|
25453
25451
|
}, e);
|
25454
25452
|
}
|
25455
25453
|
sdkJoinWithListeners(e) {
|
@@ -25494,7 +25492,7 @@ var Hi = class {
|
|
25494
25492
|
this.setSessionStoreValueLocally(e, "sessionStoreUpdate");
|
25495
25493
|
}
|
25496
25494
|
onPollsUpdate(e, t2) {
|
25497
|
-
let i2 =
|
25495
|
+
let i2 = ki[e];
|
25498
25496
|
this.setState((r2) => {
|
25499
25497
|
let s2 = t2.reduce((o2, n2) => {
|
25500
25498
|
var l2;
|
@@ -25561,7 +25559,7 @@ var Hi = class {
|
|
25561
25559
|
}
|
25562
25560
|
onJoin(e) {
|
25563
25561
|
let t2 = this.sdk.getPlaylistManager();
|
25564
|
-
this.audioPlaylist = new
|
25562
|
+
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) => {
|
25565
25563
|
var r2;
|
25566
25564
|
Object.assign(i2.room, _2.convertRoom(e, (r2 = this.sdk.getLocalPeer()) == null ? void 0 : r2.peerId)), i2.room.isConnected = true, i2.room.roomState = "Connected";
|
25567
25565
|
}, "joined"), t2.onProgress(this.setProgress), t2.onNewTrackStart((i2) => {
|
@@ -25603,10 +25601,10 @@ var Hi = class {
|
|
25603
25601
|
if (e === 1)
|
25604
25602
|
this.hmsNotifications.sendTrackUpdate(e, t2.trackId), this.handleTrackRemove(t2, i2);
|
25605
25603
|
else if ([0, 1].includes(e)) {
|
25606
|
-
let r2 =
|
25604
|
+
let r2 = Ct[e];
|
25607
25605
|
this.syncRoomState(r2), this.hmsNotifications.sendTrackUpdate(e, t2.trackId);
|
25608
25606
|
} else {
|
25609
|
-
let r2 =
|
25607
|
+
let r2 = Ct[e] || "trackUpdate", s2 = _2.convertTrack(t2);
|
25610
25608
|
this.setState((o2) => {
|
25611
25609
|
let n2 = o2.tracks[s2.id];
|
25612
25610
|
$e(n2, s2) && (Kr(n2, s2), Object.assign(n2, s2));
|
@@ -25646,7 +25644,7 @@ var Hi = class {
|
|
25646
25644
|
}
|
25647
25645
|
onChangeTrackStateRequest(e) {
|
25648
25646
|
var s2;
|
25649
|
-
let t2 = this.store.getState(Z2((s2 = e.requestedBy) == null ? void 0 : s2.peerId)), i2 = this.getStoreLocalTrackIDfromSDKTrack(e.track), r2 = this.store.getState(
|
25647
|
+
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));
|
25650
25648
|
if (!r2)
|
25651
25649
|
return this.logPossibleInconsistency(`Not found track for which track state change was requested, ${e.track}`);
|
25652
25650
|
e.enabled || this.syncRoomState("changeTrackStateRequest"), this.hmsNotifications.sendChangeTrackStateRequest({ requestedBy: t2 || void 0, track: r2, enabled: e.enabled });
|
@@ -25818,8 +25816,8 @@ var Hi = class {
|
|
25818
25816
|
}, t2);
|
25819
25817
|
}
|
25820
25818
|
};
|
25821
|
-
var
|
25822
|
-
var
|
25819
|
+
var Di = (a11) => O2 ? `${a11} ${document.title}` : a11;
|
25820
|
+
var wi = class {
|
25823
25821
|
constructor(e, t2) {
|
25824
25822
|
this.eventBus = e;
|
25825
25823
|
this.listener = t2;
|
@@ -25874,7 +25872,7 @@ var Li = class {
|
|
25874
25872
|
e !== this.score && (this.score = e, (i2 = (t2 = this.listener) == null ? void 0 : t2.onNetworkQuality) == null || i2.call(t2, e));
|
25875
25873
|
}
|
25876
25874
|
};
|
25877
|
-
var
|
25875
|
+
var _t = class {
|
25878
25876
|
constructor(e, t2, i2, r2, s2, o2) {
|
25879
25877
|
this.store = e;
|
25880
25878
|
this.transport = t2;
|
@@ -25996,12 +25994,12 @@ var jr = class {
|
|
25996
25994
|
}
|
25997
25995
|
};
|
25998
25996
|
var Pe = new jr();
|
25999
|
-
var
|
25997
|
+
var Nt = class {
|
26000
25998
|
constructor(e) {
|
26001
25999
|
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);
|
26002
26000
|
}
|
26003
26001
|
};
|
26004
|
-
var
|
26002
|
+
var Ot = class {
|
26005
26003
|
constructor() {
|
26006
26004
|
this.TAG = "[Store]:";
|
26007
26005
|
this.knownRoles = {};
|
@@ -26012,7 +26010,7 @@ var _t = class {
|
|
26012
26010
|
this.roleDetailsArrived = false;
|
26013
26011
|
this.env = "prod";
|
26014
26012
|
this.simulcastEnabled = false;
|
26015
|
-
this.userAgent =
|
26013
|
+
this.userAgent = ft(this.env);
|
26016
26014
|
this.polls = /* @__PURE__ */ new Map();
|
26017
26015
|
this.whiteboards = /* @__PURE__ */ new Map();
|
26018
26016
|
this.addPermissionToRole = (e, t2, i2, r2) => {
|
@@ -26132,7 +26130,7 @@ var _t = class {
|
|
26132
26130
|
return this.userAgent;
|
26133
26131
|
}
|
26134
26132
|
createAndSetUserAgent(e) {
|
26135
|
-
this.userAgent =
|
26133
|
+
this.userAgent = ft(this.env, e);
|
26136
26134
|
}
|
26137
26135
|
setRoom(e) {
|
26138
26136
|
this.room = e;
|
@@ -26272,7 +26270,7 @@ var _t = class {
|
|
26272
26270
|
t2.startsWith("prod") ? i2 = "prod" : t2.startsWith("qa") ? i2 = "qa" : t2.startsWith("dev") && (i2 = "dev"), this.env = i2, Pe.setEnv(i2);
|
26273
26271
|
}
|
26274
26272
|
};
|
26275
|
-
var
|
26273
|
+
var _i = class {
|
26276
26274
|
constructor() {
|
26277
26275
|
this.TAG = "[WakeLockManager]";
|
26278
26276
|
this.wakeLock = null;
|
@@ -26306,7 +26304,7 @@ var Di = class {
|
|
26306
26304
|
});
|
26307
26305
|
}
|
26308
26306
|
};
|
26309
|
-
var
|
26307
|
+
var Ni = class {
|
26310
26308
|
constructor(e) {
|
26311
26309
|
this.store = e;
|
26312
26310
|
this.bufferSize = 100;
|
@@ -26349,7 +26347,7 @@ var wi = class {
|
|
26349
26347
|
}
|
26350
26348
|
};
|
26351
26349
|
var Da = { autoplayFailed: void 0, initialized: false, autoplayCheckPromise: void 0 };
|
26352
|
-
var
|
26350
|
+
var xt = class {
|
26353
26351
|
constructor(e, t2, i2) {
|
26354
26352
|
this.store = e;
|
26355
26353
|
this.deviceManager = t2;
|
@@ -26487,7 +26485,7 @@ var Nt = class {
|
|
26487
26485
|
});
|
26488
26486
|
}
|
26489
26487
|
};
|
26490
|
-
var
|
26488
|
+
var Oi = class {
|
26491
26489
|
constructor(e) {
|
26492
26490
|
this.eventBus = e;
|
26493
26491
|
this.pluginUsage = /* @__PURE__ */ new Map();
|
@@ -26526,7 +26524,7 @@ var _i = class {
|
|
26526
26524
|
this.eventBus.analytics.subscribe((t2) => this.updatePluginUsageData(t2));
|
26527
26525
|
}
|
26528
26526
|
};
|
26529
|
-
var
|
26527
|
+
var Ut = class {
|
26530
26528
|
constructor(e, t2) {
|
26531
26529
|
this.store = e;
|
26532
26530
|
this.eventBus = t2;
|
@@ -26564,7 +26562,7 @@ var Ot = class {
|
|
26564
26562
|
let e2 = this.store.getLocalPeer();
|
26565
26563
|
!((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));
|
26566
26564
|
});
|
26567
|
-
this.handleDeviceChange =
|
26565
|
+
this.handleDeviceChange = oi(() => c2(this, null, function* () {
|
26568
26566
|
yield this.enumerateDevices(), this.logDevices("After Device Change");
|
26569
26567
|
let e2 = this.store.getLocalPeer();
|
26570
26568
|
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() }));
|
@@ -26583,7 +26581,7 @@ var Ot = class {
|
|
26583
26581
|
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");
|
26584
26582
|
return;
|
26585
26583
|
}
|
26586
|
-
let { settings: i3 } = e2, r2 = new te().codec(i3.codec).maxBitrate(i3.maxBitrate).deviceId(t3.deviceId).build();
|
26584
|
+
let { settings: i3 } = e2, r2 = new te().codec(i3.codec).maxBitrate(i3.maxBitrate).deviceId(t3.deviceId).audioMode(i3.audioMode).build();
|
26587
26585
|
try {
|
26588
26586
|
yield e2.setSettings(r2, true), this.eventBus.deviceChange.publish({ devices: this.getDevices(), selection: t3, type: "audioInput" }), this.logDevices("Audio Device Change Success");
|
26589
26587
|
} catch (s2) {
|
@@ -26670,7 +26668,7 @@ var Ot = class {
|
|
26670
26668
|
d2.d(this.TAG, e, JSON.stringify({ videoInput: [...this.videoInput], audioInput: [...this.audioInput], audioOutput: [...this.audioOutput], selected: this.getCurrentSelection() }, null, 4));
|
26671
26669
|
}
|
26672
26670
|
};
|
26673
|
-
var
|
26671
|
+
var xi = class {
|
26674
26672
|
constructor(e, t2) {
|
26675
26673
|
this.deviceManager = e;
|
26676
26674
|
this.audioSinkManager = t2;
|
@@ -26717,7 +26715,7 @@ var V = class {
|
|
26717
26715
|
};
|
26718
26716
|
}
|
26719
26717
|
};
|
26720
|
-
var
|
26718
|
+
var Bt = class {
|
26721
26719
|
constructor() {
|
26722
26720
|
this.eventEmitter = new on2();
|
26723
26721
|
this.analytics = new V(G2.ANALYTICS, this.eventEmitter);
|
@@ -26739,7 +26737,7 @@ var xt = class {
|
|
26739
26737
|
this.leave = new V(G2.LEAVE, this.eventEmitter);
|
26740
26738
|
}
|
26741
26739
|
};
|
26742
|
-
var
|
26740
|
+
var Ui = class {
|
26743
26741
|
constructor(e, t2, i2) {
|
26744
26742
|
this.store = e;
|
26745
26743
|
this.listener = t2;
|
@@ -26757,7 +26755,7 @@ var Oi = class {
|
|
26757
26755
|
(n2 = this.listener) == null || n2.onPeerUpdate(5, null);
|
26758
26756
|
}
|
26759
26757
|
};
|
26760
|
-
var
|
26758
|
+
var Bi = class {
|
26761
26759
|
constructor(e) {
|
26762
26760
|
this.listener = e;
|
26763
26761
|
this.TAG = "[BroadcastManager]";
|
@@ -26770,7 +26768,7 @@ var xi = class {
|
|
26770
26768
|
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);
|
26771
26769
|
}
|
26772
26770
|
};
|
26773
|
-
var
|
26771
|
+
var Vi = class {
|
26774
26772
|
constructor(e, t2) {
|
26775
26773
|
this.store = e;
|
26776
26774
|
this.listener = t2;
|
@@ -26916,7 +26914,7 @@ var ct = class {
|
|
26916
26914
|
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;
|
26917
26915
|
}
|
26918
26916
|
};
|
26919
|
-
var
|
26917
|
+
var Fi = class extends ct {
|
26920
26918
|
constructor(t2, i2, r2, s2) {
|
26921
26919
|
super(t2, i2, s2);
|
26922
26920
|
this.transport = r2;
|
@@ -26956,7 +26954,7 @@ var Bi = class extends ct {
|
|
26956
26954
|
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));
|
26957
26955
|
}
|
26958
26956
|
};
|
26959
|
-
var
|
26957
|
+
var Gi = class {
|
26960
26958
|
constructor(e, t2, i2, r2) {
|
26961
26959
|
this.store = e;
|
26962
26960
|
this.peerManager = t2;
|
@@ -27023,7 +27021,7 @@ var Vi = class {
|
|
27023
27021
|
}
|
27024
27022
|
};
|
27025
27023
|
var C = (a11) => a11 ? new Date(a11) : void 0;
|
27026
|
-
var
|
27024
|
+
var Wi = class {
|
27027
27025
|
constructor(e, t2, i2) {
|
27028
27026
|
this.store = e;
|
27029
27027
|
this.trackManager = t2;
|
@@ -27122,7 +27120,7 @@ var Fi = class {
|
|
27122
27120
|
});
|
27123
27121
|
}
|
27124
27122
|
};
|
27125
|
-
var
|
27123
|
+
var $i = class {
|
27126
27124
|
constructor(e, t2) {
|
27127
27125
|
this.store = e;
|
27128
27126
|
this.eventBus = t2;
|
@@ -27146,11 +27144,11 @@ var Gi = class {
|
|
27146
27144
|
}
|
27147
27145
|
}
|
27148
27146
|
};
|
27149
|
-
var
|
27147
|
+
var Vt = (a11, e, t2) => {
|
27150
27148
|
let i2 = t2 === "qa" ? Gs : Fs, r2 = new URL(i2);
|
27151
27149
|
return r2.searchParams.set("endpoint", `https://${e}`), r2.searchParams.set("token", a11), r2.toString();
|
27152
27150
|
};
|
27153
|
-
var
|
27151
|
+
var Ki = class {
|
27154
27152
|
constructor(e, t2, i2) {
|
27155
27153
|
this.transport = e;
|
27156
27154
|
this.store = t2;
|
@@ -27168,7 +27166,7 @@ var Wi = class {
|
|
27168
27166
|
let t2 = this.store.getWhiteboard(e == null ? void 0 : e.id), i2 = t2 == null ? void 0 : t2.id;
|
27169
27167
|
if (t2 || (i2 = (yield this.transport.signal.createWhiteboard(this.getCreateOptionsWithDefaults(e))).id), !i2)
|
27170
27168
|
throw new Error(`Whiteboard ID: ${i2} not found`);
|
27171
|
-
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:
|
27169
|
+
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 });
|
27172
27170
|
this.store.setWhiteboard(s2), (o2 = this.listener) == null || o2.onWhiteboardUpdate(s2);
|
27173
27171
|
});
|
27174
27172
|
}
|
@@ -27193,7 +27191,7 @@ var Wi = class {
|
|
27193
27191
|
let e = this.store.getWhiteboards();
|
27194
27192
|
for (let s2 of e.values())
|
27195
27193
|
if (s2.url) {
|
27196
|
-
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:
|
27194
|
+
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 });
|
27197
27195
|
this.store.setWhiteboard(p2), (r2 = this.listener) == null || r2.onWhiteboardUpdate(p2);
|
27198
27196
|
}
|
27199
27197
|
});
|
@@ -27207,12 +27205,12 @@ var Wi = class {
|
|
27207
27205
|
}), { 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 };
|
27208
27206
|
}
|
27209
27207
|
};
|
27210
|
-
var
|
27208
|
+
var Ft = class {
|
27211
27209
|
constructor(e, t2, i2) {
|
27212
27210
|
this.transport = e;
|
27213
27211
|
this.store = t2;
|
27214
27212
|
this.listener = i2;
|
27215
|
-
this.whiteboard = new
|
27213
|
+
this.whiteboard = new Ki(e, t2, i2);
|
27216
27214
|
}
|
27217
27215
|
setListener(e) {
|
27218
27216
|
this.listener = e, this.whiteboard.setListener(e);
|
@@ -27222,7 +27220,7 @@ var Bt = class {
|
|
27222
27220
|
var o2, n2;
|
27223
27221
|
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 }));
|
27224
27222
|
e.id || (e.id = i2), Array.isArray(e.questions) && (yield this.addQuestionsToPoll(e.id, e.questions));
|
27225
|
-
let r2 = yield this.transport.signal.getPollQuestions({ poll_id: e.id, index: 0, count: 50 }), s2 =
|
27223
|
+
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 }));
|
27226
27224
|
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]);
|
27227
27225
|
});
|
27228
27226
|
}
|
@@ -27290,7 +27288,7 @@ var Bt = class {
|
|
27290
27288
|
r2 = [...l2.polls, ...r2, ...u2.polls];
|
27291
27289
|
}
|
27292
27290
|
for (let l2 of r2) {
|
27293
|
-
let u2 = yield this.transport.signal.getPollQuestions({ poll_id: l2.poll_id, index: 0, count: 50 }), p2 =
|
27291
|
+
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);
|
27294
27292
|
p2.questions = u2.questions.map(({ question: T, options: g2, answer: v2 }, E2) => {
|
27295
27293
|
var P7, w2;
|
27296
27294
|
return M2(m({}, T), { options: g2, answer: v2, responses: (w2 = (P7 = h2 == null ? void 0 : h2.questions) == null ? void 0 : P7[E2]) == null ? void 0 : w2.responses });
|
@@ -27316,11 +27314,11 @@ var Bt = class {
|
|
27316
27314
|
return i2;
|
27317
27315
|
}
|
27318
27316
|
};
|
27319
|
-
var
|
27317
|
+
var qi = (a11) => {
|
27320
27318
|
let e = { userid: "customerID", peerid: "peerID", username: "userName" };
|
27321
27319
|
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) };
|
27322
27320
|
};
|
27323
|
-
var
|
27321
|
+
var ji = class {
|
27324
27322
|
constructor(e, t2, i2) {
|
27325
27323
|
this.store = e;
|
27326
27324
|
this.transport = t2;
|
@@ -27353,7 +27351,7 @@ var Ki = class {
|
|
27353
27351
|
(i2 = this.listener) == null || i2.onPollsUpdate(1, [o2]);
|
27354
27352
|
return;
|
27355
27353
|
}
|
27356
|
-
let n2 = yield this.transport.signal.getPollQuestions({ poll_id: s2.poll_id, index: 0, count: 50 }), l2 =
|
27354
|
+
let n2 = yield this.transport.signal.getPollQuestions({ poll_id: s2.poll_id, index: 0, count: 50 }), l2 = qi(s2);
|
27357
27355
|
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);
|
27358
27356
|
}
|
27359
27357
|
(r2 = this.listener) == null || r2.onPollsUpdate(1, t2);
|
@@ -27413,7 +27411,7 @@ var Ki = class {
|
|
27413
27411
|
});
|
27414
27412
|
}
|
27415
27413
|
};
|
27416
|
-
var
|
27414
|
+
var Ji = class {
|
27417
27415
|
constructor(e, t2) {
|
27418
27416
|
this.store = e;
|
27419
27417
|
this.listener = t2;
|
@@ -27474,7 +27472,7 @@ var qi = class {
|
|
27474
27472
|
return e && (s2 = s2.filter((o2) => o2.type === e)), t2 && (s2 = s2.filter((o2) => o2.source === t2)), s2.filter((o2) => o2.enabled !== i2);
|
27475
27473
|
}
|
27476
27474
|
};
|
27477
|
-
var
|
27475
|
+
var Qi = class {
|
27478
27476
|
constructor(e, t2) {
|
27479
27477
|
this.store = e;
|
27480
27478
|
this.listener = t2;
|
@@ -27631,7 +27629,7 @@ var ji = class {
|
|
27631
27629
|
return d2.e(this.TAG, "error in streaming/recording", i2), i2;
|
27632
27630
|
}
|
27633
27631
|
};
|
27634
|
-
var
|
27632
|
+
var zi = class {
|
27635
27633
|
constructor(e, t2) {
|
27636
27634
|
this.store = e;
|
27637
27635
|
this.listener = t2;
|
@@ -27645,7 +27643,7 @@ var Ji = class {
|
|
27645
27643
|
(i2 = this.listener) == null || i2.onSessionStoreUpdate(t2);
|
27646
27644
|
}
|
27647
27645
|
};
|
27648
|
-
var
|
27646
|
+
var Yi = class {
|
27649
27647
|
constructor(e, t2, i2) {
|
27650
27648
|
this.store = e;
|
27651
27649
|
this.transport = t2;
|
@@ -27670,13 +27668,13 @@ var Qi = class {
|
|
27670
27668
|
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;
|
27671
27669
|
else {
|
27672
27670
|
let l2 = yield this.transport.signal.getWhiteboard({ id: e.id });
|
27673
|
-
o2.url =
|
27671
|
+
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;
|
27674
27672
|
}
|
27675
27673
|
this.store.setWhiteboard(o2), (n2 = this.listener) == null || n2.onWhiteboardUpdate(o2);
|
27676
27674
|
});
|
27677
27675
|
}
|
27678
27676
|
};
|
27679
|
-
var
|
27677
|
+
var Xi = class {
|
27680
27678
|
constructor(e, t2, i2, r2, s2, o2) {
|
27681
27679
|
this.store = e;
|
27682
27680
|
this.transport = i2;
|
@@ -27703,7 +27701,7 @@ var zi = class {
|
|
27703
27701
|
this.peerManager.handlePeerInfoUpdate({ peer: i3, name: e2, data: t3 });
|
27704
27702
|
};
|
27705
27703
|
let n2 = this.transport.isFlagEnabled("onDemandTracks");
|
27706
|
-
this.trackManager = n2 ? new
|
27704
|
+
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);
|
27707
27705
|
}
|
27708
27706
|
setListener(e) {
|
27709
27707
|
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;
|
@@ -27755,7 +27753,7 @@ var zi = class {
|
|
27755
27753
|
}
|
27756
27754
|
}
|
27757
27755
|
};
|
27758
|
-
var
|
27756
|
+
var Zi = class {
|
27759
27757
|
constructor(e) {
|
27760
27758
|
this.transport = e;
|
27761
27759
|
this.observedKeys = /* @__PURE__ */ new Set();
|
@@ -27795,7 +27793,7 @@ var Yi = class {
|
|
27795
27793
|
});
|
27796
27794
|
}
|
27797
27795
|
};
|
27798
|
-
var
|
27796
|
+
var er = class {
|
27799
27797
|
constructor(e, t2, i2 = "", r2 = "", s2 = "https://prod-init.100ms.live/init", o2 = false, n2) {
|
27800
27798
|
this.authToken = e;
|
27801
27799
|
this.peerId = t2;
|
@@ -27808,15 +27806,15 @@ var Xi = class {
|
|
27808
27806
|
};
|
27809
27807
|
var 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 || {});
|
27810
27808
|
var wa = { 0: [], 1: [], 2: [1], 3: [1], 4: [1] };
|
27811
|
-
var
|
27812
|
-
var
|
27809
|
+
var 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 || {});
|
27810
|
+
var ir = class {
|
27813
27811
|
constructor(e) {
|
27814
27812
|
this.promise = new Promise((t2, i2) => {
|
27815
27813
|
this.resolve = t2, this.reject = i2, e(t2, i2);
|
27816
27814
|
});
|
27817
27815
|
}
|
27818
27816
|
};
|
27819
|
-
var
|
27817
|
+
var rr = class {
|
27820
27818
|
constructor(e, t2) {
|
27821
27819
|
this.onStateChange = e;
|
27822
27820
|
this.sendEvent = t2;
|
@@ -27843,7 +27841,7 @@ var tr = class {
|
|
27843
27841
|
d2.d(this.TAG, `schedule: Already a task for ${J[e]} scheduled, waiting for its completion`), yield g2.promise;
|
27844
27842
|
return;
|
27845
27843
|
}
|
27846
|
-
let v2 = new
|
27844
|
+
let v2 = new ir((E2, P7) => {
|
27847
27845
|
});
|
27848
27846
|
this.inProgress.set(e, v2), this.sendEvent(t2, e);
|
27849
27847
|
}
|
@@ -27904,7 +27902,7 @@ var tr = class {
|
|
27904
27902
|
});
|
27905
27903
|
}
|
27906
27904
|
};
|
27907
|
-
var
|
27905
|
+
var sr = class extends He {
|
27908
27906
|
constructor() {
|
27909
27907
|
super(100);
|
27910
27908
|
this.localStorage = new le("hms-analytics");
|
@@ -27925,7 +27923,7 @@ var ir = class extends He {
|
|
27925
27923
|
});
|
27926
27924
|
}
|
27927
27925
|
};
|
27928
|
-
var
|
27926
|
+
var ar = class {
|
27929
27927
|
constructor() {
|
27930
27928
|
this.TAG = "[AnalyticsTransport]";
|
27931
27929
|
}
|
@@ -27955,11 +27953,11 @@ var rr = class {
|
|
27955
27953
|
}
|
27956
27954
|
}
|
27957
27955
|
};
|
27958
|
-
var
|
27956
|
+
var or = class extends ar {
|
27959
27957
|
constructor(t2) {
|
27960
27958
|
super();
|
27961
27959
|
this.transportProvider = t2;
|
27962
|
-
this.failedEvents = new
|
27960
|
+
this.failedEvents = new sr();
|
27963
27961
|
}
|
27964
27962
|
};
|
27965
27963
|
var dt = class {
|
@@ -28040,10 +28038,10 @@ var lt = class {
|
|
28040
28038
|
return this.tempStats.reduce((r2, s2) => r2 + ((s2[e] || 0) > t2 ? 1 : 0), 0);
|
28041
28039
|
}
|
28042
28040
|
};
|
28043
|
-
var
|
28044
|
-
var
|
28045
|
-
var
|
28046
|
-
var
|
28041
|
+
var nr = (a11, e) => a11 && e && (a11.frameWidth !== e.frameWidth || a11.frameHeight !== e.frameHeight);
|
28042
|
+
var cr = (a11, e) => a11 && e && a11.enabled !== e.enabled;
|
28043
|
+
var Gt = (a11) => Object.entries(a11).filter(([, e]) => e !== void 0).reduce((e, [t2, i2]) => (e[t2] = i2, e), {});
|
28044
|
+
var Wt = class extends dt {
|
28047
28045
|
constructor() {
|
28048
28046
|
super(...arguments);
|
28049
28047
|
this.trackAnalytics = /* @__PURE__ */ new Map();
|
@@ -28089,16 +28087,16 @@ var Qr = class extends lt {
|
|
28089
28087
|
this.samples = [];
|
28090
28088
|
this.collateSample = () => {
|
28091
28089
|
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;
|
28092
|
-
return
|
28090
|
+
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 });
|
28093
28091
|
};
|
28094
28092
|
this.shouldCreateSample = () => {
|
28095
28093
|
let t2 = this.tempStats.length, i2 = this.tempStats[t2 - 1], r2 = this.tempStats[t2 - 2];
|
28096
|
-
return t2 === 30 ||
|
28094
|
+
return t2 === 30 || cr(i2, r2) || i2.kind === "video" && nr(i2, r2);
|
28097
28095
|
};
|
28098
28096
|
this.toAnalytics = () => ({ track_id: this.track_id, ssrc: this.ssrc, source: this.source, rid: this.rid, samples: this.samples });
|
28099
28097
|
}
|
28100
28098
|
};
|
28101
|
-
var
|
28099
|
+
var $t = class extends dt {
|
28102
28100
|
constructor() {
|
28103
28101
|
super(...arguments);
|
28104
28102
|
this.trackAnalytics = /* @__PURE__ */ new Map();
|
@@ -28118,7 +28116,7 @@ var Gt = class extends dt {
|
|
28118
28116
|
Object.keys(i2).forEach((s2) => {
|
28119
28117
|
var v2, E2;
|
28120
28118
|
let o2 = this.store.getTrackById(s2), n2 = i2[s2], l2 = (v2 = this.trackAnalytics.get(s2)) == null ? void 0 : v2.getLatestStat(), p2 = ((P7, w2) => {
|
28121
|
-
let Oe = (w2 == null ? void 0 : w2.jitterBufferDelay) || 0,
|
28119
|
+
let Oe = (w2 == null ? void 0 : w2.jitterBufferDelay) || 0, Zt = (w2 == null ? void 0 : w2.jitterBufferEmittedCount) || 0, x2 = ((P7 == null ? void 0 : P7.jitterBufferDelay) || 0) - Oe, $ = ((P7 == null ? void 0 : P7.jitterBufferEmittedCount) || 0) - Zt;
|
28122
28120
|
return $ > 0 ? x2 * 1e3 / $ : (w2 == null ? void 0 : w2.calculatedJitterBufferDelay) || 0;
|
28123
28121
|
})(n2, l2), h2 = this.calculateAvSyncForStat(n2, t2), T = M2(m({}, n2), { calculatedJitterBufferDelay: p2, avSync: h2 });
|
28124
28122
|
if (n2.kind === "video") {
|
@@ -28140,10 +28138,10 @@ var Gt = class extends dt {
|
|
28140
28138
|
return;
|
28141
28139
|
let r2 = this.store.getPeerById(t2.peerID), s2 = r2 == null ? void 0 : r2.audioTrack, o2 = r2 == null ? void 0 : r2.videoTrack;
|
28142
28140
|
if (!(s2 && o2 && s2.enabled && o2.enabled))
|
28143
|
-
return
|
28141
|
+
return Pt;
|
28144
28142
|
let l2 = i2.getRemoteTrackStats(s2.trackId);
|
28145
28143
|
if (!l2)
|
28146
|
-
return
|
28144
|
+
return Pt;
|
28147
28145
|
if (l2.estimatedPlayoutTimestamp)
|
28148
28146
|
return l2.estimatedPlayoutTimestamp - t2.estimatedPlayoutTimestamp;
|
28149
28147
|
}
|
@@ -28155,27 +28153,27 @@ var Yr = class extends lt {
|
|
28155
28153
|
this.collateSample = () => {
|
28156
28154
|
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) };
|
28157
28155
|
if (t2.kind === "video")
|
28158
|
-
return
|
28156
|
+
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") }));
|
28159
28157
|
{
|
28160
28158
|
let s2 = (t2.concealedSamples || 0) - (t2.silentConcealedSamples || 0) - ((i2.concealedSamples || 0) - (i2.silentConcealedSamples || 0));
|
28161
|
-
return
|
28159
|
+
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") }));
|
28162
28160
|
}
|
28163
28161
|
};
|
28164
28162
|
this.shouldCreateSample = () => {
|
28165
28163
|
let t2 = this.tempStats.length, i2 = this.tempStats[t2 - 1], r2 = this.tempStats[t2 - 2];
|
28166
|
-
return t2 === 10 ||
|
28164
|
+
return t2 === 10 || cr(i2, r2) || i2.kind === "video" && nr(i2, r2);
|
28167
28165
|
};
|
28168
28166
|
this.toAnalytics = () => ({ track_id: this.track_id, ssrc: this.ssrc, source: this.source, rid: this.rid, samples: this.samples });
|
28169
28167
|
}
|
28170
28168
|
calculateAvgAvSyncForSample() {
|
28171
|
-
let i2 = this.tempStats.map((r2) => r2.avSync).filter((r2) => r2 !== void 0 && r2 !==
|
28172
|
-
return i2.length === 0 ?
|
28169
|
+
let i2 = this.tempStats.map((r2) => r2.avSync).filter((r2) => r2 !== void 0 && r2 !== Pt);
|
28170
|
+
return i2.length === 0 ? Pt : i2.reduce((r2, s2) => r2 + s2, 0) / i2.length;
|
28173
28171
|
}
|
28174
28172
|
};
|
28175
|
-
var
|
28173
|
+
var lr = ((t2) => (t2[t2.Publish = 0] = "Publish", t2[t2.Subscribe = 1] = "Subscribe", t2))(lr || {});
|
28176
28174
|
function _a7(a11, e) {
|
28177
28175
|
var r2;
|
28178
|
-
let t2 =
|
28176
|
+
let t2 = Kt.parse(a11.sdp);
|
28179
28177
|
if (!((r2 = t2.origin) != null && r2.username.startsWith("mozilla")))
|
28180
28178
|
return a11;
|
28181
28179
|
let i2 = e ? Array.from(e.values()) : [];
|
@@ -28183,13 +28181,13 @@ function _a7(a11, e) {
|
|
28183
28181
|
var l2, u2, p2;
|
28184
28182
|
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;
|
28185
28183
|
n2 && (s2.msid = (p2 = s2.msid) == null ? void 0 : p2.replace(/\s(.+)/, ` ${n2}`));
|
28186
|
-
}), { type: a11.type, sdp:
|
28184
|
+
}), { type: a11.type, sdp: Kt.write(t2) };
|
28187
28185
|
}
|
28188
28186
|
function Na(a11, e) {
|
28189
28187
|
var s2;
|
28190
28188
|
if (!(a11 != null && a11.sdp) || !e)
|
28191
28189
|
return;
|
28192
|
-
let i2 =
|
28190
|
+
let i2 = Kt.parse(a11.sdp).media.find((o2) => ee(o2.mid) && parseInt(o2.mid) === parseInt(e));
|
28193
28191
|
return (s2 = i2 == null ? void 0 : i2.msid) == null ? void 0 : s2.split(" ")[1];
|
28194
28192
|
}
|
28195
28193
|
function Oa(a11) {
|
@@ -28273,27 +28271,27 @@ var Ke = class {
|
|
28273
28271
|
let i2 = (r2 = t2.track) == null ? void 0 : r2.kind;
|
28274
28272
|
if (t2.transport) {
|
28275
28273
|
let s2 = t2.transport.iceTransport, o2 = () => {
|
28276
|
-
typeof s2.getSelectedCandidatePair == "function" && (this.selectedCandidatePair = s2.getSelectedCandidatePair(), this.selectedCandidatePair && (this.observer.onSelectedCandidatePairChange(this.selectedCandidatePair), d2.d(Ee, `${
|
28274
|
+
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))));
|
28277
28275
|
};
|
28278
28276
|
typeof s2.onselectedcandidatepairchange == "function" && (s2.onselectedcandidatepairchange = o2), o2();
|
28279
28277
|
}
|
28280
28278
|
});
|
28281
28279
|
} catch (e) {
|
28282
|
-
d2.w(Ee, `Error in logging selected ice candidate pair for ${
|
28280
|
+
d2.w(Ee, `Error in logging selected ice candidate pair for ${lr[this.role]} connection`, e);
|
28283
28281
|
}
|
28284
28282
|
}
|
28285
28283
|
removeTrack(e) {
|
28286
28284
|
this.nativeConnection.signalingState !== "closed" && this.nativeConnection.removeTrack(e);
|
28287
28285
|
}
|
28288
|
-
setMaxBitrateAndFramerate(e) {
|
28286
|
+
setMaxBitrateAndFramerate(e, t2) {
|
28289
28287
|
return c2(this, null, function* () {
|
28290
|
-
let
|
28291
|
-
var
|
28292
|
-
return ((
|
28288
|
+
let i2 = (t2 == null ? void 0 : t2.maxBitrate) || e.settings.maxBitrate, r2 = e instanceof F && e.settings.maxFramerate, s2 = this.getSenders().find((o2) => {
|
28289
|
+
var n2;
|
28290
|
+
return ((n2 = o2 == null ? void 0 : o2.track) == null ? void 0 : n2.id) === e.getTrackIDBeingSent();
|
28293
28291
|
});
|
28294
|
-
if (
|
28295
|
-
let
|
28296
|
-
|
28292
|
+
if (s2) {
|
28293
|
+
let o2 = s2.getParameters();
|
28294
|
+
o2.encodings.length === 1 && (i2 && (o2.encodings[0].maxBitrate = i2 * 1e3), r2 && (o2.encodings[0].maxFramerate = r2)), yield s2.setParameters(o2);
|
28297
28295
|
} else
|
28298
28296
|
d2.w(Ee, `no sender found to setMaxBitrate for track - ${e.trackId}, sentTrackId - ${e.getTrackIDBeingSent()}`);
|
28299
28297
|
});
|
@@ -28312,11 +28310,11 @@ var Ke = class {
|
|
28312
28310
|
return this.nativeConnection.getReceivers();
|
28313
28311
|
}
|
28314
28312
|
};
|
28315
|
-
var
|
28313
|
+
var qt = class extends Ke {
|
28316
28314
|
constructor(t2, i2, r2) {
|
28317
28315
|
super(0, t2);
|
28318
28316
|
this.TAG = "[HMSPublishConnection]";
|
28319
|
-
this.observer = r2, this.nativeConnection = new RTCPeerConnection(i2), this.channel = this.nativeConnection.createDataChannel(
|
28317
|
+
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 }) => {
|
28320
28318
|
s2 && (this.observer.onIceCandidate(s2), t2.trickle(this.role, s2));
|
28321
28319
|
}, this.nativeConnection.oniceconnectionstatechange = () => {
|
28322
28320
|
this.observer.onIceConnectionChange(this.nativeConnection.iceConnectionState);
|
@@ -28336,7 +28334,7 @@ var $t = class extends Ke {
|
|
28336
28334
|
});
|
28337
28335
|
}
|
28338
28336
|
};
|
28339
|
-
var
|
28337
|
+
var jt = class {
|
28340
28338
|
constructor(e, t2, i2 = "") {
|
28341
28339
|
this.TAG = "[HMSDataChannel]";
|
28342
28340
|
this.nativeChannel = e, this.observer = t2, this.metadata = i2, e.onmessage = (r2) => {
|
@@ -28359,7 +28357,7 @@ var Kt = class {
|
|
28359
28357
|
this.nativeChannel.close();
|
28360
28358
|
}
|
28361
28359
|
};
|
28362
|
-
var
|
28360
|
+
var Jt = class a9 extends Ke {
|
28363
28361
|
constructor(t2, i2, r2, s2) {
|
28364
28362
|
super(1, t2);
|
28365
28363
|
this.isFlagEnabled = r2;
|
@@ -28406,7 +28404,7 @@ var qt = class a9 extends Ke {
|
|
28406
28404
|
}, this.nativeConnection.onconnectionstatechange = () => {
|
28407
28405
|
this.observer.onConnectionStateChange(this.nativeConnection.connectionState);
|
28408
28406
|
}, this.nativeConnection.ondatachannel = (t2) => {
|
28409
|
-
t2.channel.label ===
|
28407
|
+
t2.channel.label === ui && (this.apiChannel = new jt(t2.channel, { onMessage: (i2) => {
|
28410
28408
|
this.eventEmitter.emit("message", i2), this.observer.onApiChannelMessage(i2);
|
28411
28409
|
} }, `role=${this.role}`), t2.channel.onopen = this.handlePendingApiMessages);
|
28412
28410
|
}, this.nativeConnection.onicecandidate = (t2) => {
|
@@ -28456,8 +28454,8 @@ var qt = class a9 extends Ke {
|
|
28456
28454
|
}
|
28457
28455
|
};
|
28458
28456
|
var xa = (a11, e) => !e || e.length === 0 ? a11 : e.map((i2) => ({ urls: i2.urls, credentialType: "password", credential: i2.password, username: i2.userName }));
|
28459
|
-
var
|
28460
|
-
var
|
28457
|
+
var ur = "[InitService]";
|
28458
|
+
var Qt = class {
|
28461
28459
|
static handleError(e, t2) {
|
28462
28460
|
switch (e.status) {
|
28463
28461
|
case 404:
|
@@ -28470,16 +28468,16 @@ var jt = class {
|
|
28470
28468
|
}
|
28471
28469
|
static fetchInitConfig(n2) {
|
28472
28470
|
return c2(this, arguments, function* ({ token: e, peerId: t2, userAgent: i2, initEndpoint: r2 = "https://prod-init.100ms.live", region: s2 = "", iceServers: o2 }) {
|
28473
|
-
d2.d(
|
28471
|
+
d2.d(ur, `fetchInitConfig: initEndpoint=${r2} token=${e} peerId=${t2} region=${s2} `);
|
28474
28472
|
let l2 = dn2(r2, t2, i2, s2);
|
28475
28473
|
try {
|
28476
28474
|
let u2 = yield fetch(l2, { headers: { Authorization: `Bearer ${e}` } });
|
28477
28475
|
try {
|
28478
28476
|
let p2 = yield u2.clone().json();
|
28479
|
-
return this.handleError(u2, p2), d2.d(
|
28477
|
+
return this.handleError(u2, p2), d2.d(ur, `config is ${JSON.stringify(p2, null, 2)}`), ln2(p2, o2);
|
28480
28478
|
} catch (p2) {
|
28481
28479
|
let h2 = yield u2.text();
|
28482
|
-
throw d2.e(
|
28480
|
+
throw d2.e(ur, "json error", p2.message, h2), p2 instanceof f2 ? p2 : S2.APIErrors.ServerErrors(u2.status, "INIT", p2.message);
|
28483
28481
|
}
|
28484
28482
|
} catch (u2) {
|
28485
28483
|
let p2 = u2;
|
@@ -28494,14 +28492,14 @@ function dn2(a11, e, t2, i2) {
|
|
28494
28492
|
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();
|
28495
28493
|
} catch (r2) {
|
28496
28494
|
let s2 = r2;
|
28497
|
-
throw d2.e(
|
28495
|
+
throw d2.e(ur, s2.name, s2.message), s2;
|
28498
28496
|
}
|
28499
28497
|
}
|
28500
28498
|
function ln2(a11, e) {
|
28501
28499
|
var t2;
|
28502
28500
|
return M2(m({}, a11), { rtcConfiguration: M2(m({}, a11.rtcConfiguration), { iceServers: xa((t2 = a11.rtcConfiguration) == null ? void 0 : t2.ice_servers, e) }) });
|
28503
28501
|
}
|
28504
|
-
var
|
28502
|
+
var zt = class {
|
28505
28503
|
constructor(e) {
|
28506
28504
|
this.TAG = "[SIGNAL]: ";
|
28507
28505
|
this.pongResponseTimes = new He(5);
|
@@ -28549,7 +28547,7 @@ var Jt = class {
|
|
28549
28547
|
if (o2 instanceof f2)
|
28550
28548
|
throw o2;
|
28551
28549
|
let n2 = o2;
|
28552
|
-
throw S2.WebsocketMethodErrors.ServerErrors(Number(n2.code),
|
28550
|
+
throw S2.WebsocketMethodErrors.ServerErrors(Number(n2.code), Tr(e), n2.message);
|
28553
28551
|
}
|
28554
28552
|
});
|
28555
28553
|
}
|
@@ -28835,7 +28833,7 @@ var Jt = class {
|
|
28835
28833
|
rejectPendingCalls(e = "") {
|
28836
28834
|
this.callbacks.forEach((t2, i2) => {
|
28837
28835
|
var r2, s2, o2, n2;
|
28838
|
-
((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 ?
|
28836
|
+
((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));
|
28839
28837
|
});
|
28840
28838
|
}
|
28841
28839
|
pingPongLoop(e) {
|
@@ -28873,7 +28871,7 @@ var Ua = () => {
|
|
28873
28871
|
return { downlink: a11.downlink, downlinkMax: a11.downlinkMax, effectiveType: a11.effectiveType, rtt: a11.rtt, saveData: a11.saveData, type: a11.type };
|
28874
28872
|
};
|
28875
28873
|
var I2 = "[HMSTransport]:";
|
28876
|
-
var
|
28874
|
+
var Yt = class {
|
28877
28875
|
constructor(e, t2, i2, r2, s2, o2, n2) {
|
28878
28876
|
this.observer = e;
|
28879
28877
|
this.deviceManager = t2;
|
@@ -28912,7 +28910,7 @@ var Qt = class {
|
|
28912
28910
|
}), onFailure: (e2) => {
|
28913
28911
|
this.joinParameters && this.retryScheduler.schedule({ category: 1, error: e2, task: this.retrySignalDisconnectTask, originalState: this.state });
|
28914
28912
|
}, onOffline: (e2) => c2(this, null, function* () {
|
28915
|
-
d2.d(I2, "socket offline",
|
28913
|
+
d2.d(I2, "socket offline", tr[this.state]);
|
28916
28914
|
try {
|
28917
28915
|
this.state !== "Leaving" && this.joinParameters && this.retryScheduler.schedule({ category: 1, error: S2.WebSocketConnectionErrors.WebSocketConnectionLost("RECONNECT_SIGNAL", e2), task: this.retrySignalDisconnectTask, originalState: this.state });
|
28918
28916
|
} catch (t3) {
|
@@ -28920,12 +28918,12 @@ var Qt = class {
|
|
28920
28918
|
}
|
28921
28919
|
}), onOnline: () => {
|
28922
28920
|
var e2;
|
28923
|
-
d2.d(I2, "socket online",
|
28921
|
+
d2.d(I2, "socket online", tr[this.state]), this.analyticsSignalTransport.flushFailedEvents((e2 = this.store.getLocalPeer()) == null ? void 0 : e2.peerId);
|
28924
28922
|
}, onNetworkOnline: () => {
|
28925
28923
|
this.analyticsEventsService.flushFailedClientEvents();
|
28926
28924
|
} };
|
28927
|
-
this.signal = new
|
28928
|
-
this.analyticsSignalTransport = new
|
28925
|
+
this.signal = new zt(this.signalObserver);
|
28926
|
+
this.analyticsSignalTransport = new or(this.signal);
|
28929
28927
|
this.publishDtlsStateTimer = 0;
|
28930
28928
|
this.lastPublishDtlsState = "new";
|
28931
28929
|
this.publishConnectionObserver = { onRenegotiationNeeded: () => c2(this, null, function* () {
|
@@ -29015,11 +29013,11 @@ var Qt = class {
|
|
29015
29013
|
return this.signal.trackUpdate(this.trackStates), e2;
|
29016
29014
|
});
|
29017
29015
|
var u2, p2;
|
29018
|
-
this.webrtcInternals = new
|
29016
|
+
this.webrtcInternals = new hi(this.store, this.eventBus, (u2 = this.publishConnection) == null ? void 0 : u2.nativeConnection, (p2 = this.subscribeConnection) == null ? void 0 : p2.nativeConnection);
|
29019
29017
|
let l2 = (h2, T) => c2(this, null, function* () {
|
29020
29018
|
h2 !== this.state && (this.state = h2, yield this.observer.onStateChange(this.state, T));
|
29021
29019
|
});
|
29022
|
-
this.retryScheduler = new
|
29020
|
+
this.retryScheduler = new rr(l2, this.sendErrorAnalyticsEvent.bind(this)), this.eventBus.statsUpdate.subscribe((h2) => {
|
29023
29021
|
var g2, v2;
|
29024
29022
|
let T = ((v2 = (g2 = h2.getLocalPeerStats()) == null ? void 0 : g2.subscribe) == null ? void 0 : v2.bitrate) || 0;
|
29025
29023
|
this.maxSubscribeBitrate = Math.max(this.maxSubscribeBitrate, T);
|
@@ -29057,7 +29055,7 @@ var Qt = class {
|
|
29057
29055
|
}
|
29058
29056
|
connect(e, t2, i2, r2, s2 = false, o2) {
|
29059
29057
|
return c2(this, null, function* () {
|
29060
|
-
this.setTransportStateForConnect(), this.joinParameters = new
|
29058
|
+
this.setTransportStateForConnect(), this.joinParameters = new er(e, i2, r2.name, r2.metaData, t2, s2, o2);
|
29061
29059
|
try {
|
29062
29060
|
return yield this.internalConnect(e, t2, i2, o2);
|
29063
29061
|
} catch (n2) {
|
@@ -29111,13 +29109,13 @@ var Qt = class {
|
|
29111
29109
|
trackUpdate(e) {
|
29112
29110
|
let i2 = Array.from(this.trackStates.values()).find((r2) => e.type === r2.type && e.source === r2.source);
|
29113
29111
|
if (i2) {
|
29114
|
-
let r2 = new
|
29112
|
+
let r2 = new Nt(M2(m({}, i2), { mute: !e.enabled }));
|
29115
29113
|
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]]));
|
29116
29114
|
}
|
29117
29115
|
}
|
29118
29116
|
publishTrack(e) {
|
29119
29117
|
return c2(this, null, function* () {
|
29120
|
-
e.publishedTrackId = e.getTrackIDBeingSent(), d2.d(I2, `\u23F3 publishTrack: trackId=${e.trackId}, toPublishTrackId=${e.publishedTrackId}`, `${e}`), this.trackStates.set(e.publishedTrackId, new
|
29118
|
+
e.publishedTrackId = e.getTrackIDBeingSent(), d2.d(I2, `\u23F3 publishTrack: trackId=${e.trackId}, toPublishTrackId=${e.publishedTrackId}`, `${e}`), this.trackStates.set(e.publishedTrackId, new Nt(e));
|
29121
29119
|
let t2 = new Promise((s2, o2) => {
|
29122
29120
|
this.callbacks.set(et, { promise: { resolve: s2, reject: o2 }, action: "PUBLISH", extra: {} });
|
29123
29121
|
}), i2 = e.stream;
|
@@ -29155,7 +29153,7 @@ var Qt = class {
|
|
29155
29153
|
});
|
29156
29154
|
}
|
29157
29155
|
createPeerConnections() {
|
29158
|
-
this.initConfig && (this.publishConnection || (this.publishConnection = new
|
29156
|
+
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)));
|
29159
29157
|
}
|
29160
29158
|
negotiateJoinWithRetry(s2) {
|
29161
29159
|
return c2(this, arguments, function* ({ name: e, data: t2, autoSubscribeVideo: i2, isWebRTC: r2 = true }) {
|
@@ -29245,7 +29243,7 @@ var Qt = class {
|
|
29245
29243
|
d2.d(I2, "connect: started \u23F0");
|
29246
29244
|
let s2 = /* @__PURE__ */ new Date();
|
29247
29245
|
try {
|
29248
|
-
this.analyticsTimer.start("init_response_time"), this.initConfig = yield
|
29246
|
+
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);
|
29249
29247
|
let u2 = this.store.getRoom();
|
29250
29248
|
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;
|
29251
29249
|
} catch (u2) {
|
@@ -29274,7 +29272,7 @@ var Qt = class {
|
|
29274
29272
|
}
|
29275
29273
|
initStatsAnalytics() {
|
29276
29274
|
var e, t2;
|
29277
|
-
this.isFlagEnabled("publishStats") && (this.publishStatsAnalytics = new
|
29275
|
+
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());
|
29278
29276
|
}
|
29279
29277
|
getValueFromInitConfig(e, t2, i2) {
|
29280
29278
|
var r2, s2;
|
@@ -29334,11 +29332,11 @@ var Qt = class {
|
|
29334
29332
|
}
|
29335
29333
|
};
|
29336
29334
|
var Va = { published: false, isInitialised: false, isReconnecting: false, isPreviewInProgress: false, isPreviewCalled: false, isJoinInProgress: false, deviceManagersInitialised: false };
|
29337
|
-
var
|
29335
|
+
var pr = class {
|
29338
29336
|
constructor() {
|
29339
29337
|
this.TAG = "[HMSSdk]:";
|
29340
29338
|
this.transportState = "Disconnected";
|
29341
|
-
this.analyticsTimer = new
|
29339
|
+
this.analyticsTimer = new di();
|
29342
29340
|
this.sdkState = m({}, Va);
|
29343
29341
|
this.playlistSettings = { video: { bitrate: Lr }, audio: { bitrate: Dr } };
|
29344
29342
|
this.handleAutoplayError = (e) => {
|
@@ -29435,7 +29433,7 @@ var lr = class {
|
|
29435
29433
|
};
|
29436
29434
|
}
|
29437
29435
|
initNotificationManager() {
|
29438
|
-
this.notificationManager || (this.notificationManager = new
|
29436
|
+
this.notificationManager || (this.notificationManager = new Xi(this.store, this.eventBus, this.transport, this.listener, this.audioListener));
|
29439
29437
|
}
|
29440
29438
|
initStoreAndManagers(e) {
|
29441
29439
|
var t2, i2;
|
@@ -29443,7 +29441,7 @@ var lr = class {
|
|
29443
29441
|
(i2 = this.notificationManager) == null || i2.setListener(this.listener), this.audioSinkManager.setListener(this.listener), this.interactivityCenter.setListener(this.listener);
|
29444
29442
|
return;
|
29445
29443
|
}
|
29446
|
-
this.sdkState.isInitialised = true, this.store = new
|
29444
|
+
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);
|
29447
29445
|
}
|
29448
29446
|
validateJoined(e) {
|
29449
29447
|
if (!this.localPeer)
|
@@ -29490,7 +29488,7 @@ var lr = class {
|
|
29490
29488
|
return this.interactivityCenter;
|
29491
29489
|
}
|
29492
29490
|
getPeerListIterator(e) {
|
29493
|
-
return new
|
29491
|
+
return new mi(this.transport, this.store, e);
|
29494
29492
|
}
|
29495
29493
|
updatePlaylistSettings(e) {
|
29496
29494
|
e.video && Object.assign(this.playlistSettings.video, e.video), e.audio && Object.assign(this.playlistSettings.audio, e.audio);
|
@@ -29501,7 +29499,7 @@ var lr = class {
|
|
29501
29499
|
}
|
29502
29500
|
preview(e, t2) {
|
29503
29501
|
return c2(this, null, function* () {
|
29504
|
-
if (
|
29502
|
+
if (Tt(), gt(), this.sdkState.isPreviewInProgress)
|
29505
29503
|
return Promise.reject(S2.GenericErrors.PreviewAlreadyInProgress("PREVIEW", "Preview already called"));
|
29506
29504
|
if (["Joined", "Reconnecting"].includes(this.transportState))
|
29507
29505
|
return this.midCallPreview(e.asRole, e.settings);
|
@@ -29561,13 +29559,13 @@ var lr = class {
|
|
29561
29559
|
join(e, t2) {
|
29562
29560
|
return c2(this, null, function* () {
|
29563
29561
|
var l2, u2, p2, h2, T, g2;
|
29564
|
-
if (
|
29562
|
+
if (Tt(), gt(), this.sdkState.isPreviewInProgress)
|
29565
29563
|
throw S2.GenericErrors.NotReady("JOIN", "Preview is in progress, can't join");
|
29566
29564
|
this.analyticsTimer.start("join_time"), this.sdkState.isJoinInProgress = true;
|
29567
29565
|
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);
|
29568
29566
|
(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();
|
29569
29567
|
let n2 = this.store.getConfig();
|
29570
|
-
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
|
29568
|
+
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}`);
|
29571
29569
|
try {
|
29572
29570
|
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);
|
29573
29571
|
} catch (v2) {
|
@@ -29602,7 +29600,7 @@ var lr = class {
|
|
29602
29600
|
return c2(this, null, function* () {
|
29603
29601
|
let i2 = (t2 || {}).endpoint || "https://auth.100ms.live/v2/token";
|
29604
29602
|
this.analyticsTimer.start("GET_TOKEN");
|
29605
|
-
let r2 = yield
|
29603
|
+
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();
|
29606
29604
|
if (this.analyticsTimer.end("GET_TOKEN"), !r2.ok)
|
29607
29605
|
throw S2.APIErrors.ServerErrors(s2.code, "GET_TOKEN", s2.message, false);
|
29608
29606
|
let { token: o2 } = s2;
|
@@ -30100,9 +30098,9 @@ var lr = class {
|
|
30100
30098
|
};
|
30101
30099
|
var ut = class a10 {
|
30102
30100
|
constructor(e, t2, i2) {
|
30103
|
-
this.getStats = () => (this.stats || (this.stats = new
|
30101
|
+
this.getStats = () => (this.stats || (this.stats = new Xt(this.store, this.sdk)), this.stats);
|
30104
30102
|
this.getDiagnosticsSDK = () => (this.diagnostics || (this.diagnostics = this.actions.initDiagnostics()), this.diagnostics);
|
30105
|
-
e ? this.store = e : this.store = a10.createNewHMSStore(
|
30103
|
+
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);
|
30106
30104
|
}
|
30107
30105
|
triggerOnSubscribe() {
|
30108
30106
|
this.initialTriggerOnSubscribe || (a10.makeStoreTriggerOnSubscribe(this.store), this.initialTriggerOnSubscribe = true);
|
@@ -30233,14 +30231,14 @@ var vn2 = (a11, e, t2, i2) => {
|
|
30233
30231
|
};
|
30234
30232
|
var Mn = (a11, e = "resetState") => {
|
30235
30233
|
a11.namedSetState((t2) => {
|
30236
|
-
Object.assign(t2,
|
30234
|
+
Object.assign(t2, ii());
|
30237
30235
|
}, e);
|
30238
30236
|
};
|
30239
|
-
var
|
30237
|
+
var Xt = class {
|
30240
30238
|
constructor(e, t2) {
|
30241
30239
|
this.hmsStore = e;
|
30242
30240
|
this.sdk = t2;
|
30243
|
-
this.store = ut.createNewHMSStore(
|
30241
|
+
this.store = ut.createNewHMSStore(Di("HMSStatsStore"), ii), this.getState = this.store.getState, this.subscribe = this.store.subscribe, this.getPublishPeerConnection = () => new Promise((i2) => {
|
30244
30242
|
var r2, s2;
|
30245
30243
|
this.hmsStore.getState(re) === "Connected" ? i2((s2 = (r2 = this.sdk) == null ? void 0 : r2.getWebrtcInternals()) == null ? void 0 : s2.getPublishPeerConnection()) : this.hmsStore.subscribe((o2) => {
|
30246
30244
|
var n2, l2;
|
@@ -39717,7 +39715,7 @@ var useCloseScreenshareWhiteboard = () => {
|
|
39717
39715
|
};
|
39718
39716
|
|
39719
39717
|
// src/Prebuilt/layouts/VideoStreamingSection.tsx
|
39720
|
-
var HLSView = React155.lazy(() => import("./HLSView-
|
39718
|
+
var HLSView = React155.lazy(() => import("./HLSView-PALIXUNG.js"));
|
39721
39719
|
var VideoStreamingSection = ({
|
39722
39720
|
screenType,
|
39723
39721
|
elements,
|
@@ -39880,7 +39878,8 @@ import {
|
|
39880
39878
|
CheckIcon as CheckIcon8,
|
39881
39879
|
CrossIcon as CrossIcon27,
|
39882
39880
|
HeadphonesIcon,
|
39883
|
-
SpeakerIcon as SpeakerIcon4
|
39881
|
+
SpeakerIcon as SpeakerIcon4,
|
39882
|
+
TelePhoneIcon
|
39884
39883
|
} from "@100mslive/react-icons";
|
39885
39884
|
var CamaraFlipActions = () => {
|
39886
39885
|
const actions = useHMSActions48();
|
@@ -39931,6 +39930,8 @@ var AudioActions = () => {
|
|
39931
39930
|
AudioIcon = /* @__PURE__ */ React157.createElement(BluetoothIcon, null);
|
39932
39931
|
} else if (currentSelection && currentSelection.label.toLowerCase().includes("wired")) {
|
39933
39932
|
AudioIcon = /* @__PURE__ */ React157.createElement(HeadphonesIcon, null);
|
39933
|
+
} else if (currentSelection && currentSelection.label.toLowerCase().includes("earpiece")) {
|
39934
|
+
AudioIcon = /* @__PURE__ */ React157.createElement(TelePhoneIcon, null);
|
39934
39935
|
}
|
39935
39936
|
return /* @__PURE__ */ React157.createElement(
|
39936
39937
|
AudioSelectionSheet,
|
@@ -42050,9 +42051,9 @@ init_define_process_env();
|
|
42050
42051
|
|
42051
42052
|
// src/Diagnostics/Diagnostics.tsx
|
42052
42053
|
init_define_process_env();
|
42053
|
-
import
|
42054
|
+
import React189, { useContext as useContext6 } from "react";
|
42054
42055
|
import { HMSRoomProvider as HMSRoomProvider2 } from "@100mslive/react-sdk";
|
42055
|
-
import { ConnectivityIcon as ConnectivityIcon2, GlobeIcon, MicOnIcon as MicOnIcon8, VideoOnIcon as VideoOnIcon6 } from "@100mslive/react-icons";
|
42056
|
+
import { CheckCircleIcon as CheckCircleIcon7, ConnectivityIcon as ConnectivityIcon2, GlobeIcon, MicOnIcon as MicOnIcon8, VideoOnIcon as VideoOnIcon6 } from "@100mslive/react-icons";
|
42056
42057
|
|
42057
42058
|
// src/Diagnostics/components.tsx
|
42058
42059
|
init_define_process_env();
|
@@ -42069,9 +42070,9 @@ var hmsDiagnostics = hms.getDiagnosticsSDK();
|
|
42069
42070
|
|
42070
42071
|
// src/Diagnostics/components.tsx
|
42071
42072
|
var DiagnosticsSteps = {
|
42073
|
+
browser: "Browser Support",
|
42072
42074
|
video: "Test Video",
|
42073
42075
|
audio: "Test Audio",
|
42074
|
-
// browser: 'Browser Support',
|
42075
42076
|
connectivity: "Connection Quality"
|
42076
42077
|
};
|
42077
42078
|
var DiagnosticsContext = React183.createContext({
|
@@ -42303,9 +42304,116 @@ var AudioTest = () => {
|
|
42303
42304
|
)), /* @__PURE__ */ React185.createElement(TestFooter, { error, ctaText: "Does your audio sound good?" }));
|
42304
42305
|
};
|
42305
42306
|
|
42307
|
+
// src/Diagnostics/BrowserTest.tsx
|
42308
|
+
init_define_process_env();
|
42309
|
+
import React186, { useEffect as useEffect77, useState as useState79 } from "react";
|
42310
|
+
import { parsedUserAgent as parsedUserAgent3 } from "@100mslive/react-sdk";
|
42311
|
+
var CMS_MEDIA_SERVER = "https://storage.googleapis.com/100ms-cms-prod/";
|
42312
|
+
var operatingSystemIconInfo = {
|
42313
|
+
tizen: {
|
42314
|
+
key: "tizen",
|
42315
|
+
val: "Tizen",
|
42316
|
+
icon: `${CMS_MEDIA_SERVER}cms/Tizen_b99350214e/Tizen_b99350214e.svg`
|
42317
|
+
},
|
42318
|
+
"mac os": {
|
42319
|
+
key: "macos",
|
42320
|
+
val: "Mac OS",
|
42321
|
+
icon: `${CMS_MEDIA_SERVER}cms/mac_OS_804456afd8/mac_OS_804456afd8.png`
|
42322
|
+
},
|
42323
|
+
windows: {
|
42324
|
+
key: "windows",
|
42325
|
+
val: "Windows",
|
42326
|
+
icon: `${CMS_MEDIA_SERVER}cms/Windows_fdfe6749b6/Windows_fdfe6749b6.svg`
|
42327
|
+
},
|
42328
|
+
linux: {
|
42329
|
+
key: "linux",
|
42330
|
+
val: "Linux",
|
42331
|
+
icon: `${CMS_MEDIA_SERVER}cms/Linux_31f8353a2e/Linux_31f8353a2e.svg`
|
42332
|
+
},
|
42333
|
+
chromium: {
|
42334
|
+
key: "chromium",
|
42335
|
+
val: "Chromium",
|
42336
|
+
icon: `${CMS_MEDIA_SERVER}cms/Chromium_3df17710bd/Chromium_3df17710bd.svg`
|
42337
|
+
},
|
42338
|
+
ubuntu: {
|
42339
|
+
key: "ubuntu",
|
42340
|
+
val: "Ubuntu",
|
42341
|
+
icon: `${CMS_MEDIA_SERVER}cms/Ubuntu_966dd923c5/Ubuntu_966dd923c5.svg`
|
42342
|
+
},
|
42343
|
+
ios: {
|
42344
|
+
key: "ios",
|
42345
|
+
val: "iOS",
|
42346
|
+
icon: `${CMS_MEDIA_SERVER}cms/i_OS_3cdc9d9b71/i_OS_3cdc9d9b71.svg`
|
42347
|
+
},
|
42348
|
+
android: {
|
42349
|
+
key: "android",
|
42350
|
+
val: "Android",
|
42351
|
+
icon: `${CMS_MEDIA_SERVER}cms/Android_49dcfdc934/Android_49dcfdc934.svg`
|
42352
|
+
}
|
42353
|
+
};
|
42354
|
+
var browserTypeIconInfo = {
|
42355
|
+
brave: {
|
42356
|
+
key: "brave",
|
42357
|
+
val: "Brave",
|
42358
|
+
icon: `${CMS_MEDIA_SERVER}cms/Brave_7e66131f09/Brave_7e66131f09.svg`
|
42359
|
+
},
|
42360
|
+
chrome: {
|
42361
|
+
key: "chrome",
|
42362
|
+
val: "Chrome",
|
42363
|
+
icon: `${CMS_MEDIA_SERVER}cms/Chrome_7bf77fbdd7/Chrome_7bf77fbdd7.svg`
|
42364
|
+
},
|
42365
|
+
firefox: {
|
42366
|
+
key: "firefox",
|
42367
|
+
val: "Firefox",
|
42368
|
+
icon: `${CMS_MEDIA_SERVER}cms/Firefox_30f3976fb8/Firefox_30f3976fb8.svg`
|
42369
|
+
},
|
42370
|
+
safari: {
|
42371
|
+
key: "safari",
|
42372
|
+
val: "Safari",
|
42373
|
+
icon: `${CMS_MEDIA_SERVER}cms/Safari_254e74ed94/Safari_254e74ed94.svg`
|
42374
|
+
},
|
42375
|
+
edge: {
|
42376
|
+
key: "edge",
|
42377
|
+
val: "Edge",
|
42378
|
+
icon: `${CMS_MEDIA_SERVER}cms/Edge_23add4a83f/Edge_23add4a83f.svg`
|
42379
|
+
},
|
42380
|
+
opera: {
|
42381
|
+
key: "opera",
|
42382
|
+
val: "Opera",
|
42383
|
+
icon: `${CMS_MEDIA_SERVER}cms/Opera_0f3bf4eb19/Opera_0f3bf4eb19.svg`
|
42384
|
+
}
|
42385
|
+
};
|
42386
|
+
var CheckDetails = ({ title, value, iconURL }) => /* @__PURE__ */ React186.createElement(Box, { css: { w: "100%", my: "$10", p: "$10", r: "$1", bg: "$surface_default", "@lg": { w: "auto" } } }, /* @__PURE__ */ React186.createElement(Text, { css: { c: "$on_primary_medium", mb: "$6" } }, title), /* @__PURE__ */ React186.createElement(Flex, { align: "center" }, iconURL && /* @__PURE__ */ React186.createElement(Box, { css: { size: "2rem", r: "$round", bg: "$surface_brighter" } }, /* @__PURE__ */ React186.createElement("img", { style: { objectFit: "contain", width: "2rem" }, src: iconURL, alt: value })), /* @__PURE__ */ React186.createElement(Text, { css: { ml: "$4" } }, value)));
|
42387
|
+
var BrowserTest = () => {
|
42388
|
+
var _a8, _b7;
|
42389
|
+
const [error, setError] = useState79();
|
42390
|
+
useEffect77(() => {
|
42391
|
+
try {
|
42392
|
+
hmsDiagnostics.checkBrowserSupport();
|
42393
|
+
} catch (err) {
|
42394
|
+
setError(err);
|
42395
|
+
}
|
42396
|
+
}, []);
|
42397
|
+
return /* @__PURE__ */ React186.createElement(React186.Fragment, null, /* @__PURE__ */ React186.createElement(TestContainer, { css: { display: "flex", gap: "$8", "@lg": { display: "block" } } }, /* @__PURE__ */ React186.createElement(
|
42398
|
+
CheckDetails,
|
42399
|
+
{
|
42400
|
+
title: "Browser",
|
42401
|
+
iconURL: parsedUserAgent3.getBrowser().name && browserTypeIconInfo[(_a8 = parsedUserAgent3.getBrowser().name) == null ? void 0 : _a8.toLowerCase()].icon,
|
42402
|
+
value: `${parsedUserAgent3.getBrowser().name} ${parsedUserAgent3.getBrowser().version}`
|
42403
|
+
}
|
42404
|
+
), /* @__PURE__ */ React186.createElement(
|
42405
|
+
CheckDetails,
|
42406
|
+
{
|
42407
|
+
title: "Operating system",
|
42408
|
+
iconURL: parsedUserAgent3.getOS().name && operatingSystemIconInfo[(_b7 = parsedUserAgent3.getOS().name) == null ? void 0 : _b7.toLowerCase()].icon,
|
42409
|
+
value: `${parsedUserAgent3.getOS().name} ${parsedUserAgent3.getOS().version}`
|
42410
|
+
}
|
42411
|
+
)), /* @__PURE__ */ React186.createElement(TestFooter, { error, ctaText: "Is your device information correct?" }));
|
42412
|
+
};
|
42413
|
+
|
42306
42414
|
// src/Diagnostics/ConnectivityTest.tsx
|
42307
42415
|
init_define_process_env();
|
42308
|
-
import
|
42416
|
+
import React187, { useState as useState80 } from "react";
|
42309
42417
|
import { ConnectivityState } from "@100mslive/react-sdk";
|
42310
42418
|
import { CheckCircleIcon as CheckCircleIcon6, CrossCircleIcon as CrossCircleIcon4, LinkIcon } from "@100mslive/react-icons";
|
42311
42419
|
var Regions = {
|
@@ -42327,38 +42435,38 @@ var ConnectivityTestStepResult = ({
|
|
42327
42435
|
success,
|
42328
42436
|
children
|
42329
42437
|
}) => {
|
42330
|
-
return /* @__PURE__ */
|
42438
|
+
return /* @__PURE__ */ React187.createElement(Box, { css: { my: "$10", p: "$10", r: "$1", bg: "$surface_bright" } }, /* @__PURE__ */ React187.createElement(Text, { css: { c: "$on_primary_medium", mb: "$6" } }, title), success ? /* @__PURE__ */ React187.createElement(Flex, null, /* @__PURE__ */ React187.createElement(Text, { css: { c: "$alert_success" } }, /* @__PURE__ */ React187.createElement(CheckCircleIcon6, { width: "1.5rem", height: "1.5rem" })), /* @__PURE__ */ React187.createElement(Text, { variant: "lg", css: { ml: "$4" } }, "Connected")) : /* @__PURE__ */ React187.createElement(Flex, null, /* @__PURE__ */ React187.createElement(Text, { css: { c: "$alert_error_bright" } }, /* @__PURE__ */ React187.createElement(CrossCircleIcon4, { width: "1.5rem", height: "1.5rem" })), /* @__PURE__ */ React187.createElement(Text, { variant: "lg", css: { ml: "$4" } }, "Failed")), /* @__PURE__ */ React187.createElement(Box, null, children));
|
42331
42439
|
};
|
42332
42440
|
var DetailedInfo = ({
|
42333
42441
|
title,
|
42334
42442
|
value,
|
42335
42443
|
Icon: Icon4
|
42336
42444
|
}) => {
|
42337
|
-
return /* @__PURE__ */
|
42445
|
+
return /* @__PURE__ */ React187.createElement(Box, { css: { flex: "50%", mt: "$6" } }, /* @__PURE__ */ React187.createElement(Text, { variant: "caption", css: { fontWeight: "$semiBold", c: "$on_primary_medium" } }, title), /* @__PURE__ */ React187.createElement(Flex, { css: { mt: "$xs", alignItems: "flex-start" } }, Icon4 && /* @__PURE__ */ React187.createElement(Text, { css: { mr: "$4" } }, /* @__PURE__ */ React187.createElement(Icon4, { width: "1rem", height: "1rem" })), /* @__PURE__ */ React187.createElement(Text, { variant: "caption" }, value)));
|
42338
42446
|
};
|
42339
42447
|
var MediaServerResult = ({ result }) => {
|
42340
42448
|
var _a8, _b7, _c, _d;
|
42341
|
-
return /* @__PURE__ */
|
42449
|
+
return /* @__PURE__ */ React187.createElement(
|
42342
42450
|
ConnectivityTestStepResult,
|
42343
42451
|
{
|
42344
42452
|
title: "Media server connection test",
|
42345
42453
|
success: (result == null ? void 0 : result.isPublishICEConnected) && result.isSubscribeICEConnected
|
42346
42454
|
},
|
42347
|
-
/* @__PURE__ */
|
42455
|
+
/* @__PURE__ */ React187.createElement(Flex, { css: { flexWrap: "wrap" } }, /* @__PURE__ */ React187.createElement(
|
42348
42456
|
DetailedInfo,
|
42349
42457
|
{
|
42350
42458
|
title: "Media Captured",
|
42351
42459
|
value: ((_a8 = result == null ? void 0 : result.stats) == null ? void 0 : _a8.audio.bytesSent) ? "Yes" : "No",
|
42352
42460
|
Icon: ((_b7 = result == null ? void 0 : result.stats) == null ? void 0 : _b7.audio.bytesSent) ? CheckCircleIcon6 : CrossCircleIcon4
|
42353
42461
|
}
|
42354
|
-
), /* @__PURE__ */
|
42462
|
+
), /* @__PURE__ */ React187.createElement(
|
42355
42463
|
DetailedInfo,
|
42356
42464
|
{
|
42357
42465
|
title: "Media Published",
|
42358
42466
|
value: ((_c = result == null ? void 0 : result.stats) == null ? void 0 : _c.audio.bitrateSent) ? "Yes" : "No",
|
42359
42467
|
Icon: ((_d = result == null ? void 0 : result.stats) == null ? void 0 : _d.audio.bytesSent) ? CheckCircleIcon6 : CrossCircleIcon4
|
42360
42468
|
}
|
42361
|
-
), (result == null ? void 0 : result.connectionQualityScore) ? /* @__PURE__ */
|
42469
|
+
), (result == null ? void 0 : result.connectionQualityScore) ? /* @__PURE__ */ React187.createElement(
|
42362
42470
|
DetailedInfo,
|
42363
42471
|
{
|
42364
42472
|
title: "Connection Quality Score (CQS)",
|
@@ -42368,27 +42476,27 @@ var MediaServerResult = ({ result }) => {
|
|
42368
42476
|
);
|
42369
42477
|
};
|
42370
42478
|
var SignallingResult = ({ result }) => {
|
42371
|
-
return /* @__PURE__ */
|
42479
|
+
return /* @__PURE__ */ React187.createElement(ConnectivityTestStepResult, { title: "Signalling server connection test", success: result == null ? void 0 : result.isConnected }, /* @__PURE__ */ React187.createElement(Flex, { css: { flexWrap: "wrap" } }, /* @__PURE__ */ React187.createElement(
|
42372
42480
|
DetailedInfo,
|
42373
42481
|
{
|
42374
42482
|
title: "Signalling Gateway",
|
42375
42483
|
value: (result == null ? void 0 : result.isConnected) ? "Reachable" : "Unreachable",
|
42376
42484
|
Icon: (result == null ? void 0 : result.isConnected) ? CheckCircleIcon6 : CrossCircleIcon4
|
42377
42485
|
}
|
42378
|
-
), /* @__PURE__ */
|
42486
|
+
), /* @__PURE__ */ React187.createElement(DetailedInfo, { title: "Websocket URL", value: (result == null ? void 0 : result.websocketUrl) || "N/A", Icon: LinkIcon })));
|
42379
42487
|
};
|
42380
42488
|
var AudioStats = ({ stats }) => {
|
42381
|
-
return /* @__PURE__ */
|
42489
|
+
return /* @__PURE__ */ React187.createElement(ConnectivityTestStepResult, { title: "Audio", success: !!(stats == null ? void 0 : stats.bytesSent) }, stats && /* @__PURE__ */ React187.createElement(Flex, { css: { flexWrap: "wrap" } }, /* @__PURE__ */ React187.createElement(DetailedInfo, { title: "Bytes Sent", value: formatBytes(stats.bytesSent) }), /* @__PURE__ */ React187.createElement(DetailedInfo, { title: "Bytes Received", value: formatBytes(stats.bytesReceived) }), /* @__PURE__ */ React187.createElement(DetailedInfo, { title: "Packets Received", value: stats.packetsReceived.toString() }), /* @__PURE__ */ React187.createElement(DetailedInfo, { title: "Packets Lost", value: stats.packetsLost.toString() }), /* @__PURE__ */ React187.createElement(DetailedInfo, { title: "Bitrate Sent", value: formatBytes(stats.bitrateSent, "b/s") }), /* @__PURE__ */ React187.createElement(DetailedInfo, { title: "Bitrate Received", value: formatBytes(stats.bitrateReceived, "b/s") }), /* @__PURE__ */ React187.createElement(DetailedInfo, { title: "Round Trip Time", value: `${stats.roundTripTime} ms` })));
|
42382
42490
|
};
|
42383
42491
|
var VideoStats = ({ stats }) => {
|
42384
|
-
return /* @__PURE__ */
|
42492
|
+
return /* @__PURE__ */ React187.createElement(ConnectivityTestStepResult, { title: "Video", success: !!(stats == null ? void 0 : stats.bytesSent) }, stats && /* @__PURE__ */ React187.createElement(Flex, { css: { flexWrap: "wrap" } }, /* @__PURE__ */ React187.createElement(DetailedInfo, { title: "Bytes Sent", value: formatBytes(stats.bytesSent) }), /* @__PURE__ */ React187.createElement(DetailedInfo, { title: "Bytes Received", value: formatBytes(stats.bytesReceived) }), /* @__PURE__ */ React187.createElement(DetailedInfo, { title: "Packets Received", value: stats.packetsReceived.toString() }), /* @__PURE__ */ React187.createElement(DetailedInfo, { title: "Packets Lost", value: stats.packetsLost.toString() }), /* @__PURE__ */ React187.createElement(DetailedInfo, { title: "Bitrate Sent", value: formatBytes(stats.bitrateSent, "b/s") }), /* @__PURE__ */ React187.createElement(DetailedInfo, { title: "Bitrate Received", value: formatBytes(stats.bitrateReceived, "b/s") }), /* @__PURE__ */ React187.createElement(DetailedInfo, { title: "Round Trip Time", value: `${stats.roundTripTime} ms` })));
|
42385
42493
|
};
|
42386
42494
|
var Footer3 = ({
|
42387
42495
|
error,
|
42388
42496
|
result,
|
42389
42497
|
restart
|
42390
42498
|
}) => {
|
42391
|
-
return /* @__PURE__ */
|
42499
|
+
return /* @__PURE__ */ React187.createElement(TestFooter, { error }, /* @__PURE__ */ React187.createElement(Flex, { css: { gap: "$8", "@lg": { flexDirection: "column" } } }, /* @__PURE__ */ React187.createElement(Button, { variant: "standard", onClick: restart }, "Restart Test"), /* @__PURE__ */ React187.createElement(Button, { disabled: !result, onClick: () => result && downloadJson(result, "hms_diagnostics_results") }, "Download Test Report")));
|
42392
42500
|
};
|
42393
42501
|
var ConnectivityTestReport = ({
|
42394
42502
|
error,
|
@@ -42398,13 +42506,14 @@ var ConnectivityTestReport = ({
|
|
42398
42506
|
}) => {
|
42399
42507
|
var _a8, _b7, _c, _d;
|
42400
42508
|
if (error) {
|
42401
|
-
return /* @__PURE__ */
|
42509
|
+
return /* @__PURE__ */ React187.createElement(React187.Fragment, null, /* @__PURE__ */ React187.createElement(TestContainer, { css: { textAlign: "center" } }, /* @__PURE__ */ React187.createElement(Text, { css: { c: "$alert_error_default", mb: "$4" } }, /* @__PURE__ */ React187.createElement(CrossCircleIcon4, null)), /* @__PURE__ */ React187.createElement(Text, { variant: "h6" }, "Connectivity Test Failed"), /* @__PURE__ */ React187.createElement(Text, { variant: "body2", css: { c: "$on_primary_medium" } }, error.message)), /* @__PURE__ */ React187.createElement(Footer3, { restart: startTest, error }));
|
42402
42510
|
}
|
42403
42511
|
if (result) {
|
42404
|
-
|
42512
|
+
console.log(result);
|
42513
|
+
return /* @__PURE__ */ React187.createElement(React187.Fragment, null, /* @__PURE__ */ React187.createElement(TestContainer, null, /* @__PURE__ */ React187.createElement(Text, { css: { c: "$on_primary_medium" } }, "Connectivity test has been completed."), /* @__PURE__ */ React187.createElement(SignallingResult, { result: result == null ? void 0 : result.signallingReport }), /* @__PURE__ */ React187.createElement(MediaServerResult, { result: result == null ? void 0 : result.mediaServerReport }), /* @__PURE__ */ React187.createElement(AudioStats, { stats: (_b7 = (_a8 = result == null ? void 0 : result.mediaServerReport) == null ? void 0 : _a8.stats) == null ? void 0 : _b7.audio }), /* @__PURE__ */ React187.createElement(VideoStats, { stats: (_d = (_c = result == null ? void 0 : result.mediaServerReport) == null ? void 0 : _c.stats) == null ? void 0 : _d.video })), /* @__PURE__ */ React187.createElement(Footer3, { result, restart: startTest, error }));
|
42405
42514
|
}
|
42406
|
-
if (progress) {
|
42407
|
-
return /* @__PURE__ */
|
42515
|
+
if (progress !== void 0) {
|
42516
|
+
return /* @__PURE__ */ React187.createElement(TestContainer, { css: { textAlign: "center" } }, /* @__PURE__ */ React187.createElement(Text, { css: { c: "$primary_bright" } }, /* @__PURE__ */ React187.createElement(Loading, { size: "3.5rem", color: "currentColor" })), /* @__PURE__ */ React187.createElement(Text, { variant: "h6", css: { mt: "$8" } }, "Checking your connection..."), /* @__PURE__ */ React187.createElement(
|
42408
42517
|
Text,
|
42409
42518
|
{
|
42410
42519
|
variant: "body2",
|
@@ -42420,7 +42529,7 @@ var RegionSelector = ({
|
|
42420
42529
|
setRegion,
|
42421
42530
|
startTest
|
42422
42531
|
}) => {
|
42423
|
-
return /* @__PURE__ */
|
42532
|
+
return /* @__PURE__ */ React187.createElement(TestContainer, { css: { borderBottom: "1px solid $border_default" } }, /* @__PURE__ */ React187.createElement(Text, { variant: "body1" }, "Select a region"), /* @__PURE__ */ React187.createElement(Text, { variant: "body2", css: { c: "$on_secondary_low" } }, "Select the closest region for best results"), /* @__PURE__ */ React187.createElement(
|
42424
42533
|
Flex,
|
42425
42534
|
{
|
42426
42535
|
justify: "between",
|
@@ -42432,7 +42541,7 @@ var RegionSelector = ({
|
|
42432
42541
|
}
|
42433
42542
|
}
|
42434
42543
|
},
|
42435
|
-
/* @__PURE__ */
|
42544
|
+
/* @__PURE__ */ React187.createElement(
|
42436
42545
|
Flex,
|
42437
42546
|
{
|
42438
42547
|
css: {
|
@@ -42442,7 +42551,7 @@ var RegionSelector = ({
|
|
42442
42551
|
}
|
42443
42552
|
}
|
42444
42553
|
},
|
42445
|
-
Object.entries(Regions).map(([key, value]) => /* @__PURE__ */
|
42554
|
+
Object.entries(Regions).map(([key, value]) => /* @__PURE__ */ React187.createElement(
|
42446
42555
|
Button,
|
42447
42556
|
{
|
42448
42557
|
key,
|
@@ -42454,17 +42563,16 @@ var RegionSelector = ({
|
|
42454
42563
|
value
|
42455
42564
|
))
|
42456
42565
|
),
|
42457
|
-
/* @__PURE__ */
|
42566
|
+
/* @__PURE__ */ React187.createElement(Flex, { css: { "@lg": { flexDirection: "column" } } }, /* @__PURE__ */ React187.createElement(Button, { variant: "primary", onClick: startTest, disabled: !startTest }, startTest ? "Start Test" : "Testing..."))
|
42458
42567
|
));
|
42459
42568
|
};
|
42460
42569
|
var ConnectivityTest = () => {
|
42461
|
-
const [region, setRegion] =
|
42462
|
-
const [error, setError] =
|
42463
|
-
const [progress, setProgress] =
|
42464
|
-
const [result, setResult] =
|
42570
|
+
const [region, setRegion] = useState80(Object.keys(Regions)[0]);
|
42571
|
+
const [error, setError] = useState80();
|
42572
|
+
const [progress, setProgress] = useState80();
|
42573
|
+
const [result, setResult] = useState80();
|
42465
42574
|
const startTest = () => {
|
42466
42575
|
setError(void 0);
|
42467
|
-
setProgress(ConnectivityState.STARTING);
|
42468
42576
|
setResult(void 0);
|
42469
42577
|
hmsDiagnostics.startConnectivityCheck(
|
42470
42578
|
(state) => {
|
@@ -42478,14 +42586,14 @@ var ConnectivityTest = () => {
|
|
42478
42586
|
setError(error2);
|
42479
42587
|
});
|
42480
42588
|
};
|
42481
|
-
return /* @__PURE__ */
|
42589
|
+
return /* @__PURE__ */ React187.createElement(React187.Fragment, null, /* @__PURE__ */ React187.createElement(
|
42482
42590
|
RegionSelector,
|
42483
42591
|
{
|
42484
42592
|
region,
|
42485
42593
|
setRegion,
|
42486
|
-
startTest:
|
42594
|
+
startTest: progress === void 0 || progress === ConnectivityState.COMPLETED ? startTest : void 0
|
42487
42595
|
}
|
42488
|
-
), /* @__PURE__ */
|
42596
|
+
), /* @__PURE__ */ React187.createElement(ConnectivityTestReport, { error, result, progress, startTest }));
|
42489
42597
|
};
|
42490
42598
|
var downloadJson = (obj, fileName) => {
|
42491
42599
|
const a11 = document.createElement("a");
|
@@ -42499,7 +42607,7 @@ var downloadJson = (obj, fileName) => {
|
|
42499
42607
|
|
42500
42608
|
// src/Diagnostics/VideoTest.tsx
|
42501
42609
|
init_define_process_env();
|
42502
|
-
import
|
42610
|
+
import React188, { useEffect as useEffect78, useState as useState81 } from "react";
|
42503
42611
|
import { selectDevices as selectDevices2, selectLocalMediaSettings as selectLocalMediaSettings2, selectLocalVideoTrackID as selectLocalVideoTrackID4, useHMSStore as useHMSStore100 } from "@100mslive/react-sdk";
|
42504
42612
|
import { VideoOnIcon as VideoOnIcon5 } from "@100mslive/react-icons";
|
42505
42613
|
var VideoTest = () => {
|
@@ -42507,11 +42615,11 @@ var VideoTest = () => {
|
|
42507
42615
|
const { videoInput } = allDevices;
|
42508
42616
|
const trackID = useHMSStore100(selectLocalVideoTrackID4);
|
42509
42617
|
const sdkSelectedDevices = useHMSStore100(selectLocalMediaSettings2);
|
42510
|
-
const [error, setError] =
|
42511
|
-
|
42618
|
+
const [error, setError] = useState81();
|
42619
|
+
useEffect78(() => {
|
42512
42620
|
hmsDiagnostics.startCameraCheck().catch((err) => setError(err));
|
42513
42621
|
}, []);
|
42514
|
-
return /* @__PURE__ */
|
42622
|
+
return /* @__PURE__ */ React188.createElement(React188.Fragment, null, /* @__PURE__ */ React188.createElement(TestContainer, { css: { display: "flex", "@lg": { flexDirection: "column", alignItems: "center" } } }, trackID && /* @__PURE__ */ React188.createElement(
|
42515
42623
|
StyledVideoTile.Container,
|
42516
42624
|
{
|
42517
42625
|
css: {
|
@@ -42521,30 +42629,30 @@ var VideoTest = () => {
|
|
42521
42629
|
"@lg": { mr: 0, mb: "$10" }
|
42522
42630
|
}
|
42523
42631
|
},
|
42524
|
-
/* @__PURE__ */
|
42525
|
-
), /* @__PURE__ */
|
42632
|
+
/* @__PURE__ */ React188.createElement(Video, { mirror: true, trackId: trackID })
|
42633
|
+
), /* @__PURE__ */ React188.createElement(Flex, { direction: "column", css: { w: "100%" } }, /* @__PURE__ */ React188.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__ */ React188.createElement(
|
42526
42634
|
DeviceSelector2,
|
42527
42635
|
{
|
42528
42636
|
title: "Video",
|
42529
42637
|
devices: videoInput || [],
|
42530
|
-
icon: /* @__PURE__ */
|
42638
|
+
icon: /* @__PURE__ */ React188.createElement(VideoOnIcon5, null),
|
42531
42639
|
selection: sdkSelectedDevices.videoInputDeviceId,
|
42532
42640
|
onChange: (deviceId) => __async(void 0, null, function* () {
|
42533
42641
|
hmsDiagnostics.stopCameraCheck();
|
42534
42642
|
hmsDiagnostics.startCameraCheck(deviceId);
|
42535
42643
|
})
|
42536
42644
|
}
|
42537
|
-
))), /* @__PURE__ */
|
42645
|
+
))), /* @__PURE__ */ React188.createElement(TestFooter, { error, ctaText: "Does your video look good?" }));
|
42538
42646
|
};
|
42539
42647
|
|
42540
42648
|
// src/Diagnostics/Diagnostics.tsx
|
42541
42649
|
var DiagnosticsStepIcon = {
|
42542
|
-
video: /* @__PURE__ */
|
42543
|
-
audio: /* @__PURE__ */
|
42544
|
-
browser: /* @__PURE__ */
|
42545
|
-
connectivity: /* @__PURE__ */
|
42650
|
+
video: /* @__PURE__ */ React189.createElement(VideoOnIcon6, { width: "2rem", height: "2rem" }),
|
42651
|
+
audio: /* @__PURE__ */ React189.createElement(MicOnIcon8, { width: "2rem", height: "2rem" }),
|
42652
|
+
browser: /* @__PURE__ */ React189.createElement(GlobeIcon, { width: "2rem", height: "2rem" }),
|
42653
|
+
connectivity: /* @__PURE__ */ React189.createElement(ConnectivityIcon2, { width: "2rem", height: "2rem" })
|
42546
42654
|
};
|
42547
|
-
var Container5 = ({ children }) => /* @__PURE__ */
|
42655
|
+
var Container5 = ({ children }) => /* @__PURE__ */ React189.createElement(
|
42548
42656
|
Box,
|
42549
42657
|
{
|
42550
42658
|
css: {
|
@@ -42564,30 +42672,45 @@ var Container5 = ({ children }) => /* @__PURE__ */ React188.createElement(
|
|
42564
42672
|
);
|
42565
42673
|
var DiagnosticsStepTest = () => {
|
42566
42674
|
const { activeStep } = useContext6(DiagnosticsContext);
|
42567
|
-
let TestComponent = () => /* @__PURE__ */
|
42675
|
+
let TestComponent = () => /* @__PURE__ */ React189.createElement(React189.Fragment, null);
|
42568
42676
|
if (activeStep === "audio") {
|
42569
42677
|
TestComponent = AudioTest;
|
42570
42678
|
} else if (activeStep === "video") {
|
42571
42679
|
TestComponent = VideoTest;
|
42680
|
+
} else if (activeStep === "browser") {
|
42681
|
+
TestComponent = BrowserTest;
|
42572
42682
|
} else if (activeStep === "connectivity") {
|
42573
42683
|
TestComponent = ConnectivityTest;
|
42574
42684
|
}
|
42575
|
-
return /* @__PURE__ */
|
42685
|
+
return /* @__PURE__ */ React189.createElement(TestComponent, { key: activeStep });
|
42576
42686
|
};
|
42577
42687
|
var DiagnosticsStepHeader = () => {
|
42578
42688
|
const { activeStep } = useContext6(DiagnosticsContext);
|
42579
|
-
return /* @__PURE__ */
|
42689
|
+
return /* @__PURE__ */ React189.createElement(Flex, { css: { py: "$8", px: "$10", alignItems: "center", borderBottom: "1px solid $border_default" } }, /* @__PURE__ */ React189.createElement(Text, { css: { c: "$primary_bright", mt: "$xs" } }, DiagnosticsStepIcon[activeStep]), /* @__PURE__ */ React189.createElement(Text, { css: { fontSize: "$h6", ml: "$9" } }, DiagnosticsSteps[activeStep]));
|
42580
42690
|
};
|
42581
42691
|
var DiagnosticsStep = () => {
|
42582
|
-
return /* @__PURE__ */
|
42692
|
+
return /* @__PURE__ */ React189.createElement(Box, { css: { border: "1px solid $border_default", r: "$1", w: "75%", "@lg": { w: "100%" } } }, /* @__PURE__ */ React189.createElement(DiagnosticsStepHeader, null), /* @__PURE__ */ React189.createElement(Box, { css: { maxHeight: "55vh", overflowY: "auto" } }, /* @__PURE__ */ React189.createElement(DiagnosticsStepTest, null)));
|
42583
42693
|
};
|
42584
42694
|
var DiagnosticsStepsList = () => {
|
42585
42695
|
const { activeStep } = useContext6(DiagnosticsContext);
|
42586
|
-
return /* @__PURE__ */
|
42696
|
+
return /* @__PURE__ */ React189.createElement(Box, { css: { w: "25%", "@lg": { display: "none" } } }, Object.keys(DiagnosticsSteps).map((key) => {
|
42697
|
+
const keys = Object.keys(DiagnosticsSteps);
|
42698
|
+
const activeStepIndex = keys.indexOf(activeStep);
|
42699
|
+
const keyIndex = keys.indexOf(key);
|
42700
|
+
const isStepCompleted = activeStepIndex > keyIndex;
|
42701
|
+
let color = "$on_primary_low";
|
42702
|
+
if (isStepCompleted) {
|
42703
|
+
color = "$primary_bright";
|
42704
|
+
}
|
42705
|
+
if (activeStep === key) {
|
42706
|
+
color = "$on_primary_high";
|
42707
|
+
}
|
42708
|
+
return /* @__PURE__ */ React189.createElement(Flex, { css: { mb: "$10", c: color, gap: "$4", alignItems: "center" } }, isStepCompleted ? /* @__PURE__ */ React189.createElement(CheckCircleIcon7, { width: "1rem", height: "1rem" }) : /* @__PURE__ */ React189.createElement(Text, { css: { c: color, fontSize: "1.75rem" } }, "\u2022"), /* @__PURE__ */ React189.createElement(Text, { css: { c: color } }, DiagnosticsSteps[key]));
|
42709
|
+
}));
|
42587
42710
|
};
|
42588
42711
|
var Diagnostics = () => {
|
42589
|
-
const [activeStep, setActiveStep] =
|
42590
|
-
return /* @__PURE__ */
|
42712
|
+
const [activeStep, setActiveStep] = React189.useState(Object.keys(DiagnosticsSteps)[0]);
|
42713
|
+
return /* @__PURE__ */ React189.createElement(HMSRoomProvider2, { store: hmsStore, actions: hmsActions, notifications: hmsNotifications, stats: hmsStats }, /* @__PURE__ */ React189.createElement(HMSThemeProvider, { themeType: "default" }, /* @__PURE__ */ React189.createElement(DiagnosticsContext.Provider, { value: { activeStep, setActiveStep } }, /* @__PURE__ */ React189.createElement(Container5, null, /* @__PURE__ */ React189.createElement(Text, { variant: "h4" }, "Pre-call Test"), /* @__PURE__ */ React189.createElement(Text, { variant: "md", css: { c: "$on_primary_medium" } }, "Make sure your devices and network are good to go, let's get started."), /* @__PURE__ */ React189.createElement(Flex, { css: { direction: "column", mt: "$12", justifyItems: "center" } }, /* @__PURE__ */ React189.createElement(DiagnosticsStepsList, null), /* @__PURE__ */ React189.createElement(DiagnosticsStep, null))))));
|
42591
42714
|
};
|
42592
42715
|
|
42593
42716
|
export {
|
@@ -42722,4 +42845,4 @@ object-assign/index.js:
|
|
42722
42845
|
@license MIT
|
42723
42846
|
*)
|
42724
42847
|
*/
|
42725
|
-
//# sourceMappingURL=chunk-
|
42848
|
+
//# sourceMappingURL=chunk-MBMF75ZJ.js.map
|