@100mslive/roomkit-react 0.3.14-alpha.3 → 0.3.14-alpha.5
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-G5WFG7B4.js → HLSView-AV4CONPM.js} +2 -2
- package/dist/{HLSView-RXINQ54M.css → HLSView-HMJGKVNU.css} +3 -3
- package/dist/{HLSView-RXINQ54M.css.map → HLSView-HMJGKVNU.css.map} +1 -1
- package/dist/{chunk-FVNUIIBK.js → chunk-W6E3MUWX.js} +435 -313
- package/dist/{chunk-FVNUIIBK.js.map → chunk-W6E3MUWX.js.map} +4 -4
- package/dist/index.cjs.css +2 -2
- package/dist/index.cjs.css.map +1 -1
- package/dist/index.cjs.js +464 -332
- 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 +83 -24
- package/dist/meta.esbuild.json +93 -34
- 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/Chat/ChatFooter.tsx +4 -1
- package/src/Prebuilt/components/Header/common.jsx +3 -0
- /package/dist/{HLSView-G5WFG7B4.js.map → HLSView-AV4CONPM.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_e8eab6d8-f220-492a-80f8-bf2ff90d18f6", 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.3", 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.3", RUNNER_ENVIRONMENT: "github-hosted", GITHUB_ENV: "/home/runner/work/_temp/_runner_file_commands/set_env_e8eab6d8-f220-492a-80f8-bf2ff90d18f6", 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.3", 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: "591", 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:16219", 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.3", 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: "9577210448", 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: "2f240d7e6b687be3ead9f9fb40eb5a8f538a4e09", 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: "31d06dee1b91bc30a23f96f3ef9d190f990bc91df8f6a336b91d3b5dce593762", npm_package_exports___import: "./dist/index.js", GITHUB_WORKFLOW_REF: "100mslive/web-sdks/.github/workflows/publish.yml@refs/heads/publish-alpha", PERFLOG_LOCATION_SETTING: "RUNNER_PERFLOG", GITHUB_ACTION_REPOSITORY: "", npm_package_scripts_prebuilt: "cd packages/roomkit-react && yarn start", npm_package_devDependencies_postcss_loader: "^6.2.1", npm_package_devDependencies_esbuild_loader: "^4.0.2", PATH: "/tmp/yarn--1718778441235-0.7667263569917944:/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--1718778441041-0.868102265657817:/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--1718778415971-0.744337896672814:/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--1718778415793-0.4023587612485038:/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_ee36d0b4-9733-4916-817c-a48e907dc980", INVOCATION_ID: "ef4e07a0dbe34b0d9809ce13101a712c", 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: "580", 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 192", 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.3", 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.3", 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: "2f240d7e6b687be3ead9f9fb40eb5a8f538a4e09", 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_e8eab6d8-f220-492a-80f8-bf2ff90d18f6", 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_e8eab6d8-f220-492a-80f8-bf2ff90d18f6", 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_e8eab6d8-f220-492a-80f8-bf2ff90d18f6" };
|
110
|
+
define_process_env_default = { GITHUB_STATE: "/home/runner/work/_temp/_runner_file_commands/save_state_f347cc4e-8409-4cb1-bd73-5ea4dfc29bd1", 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.5", 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.5", RUNNER_ENVIRONMENT: "github-hosted", GITHUB_ENV: "/home/runner/work/_temp/_runner_file_commands/set_env_f347cc4e-8409-4cb1-bd73-5ea4dfc29bd1", 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.5", 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: "601", 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:17357", 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.5", 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: "9581485352", 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: "2d512204b017ee7b52ba3459eb0af1ef57cd8568", 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: "3159ec212055d836d38a991cc47b4032af46431931d6562d3a56a2b6ebb9c7bb", 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--1718798060760-0.20320992843434693:/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--1718798060566-0.27679053807938003:/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--1718798035643-0.9764389940676401:/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--1718798035468-0.9194833547191164:/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_ddd748a9-4928-4ed3-ba0c-9ae307a41938", INVOCATION_ID: "7e9532587dd64854b25a8c27c43bfc2b", 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: "582", 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 59", 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.5", 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.5", 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: "2d512204b017ee7b52ba3459eb0af1ef57cd8568", 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_f347cc4e-8409-4cb1-bd73-5ea4dfc29bd1", 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_f347cc4e-8409-4cb1-bd73-5ea4dfc29bd1", 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_f347cc4e-8409-4cb1-bd73-5ea4dfc29bd1" };
|
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.5", 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;
|
@@ -21661,7 +21661,7 @@ var ce = class a3 extends Ie {
|
|
21661
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 } }));
|
21662
21662
|
}
|
21663
21663
|
});
|
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
|
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);
|
21665
21665
|
}
|
21666
21666
|
getManuallySelectedDeviceId() {
|
21667
21667
|
return this.manuallySelectedDeviceId;
|
@@ -21727,7 +21727,7 @@ var ce = class a3 extends Ie {
|
|
21727
21727
|
});
|
21728
21728
|
}
|
21729
21729
|
initAudioLevelMonitor() {
|
21730
|
-
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();
|
21731
21731
|
}
|
21732
21732
|
destroyAudioLevelMonitor() {
|
21733
21733
|
var t2;
|
@@ -21736,7 +21736,7 @@ var ce = class a3 extends Ie {
|
|
21736
21736
|
cleanup() {
|
21737
21737
|
return c2(this, null, function* () {
|
21738
21738
|
var t2;
|
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(),
|
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);
|
21740
21740
|
});
|
21741
21741
|
}
|
21742
21742
|
getTrackIDBeingSent() {
|
@@ -21815,10 +21815,10 @@ var Ye = class extends Re {
|
|
21815
21815
|
this.sinkCount > 0 && this.sinkCount--;
|
21816
21816
|
}
|
21817
21817
|
};
|
21818
|
-
var
|
21818
|
+
var Mt = { none: -1, low: 0, medium: 1, high: 2 };
|
21819
21819
|
var go = 0.5;
|
21820
21820
|
var Ds = (a11, e) => {
|
21821
|
-
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);
|
21822
21822
|
for (let o2 = 0; o2 < r2.length; o2++) {
|
21823
21823
|
let { resolution: n2, layer: l2 } = r2[o2], u2 = n2[i2];
|
21824
21824
|
if (s2 <= u2) {
|
@@ -21875,7 +21875,7 @@ var Rr = class {
|
|
21875
21875
|
(t2 = this.resizeObserver) == null || t2.unobserve(e), this.listeners.delete(e);
|
21876
21876
|
};
|
21877
21877
|
this.createObserver = () => {
|
21878
|
-
this.isSupported() && !this.resizeObserver && (this.resizeObserver = new ResizeObserver(
|
21878
|
+
this.isSupported() && !this.resizeObserver && (this.resizeObserver = new ResizeObserver(oi(this.handleResize, 300)));
|
21879
21879
|
};
|
21880
21880
|
this.handleResize = (e) => {
|
21881
21881
|
var t2;
|
@@ -21954,7 +21954,7 @@ var Xe = class {
|
|
21954
21954
|
if (r2 === 0 || s2 === 0)
|
21955
21955
|
continue;
|
21956
21956
|
let o2 = Ds(this.track.getSimulcastDefinitions(), { width: r2, height: s2 });
|
21957
|
-
e ? e =
|
21957
|
+
e ? e = Mt[o2] > Mt[e] ? o2 : e : e = o2;
|
21958
21958
|
}
|
21959
21959
|
e && (d2.d(this.TAG, `selecting max layer ${e} for the track`, `${this.track}`), yield this.track.setPreferredLayer(e));
|
21960
21960
|
});
|
@@ -21962,7 +21962,7 @@ var Xe = class {
|
|
21962
21962
|
};
|
21963
21963
|
var Ir = ((t2) => (t2.TRANSFORM = "TRANSFORM", t2.ANALYZE = "ANALYZE", t2))(Ir || {});
|
21964
21964
|
var Ar = ((t2) => (t2["2D"] = "2d", t2.WEBGL = "webgl", t2.WEBGL2 = "webgl2", t2))(Ar || {});
|
21965
|
-
var
|
21965
|
+
var yt = class {
|
21966
21966
|
constructor() {
|
21967
21967
|
this.total = 0;
|
21968
21968
|
this.count = 0;
|
@@ -21981,10 +21981,10 @@ var Ze = class {
|
|
21981
21981
|
constructor(e) {
|
21982
21982
|
this.eventBus = e;
|
21983
21983
|
this.TAG = "[VideoPluginsAnalytics]";
|
21984
|
-
this.initTime = {}, this.preProcessingAvgs = new
|
21984
|
+
this.initTime = {}, this.preProcessingAvgs = new yt(), this.addedTimestamps = {}, this.processingAvgs = {}, this.pluginAdded = {}, this.pluginInputFrameRate = {}, this.pluginFrameRate = {};
|
21985
21985
|
}
|
21986
21986
|
added(e, t2, i2) {
|
21987
|
-
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]));
|
21988
21988
|
}
|
21989
21989
|
removed(e) {
|
21990
21990
|
var t2;
|
@@ -22044,7 +22044,7 @@ var Ze = class {
|
|
22044
22044
|
var Ns = 24;
|
22045
22045
|
var fo = 320;
|
22046
22046
|
var vo = 240;
|
22047
|
-
var
|
22047
|
+
var kt = class {
|
22048
22048
|
constructor(e, t2) {
|
22049
22049
|
this.TAG = "[VideoPluginsManager]";
|
22050
22050
|
this.pluginsLoopRunning = false;
|
@@ -22267,7 +22267,7 @@ var Mt = class {
|
|
22267
22267
|
return this.pluginNumFramesSkipped[e] < this.pluginNumFramesToSkip[e] ? (this.pluginNumFramesSkipped[e]++, t2 = true) : (t2 = false, this.pluginNumFramesSkipped[e] = 0), t2;
|
22268
22268
|
}
|
22269
22269
|
};
|
22270
|
-
var
|
22270
|
+
var ci = class {
|
22271
22271
|
constructor(e, t2) {
|
22272
22272
|
this.TAG = "[MediaStreamPluginsManager]";
|
22273
22273
|
this.plugins = /* @__PURE__ */ new Set(), this.analytics = new Ze(e), this.room = t2;
|
@@ -22312,7 +22312,7 @@ var oi = class {
|
|
22312
22312
|
}
|
22313
22313
|
};
|
22314
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"];
|
22315
|
-
var
|
22315
|
+
var di = class {
|
22316
22316
|
constructor() {
|
22317
22317
|
this.eventPerformanceMeasures = {};
|
22318
22318
|
}
|
@@ -22340,7 +22340,7 @@ var ni = class {
|
|
22340
22340
|
};
|
22341
22341
|
var Hr = { isAudioMuted: false, isVideoMuted: false, audioInputDeviceId: "default", audioOutputDeviceId: "default", videoDeviceId: "default" };
|
22342
22342
|
var pe;
|
22343
|
-
var
|
22343
|
+
var li;
|
22344
22344
|
var ve = class a5 {
|
22345
22345
|
constructor(e, t2, i2, r2, s2) {
|
22346
22346
|
this.store = e;
|
@@ -22459,7 +22459,7 @@ var ve = class a5 {
|
|
22459
22459
|
static getEmptyVideoTrack(e) {
|
22460
22460
|
var n2, l2, u2;
|
22461
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;
|
22462
|
-
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(() => {
|
22463
22463
|
let p2 = pe == null ? void 0 : pe.getContext("2d");
|
22464
22464
|
p2 && p2.fillRect(0, 0, 1, 1);
|
22465
22465
|
}, 1e3 / r2));
|
@@ -22473,7 +22473,7 @@ var ve = class a5 {
|
|
22473
22473
|
return r2.enabled = false, r2;
|
22474
22474
|
}
|
22475
22475
|
static cleanup() {
|
22476
|
-
clearInterval(
|
22476
|
+
clearInterval(li), li = void 0, pe = void 0;
|
22477
22477
|
}
|
22478
22478
|
getAVTracks(e) {
|
22479
22479
|
return c2(this, null, function* () {
|
@@ -22639,7 +22639,7 @@ var F = class a6 extends Ye {
|
|
22639
22639
|
this.handleVisibilityChange = () => c2(this, null, function* () {
|
22640
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 });
|
22641
22641
|
});
|
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
|
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);
|
22643
22643
|
}
|
22644
22644
|
setSimulcastDefinitons(t2) {
|
22645
22645
|
this._layerDefinitions = t2;
|
@@ -22795,11 +22795,11 @@ var F = class a6 extends Ye {
|
|
22795
22795
|
}
|
22796
22796
|
};
|
22797
22797
|
var et = "renegotiation-callback-id";
|
22798
|
-
var
|
22798
|
+
var ui = "ion-sfu";
|
22799
22799
|
var tt = "SUBSCRIBE_ICE_CONNECTION_CALLBACK_ID";
|
22800
22800
|
var xs = "https://event.100ms.live/v2/client/report";
|
22801
22801
|
var Us = "https://event-nonprod.100ms.live/v2/client/report";
|
22802
|
-
var
|
22802
|
+
var Pt = Math.pow(2, 31) - 1;
|
22803
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" };
|
22804
22804
|
var Bs = "2.5";
|
22805
22805
|
var Vs = "20240521";
|
@@ -23050,7 +23050,7 @@ var Ws = (a11, e, t2, i2) => c2(void 0, null, function* () {
|
|
23050
23050
|
let h2 = (P7 = l2[p2]) == null ? void 0 : P7.codecId, T = h2 ? n2[h2] : void 0, g2;
|
23051
23051
|
T && (g2 = T.substring(T.indexOf("/") + 1));
|
23052
23052
|
let v2 = M2(m({}, l2[p2]), { rid: (w2 = l2[p2]) == null ? void 0 : w2.rid }), E2 = u2[v2.ssrc];
|
23053
|
-
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 });
|
23054
23054
|
});
|
23055
23055
|
} catch (n2) {
|
23056
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);
|
@@ -23066,7 +23066,7 @@ var $s = (a11, e, t2, i2) => c2(void 0, null, function* () {
|
|
23066
23066
|
} catch (u2) {
|
23067
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);
|
23068
23068
|
}
|
23069
|
-
let s2 = Po(r2), o2 =
|
23069
|
+
let s2 = Po(r2), o2 = Et("bytesReceived", s2, i2), n2 = _r("packetsLost", s2, i2);
|
23070
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 });
|
23071
23071
|
});
|
23072
23072
|
var Po = (a11) => {
|
@@ -23093,7 +23093,7 @@ var Po = (a11) => {
|
|
23093
23093
|
return r2 && (s2 = r2.substring(r2.indexOf("/") + 1)), e && Object.assign(e, { remote: t2, codec: s2 });
|
23094
23094
|
};
|
23095
23095
|
var Nr = (a11, e, t2) => {
|
23096
|
-
let i2 = Eo(e), r2 =
|
23096
|
+
let i2 = Eo(e), r2 = Et(a11 === "publish" ? "bytesSent" : "bytesReceived", i2, t2 && t2[a11]);
|
23097
23097
|
return i2 && Object.assign(i2, { bitrate: r2 });
|
23098
23098
|
};
|
23099
23099
|
var Eo = (a11) => {
|
@@ -23111,13 +23111,13 @@ var Ks = (a11) => {
|
|
23111
23111
|
}), e;
|
23112
23112
|
};
|
23113
23113
|
var qs = (a11, e) => Array.from(new Set(a11.concat(e)));
|
23114
|
-
var
|
23114
|
+
var Et = (a11, e, t2) => _r(a11, e, t2) * 8;
|
23115
23115
|
var _r = (a11, e, t2) => {
|
23116
23116
|
let i2 = e && e[a11], r2 = t2 ? t2[a11] : null;
|
23117
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;
|
23118
23118
|
};
|
23119
23119
|
var Or = (a11, e, t2, i2) => ee(a11) && ee(e) && t2 && i2 ? (a11 - e) / (t2 - i2) : 0;
|
23120
|
-
var
|
23120
|
+
var pi = class {
|
23121
23121
|
constructor(e, t2, i2) {
|
23122
23122
|
this.getStats = e;
|
23123
23123
|
this.store = t2;
|
@@ -23177,7 +23177,7 @@ var li = class {
|
|
23177
23177
|
this.localPeerID = (r2 = this.store.getLocalPeer()) == null ? void 0 : r2.peerId;
|
23178
23178
|
}
|
23179
23179
|
};
|
23180
|
-
var
|
23180
|
+
var hi = class {
|
23181
23181
|
constructor(e, t2, i2, r2) {
|
23182
23182
|
this.store = e;
|
23183
23183
|
this.eventBus = t2;
|
@@ -23207,7 +23207,7 @@ var ui = class {
|
|
23207
23207
|
}
|
23208
23208
|
setPeerConnections({ publish: e, subscribe: t2 }) {
|
23209
23209
|
var i2, r2;
|
23210
|
-
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);
|
23211
23211
|
}
|
23212
23212
|
start() {
|
23213
23213
|
return c2(this, null, function* () {
|
@@ -23298,7 +23298,7 @@ var We = class extends it {
|
|
23298
23298
|
}`;
|
23299
23299
|
}
|
23300
23300
|
};
|
23301
|
-
var
|
23301
|
+
var bt = class extends it {
|
23302
23302
|
constructor(t2) {
|
23303
23303
|
super(M2(m({}, t2), { isLocal: false }));
|
23304
23304
|
this.isLocal = false;
|
@@ -23307,8 +23307,8 @@ var Pt = class extends it {
|
|
23307
23307
|
this.fromRoomState = !!t2.fromRoomState;
|
23308
23308
|
}
|
23309
23309
|
};
|
23310
|
-
var he = (a11, e) => new
|
23311
|
-
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 {
|
23312
23312
|
constructor(e, t2, i2) {
|
23313
23313
|
this.transport = e;
|
23314
23314
|
this.store = t2;
|
@@ -23388,7 +23388,7 @@ var De = class extends Ro {
|
|
23388
23388
|
return super.listeners(e);
|
23389
23389
|
}
|
23390
23390
|
};
|
23391
|
-
var
|
23391
|
+
var Si = class extends De {
|
23392
23392
|
constructor() {
|
23393
23393
|
super(...arguments);
|
23394
23394
|
this.audioElement = null;
|
@@ -23440,7 +23440,7 @@ var hi = class extends De {
|
|
23440
23440
|
}), this.audioContextManager = new st(t2), t2;
|
23441
23441
|
}
|
23442
23442
|
};
|
23443
|
-
var
|
23443
|
+
var gi = class extends De {
|
23444
23444
|
constructor() {
|
23445
23445
|
super(...arguments);
|
23446
23446
|
this.TAG = "[PlaylistVideoManager]";
|
@@ -23514,13 +23514,13 @@ var mi = class extends De {
|
|
23514
23514
|
this.canvas || (this.canvas = document.createElement("canvas"), this.canvasContext = this.canvas.getContext("2d"));
|
23515
23515
|
}
|
23516
23516
|
};
|
23517
|
-
var
|
23518
|
-
var
|
23517
|
+
var Ti = { audio: { list: [], currentIndex: -1, isAutoplayOn: true }, video: { list: [], currentIndex: -1, isAutoplayOn: true } };
|
23518
|
+
var Rt = class extends De {
|
23519
23519
|
constructor(t2, i2) {
|
23520
23520
|
super();
|
23521
23521
|
this.sdk = t2;
|
23522
23522
|
this.eventBus = i2;
|
23523
|
-
this.state = { audio: m({},
|
23523
|
+
this.state = { audio: m({}, Ti.audio), video: m({}, Ti.video) };
|
23524
23524
|
this.TAG = "[PlaylistManager]";
|
23525
23525
|
this.handlePausePlaylist = (r2) => c2(this, [r2], function* ({ enabled: t3, track: i3 }) {
|
23526
23526
|
var o2;
|
@@ -23530,12 +23530,12 @@ var Et = class extends De {
|
|
23530
23530
|
i3.source === "audioplaylist" && (s2 = "audio"), i3.source === "videoplaylist" && (s2 = "video"), s2 && ((o2 = this.getElement(s2)) == null || o2.pause());
|
23531
23531
|
});
|
23532
23532
|
this.addTrack = (t3, i3) => c2(this, null, function* () {
|
23533
|
-
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));
|
23534
23534
|
});
|
23535
23535
|
this.removeTrack = (t3) => c2(this, null, function* () {
|
23536
23536
|
yield this.sdk.removeTrack(t3, true), d2.d(this.TAG, "Playlist track removed", t3);
|
23537
23537
|
});
|
23538
|
-
this.audioManager = new
|
23538
|
+
this.audioManager = new Si(), this.videoManager = new gi(), this.addListeners();
|
23539
23539
|
}
|
23540
23540
|
getList(t2 = "audio") {
|
23541
23541
|
return this.state[t2].list;
|
@@ -23658,7 +23658,7 @@ var Et = class extends De {
|
|
23658
23658
|
});
|
23659
23659
|
}
|
23660
23660
|
cleanup() {
|
23661
|
-
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();
|
23662
23662
|
}
|
23663
23663
|
onProgress(t2) {
|
23664
23664
|
this.videoManager.on("progress", () => {
|
@@ -23740,7 +23740,7 @@ var Io = (a11) => a11.errors;
|
|
23740
23740
|
var Gh = createSelector(Io, (a11) => a11.length === 0 ? null : a11.at(-1));
|
23741
23741
|
var Wh = createSelector(B2, (a11) => a11.id);
|
23742
23742
|
var q2 = (a11) => a11.peers;
|
23743
|
-
var
|
23743
|
+
var fi = (a11) => a11.messages.byID;
|
23744
23744
|
var js = (a11) => a11.messages.allIDs;
|
23745
23745
|
var N2 = (a11) => a11.tracks;
|
23746
23746
|
var Js = (a11) => a11.settings;
|
@@ -23824,20 +23824,20 @@ var tm = createSelector(q2, N2, (a11, e) => {
|
|
23824
23824
|
var im = createSelector(q2, N2, (a11, e) => {
|
23825
23825
|
for (let t2 in e) {
|
23826
23826
|
let i2 = e[t2];
|
23827
|
-
if (
|
23827
|
+
if (ri(i2) && i2.peerId)
|
23828
23828
|
return a11[i2.peerId];
|
23829
23829
|
}
|
23830
23830
|
});
|
23831
23831
|
var rm = createSelector(Co, (a11) => a11.filter(as));
|
23832
23832
|
var sm = createSelector(js, (a11) => a11.length);
|
23833
|
-
var am = createSelector(
|
23834
|
-
var
|
23833
|
+
var am = createSelector(fi, (a11) => Object.values(a11).filter((e) => !e.read).length);
|
23834
|
+
var It = createSelector(js, fi, (a11, e) => {
|
23835
23835
|
let t2 = [];
|
23836
23836
|
return a11.forEach((i2) => {
|
23837
23837
|
t2.push(e[i2]);
|
23838
23838
|
}), t2;
|
23839
23839
|
});
|
23840
|
-
var wo = createSelector(
|
23840
|
+
var wo = createSelector(It, (a11) => a11.filter((e) => {
|
23841
23841
|
var t2;
|
23842
23842
|
return !e.recipientPeer && !(e.recipientRoles && ((t2 = e.recipientRoles) == null ? void 0 : t2.length) > 0);
|
23843
23843
|
}));
|
@@ -23888,7 +23888,7 @@ var la = { selection: Vr("video"), progress: ra("video"), currentTime: sa("video
|
|
23888
23888
|
function A2(a11) {
|
23889
23889
|
return (e) => (t2) => a11(t2, e);
|
23890
23890
|
}
|
23891
|
-
var
|
23891
|
+
var At = "HMS-Store:";
|
23892
23892
|
var b2 = class {
|
23893
23893
|
static v(e, ...t2) {
|
23894
23894
|
this.log(0, e, ...t2);
|
@@ -23918,23 +23918,23 @@ var b2 = class {
|
|
23918
23918
|
if (!(this.level.valueOf() > e.valueOf()))
|
23919
23919
|
switch (e) {
|
23920
23920
|
case 0: {
|
23921
|
-
console.log(
|
23921
|
+
console.log(At, ...t2);
|
23922
23922
|
break;
|
23923
23923
|
}
|
23924
23924
|
case 1: {
|
23925
|
-
console.debug(
|
23925
|
+
console.debug(At, ...t2);
|
23926
23926
|
break;
|
23927
23927
|
}
|
23928
23928
|
case 2: {
|
23929
|
-
console.info(
|
23929
|
+
console.info(At, ...t2);
|
23930
23930
|
break;
|
23931
23931
|
}
|
23932
23932
|
case 3: {
|
23933
|
-
console.warn(
|
23933
|
+
console.warn(At, ...t2);
|
23934
23934
|
break;
|
23935
23935
|
}
|
23936
23936
|
case 6: {
|
23937
|
-
console.error(
|
23937
|
+
console.error(At, ...t2);
|
23938
23938
|
break;
|
23939
23939
|
}
|
23940
23940
|
case 4: {
|
@@ -23956,31 +23956,31 @@ var b2 = class {
|
|
23956
23956
|
};
|
23957
23957
|
b2.level = 0;
|
23958
23958
|
var Fr = (a11, e) => e;
|
23959
|
-
var
|
23959
|
+
var Ht = (a11, e) => e;
|
23960
23960
|
var ua = (a11, e) => e;
|
23961
23961
|
var Oo = (a11, e) => e;
|
23962
23962
|
var xo = (a11, e) => e;
|
23963
23963
|
var j2 = createSelector([q2, Fr], (a11, e) => e ? a11[e] : null);
|
23964
|
-
var Gr = createSelector([N2,
|
23965
|
-
var Uo = createSelector([N2,
|
23964
|
+
var Gr = createSelector([N2, Ht], (a11, e) => e ? a11[e] : null);
|
23965
|
+
var Uo = createSelector([N2, Ht], (a11, e) => {
|
23966
23966
|
if (!e)
|
23967
23967
|
return null;
|
23968
23968
|
let t2 = a11[e];
|
23969
23969
|
return (t2 == null ? void 0 : t2.type) === "video" ? t2 : null;
|
23970
23970
|
});
|
23971
|
-
var Bo = createSelector([N2,
|
23971
|
+
var Bo = createSelector([N2, Ht], (a11, e) => {
|
23972
23972
|
if (!e)
|
23973
23973
|
return null;
|
23974
23974
|
let t2 = a11[e];
|
23975
23975
|
return (t2 == null ? void 0 : t2.type) === "audio" ? t2 : null;
|
23976
23976
|
});
|
23977
|
-
var Vo = createSelector([N2,
|
23977
|
+
var Vo = createSelector([N2, Ht], (a11, e) => {
|
23978
23978
|
if (!e)
|
23979
23979
|
return null;
|
23980
23980
|
let t2 = a11[e];
|
23981
23981
|
return (t2 == null ? void 0 : t2.type) === "audio" && (t2 == null ? void 0 : t2.source) === "screen" ? t2 : null;
|
23982
23982
|
});
|
23983
|
-
var Fo = createSelector([N2,
|
23983
|
+
var Fo = createSelector([N2, Ht], (a11, e) => {
|
23984
23984
|
if (!e)
|
23985
23985
|
return null;
|
23986
23986
|
let t2 = a11[e];
|
@@ -24000,7 +24000,7 @@ function Om(a11) {
|
|
24000
24000
|
}
|
24001
24001
|
var Um = A2(createSelector(j2, (a11) => a11 == null ? void 0 : a11.name));
|
24002
24002
|
var Bm = A2(createSelector(j2, (a11) => a11 == null ? void 0 : a11.type));
|
24003
|
-
var
|
24003
|
+
var vi = A2(Gr);
|
24004
24004
|
var pa = A2(Uo);
|
24005
24005
|
var Vm = A2(Bo);
|
24006
24006
|
var Fm = A2(Vo);
|
@@ -24054,7 +24054,7 @@ var zm = A2(createSelector(N2, j2, (a11, e) => {
|
|
24054
24054
|
var Ym = A2(createSelector(N2, j2, (a11, e) => {
|
24055
24055
|
let t2 = e == null ? void 0 : e.auxiliaryTracks.find((i2) => {
|
24056
24056
|
let r2 = a11[i2];
|
24057
|
-
return
|
24057
|
+
return ri(r2) && pt(r2);
|
24058
24058
|
});
|
24059
24059
|
return t2 ? a11[t2] : void 0;
|
24060
24060
|
}));
|
@@ -24108,21 +24108,21 @@ var aS = A2((a11, e) => {
|
|
24108
24108
|
return t2.layer;
|
24109
24109
|
}
|
24110
24110
|
});
|
24111
|
-
var fa = createSelector([
|
24111
|
+
var fa = createSelector([It, ye, Fr], (a11, e, t2) => {
|
24112
24112
|
if (t2)
|
24113
24113
|
return a11.filter((i2) => {
|
24114
24114
|
var r2;
|
24115
24115
|
return !i2.recipientPeer && !((r2 = i2.recipientRoles) != null && r2.length) || i2.sender && ![e, t2].includes(i2.sender) ? false : [e, t2].includes(i2.recipientPeer);
|
24116
24116
|
});
|
24117
24117
|
});
|
24118
|
-
var va = createSelector([
|
24118
|
+
var va = createSelector([It, ua], (a11, e) => {
|
24119
24119
|
if (e)
|
24120
24120
|
return a11.filter((t2) => {
|
24121
24121
|
var i2, r2;
|
24122
24122
|
return (i2 = t2.recipientRoles) != null && i2.length ? (r2 = t2.recipientRoles) == null ? void 0 : r2.includes(e) : false;
|
24123
24123
|
});
|
24124
24124
|
});
|
24125
|
-
var qo = createSelector(
|
24125
|
+
var qo = createSelector(It, (a11) => a11.filter((e) => {
|
24126
24126
|
var t2;
|
24127
24127
|
return !e.recipientPeer && !((t2 = e.recipientRoles) != null && t2.length);
|
24128
24128
|
}));
|
@@ -24150,12 +24150,12 @@ var Xo = createSelector([oe, N2], (a11, e) => {
|
|
24150
24150
|
let t2 = null;
|
24151
24151
|
return a11 && (t2 = e[a11]), (t2 == null ? void 0 : t2.plugins) || [];
|
24152
24152
|
});
|
24153
|
-
var
|
24154
|
-
var
|
24155
|
-
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" };
|
24156
24156
|
var ya = { TRANSCRIPTION_STATE_UPDATED: "TRANSCRIPTION_STATE_UPDATED" };
|
24157
24157
|
var Wr = "hmsNotification";
|
24158
|
-
var
|
24158
|
+
var Pi = class {
|
24159
24159
|
constructor(e) {
|
24160
24160
|
this.id = 0;
|
24161
24161
|
this.onNotification = (e2, t2) => {
|
@@ -24171,7 +24171,7 @@ var yi = class {
|
|
24171
24171
|
this.eventEmitter.removeListener(Wr, i2);
|
24172
24172
|
};
|
24173
24173
|
};
|
24174
|
-
this.store = e, this.eventEmitter = new Zo({ maxListeners: Object.keys(
|
24174
|
+
this.store = e, this.eventEmitter = new Zo({ maxListeners: Object.keys(Sr).length });
|
24175
24175
|
}
|
24176
24176
|
sendPlaylistTrackEnded(e) {
|
24177
24177
|
let t2 = this.createNotification("PLAYLIST_TRACK_ENDED", e, "info");
|
@@ -24194,14 +24194,14 @@ var yi = class {
|
|
24194
24194
|
this.emitEvent(t2);
|
24195
24195
|
}
|
24196
24196
|
sendPeerUpdate(e, t2) {
|
24197
|
-
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];
|
24198
24198
|
if (r2 && i2) {
|
24199
24199
|
let s2 = this.createNotification(r2, i2, "info");
|
24200
24200
|
this.emitEvent(s2);
|
24201
24201
|
}
|
24202
24202
|
}
|
24203
24203
|
sendTrackUpdate(e, t2) {
|
24204
|
-
let i2 = this.store.getState(
|
24204
|
+
let i2 = this.store.getState(vi(t2)), r2 = Ct[e];
|
24205
24205
|
if (r2) {
|
24206
24206
|
let s2 = this.createNotification(r2, i2, "info");
|
24207
24207
|
this.emitEvent(s2);
|
@@ -24232,7 +24232,7 @@ var yi = class {
|
|
24232
24232
|
this.emitEvent(t2);
|
24233
24233
|
}
|
24234
24234
|
sendPollUpdate(e, t2) {
|
24235
|
-
let i2 =
|
24235
|
+
let i2 = ki[e], r2 = this.store.getState(Ma(t2));
|
24236
24236
|
if (i2) {
|
24237
24237
|
let s2 = this.createNotification(i2, r2, "info");
|
24238
24238
|
this.emitEvent(s2);
|
@@ -24249,7 +24249,7 @@ var yi = class {
|
|
24249
24249
|
return this.id++, { id: this.id, type: e, message: r2, data: t2, severity: i2 };
|
24250
24250
|
}
|
24251
24251
|
};
|
24252
|
-
var
|
24252
|
+
var Ei = class {
|
24253
24253
|
constructor(e) {
|
24254
24254
|
this.queuedUpdates = {};
|
24255
24255
|
this.timers = {};
|
@@ -24280,35 +24280,35 @@ function ka(a11) {
|
|
24280
24280
|
return a11 instanceof ae || a11 instanceof U2;
|
24281
24281
|
}
|
24282
24282
|
var Pa = (a11, e) => {
|
24283
|
-
let t2 =
|
24283
|
+
let t2 = Lt(Object.keys(a11), Object.keys(e));
|
24284
24284
|
for (let i2 of t2) {
|
24285
24285
|
let r2 = a11[i2], s2 = e[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] :
|
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);
|
24287
24287
|
}
|
24288
24288
|
};
|
24289
24289
|
var Ea = (a11, e) => {
|
24290
|
-
let t2 =
|
24290
|
+
let t2 = Lt(Object.keys(a11), Object.keys(e));
|
24291
24291
|
for (let i2 of t2) {
|
24292
24292
|
let r2 = a11[i2], s2 = e[i2];
|
24293
|
-
$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);
|
24294
24294
|
}
|
24295
24295
|
};
|
24296
24296
|
var ba = (a11, e) => {
|
24297
|
-
let t2 =
|
24297
|
+
let t2 = Lt(Object.keys(a11), Object.keys(e));
|
24298
24298
|
for (let i2 of t2) {
|
24299
24299
|
let r2 = a11[i2], s2 = e[i2];
|
24300
|
-
$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);
|
24301
24301
|
}
|
24302
24302
|
};
|
24303
24303
|
var $r = (a11, e) => {
|
24304
|
-
let t2 =
|
24304
|
+
let t2 = Lt(Object.keys(a11), Object.keys(e));
|
24305
24305
|
for (let i2 of t2) {
|
24306
24306
|
let r2 = a11[i2], s2 = e[i2];
|
24307
|
-
$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);
|
24308
24308
|
}
|
24309
24309
|
};
|
24310
24310
|
var Ra = (a11, e, t2) => {
|
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 =
|
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));
|
24312
24312
|
for (let s2 of r2) {
|
24313
24313
|
if (!i2[s2]) {
|
24314
24314
|
delete a11[s2];
|
@@ -24322,7 +24322,7 @@ var Kr = (a11, e) => {
|
|
24322
24322
|
};
|
24323
24323
|
var $e = (a11, e) => a11 && e;
|
24324
24324
|
var qr = (a11, e) => a11 && !e;
|
24325
|
-
var
|
24325
|
+
var bi = (a11, e) => !a11 && e;
|
24326
24326
|
var se = (a11, e) => {
|
24327
24327
|
if (a11 === e || a11.length === 0 && (e == null ? void 0 : e.length) === 0)
|
24328
24328
|
return true;
|
@@ -24333,7 +24333,7 @@ var se = (a11, e) => {
|
|
24333
24333
|
return false;
|
24334
24334
|
return true;
|
24335
24335
|
};
|
24336
|
-
var
|
24336
|
+
var Lt = (a11, e) => {
|
24337
24337
|
let t2 = /* @__PURE__ */ new Set();
|
24338
24338
|
for (let i2 of a11)
|
24339
24339
|
t2.add(i2);
|
@@ -24418,7 +24418,7 @@ var _2 = class a8 {
|
|
24418
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 || [] };
|
24419
24419
|
}
|
24420
24420
|
};
|
24421
|
-
var
|
24421
|
+
var Dt = class {
|
24422
24422
|
constructor(e, t2, i2, r2) {
|
24423
24423
|
this.playlistManager = e;
|
24424
24424
|
this.syncPlaylistState = i2;
|
@@ -24489,7 +24489,7 @@ var Ct = class {
|
|
24489
24489
|
});
|
24490
24490
|
}
|
24491
24491
|
};
|
24492
|
-
var
|
24492
|
+
var Ri = class {
|
24493
24493
|
constructor(e, t2) {
|
24494
24494
|
this.sdk = e;
|
24495
24495
|
this.setLocally = t2;
|
@@ -24516,7 +24516,7 @@ var Ei = class {
|
|
24516
24516
|
});
|
24517
24517
|
}
|
24518
24518
|
};
|
24519
|
-
var
|
24519
|
+
var Ii = class {
|
24520
24520
|
constructor(e, t2) {
|
24521
24521
|
this.intervalMs = 100, this.shouldMonitor = false, this.hasStarted = false, this.unsubs = [], this.analysers = {}, this.store = e, this.actions = t2;
|
24522
24522
|
}
|
@@ -24602,7 +24602,7 @@ var _e = (a11, e) => {
|
|
24602
24602
|
let t2 = a11.filter((i2) => en2(e(i2)));
|
24603
24603
|
return t2.reduce((i2, r2) => i2 + (e(r2) || 0), 0) / t2.length;
|
24604
24604
|
};
|
24605
|
-
var
|
24605
|
+
var Ai = class {
|
24606
24606
|
constructor(e) {
|
24607
24607
|
this.sdk = e;
|
24608
24608
|
this.peerStatsList = [];
|
@@ -24621,14 +24621,14 @@ var Ri = class {
|
|
24621
24621
|
let o2 = yield (T = (h2 = this.sdk.getWebrtcInternals()) == null ? void 0 : h2.getSubscribePeerConnection()) == null ? void 0 : T.getStats();
|
24622
24622
|
o2 == null || o2.forEach((g2) => {
|
24623
24623
|
if (g2.type === "inbound-rtp") {
|
24624
|
-
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));
|
24625
24625
|
v2.push(M2(m({}, g2), { bitrate: E2 }));
|
24626
24626
|
}
|
24627
24627
|
});
|
24628
24628
|
});
|
24629
24629
|
}
|
24630
24630
|
buildReport() {
|
24631
|
-
var T, g2, v2, E2, P7, w2, Oe,
|
24631
|
+
var T, g2, v2, E2, P7, w2, Oe, Zt;
|
24632
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);
|
24633
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) => {
|
24634
24634
|
var $;
|
@@ -24636,13 +24636,13 @@ var Ri = class {
|
|
24636
24636
|
}), bitrateReceived: _e(this.peerStatsList, (x2) => {
|
24637
24637
|
var $;
|
24638
24638
|
return ($ = x2.subscribe) == null ? void 0 : $.bitrate;
|
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: ((
|
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 } };
|
24640
24640
|
}
|
24641
24641
|
};
|
24642
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 || {});
|
24643
24643
|
var Ca;
|
24644
24644
|
var La;
|
24645
|
-
var
|
24645
|
+
var Hi = class {
|
24646
24646
|
constructor(e, t2, i2, r2) {
|
24647
24647
|
this.sdk = e;
|
24648
24648
|
this.sdkListener = t2;
|
@@ -24677,7 +24677,6 @@ var Ii = class {
|
|
24677
24677
|
this.onSessionStoreUpdate = this.sdkListener.onSessionStoreUpdate.bind(this.sdkListener);
|
24678
24678
|
this.onPollsUpdate = this.sdkListener.onPollsUpdate.bind(this.sdkListener);
|
24679
24679
|
this.onWhiteboardUpdate = this.sdkListener.onWhiteboardUpdate.bind(this.sdkListener);
|
24680
|
-
this._state = 0;
|
24681
24680
|
this.handleConnectionQualityUpdate = (e2) => {
|
24682
24681
|
let t3 = e2.find((i3) => {
|
24683
24682
|
var r3, s2;
|
@@ -24685,14 +24684,14 @@ var Ii = class {
|
|
24685
24684
|
});
|
24686
24685
|
this.networkScores.push(ee(t3 == null ? void 0 : t3.downlinkQuality) ? t3.downlinkQuality : -1);
|
24687
24686
|
};
|
24688
|
-
this.statsCollector = new
|
24687
|
+
this.statsCollector = new Ai(e), this.state = 0;
|
24689
24688
|
}
|
24690
24689
|
get state() {
|
24691
24690
|
return this._state;
|
24692
24691
|
}
|
24693
24692
|
set state(e) {
|
24694
24693
|
var t2;
|
24695
|
-
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));
|
24696
24695
|
}
|
24697
24696
|
onICESuccess(e) {
|
24698
24697
|
e ? this.isPublishICEConnected = true : this.isSubscribeICEConnected = true, this.isPublishICEConnected && this.isSubscribeICEConnected && (this.state = 3);
|
@@ -24764,7 +24763,7 @@ var Ne = class {
|
|
24764
24763
|
this.id = e;
|
24765
24764
|
}
|
24766
24765
|
};
|
24767
|
-
var
|
24766
|
+
var Ci = (a11, e, t2) => c2(void 0, null, function* () {
|
24768
24767
|
let r2 = Error("something went wrong during fetch");
|
24769
24768
|
for (let s2 = 0; s2 < 4; s2++)
|
24770
24769
|
try {
|
@@ -24791,18 +24790,20 @@ function nt(a11) {
|
|
24791
24790
|
throw S2.APIErrors.InvalidTokenFormat("INIT", `couldn't parse to json - ${i2.message}`);
|
24792
24791
|
}
|
24793
24792
|
}
|
24794
|
-
var
|
24793
|
+
var wt = class {
|
24795
24794
|
constructor(e, t2) {
|
24796
24795
|
this.sdk = e;
|
24797
24796
|
this.sdkListener = t2;
|
24798
24797
|
this.recordedAudio = Ha;
|
24799
|
-
this.isConnectivityCheckInProgress = false;
|
24800
24798
|
this.initSdkWithLocalPeer();
|
24801
24799
|
}
|
24802
24800
|
get localPeer() {
|
24803
24801
|
var e;
|
24804
24802
|
return (e = this.sdk) == null ? void 0 : e.store.getLocalPeer();
|
24805
24803
|
}
|
24804
|
+
checkBrowserSupport() {
|
24805
|
+
Tt(), gt();
|
24806
|
+
}
|
24806
24807
|
requestPermission(e) {
|
24807
24808
|
return c2(this, null, function* () {
|
24808
24809
|
let t2 = yield navigator.mediaDevices.getUserMedia(e);
|
@@ -24859,16 +24860,9 @@ var Lt = class {
|
|
24859
24860
|
var n2;
|
24860
24861
|
if (!this.sdk)
|
24861
24862
|
throw new Error("SDK not found");
|
24862
|
-
|
24863
|
-
|
24864
|
-
|
24865
|
-
let r2 = yield this.getAuthToken(i2), { roomId: s2 } = nt(r2);
|
24866
|
-
(n2 = this.sdk) == null || n2.store.setRoom(new Ne(s2)), yield this.sdk.leave();
|
24867
|
-
let o2 = new Ii(this.sdk, this.sdkListener, e, (l2) => {
|
24868
|
-
this.isConnectivityCheckInProgress = false, t2(l2);
|
24869
|
-
});
|
24870
|
-
yield this.sdk.join({ authToken: r2, userName: "diagonistic-test", initEndpoint: "https://qa-in2-ipv6.100ms.live/init" }, o2), this.sdk.addConnectionQualityListener({ onConnectionQualityUpdate(l2) {
|
24871
|
-
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);
|
24872
24866
|
} });
|
24873
24867
|
});
|
24874
24868
|
}
|
@@ -24887,7 +24881,7 @@ var Lt = class {
|
|
24887
24881
|
return c2(this, null, function* () {
|
24888
24882
|
let t2 = new URL("https://api-nonprod.100ms.live/v2/diagnostics/token");
|
24889
24883
|
e && t2.searchParams.append("region", e);
|
24890
|
-
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();
|
24891
24885
|
if (!i2.ok)
|
24892
24886
|
throw S2.APIErrors.ServerErrors(r2.code, "GET_TOKEN", r2.message, false);
|
24893
24887
|
let { token: s2 } = r2;
|
@@ -24907,7 +24901,7 @@ var Lt = class {
|
|
24907
24901
|
});
|
24908
24902
|
}
|
24909
24903
|
};
|
24910
|
-
var
|
24904
|
+
var Li = class {
|
24911
24905
|
constructor(e, t2, i2) {
|
24912
24906
|
this.isRoomJoinCalled = false;
|
24913
24907
|
this.ignoredMessageTypes = [];
|
@@ -24922,7 +24916,7 @@ var Hi = class {
|
|
24922
24916
|
}, e2);
|
24923
24917
|
};
|
24924
24918
|
this.sendPeerUpdateNotification = (e2, t3) => {
|
24925
|
-
let i3 = this.store.getState(Z2(t3.peerId)), r2 =
|
24919
|
+
let i3 = this.store.getState(Z2(t3.peerId)), r2 = yi[e2] || "peerUpdate";
|
24926
24920
|
if (e2 === 8)
|
24927
24921
|
this.syncRoomState(r2), this.updateMidCallPreviewRoomState(e2, t3);
|
24928
24922
|
else if ([0, 1].includes(e2))
|
@@ -24940,7 +24934,7 @@ var Hi = class {
|
|
24940
24934
|
};
|
24941
24935
|
this.getSDKHMSPeer = (e2) => this.sdk.getPeerMap()[e2];
|
24942
24936
|
this.setState = (e2, t3) => this.store.namedSetState(e2, t3);
|
24943
|
-
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);
|
24944
24938
|
}
|
24945
24939
|
getLocalTrack(e) {
|
24946
24940
|
return this.sdk.store.getLocalPeerTracks().find((t2) => t2.trackId === e);
|
@@ -25444,16 +25438,16 @@ var Hi = class {
|
|
25444
25438
|
}
|
25445
25439
|
enableBeamSpeakerLabelsLogging() {
|
25446
25440
|
return c2(this, null, function* () {
|
25447
|
-
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());
|
25448
25442
|
});
|
25449
25443
|
}
|
25450
25444
|
initDiagnostics() {
|
25451
|
-
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) });
|
25452
25446
|
return this.sdk.addAudioListener({ onAudioLevelUpdate: this.onAudioLevelUpdate.bind(this) }), this.sdk.addConnectionQualityListener({ onConnectionQualityUpdate: this.onConnectionQualityUpdate.bind(this) }), e;
|
25453
25447
|
}
|
25454
25448
|
resetState(e = "resetState") {
|
25455
25449
|
this.isRoomJoinCalled = false, b2.cleanup(), this.setState((t2) => {
|
25456
|
-
Object.assign(t2,
|
25450
|
+
Object.assign(t2, ti());
|
25457
25451
|
}, e);
|
25458
25452
|
}
|
25459
25453
|
sdkJoinWithListeners(e) {
|
@@ -25498,7 +25492,7 @@ var Hi = class {
|
|
25498
25492
|
this.setSessionStoreValueLocally(e, "sessionStoreUpdate");
|
25499
25493
|
}
|
25500
25494
|
onPollsUpdate(e, t2) {
|
25501
|
-
let i2 =
|
25495
|
+
let i2 = ki[e];
|
25502
25496
|
this.setState((r2) => {
|
25503
25497
|
let s2 = t2.reduce((o2, n2) => {
|
25504
25498
|
var l2;
|
@@ -25565,7 +25559,7 @@ var Hi = class {
|
|
25565
25559
|
}
|
25566
25560
|
onJoin(e) {
|
25567
25561
|
let t2 = this.sdk.getPlaylistManager();
|
25568
|
-
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) => {
|
25569
25563
|
var r2;
|
25570
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";
|
25571
25565
|
}, "joined"), t2.onProgress(this.setProgress), t2.onNewTrackStart((i2) => {
|
@@ -25607,10 +25601,10 @@ var Hi = class {
|
|
25607
25601
|
if (e === 1)
|
25608
25602
|
this.hmsNotifications.sendTrackUpdate(e, t2.trackId), this.handleTrackRemove(t2, i2);
|
25609
25603
|
else if ([0, 1].includes(e)) {
|
25610
|
-
let r2 =
|
25604
|
+
let r2 = Ct[e];
|
25611
25605
|
this.syncRoomState(r2), this.hmsNotifications.sendTrackUpdate(e, t2.trackId);
|
25612
25606
|
} else {
|
25613
|
-
let r2 =
|
25607
|
+
let r2 = Ct[e] || "trackUpdate", s2 = _2.convertTrack(t2);
|
25614
25608
|
this.setState((o2) => {
|
25615
25609
|
let n2 = o2.tracks[s2.id];
|
25616
25610
|
$e(n2, s2) && (Kr(n2, s2), Object.assign(n2, s2));
|
@@ -25650,7 +25644,7 @@ var Hi = class {
|
|
25650
25644
|
}
|
25651
25645
|
onChangeTrackStateRequest(e) {
|
25652
25646
|
var s2;
|
25653
|
-
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));
|
25654
25648
|
if (!r2)
|
25655
25649
|
return this.logPossibleInconsistency(`Not found track for which track state change was requested, ${e.track}`);
|
25656
25650
|
e.enabled || this.syncRoomState("changeTrackStateRequest"), this.hmsNotifications.sendChangeTrackStateRequest({ requestedBy: t2 || void 0, track: r2, enabled: e.enabled });
|
@@ -25822,8 +25816,8 @@ var Hi = class {
|
|
25822
25816
|
}, t2);
|
25823
25817
|
}
|
25824
25818
|
};
|
25825
|
-
var
|
25826
|
-
var
|
25819
|
+
var Di = (a11) => O2 ? `${a11} ${document.title}` : a11;
|
25820
|
+
var wi = class {
|
25827
25821
|
constructor(e, t2) {
|
25828
25822
|
this.eventBus = e;
|
25829
25823
|
this.listener = t2;
|
@@ -25878,7 +25872,7 @@ var Li = class {
|
|
25878
25872
|
e !== this.score && (this.score = e, (i2 = (t2 = this.listener) == null ? void 0 : t2.onNetworkQuality) == null || i2.call(t2, e));
|
25879
25873
|
}
|
25880
25874
|
};
|
25881
|
-
var
|
25875
|
+
var _t = class {
|
25882
25876
|
constructor(e, t2, i2, r2, s2, o2) {
|
25883
25877
|
this.store = e;
|
25884
25878
|
this.transport = t2;
|
@@ -26000,12 +25994,12 @@ var jr = class {
|
|
26000
25994
|
}
|
26001
25995
|
};
|
26002
25996
|
var Pe = new jr();
|
26003
|
-
var
|
25997
|
+
var Nt = class {
|
26004
25998
|
constructor(e) {
|
26005
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);
|
26006
26000
|
}
|
26007
26001
|
};
|
26008
|
-
var
|
26002
|
+
var Ot = class {
|
26009
26003
|
constructor() {
|
26010
26004
|
this.TAG = "[Store]:";
|
26011
26005
|
this.knownRoles = {};
|
@@ -26016,7 +26010,7 @@ var _t = class {
|
|
26016
26010
|
this.roleDetailsArrived = false;
|
26017
26011
|
this.env = "prod";
|
26018
26012
|
this.simulcastEnabled = false;
|
26019
|
-
this.userAgent =
|
26013
|
+
this.userAgent = ft(this.env);
|
26020
26014
|
this.polls = /* @__PURE__ */ new Map();
|
26021
26015
|
this.whiteboards = /* @__PURE__ */ new Map();
|
26022
26016
|
this.addPermissionToRole = (e, t2, i2, r2) => {
|
@@ -26136,7 +26130,7 @@ var _t = class {
|
|
26136
26130
|
return this.userAgent;
|
26137
26131
|
}
|
26138
26132
|
createAndSetUserAgent(e) {
|
26139
|
-
this.userAgent =
|
26133
|
+
this.userAgent = ft(this.env, e);
|
26140
26134
|
}
|
26141
26135
|
setRoom(e) {
|
26142
26136
|
this.room = e;
|
@@ -26276,7 +26270,7 @@ var _t = class {
|
|
26276
26270
|
t2.startsWith("prod") ? i2 = "prod" : t2.startsWith("qa") ? i2 = "qa" : t2.startsWith("dev") && (i2 = "dev"), this.env = i2, Pe.setEnv(i2);
|
26277
26271
|
}
|
26278
26272
|
};
|
26279
|
-
var
|
26273
|
+
var _i = class {
|
26280
26274
|
constructor() {
|
26281
26275
|
this.TAG = "[WakeLockManager]";
|
26282
26276
|
this.wakeLock = null;
|
@@ -26310,7 +26304,7 @@ var Di = class {
|
|
26310
26304
|
});
|
26311
26305
|
}
|
26312
26306
|
};
|
26313
|
-
var
|
26307
|
+
var Ni = class {
|
26314
26308
|
constructor(e) {
|
26315
26309
|
this.store = e;
|
26316
26310
|
this.bufferSize = 100;
|
@@ -26353,7 +26347,7 @@ var wi = class {
|
|
26353
26347
|
}
|
26354
26348
|
};
|
26355
26349
|
var Da = { autoplayFailed: void 0, initialized: false, autoplayCheckPromise: void 0 };
|
26356
|
-
var
|
26350
|
+
var xt = class {
|
26357
26351
|
constructor(e, t2, i2) {
|
26358
26352
|
this.store = e;
|
26359
26353
|
this.deviceManager = t2;
|
@@ -26491,7 +26485,7 @@ var Nt = class {
|
|
26491
26485
|
});
|
26492
26486
|
}
|
26493
26487
|
};
|
26494
|
-
var
|
26488
|
+
var Oi = class {
|
26495
26489
|
constructor(e) {
|
26496
26490
|
this.eventBus = e;
|
26497
26491
|
this.pluginUsage = /* @__PURE__ */ new Map();
|
@@ -26530,7 +26524,7 @@ var _i = class {
|
|
26530
26524
|
this.eventBus.analytics.subscribe((t2) => this.updatePluginUsageData(t2));
|
26531
26525
|
}
|
26532
26526
|
};
|
26533
|
-
var
|
26527
|
+
var Ut = class {
|
26534
26528
|
constructor(e, t2) {
|
26535
26529
|
this.store = e;
|
26536
26530
|
this.eventBus = t2;
|
@@ -26568,7 +26562,7 @@ var Ot = class {
|
|
26568
26562
|
let e2 = this.store.getLocalPeer();
|
26569
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));
|
26570
26564
|
});
|
26571
|
-
this.handleDeviceChange =
|
26565
|
+
this.handleDeviceChange = oi(() => c2(this, null, function* () {
|
26572
26566
|
yield this.enumerateDevices(), this.logDevices("After Device Change");
|
26573
26567
|
let e2 = this.store.getLocalPeer();
|
26574
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() }));
|
@@ -26674,7 +26668,7 @@ var Ot = class {
|
|
26674
26668
|
d2.d(this.TAG, e, JSON.stringify({ videoInput: [...this.videoInput], audioInput: [...this.audioInput], audioOutput: [...this.audioOutput], selected: this.getCurrentSelection() }, null, 4));
|
26675
26669
|
}
|
26676
26670
|
};
|
26677
|
-
var
|
26671
|
+
var xi = class {
|
26678
26672
|
constructor(e, t2) {
|
26679
26673
|
this.deviceManager = e;
|
26680
26674
|
this.audioSinkManager = t2;
|
@@ -26721,7 +26715,7 @@ var V = class {
|
|
26721
26715
|
};
|
26722
26716
|
}
|
26723
26717
|
};
|
26724
|
-
var
|
26718
|
+
var Bt = class {
|
26725
26719
|
constructor() {
|
26726
26720
|
this.eventEmitter = new on2();
|
26727
26721
|
this.analytics = new V(G2.ANALYTICS, this.eventEmitter);
|
@@ -26743,7 +26737,7 @@ var xt = class {
|
|
26743
26737
|
this.leave = new V(G2.LEAVE, this.eventEmitter);
|
26744
26738
|
}
|
26745
26739
|
};
|
26746
|
-
var
|
26740
|
+
var Ui = class {
|
26747
26741
|
constructor(e, t2, i2) {
|
26748
26742
|
this.store = e;
|
26749
26743
|
this.listener = t2;
|
@@ -26761,7 +26755,7 @@ var Oi = class {
|
|
26761
26755
|
(n2 = this.listener) == null || n2.onPeerUpdate(5, null);
|
26762
26756
|
}
|
26763
26757
|
};
|
26764
|
-
var
|
26758
|
+
var Bi = class {
|
26765
26759
|
constructor(e) {
|
26766
26760
|
this.listener = e;
|
26767
26761
|
this.TAG = "[BroadcastManager]";
|
@@ -26774,7 +26768,7 @@ var xi = class {
|
|
26774
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);
|
26775
26769
|
}
|
26776
26770
|
};
|
26777
|
-
var
|
26771
|
+
var Vi = class {
|
26778
26772
|
constructor(e, t2) {
|
26779
26773
|
this.store = e;
|
26780
26774
|
this.listener = t2;
|
@@ -26920,7 +26914,7 @@ var ct = class {
|
|
26920
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;
|
26921
26915
|
}
|
26922
26916
|
};
|
26923
|
-
var
|
26917
|
+
var Fi = class extends ct {
|
26924
26918
|
constructor(t2, i2, r2, s2) {
|
26925
26919
|
super(t2, i2, s2);
|
26926
26920
|
this.transport = r2;
|
@@ -26960,7 +26954,7 @@ var Bi = class extends ct {
|
|
26960
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));
|
26961
26955
|
}
|
26962
26956
|
};
|
26963
|
-
var
|
26957
|
+
var Gi = class {
|
26964
26958
|
constructor(e, t2, i2, r2) {
|
26965
26959
|
this.store = e;
|
26966
26960
|
this.peerManager = t2;
|
@@ -27027,7 +27021,7 @@ var Vi = class {
|
|
27027
27021
|
}
|
27028
27022
|
};
|
27029
27023
|
var C = (a11) => a11 ? new Date(a11) : void 0;
|
27030
|
-
var
|
27024
|
+
var Wi = class {
|
27031
27025
|
constructor(e, t2, i2) {
|
27032
27026
|
this.store = e;
|
27033
27027
|
this.trackManager = t2;
|
@@ -27126,7 +27120,7 @@ var Fi = class {
|
|
27126
27120
|
});
|
27127
27121
|
}
|
27128
27122
|
};
|
27129
|
-
var
|
27123
|
+
var $i = class {
|
27130
27124
|
constructor(e, t2) {
|
27131
27125
|
this.store = e;
|
27132
27126
|
this.eventBus = t2;
|
@@ -27150,11 +27144,11 @@ var Gi = class {
|
|
27150
27144
|
}
|
27151
27145
|
}
|
27152
27146
|
};
|
27153
|
-
var
|
27147
|
+
var Vt = (a11, e, t2) => {
|
27154
27148
|
let i2 = t2 === "qa" ? Gs : Fs, r2 = new URL(i2);
|
27155
27149
|
return r2.searchParams.set("endpoint", `https://${e}`), r2.searchParams.set("token", a11), r2.toString();
|
27156
27150
|
};
|
27157
|
-
var
|
27151
|
+
var Ki = class {
|
27158
27152
|
constructor(e, t2, i2) {
|
27159
27153
|
this.transport = e;
|
27160
27154
|
this.store = t2;
|
@@ -27172,7 +27166,7 @@ var Wi = class {
|
|
27172
27166
|
let t2 = this.store.getWhiteboard(e == null ? void 0 : e.id), i2 = t2 == null ? void 0 : t2.id;
|
27173
27167
|
if (t2 || (i2 = (yield this.transport.signal.createWhiteboard(this.getCreateOptionsWithDefaults(e))).id), !i2)
|
27174
27168
|
throw new Error(`Whiteboard ID: ${i2} not found`);
|
27175
|
-
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 });
|
27176
27170
|
this.store.setWhiteboard(s2), (o2 = this.listener) == null || o2.onWhiteboardUpdate(s2);
|
27177
27171
|
});
|
27178
27172
|
}
|
@@ -27197,7 +27191,7 @@ var Wi = class {
|
|
27197
27191
|
let e = this.store.getWhiteboards();
|
27198
27192
|
for (let s2 of e.values())
|
27199
27193
|
if (s2.url) {
|
27200
|
-
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 });
|
27201
27195
|
this.store.setWhiteboard(p2), (r2 = this.listener) == null || r2.onWhiteboardUpdate(p2);
|
27202
27196
|
}
|
27203
27197
|
});
|
@@ -27211,12 +27205,12 @@ var Wi = class {
|
|
27211
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 };
|
27212
27206
|
}
|
27213
27207
|
};
|
27214
|
-
var
|
27208
|
+
var Ft = class {
|
27215
27209
|
constructor(e, t2, i2) {
|
27216
27210
|
this.transport = e;
|
27217
27211
|
this.store = t2;
|
27218
27212
|
this.listener = i2;
|
27219
|
-
this.whiteboard = new
|
27213
|
+
this.whiteboard = new Ki(e, t2, i2);
|
27220
27214
|
}
|
27221
27215
|
setListener(e) {
|
27222
27216
|
this.listener = e, this.whiteboard.setListener(e);
|
@@ -27226,7 +27220,7 @@ var Bt = class {
|
|
27226
27220
|
var o2, n2;
|
27227
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 }));
|
27228
27222
|
e.id || (e.id = i2), Array.isArray(e.questions) && (yield this.addQuestionsToPoll(e.id, e.questions));
|
27229
|
-
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 }));
|
27230
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]);
|
27231
27225
|
});
|
27232
27226
|
}
|
@@ -27294,7 +27288,7 @@ var Bt = class {
|
|
27294
27288
|
r2 = [...l2.polls, ...r2, ...u2.polls];
|
27295
27289
|
}
|
27296
27290
|
for (let l2 of r2) {
|
27297
|
-
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);
|
27298
27292
|
p2.questions = u2.questions.map(({ question: T, options: g2, answer: v2 }, E2) => {
|
27299
27293
|
var P7, w2;
|
27300
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 });
|
@@ -27320,11 +27314,11 @@ var Bt = class {
|
|
27320
27314
|
return i2;
|
27321
27315
|
}
|
27322
27316
|
};
|
27323
|
-
var
|
27317
|
+
var qi = (a11) => {
|
27324
27318
|
let e = { userid: "customerID", peerid: "peerID", username: "userName" };
|
27325
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) };
|
27326
27320
|
};
|
27327
|
-
var
|
27321
|
+
var ji = class {
|
27328
27322
|
constructor(e, t2, i2) {
|
27329
27323
|
this.store = e;
|
27330
27324
|
this.transport = t2;
|
@@ -27357,7 +27351,7 @@ var Ki = class {
|
|
27357
27351
|
(i2 = this.listener) == null || i2.onPollsUpdate(1, [o2]);
|
27358
27352
|
return;
|
27359
27353
|
}
|
27360
|
-
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);
|
27361
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);
|
27362
27356
|
}
|
27363
27357
|
(r2 = this.listener) == null || r2.onPollsUpdate(1, t2);
|
@@ -27417,7 +27411,7 @@ var Ki = class {
|
|
27417
27411
|
});
|
27418
27412
|
}
|
27419
27413
|
};
|
27420
|
-
var
|
27414
|
+
var Ji = class {
|
27421
27415
|
constructor(e, t2) {
|
27422
27416
|
this.store = e;
|
27423
27417
|
this.listener = t2;
|
@@ -27478,7 +27472,7 @@ var qi = class {
|
|
27478
27472
|
return e && (s2 = s2.filter((o2) => o2.type === e)), t2 && (s2 = s2.filter((o2) => o2.source === t2)), s2.filter((o2) => o2.enabled !== i2);
|
27479
27473
|
}
|
27480
27474
|
};
|
27481
|
-
var
|
27475
|
+
var Qi = class {
|
27482
27476
|
constructor(e, t2) {
|
27483
27477
|
this.store = e;
|
27484
27478
|
this.listener = t2;
|
@@ -27635,7 +27629,7 @@ var ji = class {
|
|
27635
27629
|
return d2.e(this.TAG, "error in streaming/recording", i2), i2;
|
27636
27630
|
}
|
27637
27631
|
};
|
27638
|
-
var
|
27632
|
+
var zi = class {
|
27639
27633
|
constructor(e, t2) {
|
27640
27634
|
this.store = e;
|
27641
27635
|
this.listener = t2;
|
@@ -27649,7 +27643,7 @@ var Ji = class {
|
|
27649
27643
|
(i2 = this.listener) == null || i2.onSessionStoreUpdate(t2);
|
27650
27644
|
}
|
27651
27645
|
};
|
27652
|
-
var
|
27646
|
+
var Yi = class {
|
27653
27647
|
constructor(e, t2, i2) {
|
27654
27648
|
this.store = e;
|
27655
27649
|
this.transport = t2;
|
@@ -27674,13 +27668,13 @@ var Qi = class {
|
|
27674
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;
|
27675
27669
|
else {
|
27676
27670
|
let l2 = yield this.transport.signal.getWhiteboard({ id: e.id });
|
27677
|
-
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;
|
27678
27672
|
}
|
27679
27673
|
this.store.setWhiteboard(o2), (n2 = this.listener) == null || n2.onWhiteboardUpdate(o2);
|
27680
27674
|
});
|
27681
27675
|
}
|
27682
27676
|
};
|
27683
|
-
var
|
27677
|
+
var Xi = class {
|
27684
27678
|
constructor(e, t2, i2, r2, s2, o2) {
|
27685
27679
|
this.store = e;
|
27686
27680
|
this.transport = i2;
|
@@ -27707,7 +27701,7 @@ var zi = class {
|
|
27707
27701
|
this.peerManager.handlePeerInfoUpdate({ peer: i3, name: e2, data: t3 });
|
27708
27702
|
};
|
27709
27703
|
let n2 = this.transport.isFlagEnabled("onDemandTracks");
|
27710
|
-
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);
|
27711
27705
|
}
|
27712
27706
|
setListener(e) {
|
27713
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;
|
@@ -27759,7 +27753,7 @@ var zi = class {
|
|
27759
27753
|
}
|
27760
27754
|
}
|
27761
27755
|
};
|
27762
|
-
var
|
27756
|
+
var Zi = class {
|
27763
27757
|
constructor(e) {
|
27764
27758
|
this.transport = e;
|
27765
27759
|
this.observedKeys = /* @__PURE__ */ new Set();
|
@@ -27799,7 +27793,7 @@ var Yi = class {
|
|
27799
27793
|
});
|
27800
27794
|
}
|
27801
27795
|
};
|
27802
|
-
var
|
27796
|
+
var er = class {
|
27803
27797
|
constructor(e, t2, i2 = "", r2 = "", s2 = "https://prod-init.100ms.live/init", o2 = false, n2) {
|
27804
27798
|
this.authToken = e;
|
27805
27799
|
this.peerId = t2;
|
@@ -27812,15 +27806,15 @@ var Xi = class {
|
|
27812
27806
|
};
|
27813
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 || {});
|
27814
27808
|
var wa = { 0: [], 1: [], 2: [1], 3: [1], 4: [1] };
|
27815
|
-
var
|
27816
|
-
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 {
|
27817
27811
|
constructor(e) {
|
27818
27812
|
this.promise = new Promise((t2, i2) => {
|
27819
27813
|
this.resolve = t2, this.reject = i2, e(t2, i2);
|
27820
27814
|
});
|
27821
27815
|
}
|
27822
27816
|
};
|
27823
|
-
var
|
27817
|
+
var rr = class {
|
27824
27818
|
constructor(e, t2) {
|
27825
27819
|
this.onStateChange = e;
|
27826
27820
|
this.sendEvent = t2;
|
@@ -27847,7 +27841,7 @@ var tr = class {
|
|
27847
27841
|
d2.d(this.TAG, `schedule: Already a task for ${J[e]} scheduled, waiting for its completion`), yield g2.promise;
|
27848
27842
|
return;
|
27849
27843
|
}
|
27850
|
-
let v2 = new
|
27844
|
+
let v2 = new ir((E2, P7) => {
|
27851
27845
|
});
|
27852
27846
|
this.inProgress.set(e, v2), this.sendEvent(t2, e);
|
27853
27847
|
}
|
@@ -27908,7 +27902,7 @@ var tr = class {
|
|
27908
27902
|
});
|
27909
27903
|
}
|
27910
27904
|
};
|
27911
|
-
var
|
27905
|
+
var sr = class extends He {
|
27912
27906
|
constructor() {
|
27913
27907
|
super(100);
|
27914
27908
|
this.localStorage = new le("hms-analytics");
|
@@ -27929,7 +27923,7 @@ var ir = class extends He {
|
|
27929
27923
|
});
|
27930
27924
|
}
|
27931
27925
|
};
|
27932
|
-
var
|
27926
|
+
var ar = class {
|
27933
27927
|
constructor() {
|
27934
27928
|
this.TAG = "[AnalyticsTransport]";
|
27935
27929
|
}
|
@@ -27959,11 +27953,11 @@ var rr = class {
|
|
27959
27953
|
}
|
27960
27954
|
}
|
27961
27955
|
};
|
27962
|
-
var
|
27956
|
+
var or = class extends ar {
|
27963
27957
|
constructor(t2) {
|
27964
27958
|
super();
|
27965
27959
|
this.transportProvider = t2;
|
27966
|
-
this.failedEvents = new
|
27960
|
+
this.failedEvents = new sr();
|
27967
27961
|
}
|
27968
27962
|
};
|
27969
27963
|
var dt = class {
|
@@ -28044,10 +28038,10 @@ var lt = class {
|
|
28044
28038
|
return this.tempStats.reduce((r2, s2) => r2 + ((s2[e] || 0) > t2 ? 1 : 0), 0);
|
28045
28039
|
}
|
28046
28040
|
};
|
28047
|
-
var
|
28048
|
-
var
|
28049
|
-
var
|
28050
|
-
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 {
|
28051
28045
|
constructor() {
|
28052
28046
|
super(...arguments);
|
28053
28047
|
this.trackAnalytics = /* @__PURE__ */ new Map();
|
@@ -28093,16 +28087,16 @@ var Qr = class extends lt {
|
|
28093
28087
|
this.samples = [];
|
28094
28088
|
this.collateSample = () => {
|
28095
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;
|
28096
|
-
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 });
|
28097
28091
|
};
|
28098
28092
|
this.shouldCreateSample = () => {
|
28099
28093
|
let t2 = this.tempStats.length, i2 = this.tempStats[t2 - 1], r2 = this.tempStats[t2 - 2];
|
28100
|
-
return t2 === 30 ||
|
28094
|
+
return t2 === 30 || cr(i2, r2) || i2.kind === "video" && nr(i2, r2);
|
28101
28095
|
};
|
28102
28096
|
this.toAnalytics = () => ({ track_id: this.track_id, ssrc: this.ssrc, source: this.source, rid: this.rid, samples: this.samples });
|
28103
28097
|
}
|
28104
28098
|
};
|
28105
|
-
var
|
28099
|
+
var $t = class extends dt {
|
28106
28100
|
constructor() {
|
28107
28101
|
super(...arguments);
|
28108
28102
|
this.trackAnalytics = /* @__PURE__ */ new Map();
|
@@ -28122,7 +28116,7 @@ var Gt = class extends dt {
|
|
28122
28116
|
Object.keys(i2).forEach((s2) => {
|
28123
28117
|
var v2, E2;
|
28124
28118
|
let o2 = this.store.getTrackById(s2), n2 = i2[s2], l2 = (v2 = this.trackAnalytics.get(s2)) == null ? void 0 : v2.getLatestStat(), p2 = ((P7, w2) => {
|
28125
|
-
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;
|
28126
28120
|
return $ > 0 ? x2 * 1e3 / $ : (w2 == null ? void 0 : w2.calculatedJitterBufferDelay) || 0;
|
28127
28121
|
})(n2, l2), h2 = this.calculateAvSyncForStat(n2, t2), T = M2(m({}, n2), { calculatedJitterBufferDelay: p2, avSync: h2 });
|
28128
28122
|
if (n2.kind === "video") {
|
@@ -28144,10 +28138,10 @@ var Gt = class extends dt {
|
|
28144
28138
|
return;
|
28145
28139
|
let r2 = this.store.getPeerById(t2.peerID), s2 = r2 == null ? void 0 : r2.audioTrack, o2 = r2 == null ? void 0 : r2.videoTrack;
|
28146
28140
|
if (!(s2 && o2 && s2.enabled && o2.enabled))
|
28147
|
-
return
|
28141
|
+
return Pt;
|
28148
28142
|
let l2 = i2.getRemoteTrackStats(s2.trackId);
|
28149
28143
|
if (!l2)
|
28150
|
-
return
|
28144
|
+
return Pt;
|
28151
28145
|
if (l2.estimatedPlayoutTimestamp)
|
28152
28146
|
return l2.estimatedPlayoutTimestamp - t2.estimatedPlayoutTimestamp;
|
28153
28147
|
}
|
@@ -28159,27 +28153,27 @@ var Yr = class extends lt {
|
|
28159
28153
|
this.collateSample = () => {
|
28160
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) };
|
28161
28155
|
if (t2.kind === "video")
|
28162
|
-
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") }));
|
28163
28157
|
{
|
28164
28158
|
let s2 = (t2.concealedSamples || 0) - (t2.silentConcealedSamples || 0) - ((i2.concealedSamples || 0) - (i2.silentConcealedSamples || 0));
|
28165
|
-
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") }));
|
28166
28160
|
}
|
28167
28161
|
};
|
28168
28162
|
this.shouldCreateSample = () => {
|
28169
28163
|
let t2 = this.tempStats.length, i2 = this.tempStats[t2 - 1], r2 = this.tempStats[t2 - 2];
|
28170
|
-
return t2 === 10 ||
|
28164
|
+
return t2 === 10 || cr(i2, r2) || i2.kind === "video" && nr(i2, r2);
|
28171
28165
|
};
|
28172
28166
|
this.toAnalytics = () => ({ track_id: this.track_id, ssrc: this.ssrc, source: this.source, rid: this.rid, samples: this.samples });
|
28173
28167
|
}
|
28174
28168
|
calculateAvgAvSyncForSample() {
|
28175
|
-
let i2 = this.tempStats.map((r2) => r2.avSync).filter((r2) => r2 !== void 0 && r2 !==
|
28176
|
-
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;
|
28177
28171
|
}
|
28178
28172
|
};
|
28179
|
-
var
|
28173
|
+
var lr = ((t2) => (t2[t2.Publish = 0] = "Publish", t2[t2.Subscribe = 1] = "Subscribe", t2))(lr || {});
|
28180
28174
|
function _a7(a11, e) {
|
28181
28175
|
var r2;
|
28182
|
-
let t2 =
|
28176
|
+
let t2 = Kt.parse(a11.sdp);
|
28183
28177
|
if (!((r2 = t2.origin) != null && r2.username.startsWith("mozilla")))
|
28184
28178
|
return a11;
|
28185
28179
|
let i2 = e ? Array.from(e.values()) : [];
|
@@ -28187,13 +28181,13 @@ function _a7(a11, e) {
|
|
28187
28181
|
var l2, u2, p2;
|
28188
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;
|
28189
28183
|
n2 && (s2.msid = (p2 = s2.msid) == null ? void 0 : p2.replace(/\s(.+)/, ` ${n2}`));
|
28190
|
-
}), { type: a11.type, sdp:
|
28184
|
+
}), { type: a11.type, sdp: Kt.write(t2) };
|
28191
28185
|
}
|
28192
28186
|
function Na(a11, e) {
|
28193
28187
|
var s2;
|
28194
28188
|
if (!(a11 != null && a11.sdp) || !e)
|
28195
28189
|
return;
|
28196
|
-
let i2 =
|
28190
|
+
let i2 = Kt.parse(a11.sdp).media.find((o2) => ee(o2.mid) && parseInt(o2.mid) === parseInt(e));
|
28197
28191
|
return (s2 = i2 == null ? void 0 : i2.msid) == null ? void 0 : s2.split(" ")[1];
|
28198
28192
|
}
|
28199
28193
|
function Oa(a11) {
|
@@ -28277,13 +28271,13 @@ var Ke = class {
|
|
28277
28271
|
let i2 = (r2 = t2.track) == null ? void 0 : r2.kind;
|
28278
28272
|
if (t2.transport) {
|
28279
28273
|
let s2 = t2.transport.iceTransport, o2 = () => {
|
28280
|
-
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))));
|
28281
28275
|
};
|
28282
28276
|
typeof s2.onselectedcandidatepairchange == "function" && (s2.onselectedcandidatepairchange = o2), o2();
|
28283
28277
|
}
|
28284
28278
|
});
|
28285
28279
|
} catch (e) {
|
28286
|
-
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);
|
28287
28281
|
}
|
28288
28282
|
}
|
28289
28283
|
removeTrack(e) {
|
@@ -28316,11 +28310,11 @@ var Ke = class {
|
|
28316
28310
|
return this.nativeConnection.getReceivers();
|
28317
28311
|
}
|
28318
28312
|
};
|
28319
|
-
var
|
28313
|
+
var qt = class extends Ke {
|
28320
28314
|
constructor(t2, i2, r2) {
|
28321
28315
|
super(0, t2);
|
28322
28316
|
this.TAG = "[HMSPublishConnection]";
|
28323
|
-
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 }) => {
|
28324
28318
|
s2 && (this.observer.onIceCandidate(s2), t2.trickle(this.role, s2));
|
28325
28319
|
}, this.nativeConnection.oniceconnectionstatechange = () => {
|
28326
28320
|
this.observer.onIceConnectionChange(this.nativeConnection.iceConnectionState);
|
@@ -28340,7 +28334,7 @@ var $t = class extends Ke {
|
|
28340
28334
|
});
|
28341
28335
|
}
|
28342
28336
|
};
|
28343
|
-
var
|
28337
|
+
var jt = class {
|
28344
28338
|
constructor(e, t2, i2 = "") {
|
28345
28339
|
this.TAG = "[HMSDataChannel]";
|
28346
28340
|
this.nativeChannel = e, this.observer = t2, this.metadata = i2, e.onmessage = (r2) => {
|
@@ -28363,7 +28357,7 @@ var Kt = class {
|
|
28363
28357
|
this.nativeChannel.close();
|
28364
28358
|
}
|
28365
28359
|
};
|
28366
|
-
var
|
28360
|
+
var Jt = class a9 extends Ke {
|
28367
28361
|
constructor(t2, i2, r2, s2) {
|
28368
28362
|
super(1, t2);
|
28369
28363
|
this.isFlagEnabled = r2;
|
@@ -28410,7 +28404,7 @@ var qt = class a9 extends Ke {
|
|
28410
28404
|
}, this.nativeConnection.onconnectionstatechange = () => {
|
28411
28405
|
this.observer.onConnectionStateChange(this.nativeConnection.connectionState);
|
28412
28406
|
}, this.nativeConnection.ondatachannel = (t2) => {
|
28413
|
-
t2.channel.label ===
|
28407
|
+
t2.channel.label === ui && (this.apiChannel = new jt(t2.channel, { onMessage: (i2) => {
|
28414
28408
|
this.eventEmitter.emit("message", i2), this.observer.onApiChannelMessage(i2);
|
28415
28409
|
} }, `role=${this.role}`), t2.channel.onopen = this.handlePendingApiMessages);
|
28416
28410
|
}, this.nativeConnection.onicecandidate = (t2) => {
|
@@ -28460,8 +28454,8 @@ var qt = class a9 extends Ke {
|
|
28460
28454
|
}
|
28461
28455
|
};
|
28462
28456
|
var xa = (a11, e) => !e || e.length === 0 ? a11 : e.map((i2) => ({ urls: i2.urls, credentialType: "password", credential: i2.password, username: i2.userName }));
|
28463
|
-
var
|
28464
|
-
var
|
28457
|
+
var ur = "[InitService]";
|
28458
|
+
var Qt = class {
|
28465
28459
|
static handleError(e, t2) {
|
28466
28460
|
switch (e.status) {
|
28467
28461
|
case 404:
|
@@ -28474,16 +28468,16 @@ var jt = class {
|
|
28474
28468
|
}
|
28475
28469
|
static fetchInitConfig(n2) {
|
28476
28470
|
return c2(this, arguments, function* ({ token: e, peerId: t2, userAgent: i2, initEndpoint: r2 = "https://prod-init.100ms.live", region: s2 = "", iceServers: o2 }) {
|
28477
|
-
d2.d(
|
28471
|
+
d2.d(ur, `fetchInitConfig: initEndpoint=${r2} token=${e} peerId=${t2} region=${s2} `);
|
28478
28472
|
let l2 = dn2(r2, t2, i2, s2);
|
28479
28473
|
try {
|
28480
28474
|
let u2 = yield fetch(l2, { headers: { Authorization: `Bearer ${e}` } });
|
28481
28475
|
try {
|
28482
28476
|
let p2 = yield u2.clone().json();
|
28483
|
-
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);
|
28484
28478
|
} catch (p2) {
|
28485
28479
|
let h2 = yield u2.text();
|
28486
|
-
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);
|
28487
28481
|
}
|
28488
28482
|
} catch (u2) {
|
28489
28483
|
let p2 = u2;
|
@@ -28498,14 +28492,14 @@ function dn2(a11, e, t2, i2) {
|
|
28498
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();
|
28499
28493
|
} catch (r2) {
|
28500
28494
|
let s2 = r2;
|
28501
|
-
throw d2.e(
|
28495
|
+
throw d2.e(ur, s2.name, s2.message), s2;
|
28502
28496
|
}
|
28503
28497
|
}
|
28504
28498
|
function ln2(a11, e) {
|
28505
28499
|
var t2;
|
28506
28500
|
return M2(m({}, a11), { rtcConfiguration: M2(m({}, a11.rtcConfiguration), { iceServers: xa((t2 = a11.rtcConfiguration) == null ? void 0 : t2.ice_servers, e) }) });
|
28507
28501
|
}
|
28508
|
-
var
|
28502
|
+
var zt = class {
|
28509
28503
|
constructor(e) {
|
28510
28504
|
this.TAG = "[SIGNAL]: ";
|
28511
28505
|
this.pongResponseTimes = new He(5);
|
@@ -28553,7 +28547,7 @@ var Jt = class {
|
|
28553
28547
|
if (o2 instanceof f2)
|
28554
28548
|
throw o2;
|
28555
28549
|
let n2 = o2;
|
28556
|
-
throw S2.WebsocketMethodErrors.ServerErrors(Number(n2.code),
|
28550
|
+
throw S2.WebsocketMethodErrors.ServerErrors(Number(n2.code), Tr(e), n2.message);
|
28557
28551
|
}
|
28558
28552
|
});
|
28559
28553
|
}
|
@@ -28839,7 +28833,7 @@ var Jt = class {
|
|
28839
28833
|
rejectPendingCalls(e = "") {
|
28840
28834
|
this.callbacks.forEach((t2, i2) => {
|
28841
28835
|
var r2, s2, o2, n2;
|
28842
|
-
((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));
|
28843
28837
|
});
|
28844
28838
|
}
|
28845
28839
|
pingPongLoop(e) {
|
@@ -28877,7 +28871,7 @@ var Ua = () => {
|
|
28877
28871
|
return { downlink: a11.downlink, downlinkMax: a11.downlinkMax, effectiveType: a11.effectiveType, rtt: a11.rtt, saveData: a11.saveData, type: a11.type };
|
28878
28872
|
};
|
28879
28873
|
var I2 = "[HMSTransport]:";
|
28880
|
-
var
|
28874
|
+
var Yt = class {
|
28881
28875
|
constructor(e, t2, i2, r2, s2, o2, n2) {
|
28882
28876
|
this.observer = e;
|
28883
28877
|
this.deviceManager = t2;
|
@@ -28916,7 +28910,7 @@ var Qt = class {
|
|
28916
28910
|
}), onFailure: (e2) => {
|
28917
28911
|
this.joinParameters && this.retryScheduler.schedule({ category: 1, error: e2, task: this.retrySignalDisconnectTask, originalState: this.state });
|
28918
28912
|
}, onOffline: (e2) => c2(this, null, function* () {
|
28919
|
-
d2.d(I2, "socket offline",
|
28913
|
+
d2.d(I2, "socket offline", tr[this.state]);
|
28920
28914
|
try {
|
28921
28915
|
this.state !== "Leaving" && this.joinParameters && this.retryScheduler.schedule({ category: 1, error: S2.WebSocketConnectionErrors.WebSocketConnectionLost("RECONNECT_SIGNAL", e2), task: this.retrySignalDisconnectTask, originalState: this.state });
|
28922
28916
|
} catch (t3) {
|
@@ -28924,12 +28918,12 @@ var Qt = class {
|
|
28924
28918
|
}
|
28925
28919
|
}), onOnline: () => {
|
28926
28920
|
var e2;
|
28927
|
-
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);
|
28928
28922
|
}, onNetworkOnline: () => {
|
28929
28923
|
this.analyticsEventsService.flushFailedClientEvents();
|
28930
28924
|
} };
|
28931
|
-
this.signal = new
|
28932
|
-
this.analyticsSignalTransport = new
|
28925
|
+
this.signal = new zt(this.signalObserver);
|
28926
|
+
this.analyticsSignalTransport = new or(this.signal);
|
28933
28927
|
this.publishDtlsStateTimer = 0;
|
28934
28928
|
this.lastPublishDtlsState = "new";
|
28935
28929
|
this.publishConnectionObserver = { onRenegotiationNeeded: () => c2(this, null, function* () {
|
@@ -29019,11 +29013,11 @@ var Qt = class {
|
|
29019
29013
|
return this.signal.trackUpdate(this.trackStates), e2;
|
29020
29014
|
});
|
29021
29015
|
var u2, p2;
|
29022
|
-
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);
|
29023
29017
|
let l2 = (h2, T) => c2(this, null, function* () {
|
29024
29018
|
h2 !== this.state && (this.state = h2, yield this.observer.onStateChange(this.state, T));
|
29025
29019
|
});
|
29026
|
-
this.retryScheduler = new
|
29020
|
+
this.retryScheduler = new rr(l2, this.sendErrorAnalyticsEvent.bind(this)), this.eventBus.statsUpdate.subscribe((h2) => {
|
29027
29021
|
var g2, v2;
|
29028
29022
|
let T = ((v2 = (g2 = h2.getLocalPeerStats()) == null ? void 0 : g2.subscribe) == null ? void 0 : v2.bitrate) || 0;
|
29029
29023
|
this.maxSubscribeBitrate = Math.max(this.maxSubscribeBitrate, T);
|
@@ -29061,7 +29055,7 @@ var Qt = class {
|
|
29061
29055
|
}
|
29062
29056
|
connect(e, t2, i2, r2, s2 = false, o2) {
|
29063
29057
|
return c2(this, null, function* () {
|
29064
|
-
this.setTransportStateForConnect(), this.joinParameters = new
|
29058
|
+
this.setTransportStateForConnect(), this.joinParameters = new er(e, i2, r2.name, r2.metaData, t2, s2, o2);
|
29065
29059
|
try {
|
29066
29060
|
return yield this.internalConnect(e, t2, i2, o2);
|
29067
29061
|
} catch (n2) {
|
@@ -29115,13 +29109,13 @@ var Qt = class {
|
|
29115
29109
|
trackUpdate(e) {
|
29116
29110
|
let i2 = Array.from(this.trackStates.values()).find((r2) => e.type === r2.type && e.source === r2.source);
|
29117
29111
|
if (i2) {
|
29118
|
-
let r2 = new
|
29112
|
+
let r2 = new Nt(M2(m({}, i2), { mute: !e.enabled }));
|
29119
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]]));
|
29120
29114
|
}
|
29121
29115
|
}
|
29122
29116
|
publishTrack(e) {
|
29123
29117
|
return c2(this, null, function* () {
|
29124
|
-
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));
|
29125
29119
|
let t2 = new Promise((s2, o2) => {
|
29126
29120
|
this.callbacks.set(et, { promise: { resolve: s2, reject: o2 }, action: "PUBLISH", extra: {} });
|
29127
29121
|
}), i2 = e.stream;
|
@@ -29159,7 +29153,7 @@ var Qt = class {
|
|
29159
29153
|
});
|
29160
29154
|
}
|
29161
29155
|
createPeerConnections() {
|
29162
|
-
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)));
|
29163
29157
|
}
|
29164
29158
|
negotiateJoinWithRetry(s2) {
|
29165
29159
|
return c2(this, arguments, function* ({ name: e, data: t2, autoSubscribeVideo: i2, isWebRTC: r2 = true }) {
|
@@ -29249,7 +29243,7 @@ var Qt = class {
|
|
29249
29243
|
d2.d(I2, "connect: started \u23F0");
|
29250
29244
|
let s2 = /* @__PURE__ */ new Date();
|
29251
29245
|
try {
|
29252
|
-
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);
|
29253
29247
|
let u2 = this.store.getRoom();
|
29254
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;
|
29255
29249
|
} catch (u2) {
|
@@ -29278,7 +29272,7 @@ var Qt = class {
|
|
29278
29272
|
}
|
29279
29273
|
initStatsAnalytics() {
|
29280
29274
|
var e, t2;
|
29281
|
-
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());
|
29282
29276
|
}
|
29283
29277
|
getValueFromInitConfig(e, t2, i2) {
|
29284
29278
|
var r2, s2;
|
@@ -29338,11 +29332,11 @@ var Qt = class {
|
|
29338
29332
|
}
|
29339
29333
|
};
|
29340
29334
|
var Va = { published: false, isInitialised: false, isReconnecting: false, isPreviewInProgress: false, isPreviewCalled: false, isJoinInProgress: false, deviceManagersInitialised: false };
|
29341
|
-
var
|
29335
|
+
var pr = class {
|
29342
29336
|
constructor() {
|
29343
29337
|
this.TAG = "[HMSSdk]:";
|
29344
29338
|
this.transportState = "Disconnected";
|
29345
|
-
this.analyticsTimer = new
|
29339
|
+
this.analyticsTimer = new di();
|
29346
29340
|
this.sdkState = m({}, Va);
|
29347
29341
|
this.playlistSettings = { video: { bitrate: Lr }, audio: { bitrate: Dr } };
|
29348
29342
|
this.handleAutoplayError = (e) => {
|
@@ -29439,7 +29433,7 @@ var lr = class {
|
|
29439
29433
|
};
|
29440
29434
|
}
|
29441
29435
|
initNotificationManager() {
|
29442
|
-
this.notificationManager || (this.notificationManager = new
|
29436
|
+
this.notificationManager || (this.notificationManager = new Xi(this.store, this.eventBus, this.transport, this.listener, this.audioListener));
|
29443
29437
|
}
|
29444
29438
|
initStoreAndManagers(e) {
|
29445
29439
|
var t2, i2;
|
@@ -29447,7 +29441,7 @@ var lr = class {
|
|
29447
29441
|
(i2 = this.notificationManager) == null || i2.setListener(this.listener), this.audioSinkManager.setListener(this.listener), this.interactivityCenter.setListener(this.listener);
|
29448
29442
|
return;
|
29449
29443
|
}
|
29450
|
-
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);
|
29451
29445
|
}
|
29452
29446
|
validateJoined(e) {
|
29453
29447
|
if (!this.localPeer)
|
@@ -29494,7 +29488,7 @@ var lr = class {
|
|
29494
29488
|
return this.interactivityCenter;
|
29495
29489
|
}
|
29496
29490
|
getPeerListIterator(e) {
|
29497
|
-
return new
|
29491
|
+
return new mi(this.transport, this.store, e);
|
29498
29492
|
}
|
29499
29493
|
updatePlaylistSettings(e) {
|
29500
29494
|
e.video && Object.assign(this.playlistSettings.video, e.video), e.audio && Object.assign(this.playlistSettings.audio, e.audio);
|
@@ -29505,7 +29499,7 @@ var lr = class {
|
|
29505
29499
|
}
|
29506
29500
|
preview(e, t2) {
|
29507
29501
|
return c2(this, null, function* () {
|
29508
|
-
if (
|
29502
|
+
if (Tt(), gt(), this.sdkState.isPreviewInProgress)
|
29509
29503
|
return Promise.reject(S2.GenericErrors.PreviewAlreadyInProgress("PREVIEW", "Preview already called"));
|
29510
29504
|
if (["Joined", "Reconnecting"].includes(this.transportState))
|
29511
29505
|
return this.midCallPreview(e.asRole, e.settings);
|
@@ -29565,13 +29559,13 @@ var lr = class {
|
|
29565
29559
|
join(e, t2) {
|
29566
29560
|
return c2(this, null, function* () {
|
29567
29561
|
var l2, u2, p2, h2, T, g2;
|
29568
|
-
if (
|
29562
|
+
if (Tt(), gt(), this.sdkState.isPreviewInProgress)
|
29569
29563
|
throw S2.GenericErrors.NotReady("JOIN", "Preview is in progress, can't join");
|
29570
29564
|
this.analyticsTimer.start("join_time"), this.sdkState.isJoinInProgress = true;
|
29571
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);
|
29572
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();
|
29573
29567
|
let n2 = this.store.getConfig();
|
29574
|
-
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}`);
|
29575
29569
|
try {
|
29576
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);
|
29577
29571
|
} catch (v2) {
|
@@ -29606,7 +29600,7 @@ var lr = class {
|
|
29606
29600
|
return c2(this, null, function* () {
|
29607
29601
|
let i2 = (t2 || {}).endpoint || "https://auth.100ms.live/v2/token";
|
29608
29602
|
this.analyticsTimer.start("GET_TOKEN");
|
29609
|
-
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();
|
29610
29604
|
if (this.analyticsTimer.end("GET_TOKEN"), !r2.ok)
|
29611
29605
|
throw S2.APIErrors.ServerErrors(s2.code, "GET_TOKEN", s2.message, false);
|
29612
29606
|
let { token: o2 } = s2;
|
@@ -30104,9 +30098,9 @@ var lr = class {
|
|
30104
30098
|
};
|
30105
30099
|
var ut = class a10 {
|
30106
30100
|
constructor(e, t2, i2) {
|
30107
|
-
this.getStats = () => (this.stats || (this.stats = new
|
30101
|
+
this.getStats = () => (this.stats || (this.stats = new Xt(this.store, this.sdk)), this.stats);
|
30108
30102
|
this.getDiagnosticsSDK = () => (this.diagnostics || (this.diagnostics = this.actions.initDiagnostics()), this.diagnostics);
|
30109
|
-
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);
|
30110
30104
|
}
|
30111
30105
|
triggerOnSubscribe() {
|
30112
30106
|
this.initialTriggerOnSubscribe || (a10.makeStoreTriggerOnSubscribe(this.store), this.initialTriggerOnSubscribe = true);
|
@@ -30237,14 +30231,14 @@ var vn2 = (a11, e, t2, i2) => {
|
|
30237
30231
|
};
|
30238
30232
|
var Mn = (a11, e = "resetState") => {
|
30239
30233
|
a11.namedSetState((t2) => {
|
30240
|
-
Object.assign(t2,
|
30234
|
+
Object.assign(t2, ii());
|
30241
30235
|
}, e);
|
30242
30236
|
};
|
30243
|
-
var
|
30237
|
+
var Xt = class {
|
30244
30238
|
constructor(e, t2) {
|
30245
30239
|
this.hmsStore = e;
|
30246
30240
|
this.sdk = t2;
|
30247
|
-
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) => {
|
30248
30242
|
var r2, s2;
|
30249
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) => {
|
30250
30244
|
var n2, l2;
|
@@ -35724,7 +35718,10 @@ var ChatFooter = ({ onSend, children }) => {
|
|
35724
35718
|
}, [defaultSelection, selectedPeer, selectedRole, setRoleSelector, isMobile, isLandscapeHLSStream, elements == null ? void 0 : elements.chat]);
|
35725
35719
|
const resetInputHeight = useCallback28(() => {
|
35726
35720
|
if (inputRef.current) {
|
35727
|
-
inputRef.current.style.height = `${Math.max(
|
35721
|
+
inputRef.current.style.height = `${Math.max(
|
35722
|
+
32,
|
35723
|
+
inputRef.current.value ? Math.min(inputRef.current.scrollHeight, 24 * 4) : 0
|
35724
|
+
)}px`;
|
35728
35725
|
}
|
35729
35726
|
}, []);
|
35730
35727
|
const updateInputHeight = useCallback28(() => {
|
@@ -39721,7 +39718,7 @@ var useCloseScreenshareWhiteboard = () => {
|
|
39721
39718
|
};
|
39722
39719
|
|
39723
39720
|
// src/Prebuilt/layouts/VideoStreamingSection.tsx
|
39724
|
-
var HLSView = React155.lazy(() => import("./HLSView-
|
39721
|
+
var HLSView = React155.lazy(() => import("./HLSView-AV4CONPM.js"));
|
39725
39722
|
var VideoStreamingSection = ({
|
39726
39723
|
screenType,
|
39727
39724
|
elements,
|
@@ -39884,7 +39881,8 @@ import {
|
|
39884
39881
|
CheckIcon as CheckIcon8,
|
39885
39882
|
CrossIcon as CrossIcon27,
|
39886
39883
|
HeadphonesIcon,
|
39887
|
-
SpeakerIcon as SpeakerIcon4
|
39884
|
+
SpeakerIcon as SpeakerIcon4,
|
39885
|
+
TelePhoneIcon
|
39888
39886
|
} from "@100mslive/react-icons";
|
39889
39887
|
var CamaraFlipActions = () => {
|
39890
39888
|
const actions = useHMSActions48();
|
@@ -39935,6 +39933,8 @@ var AudioActions = () => {
|
|
39935
39933
|
AudioIcon = /* @__PURE__ */ React157.createElement(BluetoothIcon, null);
|
39936
39934
|
} else if (currentSelection && currentSelection.label.toLowerCase().includes("wired")) {
|
39937
39935
|
AudioIcon = /* @__PURE__ */ React157.createElement(HeadphonesIcon, null);
|
39936
|
+
} else if (currentSelection && currentSelection.label.toLowerCase().includes("earpiece")) {
|
39937
|
+
AudioIcon = /* @__PURE__ */ React157.createElement(TelePhoneIcon, null);
|
39938
39938
|
}
|
39939
39939
|
return /* @__PURE__ */ React157.createElement(
|
39940
39940
|
AudioSelectionSheet,
|
@@ -42054,9 +42054,9 @@ init_define_process_env();
|
|
42054
42054
|
|
42055
42055
|
// src/Diagnostics/Diagnostics.tsx
|
42056
42056
|
init_define_process_env();
|
42057
|
-
import
|
42057
|
+
import React189, { useContext as useContext6 } from "react";
|
42058
42058
|
import { HMSRoomProvider as HMSRoomProvider2 } from "@100mslive/react-sdk";
|
42059
|
-
import { ConnectivityIcon as ConnectivityIcon2, GlobeIcon, MicOnIcon as MicOnIcon8, VideoOnIcon as VideoOnIcon6 } from "@100mslive/react-icons";
|
42059
|
+
import { CheckCircleIcon as CheckCircleIcon7, ConnectivityIcon as ConnectivityIcon2, GlobeIcon, MicOnIcon as MicOnIcon8, VideoOnIcon as VideoOnIcon6 } from "@100mslive/react-icons";
|
42060
42060
|
|
42061
42061
|
// src/Diagnostics/components.tsx
|
42062
42062
|
init_define_process_env();
|
@@ -42073,9 +42073,9 @@ var hmsDiagnostics = hms.getDiagnosticsSDK();
|
|
42073
42073
|
|
42074
42074
|
// src/Diagnostics/components.tsx
|
42075
42075
|
var DiagnosticsSteps = {
|
42076
|
+
browser: "Browser Support",
|
42076
42077
|
video: "Test Video",
|
42077
42078
|
audio: "Test Audio",
|
42078
|
-
// browser: 'Browser Support',
|
42079
42079
|
connectivity: "Connection Quality"
|
42080
42080
|
};
|
42081
42081
|
var DiagnosticsContext = React183.createContext({
|
@@ -42307,9 +42307,116 @@ var AudioTest = () => {
|
|
42307
42307
|
)), /* @__PURE__ */ React185.createElement(TestFooter, { error, ctaText: "Does your audio sound good?" }));
|
42308
42308
|
};
|
42309
42309
|
|
42310
|
+
// src/Diagnostics/BrowserTest.tsx
|
42311
|
+
init_define_process_env();
|
42312
|
+
import React186, { useEffect as useEffect77, useState as useState79 } from "react";
|
42313
|
+
import { parsedUserAgent as parsedUserAgent3 } from "@100mslive/react-sdk";
|
42314
|
+
var CMS_MEDIA_SERVER = "https://storage.googleapis.com/100ms-cms-prod/";
|
42315
|
+
var operatingSystemIconInfo = {
|
42316
|
+
tizen: {
|
42317
|
+
key: "tizen",
|
42318
|
+
val: "Tizen",
|
42319
|
+
icon: `${CMS_MEDIA_SERVER}cms/Tizen_b99350214e/Tizen_b99350214e.svg`
|
42320
|
+
},
|
42321
|
+
"mac os": {
|
42322
|
+
key: "macos",
|
42323
|
+
val: "Mac OS",
|
42324
|
+
icon: `${CMS_MEDIA_SERVER}cms/mac_OS_804456afd8/mac_OS_804456afd8.png`
|
42325
|
+
},
|
42326
|
+
windows: {
|
42327
|
+
key: "windows",
|
42328
|
+
val: "Windows",
|
42329
|
+
icon: `${CMS_MEDIA_SERVER}cms/Windows_fdfe6749b6/Windows_fdfe6749b6.svg`
|
42330
|
+
},
|
42331
|
+
linux: {
|
42332
|
+
key: "linux",
|
42333
|
+
val: "Linux",
|
42334
|
+
icon: `${CMS_MEDIA_SERVER}cms/Linux_31f8353a2e/Linux_31f8353a2e.svg`
|
42335
|
+
},
|
42336
|
+
chromium: {
|
42337
|
+
key: "chromium",
|
42338
|
+
val: "Chromium",
|
42339
|
+
icon: `${CMS_MEDIA_SERVER}cms/Chromium_3df17710bd/Chromium_3df17710bd.svg`
|
42340
|
+
},
|
42341
|
+
ubuntu: {
|
42342
|
+
key: "ubuntu",
|
42343
|
+
val: "Ubuntu",
|
42344
|
+
icon: `${CMS_MEDIA_SERVER}cms/Ubuntu_966dd923c5/Ubuntu_966dd923c5.svg`
|
42345
|
+
},
|
42346
|
+
ios: {
|
42347
|
+
key: "ios",
|
42348
|
+
val: "iOS",
|
42349
|
+
icon: `${CMS_MEDIA_SERVER}cms/i_OS_3cdc9d9b71/i_OS_3cdc9d9b71.svg`
|
42350
|
+
},
|
42351
|
+
android: {
|
42352
|
+
key: "android",
|
42353
|
+
val: "Android",
|
42354
|
+
icon: `${CMS_MEDIA_SERVER}cms/Android_49dcfdc934/Android_49dcfdc934.svg`
|
42355
|
+
}
|
42356
|
+
};
|
42357
|
+
var browserTypeIconInfo = {
|
42358
|
+
brave: {
|
42359
|
+
key: "brave",
|
42360
|
+
val: "Brave",
|
42361
|
+
icon: `${CMS_MEDIA_SERVER}cms/Brave_7e66131f09/Brave_7e66131f09.svg`
|
42362
|
+
},
|
42363
|
+
chrome: {
|
42364
|
+
key: "chrome",
|
42365
|
+
val: "Chrome",
|
42366
|
+
icon: `${CMS_MEDIA_SERVER}cms/Chrome_7bf77fbdd7/Chrome_7bf77fbdd7.svg`
|
42367
|
+
},
|
42368
|
+
firefox: {
|
42369
|
+
key: "firefox",
|
42370
|
+
val: "Firefox",
|
42371
|
+
icon: `${CMS_MEDIA_SERVER}cms/Firefox_30f3976fb8/Firefox_30f3976fb8.svg`
|
42372
|
+
},
|
42373
|
+
safari: {
|
42374
|
+
key: "safari",
|
42375
|
+
val: "Safari",
|
42376
|
+
icon: `${CMS_MEDIA_SERVER}cms/Safari_254e74ed94/Safari_254e74ed94.svg`
|
42377
|
+
},
|
42378
|
+
edge: {
|
42379
|
+
key: "edge",
|
42380
|
+
val: "Edge",
|
42381
|
+
icon: `${CMS_MEDIA_SERVER}cms/Edge_23add4a83f/Edge_23add4a83f.svg`
|
42382
|
+
},
|
42383
|
+
opera: {
|
42384
|
+
key: "opera",
|
42385
|
+
val: "Opera",
|
42386
|
+
icon: `${CMS_MEDIA_SERVER}cms/Opera_0f3bf4eb19/Opera_0f3bf4eb19.svg`
|
42387
|
+
}
|
42388
|
+
};
|
42389
|
+
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)));
|
42390
|
+
var BrowserTest = () => {
|
42391
|
+
var _a8, _b7;
|
42392
|
+
const [error, setError] = useState79();
|
42393
|
+
useEffect77(() => {
|
42394
|
+
try {
|
42395
|
+
hmsDiagnostics.checkBrowserSupport();
|
42396
|
+
} catch (err) {
|
42397
|
+
setError(err);
|
42398
|
+
}
|
42399
|
+
}, []);
|
42400
|
+
return /* @__PURE__ */ React186.createElement(React186.Fragment, null, /* @__PURE__ */ React186.createElement(TestContainer, { css: { display: "flex", gap: "$8", "@lg": { display: "block" } } }, /* @__PURE__ */ React186.createElement(
|
42401
|
+
CheckDetails,
|
42402
|
+
{
|
42403
|
+
title: "Browser",
|
42404
|
+
iconURL: parsedUserAgent3.getBrowser().name && browserTypeIconInfo[(_a8 = parsedUserAgent3.getBrowser().name) == null ? void 0 : _a8.toLowerCase()].icon,
|
42405
|
+
value: `${parsedUserAgent3.getBrowser().name} ${parsedUserAgent3.getBrowser().version}`
|
42406
|
+
}
|
42407
|
+
), /* @__PURE__ */ React186.createElement(
|
42408
|
+
CheckDetails,
|
42409
|
+
{
|
42410
|
+
title: "Operating system",
|
42411
|
+
iconURL: parsedUserAgent3.getOS().name && operatingSystemIconInfo[(_b7 = parsedUserAgent3.getOS().name) == null ? void 0 : _b7.toLowerCase()].icon,
|
42412
|
+
value: `${parsedUserAgent3.getOS().name} ${parsedUserAgent3.getOS().version}`
|
42413
|
+
}
|
42414
|
+
)), /* @__PURE__ */ React186.createElement(TestFooter, { error, ctaText: "Is your device information correct?" }));
|
42415
|
+
};
|
42416
|
+
|
42310
42417
|
// src/Diagnostics/ConnectivityTest.tsx
|
42311
42418
|
init_define_process_env();
|
42312
|
-
import
|
42419
|
+
import React187, { useState as useState80 } from "react";
|
42313
42420
|
import { ConnectivityState } from "@100mslive/react-sdk";
|
42314
42421
|
import { CheckCircleIcon as CheckCircleIcon6, CrossCircleIcon as CrossCircleIcon4, LinkIcon } from "@100mslive/react-icons";
|
42315
42422
|
var Regions = {
|
@@ -42331,38 +42438,38 @@ var ConnectivityTestStepResult = ({
|
|
42331
42438
|
success,
|
42332
42439
|
children
|
42333
42440
|
}) => {
|
42334
|
-
return /* @__PURE__ */
|
42441
|
+
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));
|
42335
42442
|
};
|
42336
42443
|
var DetailedInfo = ({
|
42337
42444
|
title,
|
42338
42445
|
value,
|
42339
42446
|
Icon: Icon4
|
42340
42447
|
}) => {
|
42341
|
-
return /* @__PURE__ */
|
42448
|
+
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)));
|
42342
42449
|
};
|
42343
42450
|
var MediaServerResult = ({ result }) => {
|
42344
42451
|
var _a8, _b7, _c, _d;
|
42345
|
-
return /* @__PURE__ */
|
42452
|
+
return /* @__PURE__ */ React187.createElement(
|
42346
42453
|
ConnectivityTestStepResult,
|
42347
42454
|
{
|
42348
42455
|
title: "Media server connection test",
|
42349
42456
|
success: (result == null ? void 0 : result.isPublishICEConnected) && result.isSubscribeICEConnected
|
42350
42457
|
},
|
42351
|
-
/* @__PURE__ */
|
42458
|
+
/* @__PURE__ */ React187.createElement(Flex, { css: { flexWrap: "wrap" } }, /* @__PURE__ */ React187.createElement(
|
42352
42459
|
DetailedInfo,
|
42353
42460
|
{
|
42354
42461
|
title: "Media Captured",
|
42355
42462
|
value: ((_a8 = result == null ? void 0 : result.stats) == null ? void 0 : _a8.audio.bytesSent) ? "Yes" : "No",
|
42356
42463
|
Icon: ((_b7 = result == null ? void 0 : result.stats) == null ? void 0 : _b7.audio.bytesSent) ? CheckCircleIcon6 : CrossCircleIcon4
|
42357
42464
|
}
|
42358
|
-
), /* @__PURE__ */
|
42465
|
+
), /* @__PURE__ */ React187.createElement(
|
42359
42466
|
DetailedInfo,
|
42360
42467
|
{
|
42361
42468
|
title: "Media Published",
|
42362
42469
|
value: ((_c = result == null ? void 0 : result.stats) == null ? void 0 : _c.audio.bitrateSent) ? "Yes" : "No",
|
42363
42470
|
Icon: ((_d = result == null ? void 0 : result.stats) == null ? void 0 : _d.audio.bytesSent) ? CheckCircleIcon6 : CrossCircleIcon4
|
42364
42471
|
}
|
42365
|
-
), (result == null ? void 0 : result.connectionQualityScore) ? /* @__PURE__ */
|
42472
|
+
), (result == null ? void 0 : result.connectionQualityScore) ? /* @__PURE__ */ React187.createElement(
|
42366
42473
|
DetailedInfo,
|
42367
42474
|
{
|
42368
42475
|
title: "Connection Quality Score (CQS)",
|
@@ -42372,27 +42479,27 @@ var MediaServerResult = ({ result }) => {
|
|
42372
42479
|
);
|
42373
42480
|
};
|
42374
42481
|
var SignallingResult = ({ result }) => {
|
42375
|
-
return /* @__PURE__ */
|
42482
|
+
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(
|
42376
42483
|
DetailedInfo,
|
42377
42484
|
{
|
42378
42485
|
title: "Signalling Gateway",
|
42379
42486
|
value: (result == null ? void 0 : result.isConnected) ? "Reachable" : "Unreachable",
|
42380
42487
|
Icon: (result == null ? void 0 : result.isConnected) ? CheckCircleIcon6 : CrossCircleIcon4
|
42381
42488
|
}
|
42382
|
-
), /* @__PURE__ */
|
42489
|
+
), /* @__PURE__ */ React187.createElement(DetailedInfo, { title: "Websocket URL", value: (result == null ? void 0 : result.websocketUrl) || "N/A", Icon: LinkIcon })));
|
42383
42490
|
};
|
42384
42491
|
var AudioStats = ({ stats }) => {
|
42385
|
-
return /* @__PURE__ */
|
42492
|
+
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` })));
|
42386
42493
|
};
|
42387
42494
|
var VideoStats = ({ stats }) => {
|
42388
|
-
return /* @__PURE__ */
|
42495
|
+
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` })));
|
42389
42496
|
};
|
42390
42497
|
var Footer3 = ({
|
42391
42498
|
error,
|
42392
42499
|
result,
|
42393
42500
|
restart
|
42394
42501
|
}) => {
|
42395
|
-
return /* @__PURE__ */
|
42502
|
+
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")));
|
42396
42503
|
};
|
42397
42504
|
var ConnectivityTestReport = ({
|
42398
42505
|
error,
|
@@ -42402,13 +42509,14 @@ var ConnectivityTestReport = ({
|
|
42402
42509
|
}) => {
|
42403
42510
|
var _a8, _b7, _c, _d;
|
42404
42511
|
if (error) {
|
42405
|
-
return /* @__PURE__ */
|
42512
|
+
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 }));
|
42406
42513
|
}
|
42407
42514
|
if (result) {
|
42408
|
-
|
42515
|
+
console.log(result);
|
42516
|
+
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 }));
|
42409
42517
|
}
|
42410
|
-
if (progress) {
|
42411
|
-
return /* @__PURE__ */
|
42518
|
+
if (progress !== void 0) {
|
42519
|
+
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(
|
42412
42520
|
Text,
|
42413
42521
|
{
|
42414
42522
|
variant: "body2",
|
@@ -42424,7 +42532,7 @@ var RegionSelector = ({
|
|
42424
42532
|
setRegion,
|
42425
42533
|
startTest
|
42426
42534
|
}) => {
|
42427
|
-
return /* @__PURE__ */
|
42535
|
+
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(
|
42428
42536
|
Flex,
|
42429
42537
|
{
|
42430
42538
|
justify: "between",
|
@@ -42436,7 +42544,7 @@ var RegionSelector = ({
|
|
42436
42544
|
}
|
42437
42545
|
}
|
42438
42546
|
},
|
42439
|
-
/* @__PURE__ */
|
42547
|
+
/* @__PURE__ */ React187.createElement(
|
42440
42548
|
Flex,
|
42441
42549
|
{
|
42442
42550
|
css: {
|
@@ -42446,7 +42554,7 @@ var RegionSelector = ({
|
|
42446
42554
|
}
|
42447
42555
|
}
|
42448
42556
|
},
|
42449
|
-
Object.entries(Regions).map(([key, value]) => /* @__PURE__ */
|
42557
|
+
Object.entries(Regions).map(([key, value]) => /* @__PURE__ */ React187.createElement(
|
42450
42558
|
Button,
|
42451
42559
|
{
|
42452
42560
|
key,
|
@@ -42458,17 +42566,16 @@ var RegionSelector = ({
|
|
42458
42566
|
value
|
42459
42567
|
))
|
42460
42568
|
),
|
42461
|
-
/* @__PURE__ */
|
42569
|
+
/* @__PURE__ */ React187.createElement(Flex, { css: { "@lg": { flexDirection: "column" } } }, /* @__PURE__ */ React187.createElement(Button, { variant: "primary", onClick: startTest, disabled: !startTest }, startTest ? "Start Test" : "Testing..."))
|
42462
42570
|
));
|
42463
42571
|
};
|
42464
42572
|
var ConnectivityTest = () => {
|
42465
|
-
const [region, setRegion] =
|
42466
|
-
const [error, setError] =
|
42467
|
-
const [progress, setProgress] =
|
42468
|
-
const [result, setResult] =
|
42573
|
+
const [region, setRegion] = useState80(Object.keys(Regions)[0]);
|
42574
|
+
const [error, setError] = useState80();
|
42575
|
+
const [progress, setProgress] = useState80();
|
42576
|
+
const [result, setResult] = useState80();
|
42469
42577
|
const startTest = () => {
|
42470
42578
|
setError(void 0);
|
42471
|
-
setProgress(ConnectivityState.STARTING);
|
42472
42579
|
setResult(void 0);
|
42473
42580
|
hmsDiagnostics.startConnectivityCheck(
|
42474
42581
|
(state) => {
|
@@ -42482,14 +42589,14 @@ var ConnectivityTest = () => {
|
|
42482
42589
|
setError(error2);
|
42483
42590
|
});
|
42484
42591
|
};
|
42485
|
-
return /* @__PURE__ */
|
42592
|
+
return /* @__PURE__ */ React187.createElement(React187.Fragment, null, /* @__PURE__ */ React187.createElement(
|
42486
42593
|
RegionSelector,
|
42487
42594
|
{
|
42488
42595
|
region,
|
42489
42596
|
setRegion,
|
42490
|
-
startTest:
|
42597
|
+
startTest: progress === void 0 || progress === ConnectivityState.COMPLETED ? startTest : void 0
|
42491
42598
|
}
|
42492
|
-
), /* @__PURE__ */
|
42599
|
+
), /* @__PURE__ */ React187.createElement(ConnectivityTestReport, { error, result, progress, startTest }));
|
42493
42600
|
};
|
42494
42601
|
var downloadJson = (obj, fileName) => {
|
42495
42602
|
const a11 = document.createElement("a");
|
@@ -42503,7 +42610,7 @@ var downloadJson = (obj, fileName) => {
|
|
42503
42610
|
|
42504
42611
|
// src/Diagnostics/VideoTest.tsx
|
42505
42612
|
init_define_process_env();
|
42506
|
-
import
|
42613
|
+
import React188, { useEffect as useEffect78, useState as useState81 } from "react";
|
42507
42614
|
import { selectDevices as selectDevices2, selectLocalMediaSettings as selectLocalMediaSettings2, selectLocalVideoTrackID as selectLocalVideoTrackID4, useHMSStore as useHMSStore100 } from "@100mslive/react-sdk";
|
42508
42615
|
import { VideoOnIcon as VideoOnIcon5 } from "@100mslive/react-icons";
|
42509
42616
|
var VideoTest = () => {
|
@@ -42511,11 +42618,11 @@ var VideoTest = () => {
|
|
42511
42618
|
const { videoInput } = allDevices;
|
42512
42619
|
const trackID = useHMSStore100(selectLocalVideoTrackID4);
|
42513
42620
|
const sdkSelectedDevices = useHMSStore100(selectLocalMediaSettings2);
|
42514
|
-
const [error, setError] =
|
42515
|
-
|
42621
|
+
const [error, setError] = useState81();
|
42622
|
+
useEffect78(() => {
|
42516
42623
|
hmsDiagnostics.startCameraCheck().catch((err) => setError(err));
|
42517
42624
|
}, []);
|
42518
|
-
return /* @__PURE__ */
|
42625
|
+
return /* @__PURE__ */ React188.createElement(React188.Fragment, null, /* @__PURE__ */ React188.createElement(TestContainer, { css: { display: "flex", "@lg": { flexDirection: "column", alignItems: "center" } } }, trackID && /* @__PURE__ */ React188.createElement(
|
42519
42626
|
StyledVideoTile.Container,
|
42520
42627
|
{
|
42521
42628
|
css: {
|
@@ -42525,30 +42632,30 @@ var VideoTest = () => {
|
|
42525
42632
|
"@lg": { mr: 0, mb: "$10" }
|
42526
42633
|
}
|
42527
42634
|
},
|
42528
|
-
/* @__PURE__ */
|
42529
|
-
), /* @__PURE__ */
|
42635
|
+
/* @__PURE__ */ React188.createElement(Video, { mirror: true, trackId: trackID })
|
42636
|
+
), /* @__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(
|
42530
42637
|
DeviceSelector2,
|
42531
42638
|
{
|
42532
42639
|
title: "Video",
|
42533
42640
|
devices: videoInput || [],
|
42534
|
-
icon: /* @__PURE__ */
|
42641
|
+
icon: /* @__PURE__ */ React188.createElement(VideoOnIcon5, null),
|
42535
42642
|
selection: sdkSelectedDevices.videoInputDeviceId,
|
42536
42643
|
onChange: (deviceId) => __async(void 0, null, function* () {
|
42537
42644
|
hmsDiagnostics.stopCameraCheck();
|
42538
42645
|
hmsDiagnostics.startCameraCheck(deviceId);
|
42539
42646
|
})
|
42540
42647
|
}
|
42541
|
-
))), /* @__PURE__ */
|
42648
|
+
))), /* @__PURE__ */ React188.createElement(TestFooter, { error, ctaText: "Does your video look good?" }));
|
42542
42649
|
};
|
42543
42650
|
|
42544
42651
|
// src/Diagnostics/Diagnostics.tsx
|
42545
42652
|
var DiagnosticsStepIcon = {
|
42546
|
-
video: /* @__PURE__ */
|
42547
|
-
audio: /* @__PURE__ */
|
42548
|
-
browser: /* @__PURE__ */
|
42549
|
-
connectivity: /* @__PURE__ */
|
42653
|
+
video: /* @__PURE__ */ React189.createElement(VideoOnIcon6, { width: "2rem", height: "2rem" }),
|
42654
|
+
audio: /* @__PURE__ */ React189.createElement(MicOnIcon8, { width: "2rem", height: "2rem" }),
|
42655
|
+
browser: /* @__PURE__ */ React189.createElement(GlobeIcon, { width: "2rem", height: "2rem" }),
|
42656
|
+
connectivity: /* @__PURE__ */ React189.createElement(ConnectivityIcon2, { width: "2rem", height: "2rem" })
|
42550
42657
|
};
|
42551
|
-
var Container5 = ({ children }) => /* @__PURE__ */
|
42658
|
+
var Container5 = ({ children }) => /* @__PURE__ */ React189.createElement(
|
42552
42659
|
Box,
|
42553
42660
|
{
|
42554
42661
|
css: {
|
@@ -42568,30 +42675,45 @@ var Container5 = ({ children }) => /* @__PURE__ */ React188.createElement(
|
|
42568
42675
|
);
|
42569
42676
|
var DiagnosticsStepTest = () => {
|
42570
42677
|
const { activeStep } = useContext6(DiagnosticsContext);
|
42571
|
-
let TestComponent = () => /* @__PURE__ */
|
42678
|
+
let TestComponent = () => /* @__PURE__ */ React189.createElement(React189.Fragment, null);
|
42572
42679
|
if (activeStep === "audio") {
|
42573
42680
|
TestComponent = AudioTest;
|
42574
42681
|
} else if (activeStep === "video") {
|
42575
42682
|
TestComponent = VideoTest;
|
42683
|
+
} else if (activeStep === "browser") {
|
42684
|
+
TestComponent = BrowserTest;
|
42576
42685
|
} else if (activeStep === "connectivity") {
|
42577
42686
|
TestComponent = ConnectivityTest;
|
42578
42687
|
}
|
42579
|
-
return /* @__PURE__ */
|
42688
|
+
return /* @__PURE__ */ React189.createElement(TestComponent, { key: activeStep });
|
42580
42689
|
};
|
42581
42690
|
var DiagnosticsStepHeader = () => {
|
42582
42691
|
const { activeStep } = useContext6(DiagnosticsContext);
|
42583
|
-
return /* @__PURE__ */
|
42692
|
+
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]));
|
42584
42693
|
};
|
42585
42694
|
var DiagnosticsStep = () => {
|
42586
|
-
return /* @__PURE__ */
|
42695
|
+
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)));
|
42587
42696
|
};
|
42588
42697
|
var DiagnosticsStepsList = () => {
|
42589
42698
|
const { activeStep } = useContext6(DiagnosticsContext);
|
42590
|
-
return /* @__PURE__ */
|
42699
|
+
return /* @__PURE__ */ React189.createElement(Box, { css: { w: "25%", "@lg": { display: "none" } } }, Object.keys(DiagnosticsSteps).map((key) => {
|
42700
|
+
const keys = Object.keys(DiagnosticsSteps);
|
42701
|
+
const activeStepIndex = keys.indexOf(activeStep);
|
42702
|
+
const keyIndex = keys.indexOf(key);
|
42703
|
+
const isStepCompleted = activeStepIndex > keyIndex;
|
42704
|
+
let color = "$on_primary_low";
|
42705
|
+
if (isStepCompleted) {
|
42706
|
+
color = "$primary_bright";
|
42707
|
+
}
|
42708
|
+
if (activeStep === key) {
|
42709
|
+
color = "$on_primary_high";
|
42710
|
+
}
|
42711
|
+
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]));
|
42712
|
+
}));
|
42591
42713
|
};
|
42592
42714
|
var Diagnostics = () => {
|
42593
|
-
const [activeStep, setActiveStep] =
|
42594
|
-
return /* @__PURE__ */
|
42715
|
+
const [activeStep, setActiveStep] = React189.useState(Object.keys(DiagnosticsSteps)[0]);
|
42716
|
+
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))))));
|
42595
42717
|
};
|
42596
42718
|
|
42597
42719
|
export {
|
@@ -42726,4 +42848,4 @@ object-assign/index.js:
|
|
42726
42848
|
@license MIT
|
42727
42849
|
*)
|
42728
42850
|
*/
|
42729
|
-
//# sourceMappingURL=chunk-
|
42851
|
+
//# sourceMappingURL=chunk-W6E3MUWX.js.map
|