@100mslive/roomkit-react 0.3.14-alpha.7 → 0.3.14-alpha.9
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{HLSView-RRYP5FV5.js → HLSView-MWFODCX2.js} +2 -2
- package/dist/{HLSView-YIIBVIYC.css → HLSView-PJMAGWYH.css} +3 -3
- package/dist/{HLSView-YIIBVIYC.css.map → HLSView-PJMAGWYH.css.map} +1 -1
- package/dist/Prebuilt/components/Notifications/PermissionErrorModal.d.ts +5 -1
- package/dist/{chunk-DR5OAQOV.js → chunk-VO7L2JWV.js} +736 -706
- package/dist/{chunk-DR5OAQOV.js.map → chunk-VO7L2JWV.js.map} +4 -4
- package/dist/index.cjs.css +2 -2
- package/dist/index.cjs.css.map +1 -1
- package/dist/index.cjs.js +774 -747
- 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 +34 -24
- package/dist/meta.esbuild.json +44 -34
- package/package.json +7 -7
- package/src/Diagnostics/AudioTest.tsx +27 -18
- package/src/Diagnostics/ConnectivityTest.tsx +1 -1
- package/src/Diagnostics/VideoTest.tsx +10 -2
- package/src/Prebuilt/components/Notifications/Notifications.tsx +2 -2
- package/src/Prebuilt/components/Notifications/PermissionErrorModal.tsx +13 -11
- /package/dist/{HLSView-RRYP5FV5.js.map → HLSView-MWFODCX2.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_5e2df5ff-9e88-48c5-ae09-3f35ab8bdfbe", 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.7", 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.7", RUNNER_ENVIRONMENT: "github-hosted", GITHUB_ENV: "/home/runner/work/_temp/_runner_file_commands/set_env_5e2df5ff-9e88-48c5-ae09-3f35ab8bdfbe", 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.7", 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: "592", npm_package_scripts_postinstall: "husky install && lerna bootstrap", npm_package_devDependencies_husky: "^6.0.0", npm_package_dependencies_recordrtc: "^5.6.2", npm_package_dependencies_eventemitter2: "^6.4.9", npm_package_dependencies__radix_ui_react_label: "1.0.0", npm_package_dependencies__radix_ui_react_dropdown_menu: "2.0.5", npm_package_keywords_0: "100mslive", GITHUB_GRAPHQL_URL: "https://api.github.com/graphql", npm_package_description: "100ms Room Kit provides simple & easy to use UI components to build Live Streaming & Video Conferencing experiences in your apps.", npm_package_devDependencies_typescript: "~4.7.4", npm_package_devDependencies_typedoc: "^0.24.8", npm_package_devDependencies_babel_loader: "^8.2.5", npm_package_keywords_1: "react", GOROOT_1_20_X64: "/opt/hostedtoolcache/go/1.20.14/x64", NVM_DIR: "/home/runner/.nvm", npm_package_readmeFilename: "README.md", npm_package_devDependencies_react: "^18.1.0", npm_package_devDependencies__babel_preset_env: "^7.22.5", npm_package_keywords_2: "prebuilt", DOTNET_SKIP_FIRST_TIME_EXPERIENCE: "1", GOROOT_1_21_X64: "/opt/hostedtoolcache/go/1.21.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:17308", 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.7", 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: "9598388267", 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: "c57e858bbc09c5b82722610c4ae0fcf200e61161", 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: "2c40941210fdfcce83d8f8ea6e75595dc23825a6d30d1f8b04ee1d5c13c011e8", 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--1718890248699-0.19677626630198497:/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--1718890248506-0.34564658162174067:/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--1718890223199-0.8761704666839227:/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--1718890223022-0.05784877896719243:/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_a00aa94b-086d-4f59-aff2-64b17cc8cc39", INVOCATION_ID: "ddaa7297c32e4415969cd4dbdf7c4640", 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: "584", 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 361", 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.7", 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.7", 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: "c57e858bbc09c5b82722610c4ae0fcf200e61161", 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_5e2df5ff-9e88-48c5-ae09-3f35ab8bdfbe", 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_5e2df5ff-9e88-48c5-ae09-3f35ab8bdfbe", 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_5e2df5ff-9e88-48c5-ae09-3f35ab8bdfbe" };
|
110
|
+
define_process_env_default = { GITHUB_STATE: "/home/runner/work/_temp/_runner_file_commands/save_state_64e68346-fe70-4da2-95d3-209214f9bdaf", 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.9", 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.9", RUNNER_ENVIRONMENT: "github-hosted", GITHUB_ENV: "/home/runner/work/_temp/_runner_file_commands/set_env_64e68346-fe70-4da2-95d3-209214f9bdaf", 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.9", 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: "592", npm_package_scripts_postinstall: "husky install && lerna bootstrap", npm_package_devDependencies_husky: "^6.0.0", npm_package_dependencies_recordrtc: "^5.6.2", npm_package_dependencies_eventemitter2: "^6.4.9", npm_package_dependencies__radix_ui_react_label: "1.0.0", npm_package_dependencies__radix_ui_react_dropdown_menu: "2.0.5", npm_package_keywords_0: "100mslive", GITHUB_GRAPHQL_URL: "https://api.github.com/graphql", npm_package_description: "100ms Room Kit provides simple & easy to use UI components to build Live Streaming & Video Conferencing experiences in your apps.", npm_package_devDependencies_typescript: "~4.7.4", npm_package_devDependencies_typedoc: "^0.24.8", npm_package_devDependencies_babel_loader: "^8.2.5", npm_package_keywords_1: "react", GOROOT_1_20_X64: "/opt/hostedtoolcache/go/1.20.14/x64", NVM_DIR: "/home/runner/.nvm", npm_package_readmeFilename: "README.md", npm_package_devDependencies_react: "^18.1.0", npm_package_devDependencies__babel_preset_env: "^7.22.5", npm_package_keywords_2: "prebuilt", DOTNET_SKIP_FIRST_TIME_EXPERIENCE: "1", GOROOT_1_21_X64: "/opt/hostedtoolcache/go/1.21.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:16186", 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.9", 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: "9643076846", 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: "3caf5ae1abb71e5e7dede48bc4b9b8dfa5a25a8a", 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: "45931fde6bf77d2d1cd3b95a11a2f9c9943817998bd64fda1e0d9d0cbbf7acbf", 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--1719221877947-0.7338311406643205:/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--1719221877752-0.7893639730050881:/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--1719221852672-0.07427928548185037:/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--1719221852496-0.7880008360495065:/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_b19dd9ee-c4a0-4f55-ae8f-3ea51e07fb3d", INVOCATION_ID: "0c5c352daeb1430cbd335645819f2fd5", 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: "586", 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 469", 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.9", 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.9", 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: "3caf5ae1abb71e5e7dede48bc4b9b8dfa5a25a8a", 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_64e68346-fe70-4da2-95d3-209214f9bdaf", 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_64e68346-fe70-4da2-95d3-209214f9bdaf", 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_64e68346-fe70-4da2-95d3-209214f9bdaf" };
|
111
111
|
}
|
112
112
|
});
|
113
113
|
|
@@ -8634,8 +8634,8 @@ var require_grammar = __commonJS({
|
|
8634
8634
|
var require_parser = __commonJS({
|
8635
8635
|
"../../node_modules/sdp-transform/lib/parser.js"(exports) {
|
8636
8636
|
init_define_process_env();
|
8637
|
-
var toIntIfInt = function(
|
8638
|
-
return String(Number(
|
8637
|
+
var toIntIfInt = function(v3) {
|
8638
|
+
return String(Number(v3)) === v3 ? Number(v3) : v3;
|
8639
8639
|
};
|
8640
8640
|
var attachProperties = function(match17, location, names, rawName) {
|
8641
8641
|
if (rawName && !names) {
|
@@ -8871,7 +8871,7 @@ var require_react_is_production_min = __commonJS({
|
|
8871
8871
|
var c3 = b3 ? Symbol.for("react.element") : 60103;
|
8872
8872
|
var d3 = b3 ? Symbol.for("react.portal") : 60106;
|
8873
8873
|
var e = b3 ? Symbol.for("react.fragment") : 60107;
|
8874
|
-
var
|
8874
|
+
var f2 = b3 ? Symbol.for("react.strict_mode") : 60108;
|
8875
8875
|
var g2 = b3 ? Symbol.for("react.profiler") : 60114;
|
8876
8876
|
var h2 = b3 ? Symbol.for("react.provider") : 60109;
|
8877
8877
|
var k2 = b3 ? Symbol.for("react.context") : 60110;
|
@@ -8882,7 +8882,7 @@ var require_react_is_production_min = __commonJS({
|
|
8882
8882
|
var q3 = b3 ? Symbol.for("react.suspense_list") : 60120;
|
8883
8883
|
var r2 = b3 ? Symbol.for("react.memo") : 60115;
|
8884
8884
|
var t2 = b3 ? Symbol.for("react.lazy") : 60116;
|
8885
|
-
var
|
8885
|
+
var v3 = b3 ? Symbol.for("react.block") : 60121;
|
8886
8886
|
var w2 = b3 ? Symbol.for("react.fundamental") : 60117;
|
8887
8887
|
var x2 = b3 ? Symbol.for("react.responder") : 60118;
|
8888
8888
|
var y3 = b3 ? Symbol.for("react.scope") : 60119;
|
@@ -8896,7 +8896,7 @@ var require_react_is_production_min = __commonJS({
|
|
8896
8896
|
case m2:
|
8897
8897
|
case e:
|
8898
8898
|
case g2:
|
8899
|
-
case
|
8899
|
+
case f2:
|
8900
8900
|
case p2:
|
8901
8901
|
return a11;
|
8902
8902
|
default:
|
@@ -8930,7 +8930,7 @@ var require_react_is_production_min = __commonJS({
|
|
8930
8930
|
exports.Memo = r2;
|
8931
8931
|
exports.Portal = d3;
|
8932
8932
|
exports.Profiler = g2;
|
8933
|
-
exports.StrictMode =
|
8933
|
+
exports.StrictMode = f2;
|
8934
8934
|
exports.Suspense = p2;
|
8935
8935
|
exports.isAsyncMode = function(a11) {
|
8936
8936
|
return A3(a11) || z3(a11) === l2;
|
@@ -8964,13 +8964,13 @@ var require_react_is_production_min = __commonJS({
|
|
8964
8964
|
return z3(a11) === g2;
|
8965
8965
|
};
|
8966
8966
|
exports.isStrictMode = function(a11) {
|
8967
|
-
return z3(a11) ===
|
8967
|
+
return z3(a11) === f2;
|
8968
8968
|
};
|
8969
8969
|
exports.isSuspense = function(a11) {
|
8970
8970
|
return z3(a11) === p2;
|
8971
8971
|
};
|
8972
8972
|
exports.isValidElementType = function(a11) {
|
8973
|
-
return "string" === typeof a11 || "function" === typeof a11 || a11 === e || a11 === m2 || a11 === g2 || a11 ===
|
8973
|
+
return "string" === typeof a11 || "function" === typeof a11 || a11 === e || a11 === m2 || a11 === g2 || a11 === f2 || a11 === p2 || a11 === q3 || "object" === typeof a11 && null !== a11 && (a11.$$typeof === t2 || a11.$$typeof === r2 || a11.$$typeof === h2 || a11.$$typeof === k2 || a11.$$typeof === n2 || a11.$$typeof === w2 || a11.$$typeof === x2 || a11.$$typeof === y3 || a11.$$typeof === v3);
|
8974
8974
|
};
|
8975
8975
|
exports.typeOf = z3;
|
8976
8976
|
}
|
@@ -18208,11 +18208,11 @@ function shimOnTrack(window2) {
|
|
18208
18208
|
get() {
|
18209
18209
|
return this._ontrack;
|
18210
18210
|
},
|
18211
|
-
set(
|
18211
|
+
set(f2) {
|
18212
18212
|
if (this._ontrack) {
|
18213
18213
|
this.removeEventListener("track", this._ontrack);
|
18214
18214
|
}
|
18215
|
-
this.addEventListener("track", this._ontrack =
|
18215
|
+
this.addEventListener("track", this._ontrack = f2);
|
18216
18216
|
},
|
18217
18217
|
enumerable: true,
|
18218
18218
|
configurable: true
|
@@ -19195,12 +19195,12 @@ function shimRemoteStreamsAPI(window2) {
|
|
19195
19195
|
get() {
|
19196
19196
|
return this._onaddstream;
|
19197
19197
|
},
|
19198
|
-
set(
|
19198
|
+
set(f2) {
|
19199
19199
|
if (this._onaddstream) {
|
19200
19200
|
this.removeEventListener("addstream", this._onaddstream);
|
19201
19201
|
this.removeEventListener("track", this._onaddstreampoly);
|
19202
19202
|
}
|
19203
|
-
this.addEventListener("addstream", this._onaddstream =
|
19203
|
+
this.addEventListener("addstream", this._onaddstream = f2);
|
19204
19204
|
this.addEventListener("track", this._onaddstreampoly = (e) => {
|
19205
19205
|
e.streams.forEach((stream) => {
|
19206
19206
|
if (!this._remoteStreams) {
|
@@ -19878,7 +19878,7 @@ var import_lodash4 = __toESM(require_lodash2());
|
|
19878
19878
|
import { v4 as fo } from "uuid";
|
19879
19879
|
import { v4 as ko } from "uuid";
|
19880
19880
|
import { v4 as Ro } from "uuid";
|
19881
|
-
import { EventEmitter2 as
|
19881
|
+
import { EventEmitter2 as Io } from "eventemitter2";
|
19882
19882
|
|
19883
19883
|
// ../../node_modules/immer/dist/immer.esm.mjs
|
19884
19884
|
init_define_process_env();
|
@@ -20012,14 +20012,14 @@ function M(n2, r2, t2) {
|
|
20012
20012
|
}
|
20013
20013
|
return e.o;
|
20014
20014
|
}
|
20015
|
-
function A(e, i2, o2, a11, c3, s2,
|
20015
|
+
function A(e, i2, o2, a11, c3, s2, v3) {
|
20016
20016
|
if ("production" !== define_process_env_default.NODE_ENV && c3 === o2 && n(5), r(c3)) {
|
20017
20017
|
var p2 = M(e, c3, s2 && i2 && 3 !== i2.i && !u(i2.R, a11) ? s2.concat(a11) : void 0);
|
20018
20018
|
if (f(o2, a11, p2), !r(p2))
|
20019
20019
|
return;
|
20020
20020
|
e.m = false;
|
20021
20021
|
} else
|
20022
|
-
|
20022
|
+
v3 && o2.add(c3);
|
20023
20023
|
if (t(c3) && !y(c3)) {
|
20024
20024
|
if (!e.h.D && e._ < 1)
|
20025
20025
|
return;
|
@@ -20052,8 +20052,8 @@ function N(n2, r2, t2) {
|
|
20052
20052
|
var e = s(r2) ? b("MapSet").F(r2, t2) : v(r2) ? b("MapSet").T(r2, t2) : n2.O ? function(n3, r3) {
|
20053
20053
|
var t3 = Array.isArray(n3), e2 = { i: t3 ? 1 : 0, A: r3 ? r3.A : _(), P: false, I: false, R: {}, l: r3, t: n3, k: null, o: null, j: null, C: false }, i2 = e2, o2 = en;
|
20054
20054
|
t3 && (i2 = [e2], o2 = on);
|
20055
|
-
var u2 = Proxy.revocable(i2, o2), a11 = u2.revoke,
|
20056
|
-
return e2.k =
|
20055
|
+
var u2 = Proxy.revocable(i2, o2), a11 = u2.revoke, f2 = u2.proxy;
|
20056
|
+
return e2.k = f2, e2.j = a11, f2;
|
20057
20057
|
}(r2, t2) : b("ES5").J(r2, t2);
|
20058
20058
|
return (t2 ? t2.A : _()).p.push(e), e;
|
20059
20059
|
}
|
@@ -20186,26 +20186,26 @@ var un = function() {
|
|
20186
20186
|
});
|
20187
20187
|
};
|
20188
20188
|
}
|
20189
|
-
var
|
20189
|
+
var f2;
|
20190
20190
|
if ("function" != typeof i3 && n(6), void 0 !== o2 && "function" != typeof o2 && n(7), t(r3)) {
|
20191
|
-
var c3 = w(e2), s2 = N(e2, r3, void 0),
|
20191
|
+
var c3 = w(e2), s2 = N(e2, r3, void 0), v3 = true;
|
20192
20192
|
try {
|
20193
|
-
|
20193
|
+
f2 = i3(s2), v3 = false;
|
20194
20194
|
} finally {
|
20195
|
-
|
20195
|
+
v3 ? g(c3) : O(c3);
|
20196
20196
|
}
|
20197
|
-
return "undefined" != typeof Promise &&
|
20197
|
+
return "undefined" != typeof Promise && f2 instanceof Promise ? f2.then(function(n2) {
|
20198
20198
|
return j(c3, o2), P3(n2, c3);
|
20199
20199
|
}, function(n2) {
|
20200
20200
|
throw g(c3), n2;
|
20201
|
-
}) : (j(c3, o2), P3(
|
20201
|
+
}) : (j(c3, o2), P3(f2, c3));
|
20202
20202
|
}
|
20203
20203
|
if (!r3 || "object" != typeof r3) {
|
20204
|
-
if (void 0 === (
|
20204
|
+
if (void 0 === (f2 = i3(r3)) && (f2 = r3), f2 === H && (f2 = void 0), e2.D && d(f2, true), o2) {
|
20205
20205
|
var p2 = [], l2 = [];
|
20206
|
-
b("Patches").M(r3,
|
20206
|
+
b("Patches").M(r3, f2, p2, l2), o2(p2, l2);
|
20207
20207
|
}
|
20208
|
-
return
|
20208
|
+
return f2;
|
20209
20209
|
}
|
20210
20210
|
n(21, r3);
|
20211
20211
|
}, this.produceWithPatches = function(n2, r3) {
|
@@ -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 $t = __toESM(require_lib());
|
20331
20331
|
import { EventEmitter2 as en2 } from "eventemitter2";
|
20332
20332
|
import { v4 as on2 } from "uuid";
|
20333
20333
|
import { EventEmitter2 as nn2 } from "eventemitter2";
|
@@ -20337,7 +20337,7 @@ import { v4 as pn2 } from "uuid";
|
|
20337
20337
|
var qa = Object.defineProperty;
|
20338
20338
|
var ja = Object.defineProperties;
|
20339
20339
|
var Ja = Object.getOwnPropertyDescriptors;
|
20340
|
-
var
|
20340
|
+
var Zt = Object.getOwnPropertySymbols;
|
20341
20341
|
var Qa = Object.getPrototypeOf;
|
20342
20342
|
var is = Object.prototype.hasOwnProperty;
|
20343
20343
|
var rs = Object.prototype.propertyIsEnumerable;
|
@@ -20346,8 +20346,8 @@ var ts = (a11, e, t2) => e in a11 ? qa(a11, e, { enumerable: true, configurable:
|
|
20346
20346
|
var m = (a11, e) => {
|
20347
20347
|
for (var t2 in e || (e = {}))
|
20348
20348
|
is.call(e, t2) && ts(a11, t2, e[t2]);
|
20349
|
-
if (
|
20350
|
-
for (var t2 of
|
20349
|
+
if (Zt)
|
20350
|
+
for (var t2 of Zt(e))
|
20351
20351
|
rs.call(e, t2) && ts(a11, t2, e[t2]);
|
20352
20352
|
return a11;
|
20353
20353
|
};
|
@@ -20356,13 +20356,13 @@ var mr = (a11, e) => {
|
|
20356
20356
|
var t2 = {};
|
20357
20357
|
for (var i2 in a11)
|
20358
20358
|
is.call(a11, i2) && e.indexOf(i2) < 0 && (t2[i2] = a11[i2]);
|
20359
|
-
if (a11 != null &&
|
20360
|
-
for (var i2 of
|
20359
|
+
if (a11 != null && Zt)
|
20360
|
+
for (var i2 of Zt(a11))
|
20361
20361
|
e.indexOf(i2) < 0 && rs.call(a11, i2) && (t2[i2] = a11[i2]);
|
20362
20362
|
return t2;
|
20363
20363
|
};
|
20364
20364
|
var Ya = (a11, e) => () => (e || a11((e = { exports: {} }).exports, e), e.exports);
|
20365
|
-
var
|
20365
|
+
var J = (a11, e, t2) => za(Qa(a11), t2, e);
|
20366
20366
|
var c2 = (a11, e, t2) => new Promise((i2, r2) => {
|
20367
20367
|
var s2 = (l2) => {
|
20368
20368
|
try {
|
@@ -20380,11 +20380,11 @@ var c2 = (a11, e, t2) => new Promise((i2, r2) => {
|
|
20380
20380
|
n2((t2 = t2.apply(a11, e)).next());
|
20381
20381
|
});
|
20382
20382
|
var Mr = Ya((Vc, oo) => {
|
20383
|
-
oo.exports = { version: "0.12.14-alpha.
|
20383
|
+
oo.exports = { version: "0.12.14-alpha.9", 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
20385
|
var Sr = ((n2) => (n2.Disconnected = "Disconnected", n2.Preview = "Preview", n2.Connecting = "Connecting", n2.Connected = "Connected", n2.Reconnecting = "Reconnecting", n2.Disconnecting = "Disconnecting", n2.Failed = "Failed", n2))(Sr || {});
|
20386
|
-
var
|
20387
|
-
var
|
20386
|
+
var ei = () => ({ 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 ti = () => ({ peerStats: {}, remoteTrackStats: {}, localTrackStats: {}, localPeer: { id: "" } });
|
20388
20388
|
var Xa = ((e) => (e.CHAT = "chat", e))(Xa || {});
|
20389
20389
|
var ss = ((t2) => (t2.INFO = "info", t2.ERROR = "error", t2))(ss || {});
|
20390
20390
|
var gr = ((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))(gr || {});
|
@@ -20394,35 +20394,35 @@ function xe(a11, e) {
|
|
20394
20394
|
if (e)
|
20395
20395
|
for (let r2 of e.auxiliaryTracks) {
|
20396
20396
|
let s2 = a11[r2];
|
20397
|
-
Za(s2) && (i2 =
|
20397
|
+
Za(s2) && (i2 = ut(s2) ? s2 : i2, t2 = pt(s2) ? s2 : t2);
|
20398
20398
|
}
|
20399
20399
|
return { video: t2, audio: i2 };
|
20400
20400
|
}
|
20401
|
-
function
|
20401
|
+
function ut(a11) {
|
20402
20402
|
return a11 && a11.type === "audio";
|
20403
20403
|
}
|
20404
|
-
function
|
20404
|
+
function pt(a11) {
|
20405
20405
|
return a11 && a11.type === "video";
|
20406
20406
|
}
|
20407
20407
|
function Za(a11) {
|
20408
20408
|
return a11 && a11.source === "screen";
|
20409
20409
|
}
|
20410
|
-
function
|
20410
|
+
function ii(a11) {
|
20411
20411
|
return a11 && a11.source === "audioplaylist";
|
20412
20412
|
}
|
20413
|
-
function
|
20413
|
+
function ht(a11) {
|
20414
20414
|
return a11 && a11.source === "videoplaylist";
|
20415
20415
|
}
|
20416
20416
|
function os(a11) {
|
20417
20417
|
return a11 ? !!(a11 != null && a11.degraded) : false;
|
20418
20418
|
}
|
20419
|
-
function
|
20419
|
+
function je(a11, e) {
|
20420
20420
|
return e && a11.tracks[e] ? a11.tracks[e].enabled : false;
|
20421
20421
|
}
|
20422
20422
|
function ns(a11, e) {
|
20423
20423
|
return e && a11.tracks[e] ? a11.tracks[e].displayEnabled : false;
|
20424
20424
|
}
|
20425
|
-
function
|
20425
|
+
function mt(a11) {
|
20426
20426
|
var r2;
|
20427
20427
|
let e = false, t2 = false, i2 = false;
|
20428
20428
|
return (r2 = a11 == null ? void 0 : a11.publishParams) != null && r2.allowed && (e = a11.publishParams.allowed.includes("video"), t2 = a11.publishParams.allowed.includes("audio"), i2 = a11.publishParams.allowed.includes("screen")), { video: e, audio: t2, screen: i2 };
|
@@ -20495,7 +20495,7 @@ var d2 = class {
|
|
20495
20495
|
}
|
20496
20496
|
};
|
20497
20497
|
d2.level = eo ? 7 : 0;
|
20498
|
-
var
|
20498
|
+
var Je = class {
|
20499
20499
|
constructor(e) {
|
20500
20500
|
this.tracks = new Array();
|
20501
20501
|
this.nativeStream = e, this.id = e.id;
|
@@ -20519,7 +20519,7 @@ var Tr = () => {
|
|
20519
20519
|
var ls;
|
20520
20520
|
var us;
|
20521
20521
|
var hs = ((us = (ls = ge.getBrowser()) == null ? void 0 : ls.name) == null ? void 0 : us.toLowerCase()) === "firefox";
|
20522
|
-
var
|
20522
|
+
var ri = (a11) => a11 ? `{
|
20523
20523
|
trackId: ${a11.id};
|
20524
20524
|
kind: ${a11.kind};
|
20525
20525
|
enabled: ${a11.enabled};
|
@@ -20565,11 +20565,11 @@ var Re = class {
|
|
20565
20565
|
logIdentifier: ${this.logIdentifier};
|
20566
20566
|
source: ${this.source};
|
20567
20567
|
enabled: ${this.enabled};
|
20568
|
-
nativeTrack: ${
|
20568
|
+
nativeTrack: ${ri(this.nativeTrack)};
|
20569
20569
|
}`;
|
20570
20570
|
}
|
20571
20571
|
};
|
20572
|
-
var
|
20572
|
+
var Ie = class extends Re {
|
20573
20573
|
constructor(t2, i2, r2) {
|
20574
20574
|
super(t2, i2, r2);
|
20575
20575
|
this.type = "audio";
|
@@ -20631,9 +20631,9 @@ function ro() {
|
|
20631
20631
|
}
|
20632
20632
|
return "CUSTOM";
|
20633
20633
|
}
|
20634
|
-
var
|
20635
|
-
var
|
20636
|
-
var
|
20634
|
+
var Qe = ro();
|
20635
|
+
var E2 = { WebSocketConnectionErrors: { FAILED_TO_CONNECT: 1e3, WEBSOCKET_CONNECTION_LOST: 1003, ABNORMAL_CLOSE: 1006 }, APIErrors: { SERVER_ERRORS: 2e3, INIT_CONFIG_NOT_AVAILABLE: 2002, ENDPOINT_UNREACHABLE: 2003, INVALID_TOKEN_FORMAT: 2004 }, TracksErrors: { GENERIC_TRACK: 3e3, CANT_ACCESS_CAPTURE_DEVICE: 3001, DEVICE_NOT_AVAILABLE: 3002, DEVICE_IN_USE: 3003, DEVICE_LOST_MIDWAY: 3004, NOTHING_TO_RETURN: 3005, INVALID_VIDEO_SETTINGS: 3006, CODEC_CHANGE_NOT_PERMITTED: 3007, AUTOPLAY_ERROR: 3008, OVER_CONSTRAINED: 3009, NO_AUDIO_DETECTED: 3010, SYSTEM_DENIED_PERMISSION: 3011, CURRENT_TAB_NOT_SHARED: 3012, AUDIO_PLAYBACK_ERROR: 3013, SELECTED_DEVICE_MISSING: 3014 }, WebrtcErrors: { CREATE_OFFER_FAILED: 4001, CREATE_ANSWER_FAILED: 4002, SET_LOCAL_DESCRIPTION_FAILED: 4003, SET_REMOTE_DESCRIPTION_FAILED: 4004, ICE_FAILURE: 4005, ICE_DISCONNECTED: 4006, STATS_FAILED: 4007 }, WebsocketMethodErrors: { SERVER_ERRORS: 5e3, ALREADY_JOINED: 5001, CANNOT_JOIN_PREVIEW_IN_PROGRESS: 5002 }, GenericErrors: { NOT_CONNECTED: 6e3, SIGNALLING: 6001, UNKNOWN: 6002, NOT_READY: 6003, JSON_PARSING_FAILED: 6004, TRACK_METADATA_MISSING: 6005, RTC_TRACK_MISSING: 6006, PEER_METADATA_MISSING: 6007, INVALID_ROLE: 6008, PREVIEW_IN_PROGRESS: 6009, MISSING_MEDIADEVICES: 6010, MISSING_RTCPEERCONNECTION: 6011, LOCAL_STORAGE_ACCESS_DENIED: 6012, VALIDATION_FAILED: 6013 }, PlaylistErrors: { NO_ENTRY_TO_PLAY: 8001, NO_ENTRY_IS_PLAYING: 8002 } };
|
20636
|
+
var v2 = class a2 extends Error {
|
20637
20637
|
constructor(t2, i2, r2, s2, o2, n2 = false) {
|
20638
20638
|
super(s2);
|
20639
20639
|
this.code = t2;
|
@@ -20678,111 +20678,111 @@ function fr(a11) {
|
|
20678
20678
|
}
|
20679
20679
|
var so = ["join", "offer", "answer", "trickle", "on-error", "JOIN"];
|
20680
20680
|
var S2 = { WebSocketConnectionErrors: { FailedToConnect(a11, e = "") {
|
20681
|
-
return new
|
20681
|
+
return new v2(E2.WebSocketConnectionErrors.FAILED_TO_CONNECT, "WebsocketFailedToConnect", a11, `[WS]: ${e}`, `[WS]: ${e}`);
|
20682
20682
|
}, WebSocketConnectionLost(a11, e = "") {
|
20683
|
-
return new
|
20683
|
+
return new v2(E2.WebSocketConnectionErrors.WEBSOCKET_CONNECTION_LOST, "WebSocketConnectionLost", a11, "Network connection lost", e);
|
20684
20684
|
}, AbnormalClose(a11, e = "") {
|
20685
|
-
return new
|
20685
|
+
return new v2(E2.WebSocketConnectionErrors.ABNORMAL_CLOSE, "WebSocketAbnormalClose", a11, "Websocket closed abnormally", e);
|
20686
20686
|
} }, APIErrors: { ServerErrors(a11, e, t2 = "", i2 = true) {
|
20687
|
-
return new
|
20687
|
+
return new v2(a11, "ServerErrors", e, `[${e}]: Server error ${t2}`, t2, i2);
|
20688
20688
|
}, EndpointUnreachable(a11, e = "") {
|
20689
|
-
return new
|
20689
|
+
return new v2(E2.APIErrors.ENDPOINT_UNREACHABLE, "EndpointUnreachable", a11, `Endpoint is not reachable - ${e}`, e);
|
20690
20690
|
}, InvalidTokenFormat(a11, e = "") {
|
20691
|
-
return new
|
20691
|
+
return new v2(E2.APIErrors.INVALID_TOKEN_FORMAT, "InvalidTokenFormat", a11, `Token is not in proper JWT format - ${e}`, e, true);
|
20692
20692
|
}, InitConfigNotAvailable(a11, e = "") {
|
20693
|
-
return new
|
20693
|
+
return new v2(E2.APIErrors.INIT_CONFIG_NOT_AVAILABLE, "InitError", a11, `[INIT]: ${e}`, `[INIT]: ${e}`);
|
20694
20694
|
} }, TracksErrors: { GenericTrack(a11, e = "") {
|
20695
|
-
return new
|
20695
|
+
return new v2(E2.TracksErrors.GENERIC_TRACK, "GenericTrack", a11, `[TRACK]: ${e}`, `[TRACK]: ${e}`);
|
20696
20696
|
}, CantAccessCaptureDevice(a11, e, t2 = "") {
|
20697
|
-
return new
|
20697
|
+
return new v2(E2.TracksErrors.CANT_ACCESS_CAPTURE_DEVICE, "CantAccessCaptureDevice", a11, `User denied permission to access capture device - ${e}`, t2);
|
20698
20698
|
}, DeviceNotAvailable(a11, e, t2 = "") {
|
20699
|
-
return new
|
20699
|
+
return new v2(E2.TracksErrors.DEVICE_NOT_AVAILABLE, "DeviceNotAvailable", a11, `[TRACK]: Capture device is no longer available - ${e}`, t2);
|
20700
20700
|
}, DeviceInUse(a11, e, t2 = "") {
|
20701
|
-
return new
|
20701
|
+
return new v2(E2.TracksErrors.DEVICE_IN_USE, "DeviceInUse", a11, `[TRACK]: Capture device is in use by another application - ${e}`, t2);
|
20702
20702
|
}, DeviceLostMidway(a11, e, t2 = "") {
|
20703
|
-
return new
|
20703
|
+
return new v2(E2.TracksErrors.DEVICE_LOST_MIDWAY, "DeviceLostMidway", a11, `Lost access to capture device midway - ${e}`, t2);
|
20704
20704
|
}, NothingToReturn(a11, e = "", t2 = "There is no media to return. Please select either video or audio or both.") {
|
20705
|
-
return new
|
20705
|
+
return new v2(E2.TracksErrors.NOTHING_TO_RETURN, "NothingToReturn", a11, t2, e);
|
20706
20706
|
}, InvalidVideoSettings(a11, e = "") {
|
20707
|
-
return new
|
20707
|
+
return new v2(E2.TracksErrors.INVALID_VIDEO_SETTINGS, "InvalidVideoSettings", a11, "Cannot enable simulcast when no video settings are provided", e);
|
20708
20708
|
}, AutoplayBlocked(a11, e = "") {
|
20709
|
-
return new
|
20709
|
+
return new v2(E2.TracksErrors.AUTOPLAY_ERROR, "AutoplayBlocked", a11, "Autoplay blocked because the user didn't interact with the document first", e);
|
20710
20710
|
}, CodecChangeNotPermitted(a11, e = "") {
|
20711
|
-
return new
|
20711
|
+
return new v2(E2.TracksErrors.CODEC_CHANGE_NOT_PERMITTED, "CodecChangeNotPermitted", a11, "Codec can't be changed mid call.", e);
|
20712
20712
|
}, OverConstrained(a11, e, t2 = "") {
|
20713
|
-
return new
|
20713
|
+
return new v2(E2.TracksErrors.OVER_CONSTRAINED, "OverConstrained", a11, `[TRACK]: Requested constraints cannot be satisfied with the device hardware - ${e}`, t2);
|
20714
20714
|
}, NoAudioDetected(a11, e = "Please check the mic or use another audio input") {
|
20715
|
-
return new
|
20715
|
+
return new v2(E2.TracksErrors.NO_AUDIO_DETECTED, "NoAudioDetected", a11, "No audio input detected from microphone", e);
|
20716
20716
|
}, SystemDeniedPermission(a11, e, t2 = "") {
|
20717
|
-
return new
|
20717
|
+
return new v2(E2.TracksErrors.SYSTEM_DENIED_PERMISSION, "SystemDeniedPermission", a11, `Operating System denied permission to access capture device - ${e}`, t2);
|
20718
20718
|
}, CurrentTabNotShared() {
|
20719
|
-
return new
|
20719
|
+
return new v2(E2.TracksErrors.CURRENT_TAB_NOT_SHARED, "CurrentTabNotShared", "TRACK", "The app requires you to share the current tab", "You must screen share the current tab in order to proceed");
|
20720
20720
|
}, AudioPlaybackError(a11) {
|
20721
|
-
return new
|
20721
|
+
return new v2(E2.TracksErrors.AUDIO_PLAYBACK_ERROR, "Audio playback error", "TRACK", a11, a11);
|
20722
20722
|
}, SelectedDeviceMissing(a11) {
|
20723
|
-
return new
|
20723
|
+
return new v2(E2.TracksErrors.SELECTED_DEVICE_MISSING, "SelectedDeviceMissing", "TRACK", `Could not detect selected ${a11} device`, `Please check connection to the ${a11} device`, false);
|
20724
20724
|
} }, WebrtcErrors: { CreateOfferFailed(a11, e = "") {
|
20725
|
-
return new
|
20725
|
+
return new v2(E2.WebrtcErrors.CREATE_OFFER_FAILED, "CreateOfferFailed", a11, `[${a11.toString()}]: Failed to create offer. `, e);
|
20726
20726
|
}, CreateAnswerFailed(a11, e = "") {
|
20727
|
-
return new
|
20727
|
+
return new v2(E2.WebrtcErrors.CREATE_ANSWER_FAILED, "CreateAnswerFailed", a11, `[${a11.toString()}]: Failed to create answer. `, e);
|
20728
20728
|
}, SetLocalDescriptionFailed(a11, e = "") {
|
20729
|
-
return new
|
20729
|
+
return new v2(E2.WebrtcErrors.SET_LOCAL_DESCRIPTION_FAILED, "SetLocalDescriptionFailed", a11, `[${a11.toString()}]: Failed to set offer. `, e);
|
20730
20730
|
}, SetRemoteDescriptionFailed(a11, e = "") {
|
20731
|
-
return new
|
20731
|
+
return new v2(E2.WebrtcErrors.SET_REMOTE_DESCRIPTION_FAILED, "SetRemoteDescriptionFailed", a11, `[${a11.toString()}]: Failed to set answer. `, e, true);
|
20732
20732
|
}, ICEFailure(a11, e = "", t2 = false) {
|
20733
|
-
return new
|
20733
|
+
return new v2(E2.WebrtcErrors.ICE_FAILURE, "ICEFailure", a11, `[${a11.toString()}]: Ice connection state FAILED`, e, t2);
|
20734
20734
|
}, ICEDisconnected(a11, e = "") {
|
20735
|
-
return new
|
20735
|
+
return new v2(E2.WebrtcErrors.ICE_DISCONNECTED, "ICEDisconnected", a11, `[${a11.toString()}]: Ice connection state DISCONNECTED`, e);
|
20736
20736
|
}, StatsFailed(a11, e = "") {
|
20737
|
-
return new
|
20737
|
+
return new v2(E2.WebrtcErrors.STATS_FAILED, "StatsFailed", a11, `Failed to WebRTC get stats - ${e}`, e);
|
20738
20738
|
} }, WebsocketMethodErrors: { ServerErrors(a11, e, t2) {
|
20739
|
-
return new
|
20739
|
+
return new v2(a11, "ServerErrors", e, t2, t2, so.includes(e));
|
20740
20740
|
}, AlreadyJoined(a11, e = "") {
|
20741
|
-
return new
|
20741
|
+
return new v2(E2.WebsocketMethodErrors.ALREADY_JOINED, "AlreadyJoined", a11, "[JOIN]: You have already joined this room.", e);
|
20742
20742
|
}, CannotJoinPreviewInProgress(a11, e = "") {
|
20743
|
-
return new
|
20743
|
+
return new v2(E2.WebsocketMethodErrors.CANNOT_JOIN_PREVIEW_IN_PROGRESS, "CannotJoinPreviewInProgress", a11, "[JOIN]: Cannot join if preview is in progress", e);
|
20744
20744
|
} }, GenericErrors: { NotConnected(a11, e = "") {
|
20745
|
-
return new
|
20745
|
+
return new v2(E2.GenericErrors.NOT_CONNECTED, "NotConnected", a11, "Client is not connected", e);
|
20746
20746
|
}, Signalling(a11, e) {
|
20747
|
-
return new
|
20747
|
+
return new v2(E2.GenericErrors.SIGNALLING, "Signalling", a11, `Unknown signalling error: ${a11.toString()} ${e} `, e);
|
20748
20748
|
}, Unknown(a11, e) {
|
20749
|
-
return new
|
20749
|
+
return new v2(E2.GenericErrors.UNKNOWN, "Unknown", a11, `Unknown exception: ${e}`, e);
|
20750
20750
|
}, NotReady(a11, e = "") {
|
20751
|
-
return new
|
20751
|
+
return new v2(E2.GenericErrors.NOT_READY, "NotReady", a11, e, e);
|
20752
20752
|
}, JsonParsingFailed(a11, e, t2 = "") {
|
20753
|
-
return new
|
20753
|
+
return new v2(E2.GenericErrors.JSON_PARSING_FAILED, "JsonParsingFailed", a11, `Failed to parse JSON message - ${e}`, t2);
|
20754
20754
|
}, TrackMetadataMissing(a11, e = "") {
|
20755
|
-
return new
|
20755
|
+
return new v2(E2.GenericErrors.TRACK_METADATA_MISSING, "TrackMetadataMissing", a11, "Track Metadata Missing", e);
|
20756
20756
|
}, RTCTrackMissing(a11, e = "") {
|
20757
|
-
return new
|
20757
|
+
return new v2(E2.GenericErrors.RTC_TRACK_MISSING, "RTCTrackMissing", a11, "RTC Track missing", e);
|
20758
20758
|
}, PeerMetadataMissing(a11, e = "") {
|
20759
|
-
return new
|
20759
|
+
return new v2(E2.GenericErrors.PEER_METADATA_MISSING, "PeerMetadataMissing", a11, "Peer Metadata Missing", e);
|
20760
20760
|
}, ValidationFailed(a11, e) {
|
20761
|
-
return new
|
20761
|
+
return new v2(E2.GenericErrors.VALIDATION_FAILED, "ValidationFailed", "VALIDATION", a11, e ? JSON.stringify(e) : "");
|
20762
20762
|
}, InvalidRole(a11, e) {
|
20763
|
-
return new
|
20763
|
+
return new v2(E2.GenericErrors.INVALID_ROLE, "InvalidRole", a11, "Invalid role. Join with valid role", e, true);
|
20764
20764
|
}, PreviewAlreadyInProgress(a11, e = "") {
|
20765
|
-
return new
|
20765
|
+
return new v2(E2.GenericErrors.PREVIEW_IN_PROGRESS, "PreviewAlreadyInProgress", a11, "[Preview]: Cannot join if preview is in progress", e);
|
20766
20766
|
}, LocalStorageAccessDenied(a11 = "Access to localStorage has been denied") {
|
20767
|
-
return new
|
20767
|
+
return new v2(E2.GenericErrors.LOCAL_STORAGE_ACCESS_DENIED, "LocalStorageAccessDenied", "NONE", "LocalStorageAccessDenied", a11);
|
20768
20768
|
}, MissingMediaDevices() {
|
20769
|
-
return new
|
20769
|
+
return new v2(E2.GenericErrors.MISSING_MEDIADEVICES, "MissingMediaDevices", "JOIN", "navigator.mediaDevices is undefined. 100ms SDK won't work on this website as WebRTC is not supported on HTTP endpoints(missing navigator.mediaDevices). Please ensure you're using the SDK either on localhost or a valid HTTPS endpoint.", "", true);
|
20770
20770
|
}, MissingRTCPeerConnection() {
|
20771
|
-
return new
|
20771
|
+
return new v2(E2.GenericErrors.MISSING_RTCPEERCONNECTION, "MissingRTCPeerConnection", "JOIN", "RTCPeerConnection which is a core requirement for WebRTC call was not found, this could be due to an unsupported browser or browser extensions blocking WebRTC", "", true);
|
20772
20772
|
} }, MediaPluginErrors: { PlatformNotSupported(a11, e = "") {
|
20773
|
-
return new
|
20773
|
+
return new v2(7001, "PlatformNotSupported", a11, "Check HMS Docs to see the list of supported platforms", e);
|
20774
20774
|
}, InitFailed(a11, e = "") {
|
20775
|
-
return new
|
20775
|
+
return new v2(7002, "InitFailed", a11, "Plugin init failed", e);
|
20776
20776
|
}, ProcessingFailed(a11, e = "") {
|
20777
|
-
return new
|
20777
|
+
return new v2(7003, "ProcessingFailed", a11, "Plugin processing failed", e);
|
20778
20778
|
}, AddAlreadyInProgress(a11, e = "") {
|
20779
|
-
return new
|
20779
|
+
return new v2(7004, "AddAlreadyInProgress", a11, "Plugin add already in progress", e);
|
20780
20780
|
}, DeviceNotSupported(a11, e = "") {
|
20781
|
-
return new
|
20781
|
+
return new v2(7005, "DeviceNotSupported", a11, "Check HMS Docs to see the list of supported devices", e);
|
20782
20782
|
} }, PlaylistErrors: { NoEntryToPlay(a11, e) {
|
20783
|
-
return new
|
20783
|
+
return new v2(E2.PlaylistErrors.NO_ENTRY_TO_PLAY, "NoEntryToPlay", a11, "Reached end of playlist", e);
|
20784
20784
|
}, NoEntryPlaying(a11, e) {
|
20785
|
-
return new
|
20785
|
+
return new v2(E2.PlaylistErrors.NO_ENTRY_IS_PLAYING, "NoEntryIsPlaying", a11, "No entry is playing at this time", e);
|
20786
20786
|
} } };
|
20787
20787
|
var vr = class {
|
20788
20788
|
constructor() {
|
@@ -20851,25 +20851,25 @@ var Ts = "[VALIDATIONS]";
|
|
20851
20851
|
function oe(a11) {
|
20852
20852
|
return a11 != null;
|
20853
20853
|
}
|
20854
|
-
var
|
20854
|
+
var St = () => {
|
20855
20855
|
if (!oe(RTCPeerConnection)) {
|
20856
20856
|
let a11 = S2.GenericErrors.MissingRTCPeerConnection();
|
20857
20857
|
throw d2.e(Ts, a11), a11;
|
20858
20858
|
}
|
20859
20859
|
};
|
20860
|
-
var
|
20860
|
+
var gt = () => {
|
20861
20861
|
if (!oe(navigator.mediaDevices)) {
|
20862
20862
|
let a11 = S2.GenericErrors.MissingMediaDevices();
|
20863
20863
|
throw d2.e(Ts, a11), a11;
|
20864
20864
|
}
|
20865
20865
|
};
|
20866
20866
|
var fs = Mr().version;
|
20867
|
-
function
|
20868
|
-
let t2 = "web", i2 =
|
20867
|
+
function Tt(a11 = "prod", e) {
|
20868
|
+
let t2 = "web", i2 = Qe !== "LOCAL" && a11 === "prod" ? "prod" : "debug";
|
20869
20869
|
if (Ue)
|
20870
|
-
return vs({ os: "web_nodejs", os_version: process.version, sdk: t2, sdk_version: fs, env: i2, domain:
|
20870
|
+
return vs({ os: "web_nodejs", os_version: process.version, sdk: t2, sdk_version: fs, env: i2, domain: Qe, is_prebuilt: !!(e != null && e.isPrebuilt), framework: "node", framework_version: process.version, framework_sdk_version: e == null ? void 0 : e.sdkVersion });
|
20871
20871
|
let r2 = ge.getOS(), s2 = ge.getDevice(), o2 = ge.getBrowser(), n2 = yr(`web_${r2.name}`), l2 = r2.version || "", u2 = yr(`${o2.name}_${o2.version}`), p2 = u2;
|
20872
|
-
return s2.type && (p2 = `${yr(`${s2.vendor}_${s2.type}`)}/${u2}`), vs({ os: n2, os_version: l2, sdk: t2, sdk_version: fs, device_model: p2, env: i2, domain:
|
20872
|
+
return s2.type && (p2 = `${yr(`${s2.vendor}_${s2.type}`)}/${u2}`), vs({ os: n2, os_version: l2, sdk: t2, sdk_version: fs, device_model: p2, env: i2, domain: Qe, is_prebuilt: !!(e != null && e.isPrebuilt), framework: e == null ? void 0 : e.type, framework_version: e == null ? void 0 : e.version, framework_sdk_version: e == null ? void 0 : e.sdkVersion });
|
20873
20873
|
}
|
20874
20874
|
function yr(a11) {
|
20875
20875
|
return a11.replace(/ /g, "_");
|
@@ -20877,11 +20877,11 @@ function yr(a11) {
|
|
20877
20877
|
var vs = (a11, e = ",") => Object.keys(a11).filter((t2) => oe(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: Tt() };
|
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 = no(), this.device_id = gs();
|
20882
20882
|
}
|
20883
20883
|
toSignalParams() {
|
20884
|
-
return { name: this.name, info: M2(m({}, this.properties), { timestamp: this.timestamp, domain:
|
20884
|
+
return { name: this.name, info: M2(m({}, this.properties), { timestamp: this.timestamp, domain: Qe }), timestamp: (/* @__PURE__ */ new Date()).getTime() };
|
20885
20885
|
}
|
20886
20886
|
};
|
20887
20887
|
var y2 = class {
|
@@ -20977,7 +20977,7 @@ var y2 = class {
|
|
20977
20977
|
return e = m(m({}, i2), e), e;
|
20978
20978
|
}
|
20979
20979
|
static getErrorProperties(e) {
|
20980
|
-
return e ? e instanceof
|
20980
|
+
return e ? e instanceof v2 ? e.toAnalyticsProperties() : { error_name: e.name, error_message: e.message, error_description: e.cause } : {};
|
20981
20981
|
}
|
20982
20982
|
};
|
20983
20983
|
y2.KEY_REQUESTED_AT = "requested_at", y2.KEY_RESPONDED_AT = "responded_at";
|
@@ -21015,7 +21015,7 @@ var kr = class {
|
|
21015
21015
|
return e.deviceId === t2.deviceId && (e.groupId === t2.groupId || !e.groupId);
|
21016
21016
|
}
|
21017
21017
|
};
|
21018
|
-
var
|
21018
|
+
var Q2 = new kr();
|
21019
21019
|
var Pr = ((t2) => (t2.TRANSFORM = "TRANSFORM", t2.ANALYZE = "ANALYZE", t2))(Pr || {});
|
21020
21020
|
var Er = ((t2) => (t2.PLATFORM_NOT_SUPPORTED = "PLATFORM_NOT_SUPPORTED", t2.DEVICE_NOT_SUPPORTED = "DEVICE_NOT_SUPPORTED", t2))(Er || {});
|
21021
21021
|
var ne = class {
|
@@ -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 si = class {
|
21044
21044
|
constructor(e) {
|
21045
21045
|
this.eventBus = e;
|
21046
21046
|
this.TAG = "[AudioPluginsAnalytics]";
|
@@ -21086,12 +21086,12 @@ var ai = class {
|
|
21086
21086
|
};
|
21087
21087
|
var co = 48e3;
|
21088
21088
|
var lo = () => navigator.userAgent.indexOf("Firefox") !== -1;
|
21089
|
-
var
|
21089
|
+
var ft = 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 si(t2), this.createAudioContext(), this.room = i2;
|
21095
21095
|
}
|
21096
21096
|
getPlugins() {
|
21097
21097
|
return Array.from(this.pluginsMap.keys());
|
@@ -21279,7 +21279,7 @@ function po(a11, e = "") {
|
|
21279
21279
|
return uo(a11.message, e);
|
21280
21280
|
}
|
21281
21281
|
}
|
21282
|
-
function
|
21282
|
+
function Ae(a11, e) {
|
21283
21283
|
let t2 = po(a11, e);
|
21284
21284
|
return t2.addNativeError(a11), t2;
|
21285
21285
|
}
|
@@ -21288,7 +21288,7 @@ function ys(a11) {
|
|
21288
21288
|
try {
|
21289
21289
|
return (yield navigator.mediaDevices.getUserMedia({ audio: a11 ? a11.toConstraints() : false })).getAudioTracks()[0];
|
21290
21290
|
} catch (e) {
|
21291
|
-
throw
|
21291
|
+
throw Ae(e, "audio");
|
21292
21292
|
}
|
21293
21293
|
});
|
21294
21294
|
}
|
@@ -21297,14 +21297,14 @@ function ks(a11) {
|
|
21297
21297
|
try {
|
21298
21298
|
return (yield navigator.mediaDevices.getUserMedia({ video: a11 ? a11.toConstraints() : false })).getVideoTracks()[0];
|
21299
21299
|
} catch (e) {
|
21300
|
-
throw
|
21300
|
+
throw Ae(e, "video");
|
21301
21301
|
}
|
21302
21302
|
});
|
21303
21303
|
}
|
21304
21304
|
function ue(a11) {
|
21305
21305
|
return "canvas" in a11 || a11.label === "MediaStreamAudioDestinationNode" || a11.label === "";
|
21306
21306
|
}
|
21307
|
-
var
|
21307
|
+
var He = { audioContext: null, getAudioContext() {
|
21308
21308
|
return this.audioContext || (this.audioContext = new AudioContext()), this.audioContext;
|
21309
21309
|
}, resumeContext() {
|
21310
21310
|
return c2(this, null, function* () {
|
@@ -21315,7 +21315,7 @@ var Ie = { audioContext: null, getAudioContext() {
|
|
21315
21315
|
}
|
21316
21316
|
});
|
21317
21317
|
} };
|
21318
|
-
var
|
21318
|
+
var Ce = class {
|
21319
21319
|
constructor(e = 1 / 0) {
|
21320
21320
|
this.capacity = e;
|
21321
21321
|
this.storage = [];
|
@@ -21351,18 +21351,18 @@ var Ps = `(function workerSetup() {
|
|
21351
21351
|
}
|
21352
21352
|
};
|
21353
21353
|
})()`;
|
21354
|
-
function
|
21354
|
+
function Z2(a11) {
|
21355
21355
|
if (a11 < 0)
|
21356
21356
|
throw Error("`ms` should be a positive integer");
|
21357
21357
|
return new Promise((e) => {
|
21358
21358
|
setTimeout(e, a11);
|
21359
21359
|
});
|
21360
21360
|
}
|
21361
|
-
function
|
21361
|
+
function Le(a11) {
|
21362
21362
|
if (a11 < 0)
|
21363
21363
|
throw Error("`ms` should be a positive integer");
|
21364
21364
|
if (typeof Worker == "undefined")
|
21365
|
-
return
|
21365
|
+
return Z2(a11);
|
21366
21366
|
let e = new Worker(URL.createObjectURL(new Blob([Ps], { type: "application/javascript" })));
|
21367
21367
|
return e.postMessage(["start", a11]), new Promise((t2) => {
|
21368
21368
|
e.onmessage = (i2) => {
|
@@ -21372,7 +21372,7 @@ function Ce(a11) {
|
|
21372
21372
|
}
|
21373
21373
|
function Es() {
|
21374
21374
|
if (typeof Worker == "undefined")
|
21375
|
-
return { sleep: (e) =>
|
21375
|
+
return { sleep: (e) => Z2(e) };
|
21376
21376
|
let a11 = new Worker(URL.createObjectURL(new Blob([Ps], { type: "application/javascript" })));
|
21377
21377
|
return { sleep: (e) => (a11.postMessage(["start", e]), new Promise((t2) => {
|
21378
21378
|
a11.onmessage = (i2) => {
|
@@ -21380,7 +21380,7 @@ function Es() {
|
|
21380
21380
|
};
|
21381
21381
|
})) };
|
21382
21382
|
}
|
21383
|
-
function
|
21383
|
+
function ai(a11, e = 300) {
|
21384
21384
|
let t2;
|
21385
21385
|
return function(...i2) {
|
21386
21386
|
clearTimeout(t2), t2 = void 0;
|
@@ -21392,7 +21392,7 @@ function oi(a11, e = 300) {
|
|
21392
21392
|
}
|
21393
21393
|
var mo = 35;
|
21394
21394
|
var So = 5;
|
21395
|
-
var
|
21395
|
+
var oi = class {
|
21396
21396
|
constructor(e, t2, i2) {
|
21397
21397
|
this.track = e;
|
21398
21398
|
this.audioLevelEvent = t2;
|
@@ -21402,7 +21402,7 @@ var ni = class {
|
|
21402
21402
|
this.isMonitored = false;
|
21403
21403
|
this.interval = 100;
|
21404
21404
|
this.historyInterval = 700;
|
21405
|
-
this.history = new
|
21405
|
+
this.history = new Ce(this.historyInterval / this.interval);
|
21406
21406
|
this.detectSilence = () => c2(this, null, function* () {
|
21407
21407
|
let i3 = 0;
|
21408
21408
|
for (; this.isMonitored; ) {
|
@@ -21414,7 +21414,7 @@ var ni = class {
|
|
21414
21414
|
}
|
21415
21415
|
} else
|
21416
21416
|
break;
|
21417
|
-
yield
|
21417
|
+
yield Z2(20);
|
21418
21418
|
}
|
21419
21419
|
});
|
21420
21420
|
try {
|
@@ -21437,7 +21437,7 @@ var ni = class {
|
|
21437
21437
|
loop() {
|
21438
21438
|
return c2(this, null, function* () {
|
21439
21439
|
for (; this.isMonitored; )
|
21440
|
-
this.sendAudioLevel(this.getMaxAudioLevelOverPeriod()), yield
|
21440
|
+
this.sendAudioLevel(this.getMaxAudioLevelOverPeriod()), yield Z2(this.interval);
|
21441
21441
|
});
|
21442
21442
|
}
|
21443
21443
|
sendAudioLevel(e = 0) {
|
@@ -21477,15 +21477,15 @@ var ni = class {
|
|
21477
21477
|
return this.analyserNode.getByteTimeDomainData(e), !e.some((t2) => t2 !== 128 && t2 !== 0);
|
21478
21478
|
}
|
21479
21479
|
createAnalyserNodeForStream(e) {
|
21480
|
-
let t2 =
|
21480
|
+
let t2 = He.getAudioContext(), i2 = t2.createAnalyser();
|
21481
21481
|
return t2.createMediaStreamSource(e).connect(i2), i2;
|
21482
21482
|
}
|
21483
21483
|
};
|
21484
21484
|
var br = ((t2) => (t2.SIP = "sip", t2.REGULAR = "regular", t2))(br || {});
|
21485
21485
|
var bs = ((n2) => (n2.NONE = "none", n2.INITIALISED = "initialised", n2.STARTED = "started", n2.PAUSED = "paused", n2.RESUMED = "resumed", n2.STOPPED = "stopped", n2.FAILED = "failed", n2))(bs || {});
|
21486
21486
|
var Rs = ((t2) => (t2.DVR = "dvr", t2.NO_DVR = "no-dvr", t2))(Rs || {});
|
21487
|
-
var
|
21488
|
-
var
|
21487
|
+
var Is = ((i2) => (i2.REGULAR = "regular", i2.SCREEN = "screen", i2.COMPOSITE = "composite", i2))(Is || {});
|
21488
|
+
var As = ((r2) => (r2.INITIALISED = "initialised", r2.STARTED = "started", r2.STOPPED = "stopped", r2.FAILED = "failed", r2))(As || {});
|
21489
21489
|
var Hs = ((e) => (e.CAPTION = "caption", e))(Hs || {});
|
21490
21490
|
var Be = { f: "high", h: "medium", q: "low" };
|
21491
21491
|
var Cs = ((i2) => (i2.videoInput = "videoInput", i2.audioInput = "audioInput", i2.audioOutput = "audioOutput", i2))(Cs || {});
|
@@ -21535,7 +21535,7 @@ var Ve = class {
|
|
21535
21535
|
return { audio_bitrate: this.maxBitrate, audio_codec: this.codec };
|
21536
21536
|
}
|
21537
21537
|
};
|
21538
|
-
var
|
21538
|
+
var z2 = class {
|
21539
21539
|
constructor() {
|
21540
21540
|
this._width = 320;
|
21541
21541
|
this._height = 180;
|
@@ -21593,11 +21593,11 @@ var Fe = class {
|
|
21593
21593
|
return Te() && this.height && this.width && this.height > this.width ? { width: this.height, height: this.width } : { width: this.width, height: this.height };
|
21594
21594
|
}
|
21595
21595
|
};
|
21596
|
-
var
|
21596
|
+
var De = class {
|
21597
21597
|
constructor() {
|
21598
|
-
this._video = new
|
21598
|
+
this._video = new z2().build();
|
21599
21599
|
this._audio = new ee().build();
|
21600
|
-
this._screen = new
|
21600
|
+
this._screen = new z2().build();
|
21601
21601
|
this._simulcast = false;
|
21602
21602
|
}
|
21603
21603
|
video(e) {
|
@@ -21634,7 +21634,7 @@ function Ds(a11, e) {
|
|
21634
21634
|
return !(0, import_lodash3.default)(a11[i2], e[i2]);
|
21635
21635
|
};
|
21636
21636
|
}
|
21637
|
-
var ce = class a3 extends
|
21637
|
+
var ce = class a3 extends Ie {
|
21638
21638
|
constructor(t2, i2, r2, s2, o2 = new ee().build(), n2) {
|
21639
21639
|
super(t2, i2, r2);
|
21640
21640
|
this.eventBus = s2;
|
@@ -21658,10 +21658,10 @@ var ce = class a3 extends Ae {
|
|
21658
21658
|
if (Ds(t3, this.settings)("deviceId")) {
|
21659
21659
|
this.manuallySelectedDeviceId = i3 ? this.manuallySelectedDeviceId : t3.deviceId, d2.d(this.TAG, "device change", "manual selection:", this.manuallySelectedDeviceId, "new device:", t3.deviceId), yield this.replaceTrackWith(t3);
|
21660
21660
|
let s3 = this.nativeTrack.getSettings().groupId;
|
21661
|
-
!i3 && t3.deviceId && (
|
21661
|
+
!i3 && t3.deviceId && (Q2.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 ft(this, s2, n2), this.setFirstTrackId(i2.id), Tr() && O2 && document.addEventListener("visibilitychange", this.handleVisibilityChange);
|
21665
21665
|
}
|
21666
21666
|
getManuallySelectedDeviceId() {
|
21667
21667
|
return this.manuallySelectedDeviceId;
|
@@ -21689,7 +21689,7 @@ var ce = class a3 extends Ae {
|
|
21689
21689
|
}
|
21690
21690
|
setEnabled(t2) {
|
21691
21691
|
return c2(this, null, function* () {
|
21692
|
-
t2 !== this.enabled && (t2 && ue(this.nativeTrack) && (yield this.replaceTrackWith(this.settings)), yield
|
21692
|
+
t2 !== this.enabled && (t2 && ue(this.nativeTrack) && (yield this.replaceTrackWith(this.settings)), yield J(a3.prototype, this, "setEnabled").call(this, t2), t2 && (this.settings = this.buildNewSettings({ deviceId: this.nativeTrack.getSettings().deviceId })), this.eventBus.localAudioEnabled.publish({ enabled: t2, track: this }));
|
21693
21693
|
});
|
21694
21694
|
}
|
21695
21695
|
isPublishedTrackId(t2) {
|
@@ -21727,7 +21727,7 @@ var ce = class a3 extends Ae {
|
|
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 oi(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 Ae {
|
|
21736
21736
|
cleanup() {
|
21737
21737
|
return c2(this, null, function* () {
|
21738
21738
|
var t2;
|
21739
|
-
|
21739
|
+
J(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(), Tr() && O2 && document.removeEventListener("visibilitychange", this.handleVisibilityChange);
|
21740
21740
|
});
|
21741
21741
|
}
|
21742
21742
|
getTrackIDBeingSent() {
|
@@ -21750,10 +21750,10 @@ var ce = class a3 extends Ae {
|
|
21750
21750
|
return new Ve(i2, r2, s2, o2, n2, l2);
|
21751
21751
|
}
|
21752
21752
|
};
|
21753
|
-
var se = class a4 extends
|
21753
|
+
var se = class a4 extends Ie {
|
21754
21754
|
setEnabled(e) {
|
21755
21755
|
return c2(this, null, function* () {
|
21756
|
-
e !== this.enabled && (yield
|
21756
|
+
e !== this.enabled && (yield J(a4.prototype, this, "setEnabled").call(this, e), yield this.subscribeToAudio(e));
|
21757
21757
|
});
|
21758
21758
|
}
|
21759
21759
|
};
|
@@ -21815,10 +21815,10 @@ var Ye = class extends Re {
|
|
21815
21815
|
this.sinkCount > 0 && this.sinkCount--;
|
21816
21816
|
}
|
21817
21817
|
};
|
21818
|
-
var
|
21818
|
+
var vt = { none: -1, low: 0, medium: 1, high: 2 };
|
21819
21819
|
var To = 0.5;
|
21820
21820
|
var ws = (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) => vt[o2.layer] - vt[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) {
|
@@ -21862,7 +21862,7 @@ var Rr = class {
|
|
21862
21862
|
}
|
21863
21863
|
};
|
21864
21864
|
var _s = new Rr();
|
21865
|
-
var
|
21865
|
+
var Ir = class {
|
21866
21866
|
constructor() {
|
21867
21867
|
this.TAG = "[HMSResizeObserverWrapper]";
|
21868
21868
|
this.listeners = /* @__PURE__ */ new WeakMap();
|
@@ -21875,7 +21875,7 @@ var Ar = 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(ai(this.handleResize, 300)));
|
21879
21879
|
};
|
21880
21880
|
this.handleResize = (e) => {
|
21881
21881
|
var t2;
|
@@ -21889,7 +21889,7 @@ var Ar = class {
|
|
21889
21889
|
return e || d2.w(this.TAG, "Resize Observer is not supported"), e;
|
21890
21890
|
}
|
21891
21891
|
};
|
21892
|
-
var Ns = new
|
21892
|
+
var Ns = new Ir();
|
21893
21893
|
var Xe = class {
|
21894
21894
|
constructor(e) {
|
21895
21895
|
this.track = e;
|
@@ -21954,15 +21954,15 @@ var Xe = class {
|
|
21954
21954
|
if (r2 === 0 || s2 === 0)
|
21955
21955
|
continue;
|
21956
21956
|
let o2 = ws(this.track.getSimulcastDefinitions(), { width: r2, height: s2 });
|
21957
|
-
e ? e =
|
21957
|
+
e ? e = vt[o2] > vt[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
|
});
|
21961
21961
|
}
|
21962
21962
|
};
|
21963
|
-
var
|
21963
|
+
var Ar = ((t2) => (t2.TRANSFORM = "TRANSFORM", t2.ANALYZE = "ANALYZE", t2))(Ar || {});
|
21964
21964
|
var Hr = ((t2) => (t2["2D"] = "2d", t2.WEBGL = "webgl", t2.WEBGL2 = "webgl2", t2))(Hr || {});
|
21965
|
-
var
|
21965
|
+
var Mt = 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 Mt(), 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 Mt(), 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 Os = 24;
|
22045
22045
|
var vo = 320;
|
22046
22046
|
var Mo = 240;
|
22047
|
-
var
|
22047
|
+
var yt = class {
|
22048
22048
|
constructor(e, t2) {
|
22049
22049
|
this.TAG = "[VideoPluginsManager]";
|
22050
22050
|
this.pluginsLoopRunning = false;
|
@@ -22136,7 +22136,7 @@ var kt = class {
|
|
22136
22136
|
return c2(this, null, function* () {
|
22137
22137
|
if (!(!this.pluginsLoopRunning || this.pluginsLoopState === "running"))
|
22138
22138
|
for (; this.pluginsLoopState === "paused"; )
|
22139
|
-
yield
|
22139
|
+
yield Le(100);
|
22140
22140
|
});
|
22141
22141
|
}
|
22142
22142
|
cleanup() {
|
@@ -22267,7 +22267,7 @@ var kt = 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 ni = 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 ci = class {
|
|
22312
22312
|
}
|
22313
22313
|
};
|
22314
22314
|
var yo = ["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 ci = class {
|
22316
22316
|
constructor() {
|
22317
22317
|
this.eventPerformanceMeasures = {};
|
22318
22318
|
}
|
@@ -22340,7 +22340,7 @@ var di = class {
|
|
22340
22340
|
};
|
22341
22341
|
var Cr = { isAudioMuted: false, isVideoMuted: false, audioInputDeviceId: "default", audioOutputDeviceId: "default", videoDeviceId: "default" };
|
22342
22342
|
var pe;
|
22343
|
-
var
|
22343
|
+
var di;
|
22344
22344
|
var ve = class a5 {
|
22345
22345
|
constructor(e, t2, i2, r2, s2) {
|
22346
22346
|
this.store = e;
|
@@ -22353,7 +22353,7 @@ var ve = class a5 {
|
|
22353
22353
|
}
|
22354
22354
|
getTracksToPublish() {
|
22355
22355
|
return c2(this, arguments, function* (e = Cr) {
|
22356
|
-
var T, g2,
|
22356
|
+
var T, g2, f2, P7;
|
22357
22357
|
let t2 = this.getAVTrackSettings(e);
|
22358
22358
|
if (!t2)
|
22359
22359
|
return [];
|
@@ -22367,7 +22367,7 @@ var ve = class a5 {
|
|
22367
22367
|
} catch (k2) {
|
22368
22368
|
s2 = yield this.retryGetLocalTracks(k2, t2, h2, l2);
|
22369
22369
|
}
|
22370
|
-
return h2.audio && ((
|
22370
|
+
return h2.audio && ((f2 = this.analyticsTimer) == null || f2.end("local_audio_track_time")), h2.video && ((P7 = this.analyticsTimer) == null || P7.end("local_video_track_time")), o2 && r2 && !u2 && s2.push(o2), n2 && i2 && !p2 && s2.push(n2), s2;
|
22371
22371
|
});
|
22372
22372
|
}
|
22373
22373
|
getLocalTracks() {
|
@@ -22398,8 +22398,8 @@ var ve = class a5 {
|
|
22398
22398
|
r2.srcObject = e, r2.addEventListener("loadedmetadata", () => c2(this, null, function* () {
|
22399
22399
|
let { videoWidth: l2, videoHeight: u2 } = r2, p2 = i2.screen, h2 = p2.width * p2.height, T = l2 / u2, g2 = p2.width / p2.height;
|
22400
22400
|
if (T > g2) {
|
22401
|
-
let
|
22402
|
-
l2 * u2 > h2 ? (
|
22401
|
+
let f2 = t2.video, P7 = T / g2, k2 = Math.sqrt(P7);
|
22402
|
+
l2 * u2 > h2 ? (f2.width = l2 / k2, f2.height = u2 / k2) : (f2.height = u2 * k2, f2.width = l2 * k2), yield e.getVideoTracks()[0].applyConstraints(f2);
|
22403
22403
|
}
|
22404
22404
|
}));
|
22405
22405
|
});
|
@@ -22417,8 +22417,8 @@ var ve = class a5 {
|
|
22417
22417
|
d2.d("retrieving screenshare with ", { config: i2 }, { constraints: s2 }), o2 = yield navigator.mediaDevices.getDisplayMedia(s2), t2 && (yield this.optimizeScreenShareConstraint(o2, s2));
|
22418
22418
|
} catch (g2) {
|
22419
22419
|
d2.w(this.TAG, "error in getting screenshare - ", g2);
|
22420
|
-
let
|
22421
|
-
throw this.eventBus.analytics.publish(y2.publish({ error:
|
22420
|
+
let f2 = Ae(g2, "screen");
|
22421
|
+
throw this.eventBus.analytics.publish(y2.publish({ error: f2, devices: this.deviceManager.getDevices(), settings: new ze(r2 == null ? void 0 : r2.video, r2 == null ? void 0 : r2.audio, false) })), f2;
|
22422
22422
|
}
|
22423
22423
|
let n2 = [], l2 = new Ge(o2), u2 = o2.getVideoTracks()[0], p2 = new F(l2, u2, "screen", this.eventBus, r2 == null ? void 0 : r2.video, this.store.getRoom());
|
22424
22424
|
p2.setSimulcastDefinitons(this.store.getSimulcastDefinitionsForPeer(this.store.getLocalPeer(), "screen"));
|
@@ -22426,7 +22426,7 @@ var ve = class a5 {
|
|
22426
22426
|
let g2 = this.validateCurrentTabCapture(p2, i2.forceCurrentTab);
|
22427
22427
|
p2.isCurrentTab = g2, yield p2.cropTo(i2.cropTarget);
|
22428
22428
|
} catch (g2) {
|
22429
|
-
throw o2.getTracks().forEach((
|
22429
|
+
throw o2.getTracks().forEach((f2) => f2.stop()), g2;
|
22430
22430
|
}
|
22431
22431
|
n2.push(p2);
|
22432
22432
|
let h2 = o2.getAudioTracks()[0];
|
@@ -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)), di || (di = 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));
|
@@ -22467,13 +22467,13 @@ var ve = class a5 {
|
|
22467
22467
|
return o2.enabled = false, o2;
|
22468
22468
|
}
|
22469
22469
|
static getEmptyAudioTrack() {
|
22470
|
-
let e =
|
22470
|
+
let e = He.getAudioContext(), t2 = e.createOscillator(), i2 = e.createMediaStreamDestination();
|
22471
22471
|
t2.connect(i2), t2.start();
|
22472
22472
|
let r2 = i2.stream.getAudioTracks()[0];
|
22473
22473
|
return r2.enabled = false, r2;
|
22474
22474
|
}
|
22475
22475
|
static cleanup() {
|
22476
|
-
clearInterval(
|
22476
|
+
clearInterval(di), di = void 0, pe = void 0;
|
22477
22477
|
}
|
22478
22478
|
getAVTracks(e) {
|
22479
22479
|
return c2(this, null, function* () {
|
@@ -22483,13 +22483,13 @@ var ve = class a5 {
|
|
22483
22483
|
} catch (t2) {
|
22484
22484
|
yield this.deviceManager.init();
|
22485
22485
|
let i2 = !!(!this.deviceManager.hasWebcamPermission && e.video), r2 = !!(!this.deviceManager.hasMicrophonePermission && e.audio), s2 = this.getErrorType(i2, r2);
|
22486
|
-
throw
|
22486
|
+
throw Ae(t2, s2);
|
22487
22487
|
}
|
22488
22488
|
});
|
22489
22489
|
}
|
22490
22490
|
getAVTrackSettings(e) {
|
22491
22491
|
let t2 = this.getAudioSettings(e), i2 = this.getVideoSettings(e);
|
22492
|
-
return !t2 && !i2 ? null : new
|
22492
|
+
return !t2 && !i2 ? null : new De().video(i2).audio(t2).build();
|
22493
22493
|
}
|
22494
22494
|
isInIframe() {
|
22495
22495
|
try {
|
@@ -22500,16 +22500,16 @@ var ve = class a5 {
|
|
22500
22500
|
}
|
22501
22501
|
retryGetLocalTracks(e, t2, i2, r2) {
|
22502
22502
|
return c2(this, null, function* () {
|
22503
|
-
if (e instanceof
|
22503
|
+
if (e instanceof v2 && e.action === "TRACK") {
|
22504
22504
|
this.observer.onFailure(e);
|
22505
|
-
let s2 = e.code ===
|
22505
|
+
let s2 = e.code === E2.TracksErrors.OVER_CONSTRAINED, o2 = e.message.includes("audio"), n2 = e.message.includes("video");
|
22506
22506
|
if (s2) {
|
22507
|
-
let l2 = new
|
22507
|
+
let l2 = new De().video(new Fe()).audio(new Ve()).build();
|
22508
22508
|
d2.w(this.TAG, "Fetch AV Tracks failed with overconstrained error", { fetchTrackOptions: i2 }, { error: e });
|
22509
22509
|
try {
|
22510
22510
|
return yield this.getLocalTracks(i2, l2, r2);
|
22511
22511
|
} catch (u2) {
|
22512
|
-
let p2 = u2 instanceof
|
22512
|
+
let p2 = u2 instanceof v2 ? u2.nativeError : u2, h2 = u2;
|
22513
22513
|
if ((p2 == null ? void 0 : p2.name) === "OverconstrainedError") {
|
22514
22514
|
let T = S2.TracksErrors.GenericTrack("TRACK", "Overconstrained error after dropping all constraints");
|
22515
22515
|
T.addNativeError(p2), h2 = T;
|
@@ -22556,7 +22556,7 @@ var ve = class a5 {
|
|
22556
22556
|
if (!t2 || !((n2 = t2.allowed) != null && n2.includes("video")))
|
22557
22557
|
return null;
|
22558
22558
|
let i2 = this.store.getLocalPeer(), r2 = i2 == null ? void 0 : i2.videoTrack, s2 = (r2 == null ? void 0 : r2.settings.deviceId) || e.videoDeviceId, o2 = t2.video;
|
22559
|
-
return new
|
22559
|
+
return new z2().codec(o2.codec).maxBitrate(o2.bitRate).maxFramerate(o2.frameRate).setWidth(o2.width).setHeight(o2.height).deviceId(s2 || Cr.videoDeviceId).build();
|
22560
22560
|
}
|
22561
22561
|
getScreenshareSettings(e = false) {
|
22562
22562
|
var r2;
|
@@ -22564,7 +22564,7 @@ var ve = class a5 {
|
|
22564
22564
|
if (!t2 || !((r2 = t2.allowed) != null && r2.includes("screen")))
|
22565
22565
|
return null;
|
22566
22566
|
let i2 = t2.screen;
|
22567
|
-
return { video: new
|
22567
|
+
return { video: new z2().maxBitrate(i2.bitRate, false).codec(i2.codec).maxFramerate(i2.frameRate).setWidth(i2.width).setHeight(i2.height).build(), audio: e ? void 0 : new ee().build() };
|
22568
22568
|
}
|
22569
22569
|
getOrDefaultScreenshareConfig(e) {
|
22570
22570
|
return c2(this, null, function* () {
|
@@ -22594,7 +22594,7 @@ function xs(a11, e) {
|
|
22594
22594
|
};
|
22595
22595
|
}
|
22596
22596
|
var F = class a6 extends Ye {
|
22597
|
-
constructor(t2, i2, r2, s2, o2 = new
|
22597
|
+
constructor(t2, i2, r2, s2, o2 = new z2().build(), n2) {
|
22598
22598
|
super(t2, i2, r2);
|
22599
22599
|
this.eventBus = s2;
|
22600
22600
|
this._layerDefinitions = [];
|
@@ -22630,7 +22630,7 @@ var F = class a6 extends Ye {
|
|
22630
22630
|
yield this.replaceSender(o3, this.enabled), this.nativeTrack = o3, yield this.processPlugins(), this.videoHandler.updateSinks();
|
22631
22631
|
}
|
22632
22632
|
let s3 = this.nativeTrack.getSettings().groupId;
|
22633
|
-
!i3 && t3.deviceId && (
|
22633
|
+
!i3 && t3.deviceId && (Q2.updateSelection("videoInput", { deviceId: t3.deviceId, groupId: s3 }), this.eventBus.deviceChange.publish({ isUserSelection: true, type: "video", selection: { deviceId: t3.deviceId, groupId: s3 } }));
|
22634
22634
|
}
|
22635
22635
|
});
|
22636
22636
|
this.removeOrReplaceProcessedTrack = (t3) => 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 yt(this, s2), this.mediaStreamPluginsManager = new ni(s2, n2), this.setFirstTrackId(this.trackId), O2 && Te() && document.addEventListener("visibilitychange", this.handleVisibilityChange);
|
22643
22643
|
}
|
22644
22644
|
setSimulcastDefinitons(t2) {
|
22645
22645
|
this._layerDefinitions = t2;
|
@@ -22653,7 +22653,7 @@ var F = class a6 extends Ye {
|
|
22653
22653
|
if (t2 !== this.enabled) {
|
22654
22654
|
if (this.source === "regular") {
|
22655
22655
|
let r2;
|
22656
|
-
t2 ? r2 = yield this.replaceTrackWith(this.settings) : r2 = yield this.replaceTrackWithBlank(), yield this.replaceSender(r2, t2), (i2 = this.nativeTrack) == null || i2.stop(), this.nativeTrack = r2, yield
|
22656
|
+
t2 ? r2 = yield this.replaceTrackWith(this.settings) : r2 = yield this.replaceTrackWithBlank(), yield this.replaceSender(r2, t2), (i2 = this.nativeTrack) == null || i2.stop(), this.nativeTrack = r2, yield J(a6.prototype, this, "setEnabled").call(this, t2), t2 && (yield this.pluginsManager.waitForRestart(), yield this.processPlugins(), this.settings = this.buildNewSettings({ deviceId: r2.getSettings().deviceId })), this.videoHandler.updateSinks();
|
22657
22657
|
}
|
22658
22658
|
this.eventBus.localVideoEnabled.publish({ enabled: t2, track: this });
|
22659
22659
|
}
|
@@ -22724,7 +22724,7 @@ var F = class a6 extends Ye {
|
|
22724
22724
|
cleanup() {
|
22725
22725
|
return c2(this, null, function* () {
|
22726
22726
|
var t2;
|
22727
|
-
|
22727
|
+
J(a6.prototype, this, "cleanup").call(this), this.transceiver = void 0, yield this.pluginsManager.cleanup(), (t2 = this.processedTrack) == null || t2.stop(), this.isPublished = false, O2 && Te() && document.removeEventListener("visibilitychange", this.handleVisibilityChange);
|
22728
22728
|
});
|
22729
22729
|
}
|
22730
22730
|
cropTo(t2) {
|
@@ -22767,7 +22767,7 @@ var F = class a6 extends Ye {
|
|
22767
22767
|
let i2 = t2 === "environment" ? "user" : "environment";
|
22768
22768
|
(s2 = this.nativeTrack) == null || s2.stop();
|
22769
22769
|
let r2 = yield this.replaceTrackWith(this.buildNewSettings({ facingMode: i2, deviceId: void 0 }));
|
22770
|
-
yield this.replaceSender(r2, this.enabled), this.nativeTrack = r2, yield this.processPlugins(), this.videoHandler.updateSinks(), this.settings = this.buildNewSettings({ deviceId: this.nativeTrack.getSettings().deviceId, facingMode: i2 }),
|
22770
|
+
yield this.replaceSender(r2, this.enabled), this.nativeTrack = r2, yield this.processPlugins(), this.videoHandler.updateSinks(), this.settings = this.buildNewSettings({ deviceId: this.nativeTrack.getSettings().deviceId, facingMode: i2 }), Q2.updateSelection("videoInput", { deviceId: this.settings.deviceId, groupId: this.nativeTrack.getSettings().groupId });
|
22771
22771
|
});
|
22772
22772
|
}
|
22773
22773
|
replaceTrackWith(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 li = "ion-sfu";
|
22799
22799
|
var tt = "SUBSCRIBE_ICE_CONNECTION_CALLBACK_ID";
|
22800
22800
|
var Us = "https://event.100ms.live/v2/client/report";
|
22801
22801
|
var Bs = "https://event-nonprod.100ms.live/v2/client/report";
|
22802
|
-
var
|
22802
|
+
var kt = 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 Vs = "2.5";
|
22805
22805
|
var Fs = "20240521";
|
@@ -22832,7 +22832,7 @@ var U2 = class a7 extends Ye {
|
|
22832
22832
|
}
|
22833
22833
|
setEnabled(t2) {
|
22834
22834
|
return c2(this, null, function* () {
|
22835
|
-
t2 !== this.enabled && (
|
22835
|
+
t2 !== this.enabled && (J(a7.prototype, this, "setEnabled").call(this, t2), this.videoHandler.updateSinks(true));
|
22836
22836
|
});
|
22837
22837
|
}
|
22838
22838
|
setPreferredLayer(t2) {
|
@@ -22871,12 +22871,12 @@ var U2 = class a7 extends Ye {
|
|
22871
22871
|
}
|
22872
22872
|
addSink(t2, i2 = true) {
|
22873
22873
|
return c2(this, null, function* () {
|
22874
|
-
ue(this.nativeTrack) ? yield this.requestLayer(this.preferredLayer, "addSink") : (
|
22874
|
+
ue(this.nativeTrack) ? yield this.requestLayer(this.preferredLayer, "addSink") : (J(a7.prototype, this, "addSink").call(this, t2), i2 && (yield this.updateLayer("addSink"))), this.pushInHistory("uiSetLayer-high");
|
22875
22875
|
});
|
22876
22876
|
}
|
22877
22877
|
removeSink(t2, i2 = true) {
|
22878
22878
|
return c2(this, null, function* () {
|
22879
|
-
|
22879
|
+
J(a7.prototype, this, "removeSink").call(this, t2), i2 && (yield this.updateLayer("removeSink")), this._degraded = false, this.pushInHistory("uiSetLayer-none");
|
22880
22880
|
});
|
22881
22881
|
}
|
22882
22882
|
getSimulcastDefinitions() {
|
@@ -22936,7 +22936,7 @@ var _r = class {
|
|
22936
22936
|
e.time = (/* @__PURE__ */ new Date()).toISOString().split("T")[1], this.history.push(e);
|
22937
22937
|
}
|
22938
22938
|
};
|
22939
|
-
var Ge = class extends
|
22939
|
+
var Ge = class extends Je {
|
22940
22940
|
constructor() {
|
22941
22941
|
super(...arguments);
|
22942
22942
|
this.TAG = "[HMSLocalStream]";
|
@@ -22987,7 +22987,7 @@ var Ge = class extends je {
|
|
22987
22987
|
return r2;
|
22988
22988
|
}
|
22989
22989
|
};
|
22990
|
-
var fe = class extends
|
22990
|
+
var fe = class extends Je {
|
22991
22991
|
constructor(t2, i2) {
|
22992
22992
|
super(t2);
|
22993
22993
|
this.audio = true;
|
@@ -23049,8 +23049,8 @@ var $s = (a11, e, t2, i2) => c2(void 0, null, function* () {
|
|
23049
23049
|
var k2, w2;
|
23050
23050
|
let h2 = (k2 = l2[p2]) == null ? void 0 : k2.codecId, T = h2 ? n2[h2] : void 0, g2;
|
23051
23051
|
T && (g2 = T.substring(T.indexOf("/") + 1));
|
23052
|
-
let
|
23053
|
-
s2[p2] = M2(m({},
|
23052
|
+
let f2 = M2(m({}, l2[p2]), { rid: (w2 = l2[p2]) == null ? void 0 : w2.rid }), P7 = u2[f2.ssrc];
|
23053
|
+
s2[p2] = M2(m({}, f2), { bitrate: Pt("bytesSent", f2, i2 == null ? void 0 : i2[p2]), packetsLost: P7 == null ? void 0 : P7.packetsLost, jitter: P7 == null ? void 0 : P7.jitter, roundTripTime: P7 == null ? void 0 : P7.roundTripTime, totalRoundTripTime: P7 == null ? void 0 : P7.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 Ks = (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 = Eo(r2), o2 =
|
23069
|
+
let s2 = Eo(r2), o2 = Pt("bytesReceived", s2, i2), n2 = Nr("packetsLost", s2, i2);
|
23070
23070
|
return s2 != null && s2.remote && Object.assign(s2.remote, { packetsLostRate: Nr("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 Eo = (a11) => {
|
@@ -23093,7 +23093,7 @@ var Eo = (a11) => {
|
|
23093
23093
|
return r2 && (s2 = r2.substring(r2.indexOf("/") + 1)), e && Object.assign(e, { remote: t2, codec: s2 });
|
23094
23094
|
};
|
23095
23095
|
var Or = (a11, e, t2) => {
|
23096
|
-
let i2 = bo(e), r2 =
|
23096
|
+
let i2 = bo(e), r2 = Pt(a11 === "publish" ? "bytesSent" : "bytesReceived", i2, t2 && t2[a11]);
|
23097
23097
|
return i2 && Object.assign(i2, { bitrate: r2 });
|
23098
23098
|
};
|
23099
23099
|
var bo = (a11) => {
|
@@ -23111,13 +23111,13 @@ var qs = (a11) => {
|
|
23111
23111
|
}), e;
|
23112
23112
|
};
|
23113
23113
|
var js = (a11, e) => Array.from(new Set(a11.concat(e)));
|
23114
|
-
var
|
23114
|
+
var Pt = (a11, e, t2) => Nr(a11, e, t2) * 8;
|
23115
23115
|
var Nr = (a11, e, t2) => {
|
23116
23116
|
let i2 = e && e[a11], r2 = t2 ? t2[a11] : null;
|
23117
23117
|
return [e, t2, oe(i2), oe(r2)].every((o2) => !!o2) ? xr(i2, r2, e == null ? void 0 : e.timestamp, t2 == null ? void 0 : t2.timestamp) * 1e3 : 0;
|
23118
23118
|
};
|
23119
23119
|
var xr = (a11, e, t2, i2) => oe(a11) && oe(e) && t2 && i2 ? (a11 - e) / (t2 - i2) : 0;
|
23120
|
-
var
|
23120
|
+
var ui = class {
|
23121
23121
|
constructor(e, t2, i2) {
|
23122
23122
|
this.getStats = e;
|
23123
23123
|
this.store = t2;
|
@@ -23134,7 +23134,7 @@ var pi = class {
|
|
23134
23134
|
yield this.updateLocalPeerStats(), yield this.updateLocalTrackStats(), yield this.updateRemoteTrackStats();
|
23135
23135
|
});
|
23136
23136
|
this.updateLocalPeerStats = () => c2(this, null, function* () {
|
23137
|
-
var p2, h2, T, g2,
|
23137
|
+
var p2, h2, T, g2, f2, P7;
|
23138
23138
|
let e2 = this.getLocalPeerStats(), t3;
|
23139
23139
|
try {
|
23140
23140
|
t3 = yield (h2 = (p2 = this.getStats).publish) == null ? void 0 : h2.call(p2);
|
@@ -23147,7 +23147,7 @@ var pi = class {
|
|
23147
23147
|
} catch (k2) {
|
23148
23148
|
this.eventBus.analytics.publish(y2.rtcStatsFailed(S2.WebrtcErrors.StatsFailed("SUBSCRIBE", k2.message))), d2.w(this.TAG, "Error in getting subscribe stats", k2);
|
23149
23149
|
}
|
23150
|
-
let s2 = r3 && Or("subscribe", r3, e2), { packetsLost: o2, jitter: n2 } = qs(r3), l2 = xr(o2, (
|
23150
|
+
let s2 = r3 && Or("subscribe", r3, e2), { packetsLost: o2, jitter: n2 } = qs(r3), l2 = xr(o2, (f2 = e2 == null ? void 0 : e2.subscribe) == null ? void 0 : f2.packetsLost, s2 == null ? void 0 : s2.timestamp, (P7 = e2 == null ? void 0 : e2.subscribe) == null ? void 0 : P7.timestamp), u2 = s2 && Object.assign(s2, { packetsLostRate: l2, jitter: n2, packetsLost: o2 });
|
23151
23151
|
this.peerStats[this.localPeerID] = { publish: i3, subscribe: u2 };
|
23152
23152
|
});
|
23153
23153
|
this.updateRemoteTrackStats = () => c2(this, null, function* () {
|
@@ -23177,7 +23177,7 @@ var pi = class {
|
|
23177
23177
|
this.localPeerID = (r2 = this.store.getLocalPeer()) == null ? void 0 : r2.peerId;
|
23178
23178
|
}
|
23179
23179
|
};
|
23180
|
-
var
|
23180
|
+
var pi = class {
|
23181
23181
|
constructor(e, t2, i2, r2) {
|
23182
23182
|
this.store = e;
|
23183
23183
|
this.eventBus = t2;
|
@@ -23207,7 +23207,7 @@ var hi = 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 ui({ 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* () {
|
@@ -23226,7 +23226,7 @@ var hi = class {
|
|
23226
23226
|
startLoop() {
|
23227
23227
|
return c2(this, null, function* () {
|
23228
23228
|
for (; this.isMonitored; )
|
23229
|
-
yield this.handleStatsUpdate(), yield
|
23229
|
+
yield this.handleStatsUpdate(), yield Z2(this.interval);
|
23230
23230
|
});
|
23231
23231
|
}
|
23232
23232
|
cleanup() {
|
@@ -23298,7 +23298,7 @@ var We = class extends it {
|
|
23298
23298
|
}`;
|
23299
23299
|
}
|
23300
23300
|
};
|
23301
|
-
var
|
23301
|
+
var Et = 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 bt = 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 Et({ 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 hi = class {
|
23312
23312
|
constructor(e, t2, i2) {
|
23313
23313
|
this.transport = e;
|
23314
23314
|
this.store = t2;
|
@@ -23374,7 +23374,7 @@ var st = class {
|
|
23374
23374
|
});
|
23375
23375
|
}
|
23376
23376
|
};
|
23377
|
-
var
|
23377
|
+
var we = class extends Io {
|
23378
23378
|
on(e, t2) {
|
23379
23379
|
return super.on(e, t2);
|
23380
23380
|
}
|
@@ -23388,7 +23388,7 @@ var De = class extends Ao {
|
|
23388
23388
|
return super.listeners(e);
|
23389
23389
|
}
|
23390
23390
|
};
|
23391
|
-
var
|
23391
|
+
var mi = class extends we {
|
23392
23392
|
constructor() {
|
23393
23393
|
super(...arguments);
|
23394
23394
|
this.audioElement = null;
|
@@ -23440,7 +23440,7 @@ var Si = class extends De {
|
|
23440
23440
|
}), this.audioContextManager = new st(t2), t2;
|
23441
23441
|
}
|
23442
23442
|
};
|
23443
|
-
var
|
23443
|
+
var Si = class extends we {
|
23444
23444
|
constructor() {
|
23445
23445
|
super(...arguments);
|
23446
23446
|
this.TAG = "[PlaylistVideoManager]";
|
@@ -23514,13 +23514,13 @@ var gi = 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 gi = { audio: { list: [], currentIndex: -1, isAutoplayOn: true }, video: { list: [], currentIndex: -1, isAutoplayOn: true } };
|
23518
|
+
var bt = class extends we {
|
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({}, gi.audio), video: m({}, gi.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 Rt = 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", ri(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 mi(), this.videoManager = new Si(), this.addListeners();
|
23539
23539
|
}
|
23540
23540
|
getList(t2 = "audio") {
|
23541
23541
|
return this.state[t2].list;
|
@@ -23658,7 +23658,7 @@ var Rt = class extends De {
|
|
23658
23658
|
});
|
23659
23659
|
}
|
23660
23660
|
cleanup() {
|
23661
|
-
this.state = { audio: m({},
|
23661
|
+
this.state = { audio: m({}, gi.audio), video: m({}, gi.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", () => {
|
@@ -23736,34 +23736,34 @@ var Rt = class extends De {
|
|
23736
23736
|
}
|
23737
23737
|
};
|
23738
23738
|
var B2 = (a11) => a11.room;
|
23739
|
-
var
|
23740
|
-
var Wh = createSelector(
|
23739
|
+
var Ao = (a11) => a11.errors;
|
23740
|
+
var Wh = createSelector(Ao, (a11) => a11.length === 0 ? null : a11.at(-1));
|
23741
23741
|
var $h = createSelector(B2, (a11) => a11.id);
|
23742
|
-
var
|
23743
|
-
var
|
23742
|
+
var K = (a11) => a11.peers;
|
23743
|
+
var Ti = (a11) => a11.messages.byID;
|
23744
23744
|
var Js = (a11) => a11.messages.allIDs;
|
23745
23745
|
var N2 = (a11) => a11.tracks;
|
23746
23746
|
var Qs = (a11) => a11.settings;
|
23747
23747
|
var Ur = (a11) => a11.appData;
|
23748
23748
|
var Ho = (a11) => a11.speakers;
|
23749
|
-
var
|
23750
|
-
var jh = createSelector([
|
23749
|
+
var _e = createSelector([B2], (a11) => a11 && a11.isConnected);
|
23750
|
+
var jh = createSelector([_e, B2], (a11, e) => a11 ? e.peerCount !== void 0 ? e.peerCount || 1 : e.peers.length : Math.max(e.peerCount !== void 0 ? e.peerCount : e.peers.length - 1, 0));
|
23751
23751
|
var Co = (a11) => a11.hideLocalPeer;
|
23752
|
-
var me = createSelector([B2,
|
23752
|
+
var me = createSelector([B2, K, Co], (a11, e, t2) => t2 ? a11.peers.filter((i2) => a11.localPeer !== i2).map((i2) => e[i2]) : a11.peers.map((i2) => e[i2]));
|
23753
23753
|
var Lo = createSelector(N2, (a11) => Object.values(a11));
|
23754
|
-
var te = createSelector(B2,
|
23754
|
+
var te = createSelector(B2, K, (a11, e) => e[a11.localPeer]);
|
23755
23755
|
var ye = createSelector(B2, (a11) => a11.localPeer);
|
23756
23756
|
var Jh = createSelector(te, (a11) => a11 == null ? void 0 : a11.name);
|
23757
23757
|
var Qh = createSelector(te, (a11) => a11 == null ? void 0 : a11.roleName);
|
23758
23758
|
var ae = createSelector(te, (a11) => a11 == null ? void 0 : a11.audioTrack);
|
23759
|
-
var
|
23759
|
+
var Y2 = createSelector(te, (a11) => a11 == null ? void 0 : a11.videoTrack);
|
23760
23760
|
var Do = createSelector(te, (a11) => a11 == null ? void 0 : a11.auxiliaryTracks);
|
23761
|
-
var zs = createSelector([ae,
|
23761
|
+
var zs = createSelector([ae, Y2, Do], (a11, e, t2) => {
|
23762
23762
|
let i2 = t2 ? [...t2] : [];
|
23763
23763
|
return a11 && i2.unshift(a11), e && i2.unshift(e), i2;
|
23764
23764
|
});
|
23765
23765
|
var zh = createSelector(me, (a11) => a11.filter((e) => !e.isLocal));
|
23766
|
-
var Yh = createSelector(
|
23766
|
+
var Yh = createSelector(K, Ho, (a11, e) => {
|
23767
23767
|
let t2 = Object.entries(e).sort((i2, r2) => {
|
23768
23768
|
var n2, l2;
|
23769
23769
|
let s2 = ((n2 = i2[1]) == null ? void 0 : n2.audioLevel) || 0;
|
@@ -23778,7 +23778,7 @@ var Yh = createSelector(q2, Ho, (a11, e) => {
|
|
23778
23778
|
});
|
23779
23779
|
var Br = (a11) => {
|
23780
23780
|
let e = te(a11);
|
23781
|
-
return
|
23781
|
+
return je(a11, e == null ? void 0 : e.videoTrack);
|
23782
23782
|
};
|
23783
23783
|
var Ys = (a11) => {
|
23784
23784
|
let e = te(a11);
|
@@ -23788,7 +23788,7 @@ var Vr = createSelector(te, N2, (a11, e) => {
|
|
23788
23788
|
let { video: t2, audio: i2 } = xe(e, a11);
|
23789
23789
|
return !!(t2 || i2);
|
23790
23790
|
});
|
23791
|
-
var wo = createSelector(
|
23791
|
+
var wo = createSelector(K, N2, (a11, e) => {
|
23792
23792
|
let t2;
|
23793
23793
|
for (let i2 in a11) {
|
23794
23794
|
let r2 = a11[i2], { video: s2, audio: o2 } = xe(e, r2);
|
@@ -23799,14 +23799,14 @@ var wo = createSelector(q2, N2, (a11, e) => {
|
|
23799
23799
|
return t2;
|
23800
23800
|
});
|
23801
23801
|
var Zh = createSelector(wo, (a11) => !!a11);
|
23802
|
-
var em = createSelector(
|
23802
|
+
var em = createSelector(K, N2, (a11, e) => {
|
23803
23803
|
for (let t2 in a11) {
|
23804
23804
|
let i2 = a11[t2], { audio: r2, video: s2 } = xe(e, i2);
|
23805
23805
|
if (!s2 && r2)
|
23806
23806
|
return i2;
|
23807
23807
|
}
|
23808
23808
|
});
|
23809
|
-
var tm = createSelector(
|
23809
|
+
var tm = createSelector(K, N2, (a11, e) => {
|
23810
23810
|
let t2 = [], i2 = [];
|
23811
23811
|
for (let r2 in a11) {
|
23812
23812
|
let s2 = a11[r2], { video: o2, audio: n2 } = xe(e, s2);
|
@@ -23814,30 +23814,30 @@ var tm = createSelector(q2, N2, (a11, e) => {
|
|
23814
23814
|
}
|
23815
23815
|
return t2.concat(i2);
|
23816
23816
|
});
|
23817
|
-
var im = createSelector(
|
23817
|
+
var im = createSelector(K, N2, (a11, e) => {
|
23818
23818
|
for (let t2 in e) {
|
23819
23819
|
let i2 = e[t2];
|
23820
|
-
if (
|
23820
|
+
if (ht(i2) && pt(i2) && i2.peerId)
|
23821
23821
|
return a11[i2.peerId];
|
23822
23822
|
}
|
23823
23823
|
});
|
23824
|
-
var rm = createSelector(
|
23824
|
+
var rm = createSelector(K, N2, (a11, e) => {
|
23825
23825
|
for (let t2 in e) {
|
23826
23826
|
let i2 = e[t2];
|
23827
|
-
if (
|
23827
|
+
if (ii(i2) && i2.peerId)
|
23828
23828
|
return a11[i2.peerId];
|
23829
23829
|
}
|
23830
23830
|
});
|
23831
23831
|
var sm = createSelector(Lo, (a11) => a11.filter(os));
|
23832
23832
|
var am = createSelector(Js, (a11) => a11.length);
|
23833
|
-
var om = createSelector(
|
23834
|
-
var
|
23833
|
+
var om = createSelector(Ti, (a11) => Object.values(a11).filter((e) => !e.read).length);
|
23834
|
+
var Rt = createSelector(Js, Ti, (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 _o = createSelector(
|
23840
|
+
var _o = createSelector(Rt, (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
|
}));
|
@@ -23885,7 +23885,7 @@ var da = (a11 = "audio") => createSelector(ra(a11), Fr(a11), (e, t2) => {
|
|
23885
23885
|
});
|
23886
23886
|
var la = { selection: Fr("audio"), progress: sa("audio"), currentTime: aa("audio"), playbackRate: oa("audio"), volume: na("audio"), list: ca("audio"), selectedItem: da("audio") };
|
23887
23887
|
var ua = { selection: Fr("video"), progress: sa("video"), currentTime: aa("video"), playbackRate: oa("video"), volume: na("video"), list: ca("video"), selectedItem: da("video") };
|
23888
|
-
function
|
23888
|
+
function A2(a11) {
|
23889
23889
|
return (e) => (t2) => a11(t2, e);
|
23890
23890
|
}
|
23891
23891
|
var It = "HMS-Store:";
|
@@ -23956,39 +23956,39 @@ var b2 = class {
|
|
23956
23956
|
};
|
23957
23957
|
b2.level = 0;
|
23958
23958
|
var Gr = (a11, e) => e;
|
23959
|
-
var
|
23959
|
+
var At = (a11, e) => e;
|
23960
23960
|
var pa = (a11, e) => e;
|
23961
23961
|
var xo = (a11, e) => e;
|
23962
23962
|
var Uo = (a11, e) => e;
|
23963
|
-
var
|
23964
|
-
var Wr = createSelector([N2,
|
23965
|
-
var Bo = createSelector([N2,
|
23963
|
+
var q2 = createSelector([K, Gr], (a11, e) => e ? a11[e] : null);
|
23964
|
+
var Wr = createSelector([N2, At], (a11, e) => e ? a11[e] : null);
|
23965
|
+
var Bo = createSelector([N2, At], (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 Vo = createSelector([N2,
|
23971
|
+
var Vo = createSelector([N2, At], (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 Fo = createSelector([N2,
|
23977
|
+
var Fo = createSelector([N2, At], (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 Go = createSelector([N2,
|
23983
|
+
var Go = createSelector([N2, At], (a11, e) => {
|
23984
23984
|
if (!e)
|
23985
23985
|
return null;
|
23986
23986
|
let t2 = a11[e];
|
23987
23987
|
return (t2 == null ? void 0 : t2.type) === "video" && (t2 == null ? void 0 : t2.source) === "screen" ? t2 : null;
|
23988
23988
|
});
|
23989
23989
|
var Wo = createSelector([ta, Uo], (a11, e) => e ? a11[e] : null);
|
23990
|
-
var
|
23991
|
-
var Om =
|
23990
|
+
var X2 = A2(q2);
|
23991
|
+
var Om = A2(createSelector([Ur, xo], (a11, e) => {
|
23992
23992
|
if (a11)
|
23993
23993
|
return e ? a11[e] : a11;
|
23994
23994
|
}));
|
@@ -23998,89 +23998,89 @@ function xm(a11) {
|
|
23998
23998
|
return a11 ? e.sessionStore[a11] : e.sessionStore;
|
23999
23999
|
};
|
24000
24000
|
}
|
24001
|
-
var Bm =
|
24002
|
-
var Vm =
|
24003
|
-
var
|
24004
|
-
var ha =
|
24005
|
-
var Fm =
|
24006
|
-
var Gm =
|
24007
|
-
var Wm =
|
24008
|
-
var $o =
|
24009
|
-
let t2 =
|
24001
|
+
var Bm = A2(createSelector(q2, (a11) => a11 == null ? void 0 : a11.name));
|
24002
|
+
var Vm = A2(createSelector(q2, (a11) => a11 == null ? void 0 : a11.type));
|
24003
|
+
var fi = A2(Wr);
|
24004
|
+
var ha = A2(Bo);
|
24005
|
+
var Fm = A2(Vo);
|
24006
|
+
var Gm = A2(Fo);
|
24007
|
+
var Wm = A2(Go);
|
24008
|
+
var $o = A2((a11, e) => {
|
24009
|
+
let t2 = q2(a11, e);
|
24010
24010
|
if (t2 && t2.videoTrack && t2.videoTrack !== "")
|
24011
24011
|
return a11.tracks[t2.videoTrack];
|
24012
24012
|
});
|
24013
|
-
var Ko =
|
24014
|
-
let t2 =
|
24013
|
+
var Ko = A2((a11, e) => {
|
24014
|
+
let t2 = q2(a11, e);
|
24015
24015
|
if (t2 && t2.audioTrack && t2.audioTrack !== "")
|
24016
24016
|
return a11.tracks[t2.audioTrack];
|
24017
24017
|
});
|
24018
|
-
var Km =
|
24019
|
-
let t2 =
|
24018
|
+
var Km = A2((a11, e) => {
|
24019
|
+
let t2 = q2(a11, e);
|
24020
24020
|
return (t2 == null ? void 0 : t2.auxiliaryTracks.map((i2) => a11.tracks[i2])) || [];
|
24021
24021
|
});
|
24022
24022
|
var ma = (a11, e) => e ? a11.speakers[e] : null;
|
24023
|
-
var qm =
|
24023
|
+
var qm = A2(createSelector(ma, (a11) => (a11 == null ? void 0 : a11.audioLevel) || 0));
|
24024
24024
|
var qo = (a11, e) => {
|
24025
24025
|
let t2 = Ko(e)(a11);
|
24026
24026
|
return ma(a11, t2 == null ? void 0 : t2.id);
|
24027
24027
|
};
|
24028
|
-
var jm =
|
24029
|
-
var Jm =
|
24028
|
+
var jm = A2(createSelector(qo, (a11) => (a11 == null ? void 0 : a11.audioLevel) || 0));
|
24029
|
+
var Jm = A2((a11, e) => {
|
24030
24030
|
if (e)
|
24031
24031
|
return a11.connectionQualities[e];
|
24032
24032
|
});
|
24033
|
-
var Qm =
|
24034
|
-
let t2 =
|
24033
|
+
var Qm = A2((a11, e) => {
|
24034
|
+
let t2 = q2(a11, e);
|
24035
24035
|
if (t2) {
|
24036
|
-
let i2 = t2 == null ? void 0 : t2.auxiliaryTracks.find((r2) =>
|
24036
|
+
let i2 = t2 == null ? void 0 : t2.auxiliaryTracks.find((r2) => ut(a11.tracks[r2]));
|
24037
24037
|
return i2 ? a11.tracks[i2] : void 0;
|
24038
24038
|
}
|
24039
24039
|
});
|
24040
|
-
var zm =
|
24040
|
+
var zm = A2(createSelector(N2, q2, (a11, e) => {
|
24041
24041
|
let t2 = e == null ? void 0 : e.auxiliaryTracks.find((i2) => {
|
24042
24042
|
let r2 = a11[i2];
|
24043
|
-
return
|
24043
|
+
return ht(r2) && pt(r2);
|
24044
24044
|
});
|
24045
24045
|
return t2 ? a11[t2] : void 0;
|
24046
24046
|
}));
|
24047
|
-
var Ym =
|
24047
|
+
var Ym = A2(createSelector(N2, q2, (a11, e) => {
|
24048
24048
|
let t2 = e == null ? void 0 : e.auxiliaryTracks.find((i2) => {
|
24049
24049
|
let r2 = a11[i2];
|
24050
|
-
return
|
24050
|
+
return ht(r2) && ut(r2);
|
24051
24051
|
});
|
24052
24052
|
return t2 ? a11[t2] : void 0;
|
24053
24053
|
}));
|
24054
|
-
var Xm =
|
24054
|
+
var Xm = A2(createSelector(N2, q2, (a11, e) => {
|
24055
24055
|
let t2 = e == null ? void 0 : e.auxiliaryTracks.find((i2) => {
|
24056
24056
|
let r2 = a11[i2];
|
24057
|
-
return
|
24057
|
+
return ii(r2) && ut(r2);
|
24058
24058
|
});
|
24059
24059
|
return t2 ? a11[t2] : void 0;
|
24060
24060
|
}));
|
24061
|
-
var Sa =
|
24061
|
+
var Sa = A2(createSelector(N2, q2, (a11, e) => xe(a11, e)));
|
24062
24062
|
var ga = (a11) => createSelector(Sa(a11), (e) => e.audio);
|
24063
|
-
var eS =
|
24064
|
-
let t2 =
|
24065
|
-
return
|
24063
|
+
var eS = A2((a11, e) => {
|
24064
|
+
let t2 = q2(a11, e);
|
24065
|
+
return je(a11, t2 == null ? void 0 : t2.audioTrack);
|
24066
24066
|
});
|
24067
|
-
var tS =
|
24068
|
-
let t2 =
|
24069
|
-
return
|
24067
|
+
var tS = A2((a11, e) => {
|
24068
|
+
let t2 = q2(a11, e);
|
24069
|
+
return je(a11, t2 == null ? void 0 : t2.videoTrack);
|
24070
24070
|
});
|
24071
|
-
var Ta =
|
24071
|
+
var Ta = A2((a11, e) => {
|
24072
24072
|
if (e && a11.tracks[e])
|
24073
24073
|
return a11.tracks[e].volume === 0;
|
24074
24074
|
});
|
24075
|
-
var iS =
|
24076
|
-
let t2 =
|
24075
|
+
var iS = A2((a11, e) => {
|
24076
|
+
let t2 = q2(a11, e);
|
24077
24077
|
return Ta(t2 == null ? void 0 : t2.audioTrack)(a11);
|
24078
24078
|
});
|
24079
|
-
var rS =
|
24079
|
+
var rS = A2((a11, e) => {
|
24080
24080
|
let t2 = ga(e)(a11);
|
24081
24081
|
return Ta(t2 == null ? void 0 : t2.id)(a11);
|
24082
24082
|
});
|
24083
|
-
var fa =
|
24083
|
+
var fa = A2((a11, e) => {
|
24084
24084
|
let t2 = Wr(a11, e);
|
24085
24085
|
if (t2) {
|
24086
24086
|
if (t2.type !== "audio") {
|
@@ -24090,15 +24090,15 @@ var fa = I2((a11, e) => {
|
|
24090
24090
|
return t2.volume;
|
24091
24091
|
}
|
24092
24092
|
});
|
24093
|
-
var sS =
|
24094
|
-
let t2 =
|
24093
|
+
var sS = A2((a11, e) => {
|
24094
|
+
let t2 = q2(a11, e);
|
24095
24095
|
return fa(t2 == null ? void 0 : t2.audioTrack)(a11);
|
24096
24096
|
});
|
24097
|
-
var aS =
|
24097
|
+
var aS = A2((a11, e) => {
|
24098
24098
|
let t2 = ga(e)(a11);
|
24099
24099
|
return fa(t2 == null ? void 0 : t2.id)(a11);
|
24100
24100
|
});
|
24101
|
-
var oS =
|
24101
|
+
var oS = A2((a11, e) => {
|
24102
24102
|
let t2 = Wr(a11, e);
|
24103
24103
|
if (t2) {
|
24104
24104
|
if (t2.type !== "video") {
|
@@ -24108,41 +24108,41 @@ var oS = I2((a11, e) => {
|
|
24108
24108
|
return t2.layer;
|
24109
24109
|
}
|
24110
24110
|
});
|
24111
|
-
var va = createSelector([
|
24111
|
+
var va = createSelector([Rt, ye, Gr], (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 Ma = createSelector([
|
24118
|
+
var Ma = createSelector([Rt, pa], (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 jo = createSelector(
|
24125
|
+
var jo = createSelector(Rt, (a11) => a11.filter((e) => {
|
24126
24126
|
var t2;
|
24127
24127
|
return !e.recipientPeer && !((t2 = e.recipientRoles) != null && t2.length);
|
24128
24128
|
}));
|
24129
24129
|
var Jo = createSelector([Ma, pa], (a11) => a11 ? a11.filter((e) => !e.read).length : 0);
|
24130
24130
|
var Qo = createSelector([va, Gr], (a11) => a11 ? a11.filter((e) => !e.read).length : 0);
|
24131
24131
|
var nS = createSelector(jo, (a11) => a11.filter((e) => !e.read).length);
|
24132
|
-
var cS =
|
24133
|
-
var dS =
|
24134
|
-
var lS =
|
24135
|
-
var uS =
|
24136
|
-
var ya =
|
24137
|
-
var PS = createSelector([
|
24132
|
+
var cS = A2(va);
|
24133
|
+
var dS = A2(Ma);
|
24134
|
+
var lS = A2(Jo);
|
24135
|
+
var uS = A2(Qo);
|
24136
|
+
var ya = A2(Wo);
|
24137
|
+
var PS = createSelector([K, N2], (a11, e) => Object.values(a11).map((i2) => {
|
24138
24138
|
var r2;
|
24139
24139
|
return { peer: i2, isAudioEnabled: i2.audioTrack ? (r2 = e[i2.audioTrack]) == null ? void 0 : r2.enabled : false };
|
24140
24140
|
}));
|
24141
24141
|
var zo = (a11) => a11.roleChangeRequests[0] || null;
|
24142
|
-
var ES = createSelector([zo,
|
24143
|
-
var bS = createSelector([at], (a11) =>
|
24144
|
-
var RS = createSelector([Zs], (a11) =>
|
24145
|
-
var Xo = createSelector([
|
24142
|
+
var ES = createSelector([zo, K, Se], (a11, e, t2) => a11 ? { requestedBy: a11.requestedBy ? e[a11.requestedBy] : void 0, role: t2[a11.roleName], token: a11.token } : null);
|
24143
|
+
var bS = createSelector([at], (a11) => mt(a11));
|
24144
|
+
var RS = createSelector([Zs], (a11) => mt(a11));
|
24145
|
+
var Xo = createSelector([Y2, N2], (a11, e) => {
|
24146
24146
|
let t2 = null;
|
24147
24147
|
return a11 && (t2 = e[a11]), (t2 == null ? void 0 : t2.plugins) || [];
|
24148
24148
|
});
|
@@ -24150,12 +24150,12 @@ var Zo = createSelector([ae, 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 Mi = { 0: "PEER_JOINED", 1: "PEER_LEFT", 8: "ROLE_UPDATED", 10: "NAME_UPDATED", 11: "METADATA_UPDATED", 12: "HAND_RAISE_CHANGED" };
|
24154
|
+
var Ht = { 0: "TRACK_ADDED", 1: "TRACK_REMOVED", 2: "TRACK_MUTED", 3: "TRACK_UNMUTED", 5: "TRACK_DEGRADED", 6: "TRACK_RESTORED", 4: "TRACK_DESCRIPTION_CHANGED" };
|
24155
|
+
var yi = { 0: "POLL_CREATED", 1: "POLL_STARTED", 2: "POLL_STOPPED", 4: "POLL_VOTES_UPDATED", 3: "POLLS_LIST" };
|
24156
24156
|
var ka = { TRANSCRIPTION_STATE_UPDATED: "TRANSCRIPTION_STATE_UPDATED" };
|
24157
24157
|
var $r = "hmsNotification";
|
24158
|
-
var
|
24158
|
+
var ki = class {
|
24159
24159
|
constructor(e) {
|
24160
24160
|
this.id = 0;
|
24161
24161
|
this.onNotification = (e2, t2) => {
|
@@ -24194,14 +24194,14 @@ var Pi = class {
|
|
24194
24194
|
this.emitEvent(t2);
|
24195
24195
|
}
|
24196
24196
|
sendPeerUpdate(e, t2) {
|
24197
|
-
let i2 = this.store.getState(
|
24197
|
+
let i2 = this.store.getState(X2(t2 == null ? void 0 : t2.id)) || t2, r2 = Mi[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(fi(t2)), r2 = Ht[e];
|
24205
24205
|
if (r2) {
|
24206
24206
|
let s2 = this.createNotification(r2, i2, "info");
|
24207
24207
|
this.emitEvent(s2);
|
@@ -24232,7 +24232,7 @@ var Pi = class {
|
|
24232
24232
|
this.emitEvent(t2);
|
24233
24233
|
}
|
24234
24234
|
sendPollUpdate(e, t2) {
|
24235
|
-
let i2 =
|
24235
|
+
let i2 = yi[e], r2 = this.store.getState(ya(t2));
|
24236
24236
|
if (i2) {
|
24237
24237
|
let s2 = this.createNotification(i2, r2, "info");
|
24238
24238
|
this.emitEvent(s2);
|
@@ -24249,7 +24249,7 @@ var Pi = 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 Pi = class {
|
24253
24253
|
constructor(e) {
|
24254
24254
|
this.queuedUpdates = {};
|
24255
24255
|
this.timers = {};
|
@@ -24280,35 +24280,35 @@ function Pa(a11) {
|
|
24280
24280
|
return a11 instanceof se || a11 instanceof U2;
|
24281
24281
|
}
|
24282
24282
|
var Ea = (a11, e) => {
|
24283
|
-
let t2 =
|
24283
|
+
let t2 = Ct(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) ? (re(r2.auxiliaryTracks, s2.auxiliaryTracks) && (s2.auxiliaryTracks = r2.auxiliaryTracks), r2.groups && re(r2.groups, s2.groups) && (s2.groups = r2.groups), Object.assign(r2, s2)) : jr(r2, s2) ? delete a11[i2] :
|
24286
|
+
$e(r2, s2) ? (re(r2.auxiliaryTracks, s2.auxiliaryTracks) && (s2.auxiliaryTracks = r2.auxiliaryTracks), r2.groups && re(r2.groups, s2.groups) && (s2.groups = r2.groups), Object.assign(r2, s2)) : jr(r2, s2) ? delete a11[i2] : Ei(r2, s2) && (a11[i2] = s2);
|
24287
24287
|
}
|
24288
24288
|
};
|
24289
24289
|
var ba = (a11, e) => {
|
24290
|
-
let t2 =
|
24290
|
+
let t2 = Ct(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) ? (qr(r2, s2), Object.assign(r2, s2)) : jr(r2, s2) ? delete a11[i2] :
|
24293
|
+
$e(r2, s2) ? (qr(r2, s2), Object.assign(r2, s2)) : jr(r2, s2) ? delete a11[i2] : Ei(r2, s2) && (a11[i2] = s2);
|
24294
24294
|
}
|
24295
24295
|
};
|
24296
24296
|
var Ra = (a11, e) => {
|
24297
|
-
let t2 =
|
24297
|
+
let t2 = Ct(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 && re(r2.questions, s2.questions) && (s2.questions = r2.questions), Object.assign(r2, s2)) :
|
24300
|
+
$e(r2, s2) ? (r2.questions && re(r2.questions, s2.questions) && (s2.questions = r2.questions), Object.assign(r2, s2)) : Ei(r2, s2) && (a11[i2] = s2);
|
24301
24301
|
}
|
24302
24302
|
};
|
24303
24303
|
var Kr = (a11, e) => {
|
24304
|
-
let t2 =
|
24304
|
+
let t2 = Ct(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) : jr(r2, s2) ? delete a11[i2] :
|
24307
|
+
$e(r2, s2) ? Object.assign(r2, s2) : jr(r2, s2) ? delete a11[i2] : Ei(r2, s2) && (a11[i2] = s2);
|
24308
24308
|
}
|
24309
24309
|
};
|
24310
|
-
var
|
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 =
|
24310
|
+
var Ia = (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 = Ct(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 qr = (a11, e) => {
|
|
24322
24322
|
};
|
24323
24323
|
var $e = (a11, e) => a11 && e;
|
24324
24324
|
var jr = (a11, e) => a11 && !e;
|
24325
|
-
var
|
24325
|
+
var Ei = (a11, e) => !a11 && e;
|
24326
24326
|
var re = (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 re = (a11, e) => {
|
|
24333
24333
|
return false;
|
24334
24334
|
return true;
|
24335
24335
|
};
|
24336
|
-
var
|
24336
|
+
var Ct = (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 Lt = class {
|
24422
24422
|
constructor(e, t2, i2, r2) {
|
24423
24423
|
this.playlistManager = e;
|
24424
24424
|
this.syncPlaylistState = i2;
|
@@ -24489,7 +24489,7 @@ var Dt = class {
|
|
24489
24489
|
});
|
24490
24490
|
}
|
24491
24491
|
};
|
24492
|
-
var
|
24492
|
+
var bi = class {
|
24493
24493
|
constructor(e, t2) {
|
24494
24494
|
this.sdk = e;
|
24495
24495
|
this.setLocally = t2;
|
@@ -24516,7 +24516,7 @@ var Ri = class {
|
|
24516
24516
|
});
|
24517
24517
|
}
|
24518
24518
|
};
|
24519
|
-
var
|
24519
|
+
var Ri = 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
|
}
|
@@ -24525,9 +24525,9 @@ var Ai = class {
|
|
24525
24525
|
if (this.hasStarted)
|
24526
24526
|
return;
|
24527
24527
|
this.hasStarted = true, b2.d("starting audio level monitor for remote peers", this.store);
|
24528
|
-
let e = this.store.getState(
|
24528
|
+
let e = this.store.getState(_e);
|
24529
24529
|
b2.d("starting audio levels is connected to room", e), e && (yield this.monitorAudioLevels());
|
24530
|
-
let t2 = this.store.subscribe(this.monitorAudioLevels.bind(this),
|
24530
|
+
let t2 = this.store.subscribe(this.monitorAudioLevels.bind(this), _e);
|
24531
24531
|
this.unsubs.push(t2);
|
24532
24532
|
});
|
24533
24533
|
}
|
@@ -24538,7 +24538,7 @@ var Ai = class {
|
|
24538
24538
|
}
|
24539
24539
|
monitorAudioLevels() {
|
24540
24540
|
return c2(this, null, function* () {
|
24541
|
-
if (!this.store.getState(
|
24541
|
+
if (!this.store.getState(_e)) {
|
24542
24542
|
this.shouldMonitor && (b2.i("room no longer connected, stopping audio level monitoring for remote"), this.shouldMonitor = false);
|
24543
24543
|
return;
|
24544
24544
|
}
|
@@ -24592,7 +24592,7 @@ var Ai = class {
|
|
24592
24592
|
return Math.ceil(Math.min(Math.max(s2 * 100, 0), 100));
|
24593
24593
|
}
|
24594
24594
|
};
|
24595
|
-
var
|
24595
|
+
var Aa = 2e4;
|
24596
24596
|
var Ha = 1e4;
|
24597
24597
|
var ot = { name: "diagnostics-role", priority: 1, publishParams: { allowed: ["audio", "video"], audio: { bitRate: 32, codec: "opus" }, video: { bitRate: 100, codec: "vp8", frameRate: 30, height: 720, width: 1280 }, screen: { bitRate: 100, codec: "vp8", frameRate: 10, height: 1080, width: 1920 } }, subscribeParams: { subscribeToRoles: [], maxSubsBitRate: 3200 }, permissions: { browserRecording: false, changeRole: false, endRoom: false, hlsStreaming: false, mute: false, pollRead: false, pollWrite: false, removeOthers: false, rtmpStreaming: false, unmute: false } };
|
24598
24598
|
var Ca = "https://100ms.live/test-audio.wav";
|
@@ -24618,11 +24618,11 @@ var Ii = class {
|
|
24618
24618
|
};
|
24619
24619
|
var tn2 = (a11) => !!a11 && !isNaN(a11);
|
24620
24620
|
var de = (a11) => a11[a11.length - 1];
|
24621
|
-
var
|
24621
|
+
var Ne = (a11, e) => {
|
24622
24622
|
let t2 = a11.filter((i2) => tn2(e(i2)));
|
24623
24623
|
return t2.reduce((i2, r2) => i2 + (e(r2) || 0), 0) / t2.length;
|
24624
24624
|
};
|
24625
|
-
var
|
24625
|
+
var Ai = class {
|
24626
24626
|
constructor(e) {
|
24627
24627
|
this.sdk = e;
|
24628
24628
|
this.peerStatsList = [];
|
@@ -24633,36 +24633,36 @@ var Hi = class {
|
|
24633
24633
|
}
|
24634
24634
|
handleStatsUpdate(e) {
|
24635
24635
|
return c2(this, null, function* () {
|
24636
|
-
var n2, l2, u2, p2, h2, T, g2,
|
24636
|
+
var n2, l2, u2, p2, h2, T, g2, f2;
|
24637
24637
|
let t2 = e.getLocalPeerStats();
|
24638
24638
|
t2 && this.peerStatsList.push(t2);
|
24639
24639
|
let i2 = (u2 = (l2 = (n2 = this.sdk.getLocalPeer()) == null ? void 0 : n2.audioTrack) == null ? void 0 : l2.nativeTrack) == null ? void 0 : u2.id, r2 = (T = (h2 = (p2 = this.sdk.getLocalPeer()) == null ? void 0 : p2.videoTrack) == null ? void 0 : h2.nativeTrack) == null ? void 0 : T.id, s2 = e.getLocalTrackStats();
|
24640
24640
|
s2 && (i2 && this.localAudioTrackStatsList.push(s2[i2]), r2 && this.localVideoTrackStatsList.push(s2[r2]));
|
24641
|
-
let o2 = yield (
|
24642
|
-
o2 == null || o2.forEach((
|
24643
|
-
if (
|
24644
|
-
let k2 =
|
24645
|
-
k2.push(M2(m({},
|
24641
|
+
let o2 = yield (f2 = (g2 = this.sdk.getWebrtcInternals()) == null ? void 0 : g2.getSubscribePeerConnection()) == null ? void 0 : f2.getStats();
|
24642
|
+
o2 == null || o2.forEach((P7) => {
|
24643
|
+
if (P7.type === "inbound-rtp") {
|
24644
|
+
let k2 = P7.kind === "audio" ? this.remoteAudioTrackStatsList : this.remoteVideoTrackStatsList, w2 = Pt("bytesReceived", P7, de(k2));
|
24645
|
+
k2.push(M2(m({}, P7), { bitrate: w2 }));
|
24646
24646
|
}
|
24647
24647
|
});
|
24648
24648
|
});
|
24649
24649
|
}
|
24650
24650
|
buildReport() {
|
24651
|
-
var T, g2,
|
24652
|
-
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 = ((
|
24653
|
-
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:
|
24651
|
+
var T, g2, f2, P7, k2, w2, Oe, Xt;
|
24652
|
+
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 = ((f2 = de(this.remoteAudioTrackStatsList)) == null ? void 0 : f2.packetsReceived) || 0, n2 = ((P7 = de(this.remoteVideoTrackStatsList)) == null ? void 0 : P7.packetsReceived) || 0, l2 = this.localAudioTrackStatsList.map((x2) => x2 ? Ne(Object.values(x2), ($) => $.bitrate) : 0), u2 = this.localVideoTrackStatsList.map((x2) => x2 ? Ne(Object.values(x2), ($) => $.bitrate) : 0), p2 = de(this.localAudioTrackStatsList), h2 = de(this.localVideoTrackStatsList);
|
24653
|
+
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: Ne(this.peerStatsList, (x2) => {
|
24654
24654
|
var $;
|
24655
24655
|
return ($ = x2.publish) == null ? void 0 : $.bitrate;
|
24656
|
-
}), bitrateReceived:
|
24656
|
+
}), bitrateReceived: Ne(this.peerStatsList, (x2) => {
|
24657
24657
|
var $;
|
24658
24658
|
return ($ = x2.subscribe) == null ? void 0 : $.bitrate;
|
24659
|
-
}) }, audio: { roundTripTime: s2, packetsReceived: o2, packetsLost: ((k2 = de(this.remoteAudioTrackStatsList)) == null ? void 0 : k2.packetsLost) || 0, bytesReceived: ((w2 = de(this.remoteAudioTrackStatsList)) == null ? void 0 : w2.bytesReceived) || 0, bitrateSent:
|
24659
|
+
}) }, audio: { roundTripTime: s2, packetsReceived: o2, packetsLost: ((k2 = de(this.remoteAudioTrackStatsList)) == null ? void 0 : k2.packetsLost) || 0, bytesReceived: ((w2 = de(this.remoteAudioTrackStatsList)) == null ? void 0 : w2.bytesReceived) || 0, bitrateSent: Ne(l2, (x2) => x2), bitrateReceived: Ne(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: ((Xt = de(this.remoteVideoTrackStatsList)) == null ? void 0 : Xt.bytesReceived) || 0, packetsReceived: n2, bitrateSent: Ne(u2, (x2) => x2), bitrateReceived: Ne(this.remoteVideoTrackStatsList, (x2) => x2.bitrate), bytesSent: h2 ? Object.values(h2).reduce((x2, $) => x2 + ($.bytesSent || 0), 0) : 0 } };
|
24660
24660
|
}
|
24661
24661
|
};
|
24662
24662
|
var rn2 = ((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))(rn2 || {});
|
24663
24663
|
var La;
|
24664
24664
|
var Da;
|
24665
|
-
var
|
24665
|
+
var Hi = class {
|
24666
24666
|
constructor(e, t2, i2, r2) {
|
24667
24667
|
this.sdk = e;
|
24668
24668
|
this.sdkListener = t2;
|
@@ -24703,7 +24703,7 @@ var Ci = class {
|
|
24703
24703
|
});
|
24704
24704
|
this.cqsCalculator.pushScore(t3 == null ? void 0 : t3.downlinkQuality);
|
24705
24705
|
};
|
24706
|
-
this.statsCollector = new
|
24706
|
+
this.statsCollector = new Ai(e), this.state = 0;
|
24707
24707
|
}
|
24708
24708
|
get state() {
|
24709
24709
|
return this._state;
|
@@ -24744,7 +24744,7 @@ var Ci = class {
|
|
24744
24744
|
var t2, i2;
|
24745
24745
|
this.sdkListener.onJoin(e), (t2 = this.sdk.getWebrtcInternals()) == null || t2.onStatsChange((r2) => this.statsCollector.handleStatsUpdate(r2)), (i2 = this.sdk.getWebrtcInternals()) == null || i2.start(), this.cleanupTimer = window.setTimeout(() => {
|
24746
24746
|
this.cleanupAndReport();
|
24747
|
-
},
|
24747
|
+
}, Aa);
|
24748
24748
|
}
|
24749
24749
|
onError(e) {
|
24750
24750
|
this.sdkListener.onError(e), this.errors.push(e), e != null && e.isTerminal && this.cleanupAndReport();
|
@@ -24769,7 +24769,7 @@ var Ci = class {
|
|
24769
24769
|
}
|
24770
24770
|
cleanupAndReport() {
|
24771
24771
|
var e;
|
24772
|
-
clearTimeout(this.cleanupTimer), this.cleanupTimer = void 0, this.state === 5 &&
|
24772
|
+
clearTimeout(this.cleanupTimer), this.cleanupTimer = void 0, this.state === 5 && (this.state = 6), (e = this.completionCallback) == null || e.call(this, this.buildReport()), this.sdk.leave();
|
24773
24773
|
}
|
24774
24774
|
buildReport() {
|
24775
24775
|
this.cqsCalculator.addPendingCQSTillNow();
|
@@ -24777,7 +24777,7 @@ var Ci = class {
|
|
24777
24777
|
return { testTimestamp: this.timestamp, connectivityState: this.state, errors: this.errors, signallingReport: { isConnected: this.wsConnected, isInitConnected: this.initConnected, websocketUrl: this.websocketURL }, mediaServerReport: { stats: t2, connectionQualityScore: e, isPublishICEConnected: this.isPublishICEConnected, isSubscribeICEConnected: this.isSubscribeICEConnected, publishICECandidatePairSelected: this.selectedPublishICECandidate, subscribeICECandidatePairSelected: this.selectedSubscribeICECandidate, publishIceCandidatesGathered: this.gatheredPublishICECandidates, subscribeIceCandidatesGathered: this.gatheredSubscribeICECandidates } };
|
24778
24778
|
}
|
24779
24779
|
};
|
24780
|
-
var
|
24780
|
+
var Ke = class {
|
24781
24781
|
constructor(e) {
|
24782
24782
|
this.recording = { server: { running: false }, browser: { running: false }, hls: { running: false } };
|
24783
24783
|
this.rtmp = { running: false };
|
@@ -24786,7 +24786,7 @@ var Ne = class {
|
|
24786
24786
|
this.id = e;
|
24787
24787
|
}
|
24788
24788
|
};
|
24789
|
-
var
|
24789
|
+
var Ci = (a11, e, t2) => c2(void 0, null, function* () {
|
24790
24790
|
let r2 = Error("something went wrong during fetch");
|
24791
24791
|
for (let s2 = 0; s2 < 4; s2++)
|
24792
24792
|
try {
|
@@ -24799,38 +24799,28 @@ var Li = (a11, e, t2) => c2(void 0, null, function* () {
|
|
24799
24799
|
}
|
24800
24800
|
throw ["Failed to fetch", "NetworkError"].some((s2) => r2.message.includes(s2)) ? S2.APIErrors.EndpointUnreachable("GET_TOKEN", r2.message) : r2;
|
24801
24801
|
});
|
24802
|
-
|
24803
|
-
if (!a11 || a11.length === 0)
|
24804
|
-
throw S2.APIErrors.InvalidTokenFormat("INIT", "Token cannot be an empty string or undefined or null");
|
24805
|
-
let e = a11.split(".");
|
24806
|
-
if (e.length !== 3)
|
24807
|
-
throw S2.APIErrors.InvalidTokenFormat("INIT", "Expected 3 '.' separate fields - header, payload and signature respectively");
|
24808
|
-
let t2 = atob(e[1]);
|
24809
|
-
try {
|
24810
|
-
let i2 = JSON.parse(t2);
|
24811
|
-
return { roomId: i2.room_id, userId: i2.user_id, role: i2.role };
|
24812
|
-
} catch (i2) {
|
24813
|
-
throw S2.APIErrors.InvalidTokenFormat("INIT", `couldn't parse to json - ${i2.message}`);
|
24814
|
-
}
|
24815
|
-
}
|
24816
|
-
var wt = class {
|
24802
|
+
var Dt = class {
|
24817
24803
|
constructor(e, t2) {
|
24818
24804
|
this.sdk = e;
|
24819
24805
|
this.sdkListener = t2;
|
24820
24806
|
this.recordedAudio = Ca;
|
24821
|
-
this.initSdkWithLocalPeer();
|
24807
|
+
this.sdk.setIsDiagnostics(true), this.initSdkWithLocalPeer();
|
24822
24808
|
}
|
24823
24809
|
get localPeer() {
|
24824
24810
|
var e;
|
24825
24811
|
return (e = this.sdk) == null ? void 0 : e.store.getLocalPeer();
|
24826
24812
|
}
|
24827
24813
|
checkBrowserSupport() {
|
24828
|
-
|
24814
|
+
gt(), St();
|
24829
24815
|
}
|
24830
24816
|
requestPermission(e) {
|
24831
24817
|
return c2(this, null, function* () {
|
24832
|
-
|
24833
|
-
|
24818
|
+
try {
|
24819
|
+
let t2 = yield navigator.mediaDevices.getUserMedia(e);
|
24820
|
+
return t2.getTracks().forEach((i2) => i2.stop()), yield this.sdk.deviceManager.init(true), { audio: t2.getAudioTracks().length > 0, video: t2.getVideoTracks().length > 0 };
|
24821
|
+
} catch (t2) {
|
24822
|
+
throw Ae(t2, this.sdk.localTrackManager.getErrorType(!!e.video, !!e.audio));
|
24823
|
+
}
|
24834
24824
|
});
|
24835
24825
|
}
|
24836
24826
|
startCameraCheck(e) {
|
@@ -24839,7 +24829,7 @@ var wt = class {
|
|
24839
24829
|
if (this.initSdkWithLocalPeer(), !this.localPeer)
|
24840
24830
|
throw new Error("Local peer not found");
|
24841
24831
|
this.sdk.store.setSimulcastEnabled(false), this.localPeer.role = M2(m({}, ot), { publishParams: M2(m({}, ot.publishParams), { allowed: ["video"] }) });
|
24842
|
-
let t2 = new
|
24832
|
+
let t2 = new De().video(new z2().deviceId(e || "default").build()).build(), i2 = yield (s2 = this.sdk) == null ? void 0 : s2.localTrackManager.getLocalTracks({ audio: false, video: true }, t2), r2 = i2 == null ? void 0 : i2.find((u2) => u2.type === "video");
|
24843
24833
|
if (!r2)
|
24844
24834
|
throw new Error("No video track found");
|
24845
24835
|
(o2 = this.sdk) == null || o2.deviceManager.init(true), this.localPeer.videoTrack = r2, (l2 = (n2 = this.sdk) == null ? void 0 : n2.listener) == null || l2.onPeerUpdate(9, [this.localPeer]);
|
@@ -24849,26 +24839,32 @@ var wt = class {
|
|
24849
24839
|
var e, t2;
|
24850
24840
|
(t2 = (e = this.localPeer) == null ? void 0 : e.videoTrack) == null || t2.cleanup(), this.localPeer && (this.localPeer.videoTrack = void 0);
|
24851
24841
|
}
|
24852
|
-
startMicCheck(
|
24853
|
-
return c2(this, arguments, function* (e, t2, i2 = Ha) {
|
24854
|
-
var
|
24855
|
-
this.initSdkWithLocalPeer()
|
24842
|
+
startMicCheck(s2) {
|
24843
|
+
return c2(this, arguments, function* ({ inputDevice: e, onError: t2, onStop: i2, time: r2 = Ha }) {
|
24844
|
+
var u2, p2, h2, T;
|
24845
|
+
this.initSdkWithLocalPeer((g2) => {
|
24846
|
+
this.stopMicCheck(), t2 == null || t2(g2);
|
24847
|
+
});
|
24856
24848
|
let o2 = yield this.getLocalAudioTrack(e);
|
24857
|
-
if ((
|
24849
|
+
if ((u2 = this.sdk) == null || u2.deviceManager.init(true), !this.localPeer)
|
24858
24850
|
throw new Error("Local peer not found");
|
24859
24851
|
if (!o2)
|
24860
24852
|
throw new Error("No audio track found");
|
24861
|
-
this.localPeer.audioTrack = o2, (
|
24853
|
+
this.localPeer.audioTrack = o2, (p2 = this.sdk) == null || p2.initPreviewTrackAudioLevelMonitor(), (T = (h2 = this.sdk) == null ? void 0 : h2.listener) == null || T.onPeerUpdate(9, [this.localPeer]), this.mediaRecorder = new MediaRecorder(o2.stream.nativeStream);
|
24862
24854
|
let n2 = [];
|
24863
|
-
this.mediaRecorder.ondataavailable = function(
|
24864
|
-
n2.push(
|
24855
|
+
this.mediaRecorder.ondataavailable = function(g2) {
|
24856
|
+
n2.push(g2.data);
|
24865
24857
|
}, this.mediaRecorder.onstop = () => {
|
24866
|
-
var
|
24867
|
-
let
|
24868
|
-
this.recordedAudio = URL.createObjectURL(
|
24869
|
-
}, this.mediaRecorder.start()
|
24870
|
-
|
24871
|
-
|
24858
|
+
var f2, P7;
|
24859
|
+
let g2 = new Blob(n2, { type: (f2 = this.mediaRecorder) == null ? void 0 : f2.mimeType });
|
24860
|
+
this.recordedAudio = URL.createObjectURL(g2), (P7 = this.onStopMicCheck) == null || P7.call(this);
|
24861
|
+
}, this.mediaRecorder.start();
|
24862
|
+
let l2 = setTimeout(() => {
|
24863
|
+
this.stopMicCheck();
|
24864
|
+
}, r2);
|
24865
|
+
this.onStopMicCheck = () => {
|
24866
|
+
clearTimeout(l2), i2 == null || i2();
|
24867
|
+
};
|
24872
24868
|
});
|
24873
24869
|
}
|
24874
24870
|
stopMicCheck() {
|
@@ -24880,14 +24876,13 @@ var wt = class {
|
|
24880
24876
|
}
|
24881
24877
|
startConnectivityCheck(e, t2, i2) {
|
24882
24878
|
return c2(this, null, function* () {
|
24883
|
-
var o2;
|
24884
24879
|
if (!this.sdk)
|
24885
24880
|
throw new Error("SDK not found");
|
24886
|
-
this.connectivityCheck = new
|
24887
|
-
let r2 = yield this.getAuthToken(i2)
|
24888
|
-
yield this.sdk.leave(),
|
24889
|
-
var
|
24890
|
-
(
|
24881
|
+
this.connectivityCheck = new Hi(this.sdk, this.sdkListener, e, t2);
|
24882
|
+
let r2 = yield this.getAuthToken(i2);
|
24883
|
+
yield this.sdk.leave(), yield this.sdk.join({ authToken: r2, userName: "diagnostics-test" }, this.connectivityCheck), this.sdk.addConnectionQualityListener({ onConnectionQualityUpdate: (s2) => {
|
24884
|
+
var o2;
|
24885
|
+
(o2 = this.connectivityCheck) == null || o2.handleConnectionQualityUpdate(s2);
|
24891
24886
|
} });
|
24892
24887
|
});
|
24893
24888
|
}
|
@@ -24897,19 +24892,21 @@ var wt = class {
|
|
24897
24892
|
return (e = this.connectivityCheck) == null ? void 0 : e.cleanupAndReport();
|
24898
24893
|
});
|
24899
24894
|
}
|
24900
|
-
initSdkWithLocalPeer() {
|
24901
|
-
var
|
24902
|
-
this.sdkListener && ((
|
24903
|
-
|
24904
|
-
|
24905
|
-
let t2 = new
|
24906
|
-
|
24895
|
+
initSdkWithLocalPeer(e) {
|
24896
|
+
var r2, s2, o2;
|
24897
|
+
this.sdkListener && ((r2 = this.sdk) == null || r2.initStoreAndManagers(M2(m({}, this.sdkListener), { onError: (n2) => {
|
24898
|
+
e == null || e(n2), this.sdkListener.onError(n2);
|
24899
|
+
} })));
|
24900
|
+
let t2 = new We({ name: "diagnostics-peer", role: ot, type: "regular" });
|
24901
|
+
(s2 = this.sdk) == null || s2.store.addPeer(t2);
|
24902
|
+
let i2 = new Ke("diagnostics-room");
|
24903
|
+
this.sdk.store.setRoom(i2), this.sdkListener.onRoomUpdate("ROOM_PEER_COUNT_UPDATED", i2), (o2 = this.sdk) == null || o2.deviceManager.init(true);
|
24907
24904
|
}
|
24908
24905
|
getAuthToken(e) {
|
24909
24906
|
return c2(this, null, function* () {
|
24910
|
-
let t2 = new URL("https://api
|
24907
|
+
let t2 = new URL("https://api.100ms.live/v2/diagnostics/token");
|
24911
24908
|
e && t2.searchParams.append("region", e);
|
24912
|
-
let i2 = yield
|
24909
|
+
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();
|
24913
24910
|
if (!i2.ok)
|
24914
24911
|
throw S2.APIErrors.ServerErrors(r2.code, "GET_TOKEN", r2.message, false);
|
24915
24912
|
let { token: s2 } = r2;
|
@@ -24924,12 +24921,12 @@ var wt = class {
|
|
24924
24921
|
if (!this.localPeer)
|
24925
24922
|
return;
|
24926
24923
|
this.localPeer.role = M2(m({}, ot), { publishParams: M2(m({}, ot.publishParams), { allowed: ["audio"] }) });
|
24927
|
-
let t2 = new
|
24924
|
+
let t2 = new De().audio(new ee().deviceId(e || "default").build()).build(), i2 = yield (r2 = this.sdk) == null ? void 0 : r2.localTrackManager.getLocalTracks({ audio: true, video: false }, t2);
|
24928
24925
|
return i2 == null ? void 0 : i2.find((s2) => s2.type === "audio");
|
24929
24926
|
});
|
24930
24927
|
}
|
24931
24928
|
};
|
24932
|
-
var
|
24929
|
+
var Li = class {
|
24933
24930
|
constructor(e, t2, i2) {
|
24934
24931
|
this.isRoomJoinCalled = false;
|
24935
24932
|
this.ignoredMessageTypes = [];
|
@@ -24944,13 +24941,13 @@ var Di = class {
|
|
24944
24941
|
}, e2);
|
24945
24942
|
};
|
24946
24943
|
this.sendPeerUpdateNotification = (e2, t3) => {
|
24947
|
-
let i3 = this.store.getState(
|
24944
|
+
let i3 = this.store.getState(X2(t3.peerId)), r2 = Mi[e2] || "peerUpdate";
|
24948
24945
|
if (e2 === 8)
|
24949
24946
|
this.syncRoomState(r2), this.updateMidCallPreviewRoomState(e2, t3);
|
24950
24947
|
else if ([0, 1].includes(e2))
|
24951
|
-
this.syncRoomState(r2), i3 || (i3 = this.store.getState(
|
24948
|
+
this.syncRoomState(r2), i3 || (i3 = this.store.getState(X2(t3.peerId)));
|
24952
24949
|
else if ([12, 13, 14].includes(e2))
|
24953
|
-
this.syncRoomState(r2), i3 || (i3 = this.store.getState(
|
24950
|
+
this.syncRoomState(r2), i3 || (i3 = this.store.getState(X2(t3.peerId)));
|
24954
24951
|
else {
|
24955
24952
|
let s2 = _2.convertPeer(t3);
|
24956
24953
|
this.setState((o2) => {
|
@@ -24962,7 +24959,7 @@ var Di = class {
|
|
24962
24959
|
};
|
24963
24960
|
this.getSDKHMSPeer = (e2) => this.sdk.getPeerMap()[e2];
|
24964
24961
|
this.setState = (e2, t3) => this.store.namedSetState(e2, t3);
|
24965
|
-
this.store = e, this.sdk = t2, this.hmsNotifications = i2, this.sessionStore = new
|
24962
|
+
this.store = e, this.sdk = t2, this.hmsNotifications = i2, this.sessionStore = new bi(this.sdk, this.setSessionStoreValueLocally.bind(this)), this.actionBatcher = new Pi(e);
|
24966
24963
|
}
|
24967
24964
|
getLocalTrack(e) {
|
24968
24965
|
return this.sdk.store.getLocalPeerTracks().find((t2) => t2.trackId === e);
|
@@ -25067,7 +25064,7 @@ var Di = class {
|
|
25067
25064
|
}
|
25068
25065
|
leave() {
|
25069
25066
|
return c2(this, null, function* () {
|
25070
|
-
let e = this.store.getState(
|
25067
|
+
let e = this.store.getState(_e), t2 = true;
|
25071
25068
|
e || (t2 = false, this.logPossibleInconsistency("room leave is called when no room is connected"));
|
25072
25069
|
let i2 = this.store.getState(ie);
|
25073
25070
|
return this.setState((r2) => {
|
@@ -25109,7 +25106,7 @@ var Di = class {
|
|
25109
25106
|
}
|
25110
25107
|
setLocalVideoEnabled(e) {
|
25111
25108
|
return c2(this, null, function* () {
|
25112
|
-
let t2 = this.store.getState(
|
25109
|
+
let t2 = this.store.getState(Y2);
|
25113
25110
|
t2 && (yield this.setEnabledTrack(t2, e));
|
25114
25111
|
});
|
25115
25112
|
}
|
@@ -25142,13 +25139,13 @@ var Di = class {
|
|
25142
25139
|
}
|
25143
25140
|
setVideoSettings(e) {
|
25144
25141
|
return c2(this, null, function* () {
|
25145
|
-
let t2 = this.store.getState(
|
25142
|
+
let t2 = this.store.getState(Y2);
|
25146
25143
|
t2 && (yield this.setSDKLocalVideoTrackSettings(t2, e), this.syncRoomState("setVideoSettings"));
|
25147
25144
|
});
|
25148
25145
|
}
|
25149
25146
|
switchCamera() {
|
25150
25147
|
return c2(this, null, function* () {
|
25151
|
-
let e = this.store.getState(
|
25148
|
+
let e = this.store.getState(Y2);
|
25152
25149
|
if (e) {
|
25153
25150
|
let t2 = this.sdk.store.getLocalPeerTracks().find((i2) => i2.trackId === e);
|
25154
25151
|
t2 && (yield t2.switchCamera(), this.syncRoomState("switchCamera"));
|
@@ -25235,7 +25232,7 @@ var Di = class {
|
|
25235
25232
|
let t2 = {};
|
25236
25233
|
if (t2.isSupported = false, !e)
|
25237
25234
|
return b2.w("no plugin passed in for checking support"), t2.errMsg = "no plugin passed in for checking support", t2;
|
25238
|
-
let i2 = this.store.getState(
|
25235
|
+
let i2 = this.store.getState(Y2);
|
25239
25236
|
if (!i2)
|
25240
25237
|
return b2.w("video Track not added to local peer yet"), t2.errMsg = "call this function only after local peer has video track", t2;
|
25241
25238
|
let r2 = this.getTrackById(i2);
|
@@ -25466,16 +25463,16 @@ var Di = class {
|
|
25466
25463
|
}
|
25467
25464
|
enableBeamSpeakerLabelsLogging() {
|
25468
25465
|
return c2(this, null, function* () {
|
25469
|
-
this.beamSpeakerLabelsLogger || (b2.i("enabling beam speaker labels logging"), this.beamSpeakerLabelsLogger = new
|
25466
|
+
this.beamSpeakerLabelsLogger || (b2.i("enabling beam speaker labels logging"), this.beamSpeakerLabelsLogger = new Ri(this.store, this), yield this.beamSpeakerLabelsLogger.start());
|
25470
25467
|
});
|
25471
25468
|
}
|
25472
25469
|
initDiagnostics() {
|
25473
|
-
let e = new
|
25470
|
+
let e = new Dt(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) });
|
25474
25471
|
return this.sdk.addAudioListener({ onAudioLevelUpdate: this.onAudioLevelUpdate.bind(this) }), this.sdk.addConnectionQualityListener({ onConnectionQualityUpdate: this.onConnectionQualityUpdate.bind(this) }), e;
|
25475
25472
|
}
|
25476
25473
|
resetState(e = "resetState") {
|
25477
25474
|
this.isRoomJoinCalled = false, b2.cleanup(), this.setState((t2) => {
|
25478
|
-
Object.assign(t2,
|
25475
|
+
Object.assign(t2, ei());
|
25479
25476
|
}, e);
|
25480
25477
|
}
|
25481
25478
|
sdkJoinWithListeners(e) {
|
@@ -25485,7 +25482,7 @@ var Di = class {
|
|
25485
25482
|
}
|
25486
25483
|
onRemovedFromRoom(e) {
|
25487
25484
|
var r2;
|
25488
|
-
let t2 = this.store.getState(
|
25485
|
+
let t2 = this.store.getState(X2((r2 = e.requestedBy) == null ? void 0 : r2.peerId));
|
25489
25486
|
this.hmsNotifications.sendLeaveRoom(M2(m({}, e), { requestedBy: t2 || void 0 }));
|
25490
25487
|
let i2 = e.roomEnded || !t2 ? "roomEnded" : "removedFromRoom";
|
25491
25488
|
b2.i(`resetting state after peer removed ${i2}`, e), this.resetState(i2);
|
@@ -25520,7 +25517,7 @@ var Di = class {
|
|
25520
25517
|
this.setSessionStoreValueLocally(e, "sessionStoreUpdate");
|
25521
25518
|
}
|
25522
25519
|
onPollsUpdate(e, t2) {
|
25523
|
-
let i2 =
|
25520
|
+
let i2 = yi[e];
|
25524
25521
|
this.setState((r2) => {
|
25525
25522
|
let s2 = t2.reduce((o2, n2) => {
|
25526
25523
|
var l2;
|
@@ -25557,10 +25554,10 @@ var Di = class {
|
|
25557
25554
|
e = `${e}_fullSync`, b2.time(`store-sync-${e}`);
|
25558
25555
|
let t2 = {}, i2 = [], r2 = {}, s2 = {}, o2 = {}, n2, l2 = this.sdk.getPeers();
|
25559
25556
|
for (let g2 of l2) {
|
25560
|
-
let
|
25561
|
-
t2[
|
25562
|
-
let
|
25563
|
-
for (let k2 of
|
25557
|
+
let f2 = _2.convertPeer(g2);
|
25558
|
+
t2[f2.id] = f2, i2.push(f2.id), o2[f2.id] = { peerID: f2.id, downlinkQuality: g2.networkQuality || -1 };
|
25559
|
+
let P7 = [g2.audioTrack, g2.videoTrack, ...g2.auxiliaryTracks];
|
25560
|
+
for (let k2 of P7) {
|
25564
25561
|
if (!k2)
|
25565
25562
|
continue;
|
25566
25563
|
let w2 = _2.convertTrack(k2);
|
@@ -25575,8 +25572,8 @@ var Di = class {
|
|
25575
25572
|
this.setState((g2) => {
|
25576
25573
|
var k2;
|
25577
25574
|
g2.room.peers = i2;
|
25578
|
-
let
|
25579
|
-
Ea(
|
25575
|
+
let f2 = g2.peers, P7 = g2.tracks;
|
25576
|
+
Ea(f2, t2), ba(P7, r2), Object.assign(g2.settings, s2), g2.room.isConnected && Object.assign(g2.connectionQualities, o2), (k2 = g2.preview) != null && k2.localPeer && (n2 != null && n2.localPeer) ? Object.assign(g2.preview, n2) : g2.preview = n2, Object.assign(g2.roles, _2.convertRoles(this.sdk.getRoles())), Object.assign(g2.playlist, _2.convertPlaylist(this.sdk.getPlaylistManager())), Object.assign(g2.room, _2.convertRecordingStreamingState(u2, p2, h2, T)), Object.assign(g2.templateAppData, this.sdk.getTemplateAppData());
|
25580
25577
|
}, e), b2.timeEnd(`store-sync-${e}`);
|
25581
25578
|
}
|
25582
25579
|
onPreview(e) {
|
@@ -25587,7 +25584,7 @@ var Di = class {
|
|
25587
25584
|
}
|
25588
25585
|
onJoin(e) {
|
25589
25586
|
let t2 = this.sdk.getPlaylistManager();
|
25590
|
-
this.audioPlaylist = new
|
25587
|
+
this.audioPlaylist = new Lt(t2, "audio", this.syncPlaylistState.bind(this), this.store), this.videoPlaylist = new Lt(t2, "video", this.syncRoomState.bind(this), this.store), this.syncRoomState("joinSync"), this.setState((i2) => {
|
25591
25588
|
var r2;
|
25592
25589
|
Object.assign(i2.room, _2.convertRoom(e, (r2 = this.sdk.getLocalPeer()) == null ? void 0 : r2.peerId)), i2.room.isConnected = true, i2.room.roomState = "Connected";
|
25593
25590
|
}, "joined"), t2.onProgress(this.setProgress), t2.onNewTrackStart((i2) => {
|
@@ -25607,17 +25604,17 @@ var Di = class {
|
|
25607
25604
|
onPeerUpdate(e, t2) {
|
25608
25605
|
if (![4, 5].includes(e)) {
|
25609
25606
|
if (Array.isArray(t2)) {
|
25610
|
-
let i2 = this.store.getState(
|
25611
|
-
if (this.syncRoomState("peersJoined"), this.store.getState(
|
25607
|
+
let i2 = this.store.getState(K), r2 = t2.filter((o2) => !i2[o2.peerId]);
|
25608
|
+
if (this.syncRoomState("peersJoined"), this.store.getState(_e)) {
|
25612
25609
|
let o2 = [];
|
25613
25610
|
for (let n2 of t2) {
|
25614
|
-
let l2 = this.store.getState(
|
25611
|
+
let l2 = this.store.getState(X2(n2.peerId));
|
25615
25612
|
l2 && o2.push(l2);
|
25616
25613
|
}
|
25617
25614
|
this.hmsNotifications.sendPeerList(o2);
|
25618
25615
|
} else
|
25619
25616
|
r2.forEach((o2) => {
|
25620
|
-
let n2 = this.store.getState(
|
25617
|
+
let n2 = this.store.getState(X2(o2.peerId));
|
25621
25618
|
n2 && this.hmsNotifications.sendPeerUpdate(0, n2);
|
25622
25619
|
});
|
25623
25620
|
return;
|
@@ -25629,10 +25626,10 @@ var Di = class {
|
|
25629
25626
|
if (e === 1)
|
25630
25627
|
this.hmsNotifications.sendTrackUpdate(e, t2.trackId), this.handleTrackRemove(t2, i2);
|
25631
25628
|
else if ([0, 1].includes(e)) {
|
25632
|
-
let r2 =
|
25629
|
+
let r2 = Ht[e];
|
25633
25630
|
this.syncRoomState(r2), this.hmsNotifications.sendTrackUpdate(e, t2.trackId);
|
25634
25631
|
} else {
|
25635
|
-
let r2 =
|
25632
|
+
let r2 = Ht[e] || "trackUpdate", s2 = _2.convertTrack(t2);
|
25636
25633
|
this.setState((o2) => {
|
25637
25634
|
let n2 = o2.tracks[s2.id];
|
25638
25635
|
$e(n2, s2) && (qr(n2, s2), Object.assign(n2, s2));
|
@@ -25672,14 +25669,14 @@ var Di = class {
|
|
25672
25669
|
}
|
25673
25670
|
onChangeTrackStateRequest(e) {
|
25674
25671
|
var s2;
|
25675
|
-
let t2 = this.store.getState(
|
25672
|
+
let t2 = this.store.getState(X2((s2 = e.requestedBy) == null ? void 0 : s2.peerId)), i2 = this.getStoreLocalTrackIDfromSDKTrack(e.track), r2 = this.store.getState(fi(i2));
|
25676
25673
|
if (!r2)
|
25677
25674
|
return this.logPossibleInconsistency(`Not found track for which track state change was requested, ${e.track}`);
|
25678
25675
|
e.enabled || this.syncRoomState("changeTrackStateRequest"), this.hmsNotifications.sendChangeTrackStateRequest({ requestedBy: t2 || void 0, track: r2, enabled: e.enabled });
|
25679
25676
|
}
|
25680
25677
|
onChangeMultiTrackStateRequest(e) {
|
25681
25678
|
var s2;
|
25682
|
-
let t2 = this.store.getState(
|
25679
|
+
let t2 = this.store.getState(X2((s2 = e.requestedBy) == null ? void 0 : s2.peerId));
|
25683
25680
|
e.enabled || this.syncRoomState("changeMultiTrackStateRequest");
|
25684
25681
|
let i2 = [], r2 = this.store.getState(N2);
|
25685
25682
|
for (let o2 of e.tracks) {
|
@@ -25705,7 +25702,7 @@ var Di = class {
|
|
25705
25702
|
i2.room.roomState = "Failed", i2.errors.push(t2);
|
25706
25703
|
}, "errorTerminal")) : this.store.getState().errors.length < 50 && this.setState((r2) => {
|
25707
25704
|
r2.errors.push(t2);
|
25708
|
-
}, "error"), this.syncRoomState("errorSync"), this.hmsNotifications.sendError(t2), b2.e("received error from sdk", t2 instanceof
|
25705
|
+
}, "error"), this.syncRoomState("errorSync"), this.hmsNotifications.sendError(t2), b2.e("received error from sdk", t2 instanceof v2 ? `${t2}` : t2);
|
25709
25706
|
}
|
25710
25707
|
handleTrackRemove(e, t2) {
|
25711
25708
|
this.setState((i2) => {
|
@@ -25755,7 +25752,7 @@ var Di = class {
|
|
25755
25752
|
setTrackVolume(e, t2) {
|
25756
25753
|
return c2(this, null, function* () {
|
25757
25754
|
let i2 = this.getTrackById(t2);
|
25758
|
-
i2 ? i2 instanceof
|
25755
|
+
i2 ? i2 instanceof Ie ? (yield i2.setVolume(e), this.setState((r2) => {
|
25759
25756
|
let s2 = r2.tracks[t2];
|
25760
25757
|
s2 && s2.type === "audio" && (s2.volume = e);
|
25761
25758
|
}, "trackVolume")) : b2.w(`track ${t2} is not an audio track`) : this.logPossibleInconsistency(`track ${t2} not present, unable to set volume`);
|
@@ -25777,7 +25774,7 @@ var Di = class {
|
|
25777
25774
|
b2.w("Invalid plugin received in store");
|
25778
25775
|
return;
|
25779
25776
|
}
|
25780
|
-
let r2 = this.store.getState(
|
25777
|
+
let r2 = this.store.getState(Y2);
|
25781
25778
|
if (r2) {
|
25782
25779
|
let s2 = this.getLocalTrack(r2);
|
25783
25780
|
s2 ? (t2 === "add" ? yield s2.addPlugin(e, i2) : t2 === "remove" && (yield s2.removePlugin(e)), this.syncRoomState(`${t2}VideoPlugin`)) : this.logPossibleInconsistency(`track ${r2} not present, unable to ${t2} plugin`);
|
@@ -25790,7 +25787,7 @@ var Di = class {
|
|
25790
25787
|
b2.w("Invalid plugin received in store");
|
25791
25788
|
return;
|
25792
25789
|
}
|
25793
|
-
let i2 = this.store.getState(
|
25790
|
+
let i2 = this.store.getState(Y2);
|
25794
25791
|
if (i2) {
|
25795
25792
|
let r2 = this.getLocalTrack(i2);
|
25796
25793
|
r2 ? (t2 === "add" ? yield r2.addStreamPlugins(e) : t2 === "remove" && (yield r2.removeStreamPlugins(e)), this.syncRoomState(`${t2}MediaStreamPlugin`)) : this.logPossibleInconsistency(`track ${i2} not present, unable to ${t2} plugin`);
|
@@ -25844,8 +25841,8 @@ var Di = class {
|
|
25844
25841
|
}, t2);
|
25845
25842
|
}
|
25846
25843
|
};
|
25847
|
-
var
|
25848
|
-
var
|
25844
|
+
var Di = (a11) => O2 ? `${a11} ${document.title}` : a11;
|
25845
|
+
var wi = class {
|
25849
25846
|
constructor(e, t2) {
|
25850
25847
|
this.eventBus = e;
|
25851
25848
|
this.listener = t2;
|
@@ -25855,7 +25852,7 @@ var _i = class {
|
|
25855
25852
|
var u2;
|
25856
25853
|
if (!e2)
|
25857
25854
|
return;
|
25858
|
-
let { url: t3, timeout: i2, scoreMap: r2 } = e2, s2 = this.controller.signal, o2 = Date.now(), n2 = 0, l2 =
|
25855
|
+
let { url: t3, timeout: i2, scoreMap: r2 } = e2, s2 = this.controller.signal, o2 = Date.now(), n2 = 0, l2 = Z2(i2).then(() => {
|
25859
25856
|
this.controller.abort();
|
25860
25857
|
});
|
25861
25858
|
try {
|
@@ -25867,8 +25864,8 @@ var _i = class {
|
|
25867
25864
|
try {
|
25868
25865
|
let g2 = false;
|
25869
25866
|
for (; !g2; ) {
|
25870
|
-
let { value:
|
25871
|
-
g2 =
|
25867
|
+
let { value: f2, done: P7 } = yield h2.read();
|
25868
|
+
g2 = P7, f2 && (n2 += f2.byteLength, this.sendScore({ scoreMap: r2, downloadedSize: n2, startTime: o2 }));
|
25872
25869
|
}
|
25873
25870
|
} catch (g2) {
|
25874
25871
|
g2.name !== "AbortError" && d2.d(this.TAG, g2);
|
@@ -25900,7 +25897,7 @@ var _i = class {
|
|
25900
25897
|
e !== this.score && (this.score = e, (i2 = (t2 = this.listener) == null ? void 0 : t2.onNetworkQuality) == null || i2.call(t2, e));
|
25901
25898
|
}
|
25902
25899
|
};
|
25903
|
-
var
|
25900
|
+
var wt = class {
|
25904
25901
|
constructor(e, t2, i2, r2, s2, o2) {
|
25905
25902
|
this.store = e;
|
25906
25903
|
this.transport = t2;
|
@@ -25914,8 +25911,8 @@ var _t = class {
|
|
25914
25911
|
r3 && (yield this.diffRolesAndPublishTracks({ oldRole: e2, newRole: t3 }), (s3 = this.listener) == null || s3.onPeerUpdate(8, r3));
|
25915
25912
|
});
|
25916
25913
|
this.diffRolesAndPublishTracks = (i3) => c2(this, [i3], function* ({ oldRole: e2, newRole: t3 }) {
|
25917
|
-
var g2,
|
25918
|
-
let r3 = new Set(e2.publishParams.allowed), s3 = new Set(t3.publishParams.allowed), o3 = this.removeTrack(r3, s3, "video"), n2 = this.removeTrack(r3, s3, "audio"), l2 = this.removeTrack(r3, s3, "screen"), u2 = this.hasSimulcastDifference((g2 = e2.publishParams.simulcast) == null ? void 0 : g2.video, (
|
25914
|
+
var g2, f2, P7, k2, w2, Oe;
|
25915
|
+
let r3 = new Set(e2.publishParams.allowed), s3 = new Set(t3.publishParams.allowed), o3 = this.removeTrack(r3, s3, "video"), n2 = this.removeTrack(r3, s3, "audio"), l2 = this.removeTrack(r3, s3, "screen"), u2 = this.hasSimulcastDifference((g2 = e2.publishParams.simulcast) == null ? void 0 : g2.video, (f2 = t3.publishParams.simulcast) == null ? void 0 : f2.video), p2 = this.hasSimulcastDifference((P7 = e2.publishParams.simulcast) == null ? void 0 : P7.screen, (k2 = t3.publishParams.simulcast) == null ? void 0 : k2.screen), h2 = (Oe = (w2 = this.store.getLocalPeer()) == null ? void 0 : w2.videoTrack) == null ? void 0 : Oe.enabled;
|
25919
25916
|
yield this.removeAudioTrack(n2), yield this.removeVideoTracks(o3 || u2), yield this.removeScreenTracks(l2 || p2);
|
25920
25917
|
let T = this.getSettings();
|
25921
25918
|
u2 && (T.isVideoMuted = !h2), yield this.publish(T), yield this.syncDevices(T, t3);
|
@@ -26022,12 +26019,12 @@ var Jr = class {
|
|
26022
26019
|
}
|
26023
26020
|
};
|
26024
26021
|
var Pe = new Jr();
|
26025
|
-
var
|
26022
|
+
var _t = class {
|
26026
26023
|
constructor(e) {
|
26027
26024
|
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);
|
26028
26025
|
}
|
26029
26026
|
};
|
26030
|
-
var
|
26027
|
+
var Nt = class {
|
26031
26028
|
constructor() {
|
26032
26029
|
this.TAG = "[Store]:";
|
26033
26030
|
this.knownRoles = {};
|
@@ -26038,7 +26035,7 @@ var Ot = class {
|
|
26038
26035
|
this.roleDetailsArrived = false;
|
26039
26036
|
this.env = "prod";
|
26040
26037
|
this.simulcastEnabled = false;
|
26041
|
-
this.userAgent =
|
26038
|
+
this.userAgent = Tt(this.env);
|
26042
26039
|
this.polls = /* @__PURE__ */ new Map();
|
26043
26040
|
this.whiteboards = /* @__PURE__ */ new Map();
|
26044
26041
|
this.addPermissionToRole = (e, t2, i2, r2) => {
|
@@ -26158,7 +26155,7 @@ var Ot = class {
|
|
26158
26155
|
return this.userAgent;
|
26159
26156
|
}
|
26160
26157
|
createAndSetUserAgent(e) {
|
26161
|
-
this.userAgent =
|
26158
|
+
this.userAgent = Tt(this.env, e);
|
26162
26159
|
}
|
26163
26160
|
setRoom(e) {
|
26164
26161
|
this.room = e;
|
@@ -26175,8 +26172,8 @@ var Ot = class {
|
|
26175
26172
|
}
|
26176
26173
|
setConfig(e) {
|
26177
26174
|
var t2, i2, r2;
|
26178
|
-
if (
|
26179
|
-
let s2 =
|
26175
|
+
if (Q2.rememberDevices(!!e.rememberDeviceSelection), e.rememberDeviceSelection) {
|
26176
|
+
let s2 = Q2.getSelection();
|
26180
26177
|
s2 && (e.settings || (e.settings = {}), (t2 = s2.audioInput) != null && t2.deviceId && (e.settings.audioInputDeviceId = e.settings.audioInputDeviceId || s2.audioInput.deviceId), (i2 = s2.audioOutput) != null && i2.deviceId && (e.settings.audioOutputDeviceId = e.settings.audioOutputDeviceId || s2.audioOutput.deviceId), (r2 = s2.videoInput) != null && r2.deviceId && (e.settings.videoDeviceId = e.settings.videoDeviceId || s2.videoInput.deviceId));
|
26181
26178
|
}
|
26182
26179
|
e.autoManageVideo = e.autoManageVideo !== false, e.autoManageWakeLock = e.autoManageWakeLock !== false, this.config = e, this.setEnv();
|
@@ -26298,7 +26295,7 @@ var Ot = class {
|
|
26298
26295
|
t2.startsWith("prod") ? i2 = "prod" : t2.startsWith("qa") ? i2 = "qa" : t2.startsWith("dev") && (i2 = "dev"), this.env = i2, Pe.setEnv(i2);
|
26299
26296
|
}
|
26300
26297
|
};
|
26301
|
-
var
|
26298
|
+
var _i = class {
|
26302
26299
|
constructor() {
|
26303
26300
|
this.TAG = "[WakeLockManager]";
|
26304
26301
|
this.wakeLock = null;
|
@@ -26332,7 +26329,7 @@ var Ni = class {
|
|
26332
26329
|
});
|
26333
26330
|
}
|
26334
26331
|
};
|
26335
|
-
var
|
26332
|
+
var Ni = class {
|
26336
26333
|
constructor(e) {
|
26337
26334
|
this.store = e;
|
26338
26335
|
this.bufferSize = 100;
|
@@ -26375,7 +26372,7 @@ var Oi = class {
|
|
26375
26372
|
}
|
26376
26373
|
};
|
26377
26374
|
var wa = { autoplayFailed: void 0, initialized: false, autoplayCheckPromise: void 0 };
|
26378
|
-
var
|
26375
|
+
var Ot = class {
|
26379
26376
|
constructor(e, t2, i2) {
|
26380
26377
|
this.store = e;
|
26381
26378
|
this.deviceManager = t2;
|
@@ -26402,7 +26399,7 @@ var xt = class {
|
|
26402
26399
|
var u2, p2;
|
26403
26400
|
d2.e(this.TAG, "error on audio element", s2.error);
|
26404
26401
|
let l2 = S2.TracksErrors.AudioPlaybackError(`Audio playback error for track - ${e2.trackId} code - ${(u2 = s2 == null ? void 0 : s2.error) == null ? void 0 : u2.code}`);
|
26405
|
-
this.eventBus.analytics.publish(y2.audioPlaybackError(l2)), ((p2 = s2 == null ? void 0 : s2.error) == null ? void 0 : p2.code) === MediaError.MEDIA_ERR_DECODE && (this.removeAudioElement(s2, e2), yield
|
26402
|
+
this.eventBus.analytics.publish(y2.audioPlaybackError(l2)), ((p2 = s2 == null ? void 0 : s2.error) == null ? void 0 : p2.code) === MediaError.MEDIA_ERR_DECODE && (this.removeAudioElement(s2, e2), yield Z2(500), yield this.handleTrackAdd({ track: e2, peer: t3, callListener: false }));
|
26406
26403
|
}), e2.setAudioElement(s2), e2.setVolume(this.volume), d2.d(this.TAG, "Audio track added", `${e2}`), this.init(), (o2 = this.audioSink) == null || o2.append(s2), this.outputDevice && (yield e2.setOutputDevice(this.outputDevice)), s2.srcObject = new MediaStream([e2.nativeTrack]), i3 && ((n2 = this.listener) == null || n2.onTrackUpdate(0, e2, t3)), yield this.handleAutoplayError(e2);
|
26407
26404
|
});
|
26408
26405
|
this.handleAutoplayError = (e2) => c2(this, null, function* () {
|
@@ -26513,7 +26510,7 @@ var xt = class {
|
|
26513
26510
|
});
|
26514
26511
|
}
|
26515
26512
|
};
|
26516
|
-
var
|
26513
|
+
var Oi = class {
|
26517
26514
|
constructor(e) {
|
26518
26515
|
this.eventBus = e;
|
26519
26516
|
this.pluginUsage = /* @__PURE__ */ new Map();
|
@@ -26552,7 +26549,7 @@ var xi = class {
|
|
26552
26549
|
this.eventBus.analytics.subscribe((t2) => this.updatePluginUsageData(t2));
|
26553
26550
|
}
|
26554
26551
|
};
|
26555
|
-
var
|
26552
|
+
var xt = class {
|
26556
26553
|
constructor(e, t2) {
|
26557
26554
|
this.store = e;
|
26558
26555
|
this.eventBus = t2;
|
@@ -26567,7 +26564,7 @@ var Ut = class {
|
|
26567
26564
|
this.audioInputChanged = false;
|
26568
26565
|
this.updateOutputDevice = (e2, t3) => c2(this, null, function* () {
|
26569
26566
|
let i3 = this.audioOutput.find((r2) => r2.deviceId === e2);
|
26570
|
-
return i3 && (this.outputDevice = i3, yield this.store.updateAudioOutputDevice(i3), this.eventBus.analytics.publish(y2.deviceChange({ isUserSelection: t3, selection: { audioOutput: i3 }, devices: this.getDevices(), type: "audioOutput" })),
|
26567
|
+
return i3 && (this.outputDevice = i3, yield this.store.updateAudioOutputDevice(i3), this.eventBus.analytics.publish(y2.deviceChange({ isUserSelection: t3, selection: { audioOutput: i3 }, devices: this.getDevices(), type: "audioOutput" })), Q2.updateSelection("audioOutput", { deviceId: i3.deviceId, groupId: i3.groupId })), i3;
|
26571
26568
|
});
|
26572
26569
|
this.getCurrentSelection = () => {
|
26573
26570
|
var o2, n2;
|
@@ -26580,7 +26577,7 @@ var Ut = class {
|
|
26580
26577
|
let e2 = yield navigator.mediaDevices.enumerateDevices(), t3 = this.videoInput.map(this.createIdentifier), i3 = this.audioInput.map(this.createIdentifier);
|
26581
26578
|
this.audioInput = [], this.audioOutput = [], this.videoInput = [], e2.forEach((r2) => {
|
26582
26579
|
r2.kind === "audioinput" && r2.label ? (this.hasMicrophonePermission = true, this.audioInput.push(r2)) : r2.kind === "audiooutput" ? this.audioOutput.push(r2) : r2.kind === "videoinput" && r2.label && (this.hasWebcamPermission = true, this.videoInput.push(r2));
|
26583
|
-
}), this.videoInputChanged = this.computeChange(t3, this.videoInput), this.audioInputChanged = this.computeChange(i3, this.audioInput),
|
26580
|
+
}), this.videoInputChanged = this.computeChange(t3, this.videoInput), this.audioInputChanged = this.computeChange(i3, this.audioInput), Q2.setDevices({ videoInput: [...this.videoInput], audioInput: [...this.audioInput], audioOutput: [...this.audioOutput] }), this.logDevices("Enumerate Devices");
|
26584
26581
|
} catch (e2) {
|
26585
26582
|
d2.e(this.TAG, "Failed enumerating devices", e2);
|
26586
26583
|
}
|
@@ -26590,7 +26587,7 @@ var Ut = class {
|
|
26590
26587
|
let e2 = this.store.getLocalPeer();
|
26591
26588
|
!((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));
|
26592
26589
|
});
|
26593
|
-
this.handleDeviceChange =
|
26590
|
+
this.handleDeviceChange = ai(() => c2(this, null, function* () {
|
26594
26591
|
yield this.enumerateDevices(), this.logDevices("After Device Change");
|
26595
26592
|
let e2 = this.store.getLocalPeer();
|
26596
26593
|
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() }));
|
@@ -26630,7 +26627,7 @@ var Ut = class {
|
|
26630
26627
|
this.eventBus.analytics.publish(y2.deviceChange({ selection: { videoInput: t3 }, error: S2.TracksErrors.SelectedDeviceMissing("video"), devices: this.getDevices(), type: "video" })), d2.e(this.TAG, "Video device not found");
|
26631
26628
|
return;
|
26632
26629
|
}
|
26633
|
-
let { settings: i3 } = e2, r2 = new
|
26630
|
+
let { settings: i3 } = e2, r2 = new z2().codec(i3.codec).maxBitrate(i3.maxBitrate).maxFramerate(i3.maxFramerate).setWidth(i3.width).setHeight(i3.height).deviceId(t3.deviceId).build();
|
26634
26631
|
try {
|
26635
26632
|
yield e2.setSettings(r2, true), this.eventBus.deviceChange.publish({ devices: this.getDevices(), selection: t3, type: "video" }), this.logDevices("Video Device Change Success");
|
26636
26633
|
} catch (s2) {
|
@@ -26696,7 +26693,7 @@ var Ut = class {
|
|
26696
26693
|
d2.d(this.TAG, e, JSON.stringify({ videoInput: [...this.videoInput], audioInput: [...this.audioInput], audioOutput: [...this.audioOutput], selected: this.getCurrentSelection() }, null, 4));
|
26697
26694
|
}
|
26698
26695
|
};
|
26699
|
-
var
|
26696
|
+
var xi = class {
|
26700
26697
|
constructor(e, t2) {
|
26701
26698
|
this.deviceManager = e;
|
26702
26699
|
this.audioSinkManager = t2;
|
@@ -26717,7 +26714,7 @@ var Ui = class {
|
|
26717
26714
|
}
|
26718
26715
|
unblockAutoplay() {
|
26719
26716
|
return c2(this, null, function* () {
|
26720
|
-
yield this.audioSinkManager.unblockAutoplay(), yield
|
26717
|
+
yield this.audioSinkManager.unblockAutoplay(), yield He.resumeContext();
|
26721
26718
|
});
|
26722
26719
|
}
|
26723
26720
|
};
|
@@ -26743,7 +26740,7 @@ var V = class {
|
|
26743
26740
|
};
|
26744
26741
|
}
|
26745
26742
|
};
|
26746
|
-
var
|
26743
|
+
var Ut = class {
|
26747
26744
|
constructor() {
|
26748
26745
|
this.eventEmitter = new nn2();
|
26749
26746
|
this.analytics = new V(G2.ANALYTICS, this.eventEmitter);
|
@@ -26765,7 +26762,7 @@ var Bt = class {
|
|
26765
26762
|
this.leave = new V(G2.LEAVE, this.eventEmitter);
|
26766
26763
|
}
|
26767
26764
|
};
|
26768
|
-
var
|
26765
|
+
var Ui = class {
|
26769
26766
|
constructor(e, t2, i2) {
|
26770
26767
|
this.store = e;
|
26771
26768
|
this.listener = t2;
|
@@ -26783,7 +26780,7 @@ var Bi = class {
|
|
26783
26780
|
(n2 = this.listener) == null || n2.onPeerUpdate(5, null);
|
26784
26781
|
}
|
26785
26782
|
};
|
26786
|
-
var
|
26783
|
+
var Bi = class {
|
26787
26784
|
constructor(e) {
|
26788
26785
|
this.listener = e;
|
26789
26786
|
this.TAG = "[BroadcastManager]";
|
@@ -26796,7 +26793,7 @@ var Vi = class {
|
|
26796
26793
|
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);
|
26797
26794
|
}
|
26798
26795
|
};
|
26799
|
-
var
|
26796
|
+
var Vi = class {
|
26800
26797
|
constructor(e, t2) {
|
26801
26798
|
this.store = e;
|
26802
26799
|
this.listener = t2;
|
@@ -26810,7 +26807,7 @@ var Fi = class {
|
|
26810
26807
|
(r2 = this.listener) == null || r2.onConnectionQualityUpdate(i2);
|
26811
26808
|
}
|
26812
26809
|
};
|
26813
|
-
var
|
26810
|
+
var nt = class {
|
26814
26811
|
constructor(e, t2, i2) {
|
26815
26812
|
this.store = e;
|
26816
26813
|
this.eventBus = t2;
|
@@ -26942,7 +26939,7 @@ var ct = class {
|
|
26942
26939
|
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;
|
26943
26940
|
}
|
26944
26941
|
};
|
26945
|
-
var
|
26942
|
+
var Fi = class extends nt {
|
26946
26943
|
constructor(t2, i2, r2, s2) {
|
26947
26944
|
super(t2, i2, s2);
|
26948
26945
|
this.transport = r2;
|
@@ -26982,7 +26979,7 @@ var Gi = class extends ct {
|
|
26982
26979
|
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));
|
26983
26980
|
}
|
26984
26981
|
};
|
26985
|
-
var
|
26982
|
+
var Gi = class {
|
26986
26983
|
constructor(e, t2, i2, r2) {
|
26987
26984
|
this.store = e;
|
26988
26985
|
this.peerManager = t2;
|
@@ -27049,7 +27046,7 @@ var Wi = class {
|
|
27049
27046
|
}
|
27050
27047
|
};
|
27051
27048
|
var C = (a11) => a11 ? new Date(a11) : void 0;
|
27052
|
-
var
|
27049
|
+
var Wi = class {
|
27053
27050
|
constructor(e, t2, i2) {
|
27054
27051
|
this.store = e;
|
27055
27052
|
this.trackManager = t2;
|
@@ -27148,7 +27145,7 @@ var $i = class {
|
|
27148
27145
|
});
|
27149
27146
|
}
|
27150
27147
|
};
|
27151
|
-
var
|
27148
|
+
var $i = class {
|
27152
27149
|
constructor(e, t2) {
|
27153
27150
|
this.store = e;
|
27154
27151
|
this.eventBus = t2;
|
@@ -27172,11 +27169,11 @@ var Ki = class {
|
|
27172
27169
|
}
|
27173
27170
|
}
|
27174
27171
|
};
|
27175
|
-
var
|
27172
|
+
var Bt = (a11, e, t2) => {
|
27176
27173
|
let i2 = t2 === "qa" ? Ws : Gs, r2 = new URL(i2);
|
27177
27174
|
return r2.searchParams.set("endpoint", `https://${e}`), r2.searchParams.set("token", a11), r2.toString();
|
27178
27175
|
};
|
27179
|
-
var
|
27176
|
+
var Ki = class {
|
27180
27177
|
constructor(e, t2, i2) {
|
27181
27178
|
this.transport = e;
|
27182
27179
|
this.store = t2;
|
@@ -27194,7 +27191,7 @@ var qi = class {
|
|
27194
27191
|
let t2 = this.store.getWhiteboard(e == null ? void 0 : e.id), i2 = t2 == null ? void 0 : t2.id;
|
27195
27192
|
if (t2 || (i2 = (yield this.transport.signal.createWhiteboard(this.getCreateOptionsWithDefaults(e))).id), !i2)
|
27196
27193
|
throw new Error(`Whiteboard ID: ${i2} not found`);
|
27197
|
-
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:
|
27194
|
+
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: Bt(r2.token, r2.addr, this.store.getEnv()), token: r2.token, addr: r2.addr, owner: r2.owner, permissions: r2.permissions || [], open: true });
|
27198
27195
|
this.store.setWhiteboard(s2), (o2 = this.listener) == null || o2.onWhiteboardUpdate(s2);
|
27199
27196
|
});
|
27200
27197
|
}
|
@@ -27219,7 +27216,7 @@ var qi = class {
|
|
27219
27216
|
let e = this.store.getWhiteboards();
|
27220
27217
|
for (let s2 of e.values())
|
27221
27218
|
if (s2.url) {
|
27222
|
-
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:
|
27219
|
+
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: Bt(o2.token, o2.addr, this.store.getEnv()), token: o2.token, addr: o2.addr, owner: o2.owner, permissions: o2.permissions, open: u2 });
|
27223
27220
|
this.store.setWhiteboard(p2), (r2 = this.listener) == null || r2.onWhiteboardUpdate(p2);
|
27224
27221
|
}
|
27225
27222
|
});
|
@@ -27233,12 +27230,12 @@ var qi = class {
|
|
27233
27230
|
}), { 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 };
|
27234
27231
|
}
|
27235
27232
|
};
|
27236
|
-
var
|
27233
|
+
var Vt = class {
|
27237
27234
|
constructor(e, t2, i2) {
|
27238
27235
|
this.transport = e;
|
27239
27236
|
this.store = t2;
|
27240
27237
|
this.listener = i2;
|
27241
|
-
this.whiteboard = new
|
27238
|
+
this.whiteboard = new Ki(e, t2, i2);
|
27242
27239
|
}
|
27243
27240
|
setListener(e) {
|
27244
27241
|
this.listener = e, this.whiteboard.setListener(e);
|
@@ -27248,7 +27245,7 @@ var Ft = class {
|
|
27248
27245
|
var o2, n2;
|
27249
27246
|
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 }));
|
27250
27247
|
e.id || (e.id = i2), Array.isArray(e.questions) && (yield this.addQuestionsToPoll(e.id, e.questions));
|
27251
|
-
let r2 = yield this.transport.signal.getPollQuestions({ poll_id: e.id, index: 0, count: 50 }), s2 =
|
27248
|
+
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 }));
|
27252
27249
|
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]);
|
27253
27250
|
});
|
27254
27251
|
}
|
@@ -27301,8 +27298,8 @@ var Ft = class {
|
|
27301
27298
|
var h2, T;
|
27302
27299
|
let p2 = (h2 = e == null ? void 0 : e.questions) == null ? void 0 : h2.find((g2) => g2.index === n2.question);
|
27303
27300
|
if (p2) {
|
27304
|
-
let g2 = { id: n2.response_id, questionIndex: n2.question, option: n2.option, options: n2.options, text: n2.text, responseFinal: u2, peer: { peerid: l2.peerid, userHash: l2.hash, userid: l2.userid, username: l2.username }, skipped: n2.skipped, type: n2.type, update: n2.update },
|
27305
|
-
(T = r2.questions) != null && T[n2.question - 1] && (r2.questions[n2.question - 1].responses = [...
|
27301
|
+
let g2 = { id: n2.response_id, questionIndex: n2.question, option: n2.option, options: n2.options, text: n2.text, responseFinal: u2, peer: { peerid: l2.peerid, userHash: l2.hash, userid: l2.userid, username: l2.username }, skipped: n2.skipped, type: n2.type, update: n2.update }, f2 = p2.responses && !t2 ? [...p2.responses] : [];
|
27302
|
+
(T = r2.questions) != null && T[n2.question - 1] && (r2.questions[n2.question - 1].responses = [...f2, g2]);
|
27306
27303
|
}
|
27307
27304
|
}), this.store.setPoll(r2), (o2 = this.listener) == null || o2.onPollsUpdate(4, [r2]);
|
27308
27305
|
});
|
@@ -27316,10 +27313,10 @@ var Ft = class {
|
|
27316
27313
|
r2 = [...l2.polls, ...r2, ...u2.polls];
|
27317
27314
|
}
|
27318
27315
|
for (let l2 of r2) {
|
27319
|
-
let u2 = yield this.transport.signal.getPollQuestions({ poll_id: l2.poll_id, index: 0, count: 50 }), p2 =
|
27320
|
-
p2.questions = u2.questions.map(({ question: T, options: g2, answer:
|
27316
|
+
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);
|
27317
|
+
p2.questions = u2.questions.map(({ question: T, options: g2, answer: f2 }, P7) => {
|
27321
27318
|
var k2, w2;
|
27322
|
-
return M2(m({}, T), { options: g2, answer:
|
27319
|
+
return M2(m({}, T), { options: g2, answer: f2, responses: (w2 = (k2 = h2 == null ? void 0 : h2.questions) == null ? void 0 : k2[P7]) == null ? void 0 : w2.responses });
|
27323
27320
|
}), t2.push(p2), this.store.setPoll(p2);
|
27324
27321
|
}
|
27325
27322
|
return (n2 = this.listener) == null || n2.onPollsUpdate(3, t2), t2;
|
@@ -27342,11 +27339,11 @@ var Ft = class {
|
|
27342
27339
|
return i2;
|
27343
27340
|
}
|
27344
27341
|
};
|
27345
|
-
var
|
27342
|
+
var qi = (a11) => {
|
27346
27343
|
let e = { userid: "customerID", peerid: "peerID", username: "userName" };
|
27347
27344
|
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) };
|
27348
27345
|
};
|
27349
|
-
var
|
27346
|
+
var ji = class {
|
27350
27347
|
constructor(e, t2, i2) {
|
27351
27348
|
this.store = e;
|
27352
27349
|
this.transport = t2;
|
@@ -27379,7 +27376,7 @@ var Ji = class {
|
|
27379
27376
|
(i2 = this.listener) == null || i2.onPollsUpdate(1, [o2]);
|
27380
27377
|
return;
|
27381
27378
|
}
|
27382
|
-
let n2 = yield this.transport.signal.getPollQuestions({ poll_id: s2.poll_id, index: 0, count: 50 }), l2 =
|
27379
|
+
let n2 = yield this.transport.signal.getPollQuestions({ poll_id: s2.poll_id, index: 0, count: 50 }), l2 = qi(s2);
|
27383
27380
|
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);
|
27384
27381
|
}
|
27385
27382
|
(r2 = this.listener) == null || r2.onPollsUpdate(1, t2);
|
@@ -27439,7 +27436,7 @@ var Ji = class {
|
|
27439
27436
|
});
|
27440
27437
|
}
|
27441
27438
|
};
|
27442
|
-
var
|
27439
|
+
var Ji = class {
|
27443
27440
|
constructor(e, t2) {
|
27444
27441
|
this.store = e;
|
27445
27442
|
this.listener = t2;
|
@@ -27500,7 +27497,7 @@ var Qi = class {
|
|
27500
27497
|
return e && (s2 = s2.filter((o2) => o2.type === e)), t2 && (s2 = s2.filter((o2) => o2.source === t2)), s2.filter((o2) => o2.enabled !== i2);
|
27501
27498
|
}
|
27502
27499
|
};
|
27503
|
-
var
|
27500
|
+
var Qi = class {
|
27504
27501
|
constructor(e, t2) {
|
27505
27502
|
this.store = e;
|
27506
27503
|
this.listener = t2;
|
@@ -27653,11 +27650,11 @@ var zi = class {
|
|
27653
27650
|
toSdkError(e) {
|
27654
27651
|
if (!(e != null && e.code))
|
27655
27652
|
return;
|
27656
|
-
let t2 = e.message || "error in streaming/recording", i2 = new
|
27653
|
+
let t2 = e.message || "error in streaming/recording", i2 = new v2(e.code, "ServerErrors", "NONE", t2, t2);
|
27657
27654
|
return d2.e(this.TAG, "error in streaming/recording", i2), i2;
|
27658
27655
|
}
|
27659
27656
|
};
|
27660
|
-
var
|
27657
|
+
var zi = class {
|
27661
27658
|
constructor(e, t2) {
|
27662
27659
|
this.store = e;
|
27663
27660
|
this.listener = t2;
|
@@ -27671,7 +27668,7 @@ var Yi = class {
|
|
27671
27668
|
(i2 = this.listener) == null || i2.onSessionStoreUpdate(t2);
|
27672
27669
|
}
|
27673
27670
|
};
|
27674
|
-
var
|
27671
|
+
var Yi = class {
|
27675
27672
|
constructor(e, t2, i2) {
|
27676
27673
|
this.store = e;
|
27677
27674
|
this.transport = t2;
|
@@ -27696,13 +27693,13 @@ var Xi = class {
|
|
27696
27693
|
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;
|
27697
27694
|
else {
|
27698
27695
|
let l2 = yield this.transport.signal.getWhiteboard({ id: e.id });
|
27699
|
-
o2.url =
|
27696
|
+
o2.url = Bt(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;
|
27700
27697
|
}
|
27701
27698
|
this.store.setWhiteboard(o2), (n2 = this.listener) == null || n2.onWhiteboardUpdate(o2);
|
27702
27699
|
});
|
27703
27700
|
}
|
27704
27701
|
};
|
27705
|
-
var
|
27702
|
+
var Xi = class {
|
27706
27703
|
constructor(e, t2, i2, r2, s2, o2) {
|
27707
27704
|
this.store = e;
|
27708
27705
|
this.transport = i2;
|
@@ -27729,7 +27726,7 @@ var Zi = class {
|
|
27729
27726
|
this.peerManager.handlePeerInfoUpdate({ peer: i3, name: e2, data: t3 });
|
27730
27727
|
};
|
27731
27728
|
let n2 = this.transport.isFlagEnabled("onDemandTracks");
|
27732
|
-
this.trackManager = n2 ? new
|
27729
|
+
this.trackManager = n2 ? new Fi(this.store, t2, this.transport, this.listener) : new nt(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);
|
27733
27730
|
}
|
27734
27731
|
setListener(e) {
|
27735
27732
|
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;
|
@@ -27781,7 +27778,7 @@ var Zi = class {
|
|
27781
27778
|
}
|
27782
27779
|
}
|
27783
27780
|
};
|
27784
|
-
var
|
27781
|
+
var Zi = class {
|
27785
27782
|
constructor(e) {
|
27786
27783
|
this.transport = e;
|
27787
27784
|
this.observedKeys = /* @__PURE__ */ new Set();
|
@@ -27821,7 +27818,7 @@ var er = class {
|
|
27821
27818
|
});
|
27822
27819
|
}
|
27823
27820
|
};
|
27824
|
-
var
|
27821
|
+
var er = class {
|
27825
27822
|
constructor(e, t2, i2 = "", r2 = "", s2 = "https://prod-init.100ms.live/init", o2 = false, n2) {
|
27826
27823
|
this.authToken = e;
|
27827
27824
|
this.peerId = t2;
|
@@ -27832,17 +27829,17 @@ var tr = class {
|
|
27832
27829
|
this.iceServers = n2;
|
27833
27830
|
}
|
27834
27831
|
};
|
27835
|
-
var
|
27832
|
+
var j2 = ((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))(j2 || {});
|
27836
27833
|
var _a7 = { 0: [], 1: [], 2: [1], 3: [1], 4: [1] };
|
27837
|
-
var
|
27838
|
-
var
|
27834
|
+
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 || {});
|
27835
|
+
var ir = class {
|
27839
27836
|
constructor(e) {
|
27840
27837
|
this.promise = new Promise((t2, i2) => {
|
27841
27838
|
this.resolve = t2, this.reject = i2, e(t2, i2);
|
27842
27839
|
});
|
27843
27840
|
}
|
27844
27841
|
};
|
27845
|
-
var
|
27842
|
+
var rr = class {
|
27846
27843
|
constructor(e, t2) {
|
27847
27844
|
this.onStateChange = e;
|
27848
27845
|
this.sendEvent = t2;
|
@@ -27863,29 +27860,29 @@ var sr = class {
|
|
27863
27860
|
}
|
27864
27861
|
scheduleTask(l2) {
|
27865
27862
|
return c2(this, arguments, function* ({ category: e, error: t2, changeState: i2, task: r2, originalState: s2, maxFailedRetries: o2 = 5, failedRetryCount: n2 = 0 }) {
|
27866
|
-
if (d2.d(this.TAG, "schedule: ", { category:
|
27863
|
+
if (d2.d(this.TAG, "schedule: ", { category: j2[e], error: t2 }), n2 === 0) {
|
27867
27864
|
let g2 = this.inProgress.get(e);
|
27868
27865
|
if (g2) {
|
27869
|
-
d2.d(this.TAG, `schedule: Already a task for ${
|
27866
|
+
d2.d(this.TAG, `schedule: Already a task for ${j2[e]} scheduled, waiting for its completion`), yield g2.promise;
|
27870
27867
|
return;
|
27871
27868
|
}
|
27872
|
-
let
|
27869
|
+
let f2 = new ir((P7, k2) => {
|
27873
27870
|
});
|
27874
|
-
this.inProgress.set(e,
|
27871
|
+
this.inProgress.set(e, f2), this.sendEvent(t2, e);
|
27875
27872
|
}
|
27876
27873
|
let u2 = false, p2 = _a7[e];
|
27877
27874
|
for (let g2 in p2) {
|
27878
|
-
let
|
27875
|
+
let f2 = p2[parseInt(g2)];
|
27879
27876
|
try {
|
27880
|
-
let
|
27881
|
-
|
27882
|
-
} catch (
|
27883
|
-
d2.d(this.TAG, `schedule: Stopping retry task of ${
|
27877
|
+
let P7 = this.inProgress.get(f2);
|
27878
|
+
P7 && (d2.d(this.TAG, `schedule: Suspending retry task of ${j2[e]}, waiting for ${j2[f2]} to recover`), yield P7.promise, d2.d(this.TAG, `schedule: Resuming retry task ${j2[e]} as it's dependency ${j2[f2]} is recovered`));
|
27879
|
+
} catch (P7) {
|
27880
|
+
d2.d(this.TAG, `schedule: Stopping retry task of ${j2[e]} as it's dependency ${j2[f2]} failed to recover`), u2 = true;
|
27884
27881
|
break;
|
27885
27882
|
}
|
27886
27883
|
}
|
27887
27884
|
if (n2 >= o2 || u2) {
|
27888
|
-
if (t2.description += `. [${
|
27885
|
+
if (t2.description += `. [${j2[e]}] Could not recover after ${n2} tries`, u2 && (t2.description += ` Could not recover all of it's required dependencies - [${p2.map((g2) => j2[g2]).toString()}]`), t2.isTerminal = true, this.inProgress.delete(e), this.sendEvent(t2, e), this.reset(), i2)
|
27889
27886
|
this.onStateChange("Failed", t2);
|
27890
27887
|
else
|
27891
27888
|
throw t2;
|
@@ -27893,16 +27890,16 @@ var sr = class {
|
|
27893
27890
|
}
|
27894
27891
|
i2 && this.onStateChange("Reconnecting", t2);
|
27895
27892
|
let h2 = this.getDelayForRetryCount(e, n2);
|
27896
|
-
d2.d(this.TAG, `schedule: [${
|
27893
|
+
d2.d(this.TAG, `schedule: [${j2[e]}] [failedRetryCount=${n2}] Scheduling retry task in ${h2}ms`);
|
27897
27894
|
let T;
|
27898
27895
|
try {
|
27899
27896
|
T = yield this.setTimeoutPromise(r2, h2);
|
27900
27897
|
} catch (g2) {
|
27901
|
-
T = false, d2.w(this.TAG, `[${
|
27898
|
+
T = false, d2.w(this.TAG, `[${j2[e]}] Un-caught exception ${g2.name} in retry-task, initiating retry`, g2);
|
27902
27899
|
}
|
27903
27900
|
if (T) {
|
27904
27901
|
let g2 = this.inProgress.get(e);
|
27905
|
-
this.inProgress.delete(e), g2 == null || g2.resolve(n2), i2 && this.inProgress.size === 0 && this.onStateChange(s2), d2.d(this.TAG, `schedule: [${
|
27902
|
+
this.inProgress.delete(e), g2 == null || g2.resolve(n2), i2 && this.inProgress.size === 0 && this.onStateChange(s2), d2.d(this.TAG, `schedule: [${j2[e]}] [failedRetryCount=${n2}] Recovered \u267B\uFE0F`);
|
27906
27903
|
} else
|
27907
27904
|
yield this.scheduleTask({ category: e, error: t2, changeState: i2, task: r2, originalState: s2, maxFailedRetries: o2, failedRetryCount: n2 + 1 });
|
27908
27905
|
});
|
@@ -27930,7 +27927,7 @@ var sr = class {
|
|
27930
27927
|
});
|
27931
27928
|
}
|
27932
27929
|
};
|
27933
|
-
var
|
27930
|
+
var sr = class extends Ce {
|
27934
27931
|
constructor() {
|
27935
27932
|
super(100);
|
27936
27933
|
this.localStorage = new le("hms-analytics");
|
@@ -27951,7 +27948,7 @@ var ar = class extends He {
|
|
27951
27948
|
});
|
27952
27949
|
}
|
27953
27950
|
};
|
27954
|
-
var
|
27951
|
+
var ar = class {
|
27955
27952
|
constructor() {
|
27956
27953
|
this.TAG = "[AnalyticsTransport]";
|
27957
27954
|
}
|
@@ -27981,14 +27978,14 @@ var or = class {
|
|
27981
27978
|
}
|
27982
27979
|
}
|
27983
27980
|
};
|
27984
|
-
var
|
27981
|
+
var or = class extends ar {
|
27985
27982
|
constructor(t2) {
|
27986
27983
|
super();
|
27987
27984
|
this.transportProvider = t2;
|
27988
|
-
this.failedEvents = new
|
27985
|
+
this.failedEvents = new sr();
|
27989
27986
|
}
|
27990
27987
|
};
|
27991
|
-
var
|
27988
|
+
var ct = class {
|
27992
27989
|
constructor(e, t2, i2, r2) {
|
27993
27990
|
this.store = e;
|
27994
27991
|
this.eventBus = t2;
|
@@ -28007,7 +28004,7 @@ var dt = class {
|
|
28007
28004
|
startLoop() {
|
28008
28005
|
return c2(this, null, function* () {
|
28009
28006
|
for (; this.shouldSendEvent; )
|
28010
|
-
yield
|
28007
|
+
yield Z2(this.pushInterval * 1e3), this.sendEvent();
|
28011
28008
|
});
|
28012
28009
|
}
|
28013
28010
|
sendEvent() {
|
@@ -28023,7 +28020,7 @@ var dt = class {
|
|
28023
28020
|
});
|
28024
28021
|
}
|
28025
28022
|
};
|
28026
|
-
var
|
28023
|
+
var dt = class {
|
28027
28024
|
constructor({ track: e, ssrc: t2, rid: i2, kind: r2, sampleWindowSize: s2 }) {
|
28028
28025
|
this.samples = [];
|
28029
28026
|
this.tempStats = [];
|
@@ -28066,10 +28063,10 @@ var lt = class {
|
|
28066
28063
|
return this.tempStats.reduce((r2, s2) => r2 + ((s2[e] || 0) > t2 ? 1 : 0), 0);
|
28067
28064
|
}
|
28068
28065
|
};
|
28069
|
-
var
|
28070
|
-
var
|
28071
|
-
var
|
28072
|
-
var
|
28066
|
+
var nr = (a11, e) => a11 && e && (a11.frameWidth !== e.frameWidth || a11.frameHeight !== e.frameHeight);
|
28067
|
+
var cr = (a11, e) => a11 && e && a11.enabled !== e.enabled;
|
28068
|
+
var Ft = (a11) => Object.entries(a11).filter(([, e]) => e !== void 0).reduce((e, [t2, i2]) => (e[t2] = i2, e), {});
|
28069
|
+
var Gt = class extends ct {
|
28073
28070
|
constructor() {
|
28074
28071
|
super(...arguments);
|
28075
28072
|
this.trackAnalytics = /* @__PURE__ */ new Map();
|
@@ -28089,13 +28086,13 @@ var Wt = class extends dt {
|
|
28089
28086
|
Object.keys(r2).forEach((s2) => {
|
28090
28087
|
let o2 = r2[s2], n2 = this.store.getLocalPeerTracks().find((l2) => l2.getTrackIDBeingSent() === s2);
|
28091
28088
|
Object.keys(o2).forEach((l2) => {
|
28092
|
-
var g2,
|
28089
|
+
var g2, f2, P7;
|
28093
28090
|
let u2 = o2[l2];
|
28094
28091
|
if (!n2)
|
28095
28092
|
return;
|
28096
|
-
let p2 = this.getTrackIdentifier(n2.trackId, u2), h2 = M2(m({}, u2), { availableOutgoingBitrate: (
|
28093
|
+
let p2 = this.getTrackIdentifier(n2.trackId, u2), h2 = M2(m({}, u2), { availableOutgoingBitrate: (f2 = (g2 = t2.getLocalPeerStats()) == null ? void 0 : g2.publish) == null ? void 0 : f2.availableOutgoingBitrate });
|
28097
28094
|
if (p2 && this.trackAnalytics.has(p2))
|
28098
|
-
(
|
28095
|
+
(P7 = this.trackAnalytics.get(p2)) == null || P7.pushTempStat(h2);
|
28099
28096
|
else if (n2) {
|
28100
28097
|
let k2 = new zr({ track: n2, sampleWindowSize: this.sampleWindowSize, rid: u2.rid, ssrc: u2.ssrc.toString(), kind: u2.kind });
|
28101
28098
|
k2.pushTempStat(h2), this.trackAnalytics.set(this.getTrackIdentifier(n2.trackId, u2), k2);
|
@@ -28109,22 +28106,22 @@ var Wt = class extends dt {
|
|
28109
28106
|
return i2.rid ? `${t2}:${i2.rid}` : t2;
|
28110
28107
|
}
|
28111
28108
|
};
|
28112
|
-
var zr = class extends
|
28109
|
+
var zr = class extends dt {
|
28113
28110
|
constructor() {
|
28114
28111
|
super(...arguments);
|
28115
28112
|
this.samples = [];
|
28116
28113
|
this.collateSample = () => {
|
28117
28114
|
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;
|
28118
|
-
return
|
28115
|
+
return Ft({ 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 });
|
28119
28116
|
};
|
28120
28117
|
this.shouldCreateSample = () => {
|
28121
28118
|
let t2 = this.tempStats.length, i2 = this.tempStats[t2 - 1], r2 = this.tempStats[t2 - 2];
|
28122
|
-
return t2 === 30 ||
|
28119
|
+
return t2 === 30 || cr(i2, r2) || i2.kind === "video" && nr(i2, r2);
|
28123
28120
|
};
|
28124
28121
|
this.toAnalytics = () => ({ track_id: this.track_id, ssrc: this.ssrc, source: this.source, rid: this.rid, samples: this.samples });
|
28125
28122
|
}
|
28126
28123
|
};
|
28127
|
-
var
|
28124
|
+
var Wt = class extends ct {
|
28128
28125
|
constructor() {
|
28129
28126
|
super(...arguments);
|
28130
28127
|
this.trackAnalytics = /* @__PURE__ */ new Map();
|
@@ -28142,9 +28139,9 @@ var $t = class extends dt {
|
|
28142
28139
|
handleStatsUpdate(t2) {
|
28143
28140
|
let i2 = t2.getAllRemoteTracksStats(), r2 = false;
|
28144
28141
|
Object.keys(i2).forEach((s2) => {
|
28145
|
-
var
|
28146
|
-
let o2 = this.store.getTrackById(s2), n2 = i2[s2], l2 = (
|
28147
|
-
let Oe = (w2 == null ? void 0 : w2.jitterBufferDelay) || 0,
|
28142
|
+
var f2, P7;
|
28143
|
+
let o2 = this.store.getTrackById(s2), n2 = i2[s2], l2 = (f2 = this.trackAnalytics.get(s2)) == null ? void 0 : f2.getLatestStat(), p2 = ((k2, w2) => {
|
28144
|
+
let Oe = (w2 == null ? void 0 : w2.jitterBufferDelay) || 0, Xt = (w2 == null ? void 0 : w2.jitterBufferEmittedCount) || 0, x2 = ((k2 == null ? void 0 : k2.jitterBufferDelay) || 0) - Oe, $ = ((k2 == null ? void 0 : k2.jitterBufferEmittedCount) || 0) - Xt;
|
28148
28145
|
return $ > 0 ? x2 * 1e3 / $ : (w2 == null ? void 0 : w2.calculatedJitterBufferDelay) || 0;
|
28149
28146
|
})(n2, l2), h2 = this.calculateAvSyncForStat(n2, t2), T = M2(m({}, n2), { calculatedJitterBufferDelay: p2, avSync: h2 });
|
28150
28147
|
if (n2.kind === "video") {
|
@@ -28152,7 +28149,7 @@ var $t = class extends dt {
|
|
28152
28149
|
T.expectedFrameHeight = k2 == null ? void 0 : k2.resolution.height, T.expectedFrameWidth = k2 == null ? void 0 : k2.resolution.width;
|
28153
28150
|
}
|
28154
28151
|
if (this.trackAnalytics.has(s2))
|
28155
|
-
(
|
28152
|
+
(P7 = this.trackAnalytics.get(s2)) == null || P7.pushTempStat(T);
|
28156
28153
|
else if (o2) {
|
28157
28154
|
let k2 = new Xr({ track: o2, sampleWindowSize: this.sampleWindowSize, ssrc: n2.ssrc.toString(), kind: n2.kind });
|
28158
28155
|
k2.pushTempStat(T), this.trackAnalytics.set(s2, k2);
|
@@ -28166,42 +28163,42 @@ var $t = class extends dt {
|
|
28166
28163
|
return;
|
28167
28164
|
let r2 = this.store.getPeerById(t2.peerID), s2 = r2 == null ? void 0 : r2.audioTrack, o2 = r2 == null ? void 0 : r2.videoTrack;
|
28168
28165
|
if (!(s2 && o2 && s2.enabled && o2.enabled))
|
28169
|
-
return
|
28166
|
+
return kt;
|
28170
28167
|
let l2 = i2.getRemoteTrackStats(s2.trackId);
|
28171
28168
|
if (!l2)
|
28172
|
-
return
|
28169
|
+
return kt;
|
28173
28170
|
if (l2.estimatedPlayoutTimestamp)
|
28174
28171
|
return l2.estimatedPlayoutTimestamp - t2.estimatedPlayoutTimestamp;
|
28175
28172
|
}
|
28176
28173
|
};
|
28177
|
-
var Xr = class extends
|
28174
|
+
var Xr = class extends dt {
|
28178
28175
|
constructor() {
|
28179
28176
|
super(...arguments);
|
28180
28177
|
this.samples = [];
|
28181
28178
|
this.collateSample = () => {
|
28182
28179
|
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) };
|
28183
28180
|
if (t2.kind === "video")
|
28184
|
-
return
|
28181
|
+
return Ft(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") }));
|
28185
28182
|
{
|
28186
28183
|
let s2 = (t2.concealedSamples || 0) - (t2.silentConcealedSamples || 0) - ((i2.concealedSamples || 0) - (i2.silentConcealedSamples || 0));
|
28187
|
-
return
|
28184
|
+
return Ft(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") }));
|
28188
28185
|
}
|
28189
28186
|
};
|
28190
28187
|
this.shouldCreateSample = () => {
|
28191
28188
|
let t2 = this.tempStats.length, i2 = this.tempStats[t2 - 1], r2 = this.tempStats[t2 - 2];
|
28192
|
-
return t2 === 10 ||
|
28189
|
+
return t2 === 10 || cr(i2, r2) || i2.kind === "video" && nr(i2, r2);
|
28193
28190
|
};
|
28194
28191
|
this.toAnalytics = () => ({ track_id: this.track_id, ssrc: this.ssrc, source: this.source, rid: this.rid, samples: this.samples });
|
28195
28192
|
}
|
28196
28193
|
calculateAvgAvSyncForSample() {
|
28197
|
-
let i2 = this.tempStats.map((r2) => r2.avSync).filter((r2) => r2 !== void 0 && r2 !==
|
28198
|
-
return i2.length === 0 ?
|
28194
|
+
let i2 = this.tempStats.map((r2) => r2.avSync).filter((r2) => r2 !== void 0 && r2 !== kt);
|
28195
|
+
return i2.length === 0 ? kt : i2.reduce((r2, s2) => r2 + s2, 0) / i2.length;
|
28199
28196
|
}
|
28200
28197
|
};
|
28201
|
-
var
|
28198
|
+
var lr = ((t2) => (t2[t2.Publish = 0] = "Publish", t2[t2.Subscribe = 1] = "Subscribe", t2))(lr || {});
|
28202
28199
|
function Na(a11, e) {
|
28203
28200
|
var r2;
|
28204
|
-
let t2 =
|
28201
|
+
let t2 = $t.parse(a11.sdp);
|
28205
28202
|
if (!((r2 = t2.origin) != null && r2.username.startsWith("mozilla")))
|
28206
28203
|
return a11;
|
28207
28204
|
let i2 = e ? Array.from(e.values()) : [];
|
@@ -28209,20 +28206,20 @@ function Na(a11, e) {
|
|
28209
28206
|
var l2, u2, p2;
|
28210
28207
|
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;
|
28211
28208
|
n2 && (s2.msid = (p2 = s2.msid) == null ? void 0 : p2.replace(/\s(.+)/, ` ${n2}`));
|
28212
|
-
}), { type: a11.type, sdp:
|
28209
|
+
}), { type: a11.type, sdp: $t.write(t2) };
|
28213
28210
|
}
|
28214
28211
|
function Oa(a11, e) {
|
28215
28212
|
var s2;
|
28216
28213
|
if (!(a11 != null && a11.sdp) || !e)
|
28217
28214
|
return;
|
28218
|
-
let i2 =
|
28215
|
+
let i2 = $t.parse(a11.sdp).media.find((o2) => oe(o2.mid) && parseInt(o2.mid) === parseInt(e));
|
28219
28216
|
return (s2 = i2 == null ? void 0 : i2.msid) == null ? void 0 : s2.split(" ")[1];
|
28220
28217
|
}
|
28221
28218
|
function xa(a11) {
|
28222
28219
|
return a11.sdp.includes("usedtx=1") ? a11 : { type: a11.type, sdp: a11.sdp.replace("useinbandfec=1", "useinbandfec=1;usedtx=1") };
|
28223
28220
|
}
|
28224
28221
|
var Ee = "[HMSConnection]";
|
28225
|
-
var
|
28222
|
+
var qe = class {
|
28226
28223
|
constructor(e, t2) {
|
28227
28224
|
this.candidates = new Array();
|
28228
28225
|
this.role = e, this.signal = t2;
|
@@ -28299,13 +28296,13 @@ var Ke = class {
|
|
28299
28296
|
let i2 = (r2 = t2.track) == null ? void 0 : r2.kind;
|
28300
28297
|
if (t2.transport) {
|
28301
28298
|
let s2 = t2.transport.iceTransport, o2 = () => {
|
28302
|
-
typeof s2.getSelectedCandidatePair == "function" && (this.selectedCandidatePair = s2.getSelectedCandidatePair(), this.selectedCandidatePair && (this.observer.onSelectedCandidatePairChange(this.selectedCandidatePair), d2.d(Ee, `${
|
28299
|
+
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))));
|
28303
28300
|
};
|
28304
28301
|
typeof s2.onselectedcandidatepairchange == "function" && (s2.onselectedcandidatepairchange = o2), o2();
|
28305
28302
|
}
|
28306
28303
|
});
|
28307
28304
|
} catch (e) {
|
28308
|
-
d2.w(Ee, `Error in logging selected ice candidate pair for ${
|
28305
|
+
d2.w(Ee, `Error in logging selected ice candidate pair for ${lr[this.role]} connection`, e);
|
28309
28306
|
}
|
28310
28307
|
}
|
28311
28308
|
removeTrack(e) {
|
@@ -28338,11 +28335,11 @@ var Ke = class {
|
|
28338
28335
|
return this.nativeConnection.getReceivers();
|
28339
28336
|
}
|
28340
28337
|
};
|
28341
|
-
var
|
28338
|
+
var Kt = class extends qe {
|
28342
28339
|
constructor(t2, i2, r2) {
|
28343
28340
|
super(0, t2);
|
28344
28341
|
this.TAG = "[HMSPublishConnection]";
|
28345
|
-
this.observer = r2, this.nativeConnection = new RTCPeerConnection(i2), this.channel = this.nativeConnection.createDataChannel(
|
28342
|
+
this.observer = r2, this.nativeConnection = new RTCPeerConnection(i2), this.channel = this.nativeConnection.createDataChannel(li, { protocol: "SCTP" }), this.channel.onerror = (s2) => d2.e(this.TAG, `publish data channel onerror ${s2}`, s2), this.nativeConnection.onicecandidate = ({ candidate: s2 }) => {
|
28346
28343
|
s2 && (this.observer.onIceCandidate(s2), t2.trickle(this.role, s2));
|
28347
28344
|
}, this.nativeConnection.oniceconnectionstatechange = () => {
|
28348
28345
|
this.observer.onIceConnectionChange(this.nativeConnection.iceConnectionState);
|
@@ -28362,7 +28359,7 @@ var qt = class extends Ke {
|
|
28362
28359
|
});
|
28363
28360
|
}
|
28364
28361
|
};
|
28365
|
-
var
|
28362
|
+
var qt = class {
|
28366
28363
|
constructor(e, t2, i2 = "") {
|
28367
28364
|
this.TAG = "[HMSDataChannel]";
|
28368
28365
|
this.nativeChannel = e, this.observer = t2, this.metadata = i2, e.onmessage = (r2) => {
|
@@ -28385,7 +28382,7 @@ var jt = class {
|
|
28385
28382
|
this.nativeChannel.close();
|
28386
28383
|
}
|
28387
28384
|
};
|
28388
|
-
var
|
28385
|
+
var jt = class a9 extends qe {
|
28389
28386
|
constructor(t2, i2, r2, s2) {
|
28390
28387
|
super(1, t2);
|
28391
28388
|
this.isFlagEnabled = r2;
|
@@ -28412,7 +28409,7 @@ var Jt = class a9 extends Ke {
|
|
28412
28409
|
if (d2.d(this.TAG, `Failed sending ${i3}`, { request: t3, try: o2 + 1, error: n2 }), !(n2.code / 100 === 5 || n2.code === 429))
|
28413
28410
|
throw Error(`code=${n2.code}, message=${n2.message}`);
|
28414
28411
|
let u2 = (2 + Math.random() * 2) * 1e3;
|
28415
|
-
yield
|
28412
|
+
yield Le(u2);
|
28416
28413
|
} else
|
28417
28414
|
break;
|
28418
28415
|
}
|
@@ -28432,7 +28429,7 @@ var Jt = class a9 extends Ke {
|
|
28432
28429
|
}, this.nativeConnection.onconnectionstatechange = () => {
|
28433
28430
|
this.observer.onConnectionStateChange(this.nativeConnection.connectionState);
|
28434
28431
|
}, this.nativeConnection.ondatachannel = (t2) => {
|
28435
|
-
t2.channel.label ===
|
28432
|
+
t2.channel.label === li && (this.apiChannel = new qt(t2.channel, { onMessage: (i2) => {
|
28436
28433
|
this.eventEmitter.emit("message", i2), this.observer.onApiChannelMessage(i2);
|
28437
28434
|
} }, `role=${this.role}`), t2.channel.onopen = this.handlePendingApiMessages);
|
28438
28435
|
}, this.nativeConnection.onicecandidate = (t2) => {
|
@@ -28477,13 +28474,13 @@ var Jt = class a9 extends Ke {
|
|
28477
28474
|
close() {
|
28478
28475
|
return c2(this, null, function* () {
|
28479
28476
|
var t2;
|
28480
|
-
yield
|
28477
|
+
yield J(a9.prototype, this, "close").call(this), (t2 = this.apiChannel) == null || t2.close();
|
28481
28478
|
});
|
28482
28479
|
}
|
28483
28480
|
};
|
28484
28481
|
var Ua = (a11, e) => !e || e.length === 0 ? a11 : e.map((i2) => ({ urls: i2.urls, credentialType: "password", credential: i2.password, username: i2.userName }));
|
28485
|
-
var
|
28486
|
-
var
|
28482
|
+
var ur = "[InitService]";
|
28483
|
+
var Jt = class {
|
28487
28484
|
static handleError(e, t2) {
|
28488
28485
|
switch (e.status) {
|
28489
28486
|
case 404:
|
@@ -28496,16 +28493,16 @@ var Qt = class {
|
|
28496
28493
|
}
|
28497
28494
|
static fetchInitConfig(n2) {
|
28498
28495
|
return c2(this, arguments, function* ({ token: e, peerId: t2, userAgent: i2, initEndpoint: r2 = "https://prod-init.100ms.live", region: s2 = "", iceServers: o2 }) {
|
28499
|
-
d2.d(
|
28496
|
+
d2.d(ur, `fetchInitConfig: initEndpoint=${r2} token=${e} peerId=${t2} region=${s2} `);
|
28500
28497
|
let l2 = ln2(r2, t2, i2, s2);
|
28501
28498
|
try {
|
28502
28499
|
let u2 = yield fetch(l2, { headers: { Authorization: `Bearer ${e}` } });
|
28503
28500
|
try {
|
28504
28501
|
let p2 = yield u2.clone().json();
|
28505
|
-
return this.handleError(u2, p2), d2.d(
|
28502
|
+
return this.handleError(u2, p2), d2.d(ur, `config is ${JSON.stringify(p2, null, 2)}`), un2(p2, o2);
|
28506
28503
|
} catch (p2) {
|
28507
28504
|
let h2 = yield u2.text();
|
28508
|
-
throw d2.e(
|
28505
|
+
throw d2.e(ur, "json error", p2.message, h2), p2 instanceof v2 ? p2 : S2.APIErrors.ServerErrors(u2.status, "INIT", p2.message);
|
28509
28506
|
}
|
28510
28507
|
} catch (u2) {
|
28511
28508
|
let p2 = u2;
|
@@ -28520,17 +28517,17 @@ function ln2(a11, e, t2, i2) {
|
|
28520
28517
|
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();
|
28521
28518
|
} catch (r2) {
|
28522
28519
|
let s2 = r2;
|
28523
|
-
throw d2.e(
|
28520
|
+
throw d2.e(ur, s2.name, s2.message), s2;
|
28524
28521
|
}
|
28525
28522
|
}
|
28526
28523
|
function un2(a11, e) {
|
28527
28524
|
var t2;
|
28528
28525
|
return M2(m({}, a11), { rtcConfiguration: M2(m({}, a11.rtcConfiguration), { iceServers: Ua((t2 = a11.rtcConfiguration) == null ? void 0 : t2.ice_servers, e) }) });
|
28529
28526
|
}
|
28530
|
-
var
|
28527
|
+
var Qt = class {
|
28531
28528
|
constructor(e) {
|
28532
28529
|
this.TAG = "[SIGNAL]: ";
|
28533
|
-
this.pongResponseTimes = new
|
28530
|
+
this.pongResponseTimes = new Ce(5);
|
28534
28531
|
this.isJoinCompleted = false;
|
28535
28532
|
this.pendingTrickle = [];
|
28536
28533
|
this.socket = null;
|
@@ -28572,7 +28569,7 @@ var zt = class {
|
|
28572
28569
|
this.callbacks.set(i2, { resolve: n2, reject: l2, metadata: { method: e } });
|
28573
28570
|
});
|
28574
28571
|
} catch (o2) {
|
28575
|
-
if (o2 instanceof
|
28572
|
+
if (o2 instanceof v2)
|
28576
28573
|
throw o2;
|
28577
28574
|
let n2 = o2;
|
28578
28575
|
throw S2.WebsocketMethodErrors.ServerErrors(Number(n2.code), fr(e), n2.message);
|
@@ -28886,7 +28883,7 @@ var zt = class {
|
|
28886
28883
|
if (r2 = o2, d2.e(this.TAG, `Failed sending ${e} try: ${s2}`, { method: e, params: t2, error: r2 }), !(parseInt(`${r2.code / 100}`) === 5 || r2.code === 429))
|
28887
28884
|
break;
|
28888
28885
|
let l2 = (2 + Math.random() * 2) * 1e3;
|
28889
|
-
yield
|
28886
|
+
yield Le(l2);
|
28890
28887
|
}
|
28891
28888
|
throw d2.e(`Sending ${e} over WS failed after ${Math.min(s2, 3)} retries`, { method: e, params: t2, error: r2 }), r2;
|
28892
28889
|
});
|
@@ -28898,8 +28895,8 @@ var Ba = () => {
|
|
28898
28895
|
let a11 = navigator.connection;
|
28899
28896
|
return { downlink: a11.downlink, downlinkMax: a11.downlinkMax, effectiveType: a11.effectiveType, rtt: a11.rtt, saveData: a11.saveData, type: a11.type };
|
28900
28897
|
};
|
28901
|
-
var
|
28902
|
-
var
|
28898
|
+
var I2 = "[HMSTransport]:";
|
28899
|
+
var zt = class {
|
28903
28900
|
constructor(e, t2, i2, r2, s2, o2, n2) {
|
28904
28901
|
this.observer = e;
|
28905
28902
|
this.deviceManager = t2;
|
@@ -28919,16 +28916,16 @@ var Yt = class {
|
|
28919
28916
|
try {
|
28920
28917
|
if (!this.subscribeConnection)
|
28921
28918
|
return;
|
28922
|
-
yield this.subscribeConnection.setRemoteDescription(e2), d2.d(
|
28919
|
+
yield this.subscribeConnection.setRemoteDescription(e2), d2.d(I2, `[SUBSCRIBE] Adding ${this.subscribeConnection.candidates.length} ice-candidates`, this.subscribeConnection.candidates);
|
28923
28920
|
for (let i3 of this.subscribeConnection.candidates)
|
28924
28921
|
yield this.subscribeConnection.addIceCandidate(i3);
|
28925
28922
|
this.subscribeConnection.candidates.length = 0;
|
28926
28923
|
let t3 = yield this.subscribeConnection.createAnswer();
|
28927
|
-
yield this.subscribeConnection.setLocalDescription(t3), this.signal.answer(t3), d2.d(
|
28924
|
+
yield this.subscribeConnection.setLocalDescription(t3), this.signal.answer(t3), d2.d(I2, "[role=SUBSCRIBE] onOffer renegotiation DONE \u2705");
|
28928
28925
|
} catch (t3) {
|
28929
|
-
d2.d(
|
28926
|
+
d2.d(I2, "[role=SUBSCRIBE] onOffer renegotiation FAILED \u274C", t3), this.state = "Failed";
|
28930
28927
|
let i3;
|
28931
|
-
t3 instanceof
|
28928
|
+
t3 instanceof v2 ? i3 = t3 : i3 = S2.GenericErrors.Unknown("PUBLISH", t3.message), this.observer.onFailure(i3), this.eventBus.analytics.publish(y2.subscribeFail(i3));
|
28932
28929
|
}
|
28933
28930
|
}), onTrickle: (e2) => c2(this, null, function* () {
|
28934
28931
|
let t3 = e2.target === 0 ? this.publishConnection : this.subscribeConnection;
|
@@ -28938,7 +28935,7 @@ var Yt = class {
|
|
28938
28935
|
}), onFailure: (e2) => {
|
28939
28936
|
this.joinParameters && this.retryScheduler.schedule({ category: 1, error: e2, task: this.retrySignalDisconnectTask, originalState: this.state });
|
28940
28937
|
}, onOffline: (e2) => c2(this, null, function* () {
|
28941
|
-
d2.d(
|
28938
|
+
d2.d(I2, "socket offline", tr[this.state]);
|
28942
28939
|
try {
|
28943
28940
|
this.state !== "Leaving" && this.joinParameters && this.retryScheduler.schedule({ category: 1, error: S2.WebSocketConnectionErrors.WebSocketConnectionLost("RECONNECT_SIGNAL", e2), task: this.retrySignalDisconnectTask, originalState: this.state });
|
28944
28941
|
} catch (t3) {
|
@@ -28946,19 +28943,19 @@ var Yt = class {
|
|
28946
28943
|
}
|
28947
28944
|
}), onOnline: () => {
|
28948
28945
|
var e2;
|
28949
|
-
d2.d(
|
28946
|
+
d2.d(I2, "socket online", tr[this.state]), this.analyticsSignalTransport.flushFailedEvents((e2 = this.store.getLocalPeer()) == null ? void 0 : e2.peerId);
|
28950
28947
|
}, onNetworkOnline: () => {
|
28951
28948
|
this.analyticsEventsService.flushFailedClientEvents();
|
28952
28949
|
} };
|
28953
|
-
this.signal = new
|
28954
|
-
this.analyticsSignalTransport = new
|
28950
|
+
this.signal = new Qt(this.signalObserver);
|
28951
|
+
this.analyticsSignalTransport = new or(this.signal);
|
28955
28952
|
this.publishDtlsStateTimer = 0;
|
28956
28953
|
this.lastPublishDtlsState = "new";
|
28957
28954
|
this.publishConnectionObserver = { onRenegotiationNeeded: () => c2(this, null, function* () {
|
28958
28955
|
yield this.performPublishRenegotiation();
|
28959
28956
|
}), onDTLSTransportStateChange: (e2) => {
|
28960
28957
|
var r3, s3, o3;
|
28961
|
-
if ((e2 === "failed" ? d2.w.bind(d2) : d2.d.bind(d2))(
|
28958
|
+
if ((e2 === "failed" ? d2.w.bind(d2) : d2.d.bind(d2))(I2, `Publisher on dtls transport state change: ${e2}`), !e2 || this.lastPublishDtlsState === e2 || (this.lastPublishDtlsState = e2, this.publishDtlsStateTimer !== 0 && (clearTimeout(this.publishDtlsStateTimer), this.publishDtlsStateTimer = 0), e2 !== "connecting" && e2 !== "failed"))
|
28962
28959
|
return;
|
28963
28960
|
let i3 = (o3 = (s3 = (r3 = this.initConfig) == null ? void 0 : r3.config) == null ? void 0 : s3.dtlsStateTimeouts) == null ? void 0 : o3[e2];
|
28964
28961
|
!i3 || i3 <= 0 || (this.publishDtlsStateTimer = window.setTimeout(() => {
|
@@ -28970,14 +28967,14 @@ var Yt = class {
|
|
28970
28967
|
}
|
28971
28968
|
}, i3));
|
28972
28969
|
}, onDTLSTransportError: (e2) => {
|
28973
|
-
d2.e(
|
28970
|
+
d2.e(I2, `onDTLSTransportError ${e2.name} ${e2.message}`, e2), this.eventBus.analytics.publish(y2.disconnect(e2));
|
28974
28971
|
}, onIceConnectionChange: (e2) => c2(this, null, function* () {
|
28975
|
-
(e2 === "disconnected" ? d2.w.bind(d2) : d2.d.bind(d2))(
|
28972
|
+
(e2 === "disconnected" ? d2.w.bind(d2) : d2.d.bind(d2))(I2, `Publish ice connection state change: ${e2}`);
|
28976
28973
|
}), onConnectionStateChange: (e2) => c2(this, null, function* () {
|
28977
28974
|
var i3, r3, s3, o3, n3, l3, u3, p3;
|
28978
|
-
(e2 === "disconnected" ? d2.w.bind(d2) : d2.d.bind(d2))(
|
28979
|
-
var h2, T, g2,
|
28980
|
-
((h2 = this.publishConnection) == null ? void 0 : h2.connectionState) === "disconnected" && this.handleIceConnectionFailure(0, S2.WebrtcErrors.ICEDisconnected("PUBLISH", `local candidate - ${(
|
28975
|
+
(e2 === "disconnected" ? d2.w.bind(d2) : d2.d.bind(d2))(I2, `Publish connection state change: ${e2}`), e2 === "connected" && ((i3 = this.connectivityListener) == null || i3.onICESuccess(true), (r3 = this.publishConnection) == null || r3.handleSelectedIceCandidatePairs()), e2 === "disconnected" && setTimeout(() => {
|
28976
|
+
var h2, T, g2, f2, P7, k2, w2;
|
28977
|
+
((h2 = this.publishConnection) == null ? void 0 : h2.connectionState) === "disconnected" && this.handleIceConnectionFailure(0, S2.WebrtcErrors.ICEDisconnected("PUBLISH", `local candidate - ${(f2 = (g2 = (T = this.publishConnection) == null ? void 0 : T.selectedCandidatePair) == null ? void 0 : g2.local) == null ? void 0 : f2.candidate}; remote candidate - ${(w2 = (k2 = (P7 = this.publishConnection) == null ? void 0 : P7.selectedCandidatePair) == null ? void 0 : k2.remote) == null ? void 0 : w2.candidate}`));
|
28981
28978
|
}, 5e3), e2 === "failed" && (yield this.handleIceConnectionFailure(0, S2.WebrtcErrors.ICEFailure("PUBLISH", `local candidate - ${(n3 = (o3 = (s3 = this.publishConnection) == null ? void 0 : s3.selectedCandidatePair) == null ? void 0 : o3.local) == null ? void 0 : n3.candidate}; remote candidate - ${(p3 = (u3 = (l3 = this.publishConnection) == null ? void 0 : l3.selectedCandidatePair) == null ? void 0 : u3.remote) == null ? void 0 : p3.candidate}`)));
|
28982
28979
|
}), onIceCandidate: (e2) => {
|
28983
28980
|
var t3;
|
@@ -28989,20 +28986,20 @@ var Yt = class {
|
|
28989
28986
|
this.subscribeConnectionObserver = { onApiChannelMessage: (e2) => {
|
28990
28987
|
this.observer.onNotification(JSON.parse(e2));
|
28991
28988
|
}, onTrackAdd: (e2) => {
|
28992
|
-
d2.d(
|
28989
|
+
d2.d(I2, "[Subscribe] onTrackAdd", `${e2}`), this.observer.onTrackAdd(e2);
|
28993
28990
|
}, onTrackRemove: (e2) => {
|
28994
|
-
d2.d(
|
28991
|
+
d2.d(I2, "[Subscribe] onTrackRemove", `${e2}`), this.observer.onTrackRemove(e2);
|
28995
28992
|
}, onIceConnectionChange: (e2) => c2(this, null, function* () {
|
28996
28993
|
var i3;
|
28997
|
-
if ((e2 === "disconnected" ? d2.w.bind(d2) : d2.d.bind(d2))(
|
28994
|
+
if ((e2 === "disconnected" ? d2.w.bind(d2) : d2.d.bind(d2))(I2, `Subscribe ice connection state change: ${e2}`), e2 === "connected") {
|
28998
28995
|
let r3 = this.callbacks.get(tt);
|
28999
28996
|
this.callbacks.delete(tt), (i3 = this.connectivityListener) == null || i3.onICESuccess(false), r3 && r3.promise.resolve(true);
|
29000
28997
|
}
|
29001
28998
|
}), onConnectionStateChange: (e2) => c2(this, null, function* () {
|
29002
28999
|
var i3, r3, s3, o3, n3, l3;
|
29003
|
-
(e2 === "disconnected" ? d2.w.bind(d2) : d2.d.bind(d2))(
|
29004
|
-
var u3, p3, h2, T, g2,
|
29005
|
-
((u3 = this.subscribeConnection) == null ? void 0 : u3.connectionState) === "disconnected" && this.handleIceConnectionFailure(1, S2.WebrtcErrors.ICEDisconnected("SUBSCRIBE", `local candidate - ${(T = (h2 = (p3 = this.subscribeConnection) == null ? void 0 : p3.selectedCandidatePair) == null ? void 0 : h2.local) == null ? void 0 : T.candidate}; remote candidate - ${(
|
29000
|
+
(e2 === "disconnected" ? d2.w.bind(d2) : d2.d.bind(d2))(I2, `Subscribe connection state change: ${e2}`), e2 === "failed" && (yield this.handleIceConnectionFailure(1, S2.WebrtcErrors.ICEFailure("SUBSCRIBE", `local candidate - ${(s3 = (r3 = (i3 = this.subscribeConnection) == null ? void 0 : i3.selectedCandidatePair) == null ? void 0 : r3.local) == null ? void 0 : s3.candidate}; remote candidate - ${(l3 = (n3 = (o3 = this.subscribeConnection) == null ? void 0 : o3.selectedCandidatePair) == null ? void 0 : n3.remote) == null ? void 0 : l3.candidate}`))), e2 === "disconnected" && setTimeout(() => {
|
29001
|
+
var u3, p3, h2, T, g2, f2, P7;
|
29002
|
+
((u3 = this.subscribeConnection) == null ? void 0 : u3.connectionState) === "disconnected" && this.handleIceConnectionFailure(1, S2.WebrtcErrors.ICEDisconnected("SUBSCRIBE", `local candidate - ${(T = (h2 = (p3 = this.subscribeConnection) == null ? void 0 : p3.selectedCandidatePair) == null ? void 0 : h2.local) == null ? void 0 : T.candidate}; remote candidate - ${(P7 = (f2 = (g2 = this.subscribeConnection) == null ? void 0 : g2.selectedCandidatePair) == null ? void 0 : f2.remote) == null ? void 0 : P7.candidate}`));
|
29006
29003
|
}, 5e3), e2 === "connected" && this.handleSubscribeConnectionConnected();
|
29007
29004
|
}), onIceCandidate: (e2) => {
|
29008
29005
|
var t3;
|
@@ -29012,7 +29009,7 @@ var Yt = class {
|
|
29012
29009
|
(t3 = this.connectivityListener) == null || t3.onSelectedICECandidatePairChange(e2, false);
|
29013
29010
|
} };
|
29014
29011
|
this.handleLocalRoleUpdate = (i3) => c2(this, [i3], function* ({ oldRole: e2, newRole: t3 }) {
|
29015
|
-
!this.doesRoleNeedWebRTC(e2) && this.doesRoleNeedWebRTC(t3) && (d2.d(
|
29012
|
+
!this.doesRoleNeedWebRTC(e2) && this.doesRoleNeedWebRTC(t3) && (d2.d(I2, "Local peer role updated to webrtc role, creating PeerConnections and performing inital publish negotiation \u23F3"), this.createPeerConnections(), yield this.negotiateOnFirstPublish());
|
29016
29013
|
});
|
29017
29014
|
this.retryPublishIceFailedTask = () => c2(this, null, function* () {
|
29018
29015
|
if (this.publishConnection) {
|
@@ -29036,18 +29033,18 @@ var Yt = class {
|
|
29036
29033
|
});
|
29037
29034
|
this.retrySignalDisconnectTask = () => c2(this, null, function* () {
|
29038
29035
|
var t3;
|
29039
|
-
d2.d(
|
29036
|
+
d2.d(I2, "retrySignalDisconnectTask", { signalConnected: this.signal.isConnected }), this.signal.isConnected || (yield this.internalConnect(this.joinParameters.authToken, this.joinParameters.endpoint, this.joinParameters.peerId, this.joinParameters.iceServers));
|
29040
29037
|
let e2 = (t3 = this.store.getRoom()) != null && t3.joinedAt ? this.signal.isConnected && (yield this.retryPublishIceFailedTask()) : this.signal.isConnected;
|
29041
29038
|
return this.signal.trackUpdate(this.trackStates), e2;
|
29042
29039
|
});
|
29043
29040
|
var u2, p2;
|
29044
|
-
this.webrtcInternals = new
|
29041
|
+
this.webrtcInternals = new pi(this.store, this.eventBus, (u2 = this.publishConnection) == null ? void 0 : u2.nativeConnection, (p2 = this.subscribeConnection) == null ? void 0 : p2.nativeConnection);
|
29045
29042
|
let l2 = (h2, T) => c2(this, null, function* () {
|
29046
29043
|
h2 !== this.state && (this.state = h2, yield this.observer.onStateChange(this.state, T));
|
29047
29044
|
});
|
29048
|
-
this.retryScheduler = new
|
29049
|
-
var g2,
|
29050
|
-
let T = ((
|
29045
|
+
this.retryScheduler = new rr(l2, this.sendErrorAnalyticsEvent.bind(this)), this.eventBus.statsUpdate.subscribe((h2) => {
|
29046
|
+
var g2, f2;
|
29047
|
+
let T = ((f2 = (g2 = h2.getLocalPeerStats()) == null ? void 0 : g2.subscribe) == null ? void 0 : f2.bitrate) || 0;
|
29051
29048
|
this.maxSubscribeBitrate = Math.max(this.maxSubscribeBitrate, T);
|
29052
29049
|
}), this.eventBus.localAudioEnabled.subscribe(({ track: h2 }) => this.trackUpdate(h2)), this.eventBus.localVideoEnabled.subscribe(({ track: h2 }) => this.trackUpdate(h2));
|
29053
29050
|
}
|
@@ -29070,24 +29067,24 @@ var Yt = class {
|
|
29070
29067
|
}
|
29071
29068
|
join(e, t2, i2, r2, s2 = false, o2) {
|
29072
29069
|
return c2(this, null, function* () {
|
29073
|
-
d2.d(
|
29070
|
+
d2.d(I2, "join: started \u23F0");
|
29074
29071
|
try {
|
29075
|
-
(!this.signal.isConnected || !this.initConfig) && (yield this.connect(e, r2, t2, i2, s2, o2)), this.validateNotDisconnected("connect"), this.initConfig && (yield this.waitForLocalRoleAvailability(), yield this.createConnectionsAndNegotiateJoin(i2, s2), yield this.initRtcStatsMonitor(), d2.d(
|
29072
|
+
(!this.signal.isConnected || !this.initConfig) && (yield this.connect(e, r2, t2, i2, s2, o2)), this.validateNotDisconnected("connect"), this.initConfig && (yield this.waitForLocalRoleAvailability(), yield this.createConnectionsAndNegotiateJoin(i2, s2), yield this.initRtcStatsMonitor(), d2.d(I2, "\u2705 join: Negotiated over PUBLISH connection"));
|
29076
29073
|
} catch (n2) {
|
29077
|
-
d2.e(
|
29074
|
+
d2.e(I2, `join: failed \u274C [token=${e}]`, n2), this.state = "Failed";
|
29078
29075
|
let l2 = n2;
|
29079
29076
|
throw l2.isTerminal = l2.isTerminal || l2.code === 500, yield this.observer.onStateChange(this.state, l2), l2;
|
29080
29077
|
}
|
29081
|
-
d2.d(
|
29078
|
+
d2.d(I2, "\u2705 join: successful"), this.state = "Joined", this.observer.onStateChange(this.state);
|
29082
29079
|
});
|
29083
29080
|
}
|
29084
29081
|
connect(e, t2, i2, r2, s2 = false, o2) {
|
29085
29082
|
return c2(this, null, function* () {
|
29086
|
-
this.setTransportStateForConnect(), this.joinParameters = new
|
29083
|
+
this.setTransportStateForConnect(), this.joinParameters = new er(e, i2, r2.name, r2.metaData, t2, s2, o2);
|
29087
29084
|
try {
|
29088
29085
|
return yield this.internalConnect(e, t2, i2, o2);
|
29089
29086
|
} catch (n2) {
|
29090
|
-
if (n2 instanceof
|
29087
|
+
if (n2 instanceof v2 && ([E2.WebSocketConnectionErrors.WEBSOCKET_CONNECTION_LOST, E2.WebSocketConnectionErrors.FAILED_TO_CONNECT, E2.WebSocketConnectionErrors.ABNORMAL_CLOSE, E2.APIErrors.ENDPOINT_UNREACHABLE].includes(n2.code) || n2.code.toString().startsWith("5") || n2.code.toString().startsWith("429"))) {
|
29091
29088
|
let u2 = () => c2(this, null, function* () {
|
29092
29089
|
return yield this.internalConnect(e, t2, i2, o2), !!(this.initConfig && this.initConfig.endpoint);
|
29093
29090
|
});
|
@@ -29100,18 +29097,18 @@ var Yt = class {
|
|
29100
29097
|
leave(e) {
|
29101
29098
|
return c2(this, null, function* () {
|
29102
29099
|
var t2, i2, r2, s2, o2;
|
29103
|
-
this.retryScheduler.reset(), this.joinParameters = void 0, d2.d(
|
29100
|
+
this.retryScheduler.reset(), this.joinParameters = void 0, d2.d(I2, "leaving in transport");
|
29104
29101
|
try {
|
29105
29102
|
let n2 = this.pluginUsageTracker.getPluginUsage("HMSKrispPlugin");
|
29106
29103
|
if (n2 && this.eventBus.analytics.publish(y2.getKrispUsage(n2)), this.state = "Leaving", (t2 = this.publishStatsAnalytics) == null || t2.stop(), (i2 = this.subscribeStatsAnalytics) == null || i2.stop(), (r2 = this.webrtcInternals) == null || r2.cleanup(), yield (s2 = this.publishConnection) == null ? void 0 : s2.close(), yield (o2 = this.subscribeConnection) == null ? void 0 : o2.close(), e)
|
29107
29104
|
try {
|
29108
|
-
this.signal.leave(), d2.d(
|
29105
|
+
this.signal.leave(), d2.d(I2, "signal leave done");
|
29109
29106
|
} catch (l2) {
|
29110
|
-
d2.w(
|
29107
|
+
d2.w(I2, "failed to send leave on websocket to server", l2);
|
29111
29108
|
}
|
29112
29109
|
this.analyticsEventsService.flushFailedClientEvents(), this.analyticsEventsService.reset(), yield this.signal.close();
|
29113
29110
|
} catch (n2) {
|
29114
|
-
this.eventBus.analytics.publish(y2.disconnect(n2)), d2.e(
|
29111
|
+
this.eventBus.analytics.publish(y2.disconnect(n2)), d2.e(I2, "leave: FAILED \u274C", n2);
|
29115
29112
|
} finally {
|
29116
29113
|
this.state = "Disconnected", this.observer.onStateChange(this.state);
|
29117
29114
|
}
|
@@ -29137,26 +29134,26 @@ var Yt = class {
|
|
29137
29134
|
trackUpdate(e) {
|
29138
29135
|
let i2 = Array.from(this.trackStates.values()).find((r2) => e.type === r2.type && e.source === r2.source);
|
29139
29136
|
if (i2) {
|
29140
|
-
let r2 = new
|
29141
|
-
this.trackStates.set(i2.track_id, r2), d2.d(
|
29137
|
+
let r2 = new _t(M2(m({}, i2), { mute: !e.enabled }));
|
29138
|
+
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]]));
|
29142
29139
|
}
|
29143
29140
|
}
|
29144
29141
|
publishTrack(e) {
|
29145
29142
|
return c2(this, null, function* () {
|
29146
|
-
e.publishedTrackId = e.getTrackIDBeingSent(), d2.d(
|
29143
|
+
e.publishedTrackId = e.getTrackIDBeingSent(), d2.d(I2, `\u23F3 publishTrack: trackId=${e.trackId}, toPublishTrackId=${e.publishedTrackId}`, `${e}`), this.trackStates.set(e.publishedTrackId, new _t(e));
|
29147
29144
|
let t2 = new Promise((s2, o2) => {
|
29148
29145
|
this.callbacks.set(et, { promise: { resolve: s2, reject: o2 }, action: "PUBLISH", extra: {} });
|
29149
29146
|
}), i2 = e.stream;
|
29150
29147
|
i2.setConnection(this.publishConnection);
|
29151
29148
|
let r2 = this.store.getSimulcastLayers(e.source);
|
29152
29149
|
i2.addTransceiver(e, r2), d2.time(`publish-${e.trackId}-${e.type}`), yield t2, d2.timeEnd(`publish-${e.trackId}-${e.type}`), this.store.addTrack(e), yield i2.setMaxBitrateAndFramerate(e).then(() => {
|
29153
|
-
d2.d(
|
29154
|
-
}).catch((s2) => d2.w(
|
29150
|
+
d2.d(I2, `Setting maxBitrate=${e.settings.maxBitrate} kpbs${e instanceof F ? ` and maxFramerate=${e.settings.maxFramerate}` : ""} for ${e.source} ${e.type} ${e.trackId}`);
|
29151
|
+
}).catch((s2) => d2.w(I2, "Failed setting maxBitrate and maxFramerate", s2)), e.isPublished = true, d2.d(I2, `\u2705 publishTrack: trackId=${e.trackId}`, `${e}`, this.callbacks);
|
29155
29152
|
});
|
29156
29153
|
}
|
29157
29154
|
unpublishTrack(e) {
|
29158
29155
|
return c2(this, null, function* () {
|
29159
|
-
if (d2.d(
|
29156
|
+
if (d2.d(I2, `\u23F3 unpublishTrack: trackId=${e.trackId}`, `${e}`), e.publishedTrackId && this.trackStates.has(e.publishedTrackId))
|
29160
29157
|
this.trackStates.delete(e.publishedTrackId);
|
29161
29158
|
else {
|
29162
29159
|
let s2 = Array.from(this.trackStates.values()).find((o2) => e.type === o2.type && e.source === o2.source);
|
@@ -29165,7 +29162,7 @@ var Yt = class {
|
|
29165
29162
|
let t2 = new Promise((r2, s2) => {
|
29166
29163
|
this.callbacks.set(et, { promise: { resolve: r2, reject: s2 }, action: "UNPUBLISH", extra: {} });
|
29167
29164
|
});
|
29168
|
-
e.stream.removeSender(e), yield t2, yield e.cleanup(), this.store.removeTrack(e), d2.d(
|
29165
|
+
e.stream.removeSender(e), yield t2, yield e.cleanup(), this.store.removeTrack(e), d2.d(I2, `\u2705 unpublishTrack: trackId=${e.trackId}`, this.callbacks);
|
29169
29166
|
});
|
29170
29167
|
}
|
29171
29168
|
waitForLocalRoleAvailability() {
|
@@ -29181,15 +29178,15 @@ var Yt = class {
|
|
29181
29178
|
});
|
29182
29179
|
}
|
29183
29180
|
createPeerConnections() {
|
29184
|
-
this.initConfig && (this.publishConnection || (this.publishConnection = new
|
29181
|
+
this.initConfig && (this.publishConnection || (this.publishConnection = new Kt(this.signal, this.initConfig.rtcConfiguration, this.publishConnectionObserver)), this.subscribeConnection || (this.subscribeConnection = new jt(this.signal, this.initConfig.rtcConfiguration, this.isFlagEnabled.bind(this), this.subscribeConnectionObserver)));
|
29185
29182
|
}
|
29186
29183
|
negotiateJoinWithRetry(s2) {
|
29187
29184
|
return c2(this, arguments, function* ({ name: e, data: t2, autoSubscribeVideo: i2, isWebRTC: r2 = true }) {
|
29188
29185
|
try {
|
29189
29186
|
yield this.negotiateJoin({ name: e, data: t2, autoSubscribeVideo: i2, isWebRTC: r2 });
|
29190
29187
|
} catch (o2) {
|
29191
|
-
d2.e(
|
29192
|
-
let n2 = o2 instanceof
|
29188
|
+
d2.e(I2, "Join negotiation failed \u274C", o2);
|
29189
|
+
let n2 = o2 instanceof v2 ? o2 : S2.WebsocketMethodErrors.ServerErrors(500, "JOIN", `Websocket join error - ${o2.message}`), l2 = parseInt(`${n2.code / 100}`) === 5 || [E2.WebSocketConnectionErrors.WEBSOCKET_CONNECTION_LOST, 429].includes(n2.code);
|
29193
29190
|
if (n2.code === 410 && (n2.isTerminal = true), l2) {
|
29194
29191
|
this.joinRetryCount = 0, n2.isTerminal = false;
|
29195
29192
|
let u2 = () => c2(this, null, function* () {
|
@@ -29208,8 +29205,8 @@ var Yt = class {
|
|
29208
29205
|
}
|
29209
29206
|
negotiateJoinWebRTC(r2) {
|
29210
29207
|
return c2(this, arguments, function* ({ name: e, data: t2, autoSubscribeVideo: i2 }) {
|
29211
|
-
if (d2.d(
|
29212
|
-
return d2.e(
|
29208
|
+
if (d2.d(I2, "\u23F3 join: Negotiating over PUBLISH connection"), !this.publishConnection)
|
29209
|
+
return d2.e(I2, "Publish peer connection not found, cannot negotiate"), false;
|
29213
29210
|
let s2 = yield this.publishConnection.createOffer();
|
29214
29211
|
yield this.publishConnection.setLocalDescription(s2);
|
29215
29212
|
let o2 = this.isFlagEnabled("subscribeDegradation"), n2 = this.isFlagEnabled("simulcast"), l2 = this.isFlagEnabled("onDemandTracks"), u2 = yield this.signal.join(e, t2, !i2, o2, n2, l2, s2);
|
@@ -29221,15 +29218,15 @@ var Yt = class {
|
|
29221
29218
|
}
|
29222
29219
|
negotiateJoinNonWebRTC(r2) {
|
29223
29220
|
return c2(this, arguments, function* ({ name: e, data: t2, autoSubscribeVideo: i2 }) {
|
29224
|
-
d2.d(
|
29221
|
+
d2.d(I2, "\u23F3 join: Negotiating Non-WebRTC");
|
29225
29222
|
let s2 = this.isFlagEnabled("subscribeDegradation"), o2 = this.isFlagEnabled("simulcast"), n2 = this.isFlagEnabled("onDemandTracks");
|
29226
29223
|
return !!(yield this.signal.join(e, t2, !i2, s2, o2, n2));
|
29227
29224
|
});
|
29228
29225
|
}
|
29229
29226
|
negotiateOnFirstPublish() {
|
29230
29227
|
return c2(this, null, function* () {
|
29231
|
-
if (d2.d(
|
29232
|
-
return d2.e(
|
29228
|
+
if (d2.d(I2, "\u23F3 Negotiating offer over PUBLISH connection"), !this.publishConnection)
|
29229
|
+
return d2.e(I2, "Publish peer connection not found, cannot negotiate"), false;
|
29233
29230
|
let e = yield this.publishConnection.createOffer(this.trackStates);
|
29234
29231
|
yield this.publishConnection.setLocalDescription(e);
|
29235
29232
|
let t2 = yield this.signal.offer(e, this.trackStates);
|
@@ -29241,21 +29238,21 @@ var Yt = class {
|
|
29241
29238
|
}
|
29242
29239
|
performPublishRenegotiation(e) {
|
29243
29240
|
return c2(this, null, function* () {
|
29244
|
-
d2.d(
|
29241
|
+
d2.d(I2, "\u23F3 [role=PUBLISH] onRenegotiationNeeded START", this.trackStates);
|
29245
29242
|
let t2 = this.callbacks.get(et);
|
29246
29243
|
if (t2) {
|
29247
29244
|
if (!this.publishConnection) {
|
29248
|
-
d2.e(
|
29245
|
+
d2.e(I2, "Publish peer connection not found, cannot renegotiate");
|
29249
29246
|
return;
|
29250
29247
|
}
|
29251
29248
|
try {
|
29252
29249
|
let i2 = yield this.publishConnection.createOffer(this.trackStates, e);
|
29253
29250
|
yield this.publishConnection.setLocalDescription(i2), d2.time("renegotiation-offer-exchange");
|
29254
29251
|
let r2 = yield this.signal.offer(i2, this.trackStates);
|
29255
|
-
this.callbacks.delete(et), d2.timeEnd("renegotiation-offer-exchange"), yield this.publishConnection.setRemoteDescription(r2), t2.promise.resolve(true), d2.d(
|
29252
|
+
this.callbacks.delete(et), d2.timeEnd("renegotiation-offer-exchange"), yield this.publishConnection.setRemoteDescription(r2), t2.promise.resolve(true), d2.d(I2, "[role=PUBLISH] onRenegotiationNeeded DONE \u2705");
|
29256
29253
|
} catch (i2) {
|
29257
29254
|
let r2;
|
29258
|
-
i2 instanceof
|
29255
|
+
i2 instanceof v2 ? r2 = i2 : r2 = S2.GenericErrors.Unknown("PUBLISH", i2.message), t2.promise.reject(r2), d2.d(I2, "[role=PUBLISH] onRenegotiationNeeded FAILED \u274C");
|
29259
29256
|
}
|
29260
29257
|
}
|
29261
29258
|
});
|
@@ -29268,28 +29265,28 @@ var Yt = class {
|
|
29268
29265
|
internalConnect(e, t2, i2, r2) {
|
29269
29266
|
return c2(this, null, function* () {
|
29270
29267
|
var o2, n2, l2;
|
29271
|
-
d2.d(
|
29268
|
+
d2.d(I2, "connect: started \u23F0");
|
29272
29269
|
let s2 = /* @__PURE__ */ new Date();
|
29273
29270
|
try {
|
29274
|
-
this.analyticsTimer.start("init_response_time"), this.initConfig = yield
|
29271
|
+
this.analyticsTimer.start("init_response_time"), this.initConfig = yield Jt.fetchInitConfig({ token: e, peerId: i2, userAgent: this.store.getUserAgent(), initEndpoint: t2, iceServers: r2 }), (o2 = this.connectivityListener) == null || o2.onInitSuccess(this.initConfig.endpoint);
|
29275
29272
|
let u2 = this.store.getRoom();
|
29276
|
-
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(
|
29273
|
+
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;
|
29277
29274
|
} catch (u2) {
|
29278
|
-
throw this.state !== "Reconnecting" && this.eventBus.analytics.publish(y2.connect(u2, this.getAdditionalAnalyticsProperties(), s2, /* @__PURE__ */ new Date(), t2)), d2.e(
|
29275
|
+
throw this.state !== "Reconnecting" && this.eventBus.analytics.publish(y2.connect(u2, this.getAdditionalAnalyticsProperties(), s2, /* @__PURE__ */ new Date(), t2)), d2.e(I2, "\u274C internal connect: failed", u2), u2;
|
29279
29276
|
}
|
29280
29277
|
});
|
29281
29278
|
}
|
29282
29279
|
validateNotDisconnected(e) {
|
29283
29280
|
if (this.state === "Disconnected")
|
29284
|
-
throw d2.w(
|
29281
|
+
throw d2.w(I2, "aborting join as transport state is disconnected"), S2.GenericErrors.ValidationFailed(`leave called before join could complete - stage=${e}`);
|
29285
29282
|
}
|
29286
29283
|
openSignal(e, t2) {
|
29287
29284
|
return c2(this, null, function* () {
|
29288
29285
|
if (!this.initConfig)
|
29289
29286
|
throw S2.APIErrors.InitConfigNotAvailable("INIT", "Init Config not found");
|
29290
|
-
d2.d(
|
29287
|
+
d2.d(I2, "\u23F3 internal connect: connecting to ws endpoint", this.initConfig.endpoint);
|
29291
29288
|
let i2 = new URL(this.initConfig.endpoint);
|
29292
|
-
i2.searchParams.set("peer", t2), i2.searchParams.set("token", e), i2.searchParams.set("user_agent_v2", this.store.getUserAgent()), i2.searchParams.set("protocol_version", Vs), i2.searchParams.set("protocol_spec", Fs), this.endpoint = i2.toString(), this.analyticsTimer.start("ws_connect_time"), yield this.signal.open(this.endpoint), this.analyticsTimer.end("ws_connect_time"), this.analyticsTimer.start("on_policy_change_time"), this.analyticsTimer.start("room_state_time"), d2.d(
|
29289
|
+
i2.searchParams.set("peer", t2), i2.searchParams.set("token", e), i2.searchParams.set("user_agent_v2", this.store.getUserAgent()), i2.searchParams.set("protocol_version", Vs), i2.searchParams.set("protocol_spec", Fs), this.endpoint = i2.toString(), this.analyticsTimer.start("ws_connect_time"), yield this.signal.open(this.endpoint), this.analyticsTimer.end("ws_connect_time"), this.analyticsTimer.start("on_policy_change_time"), this.analyticsTimer.start("room_state_time"), d2.d(I2, "\u2705 internal connect: connected to ws endpoint");
|
29293
29290
|
});
|
29294
29291
|
}
|
29295
29292
|
initRtcStatsMonitor() {
|
@@ -29300,7 +29297,7 @@ var Yt = class {
|
|
29300
29297
|
}
|
29301
29298
|
initStatsAnalytics() {
|
29302
29299
|
var e, t2;
|
29303
|
-
this.isFlagEnabled("publishStats") && (this.publishStatsAnalytics = new
|
29300
|
+
this.isFlagEnabled("publishStats") && (this.publishStatsAnalytics = new Gt(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 Wt(this.store, this.eventBus, this.getValueFromInitConfig("subscribeStats", "maxSampleWindowSize", 10), this.getValueFromInitConfig("subscribeStats", "maxSamplePushInterval", 60)), (t2 = this.getWebrtcInternals()) == null || t2.start());
|
29304
29301
|
}
|
29305
29302
|
getValueFromInitConfig(e, t2, i2) {
|
29306
29303
|
var r2, s2;
|
@@ -29355,17 +29352,32 @@ var Yt = class {
|
|
29355
29352
|
}
|
29356
29353
|
getAdditionalAnalyticsProperties() {
|
29357
29354
|
var o2, n2, l2, u2, p2, h2, T, g2;
|
29358
|
-
let e = Ba(), t2 = typeof document != "undefined" && document.hidden, i2 = this.store.getRemoteVideoTracks().filter((
|
29355
|
+
let e = Ba(), t2 = typeof document != "undefined" && document.hidden, i2 = this.store.getRemoteVideoTracks().filter((f2) => f2.degraded).length, r2 = (u2 = (l2 = (n2 = (o2 = this.getWebrtcInternals()) == null ? void 0 : o2.getCurrentStats()) == null ? void 0 : n2.getLocalPeerStats()) == null ? void 0 : l2.publish) == null ? void 0 : u2.bitrate, s2 = (g2 = (T = (h2 = (p2 = this.getWebrtcInternals()) == null ? void 0 : p2.getCurrentStats()) == null ? void 0 : h2.getLocalPeerStats()) == null ? void 0 : T.subscribe) == null ? void 0 : g2.bitrate;
|
29359
29356
|
return { network_info: e, document_hidden: t2, num_degraded_tracks: i2, bitrate: { publish: r2, subscribe: s2 }, max_sub_bitrate: this.maxSubscribeBitrate, recent_pong_response_times: this.signal.getPongResponseTimes(), transport_state: this.state };
|
29360
29357
|
}
|
29361
29358
|
};
|
29359
|
+
function pr(a11) {
|
29360
|
+
if (!a11 || a11.length === 0)
|
29361
|
+
throw S2.APIErrors.InvalidTokenFormat("INIT", "Token cannot be an empty string or undefined or null");
|
29362
|
+
let e = a11.split(".");
|
29363
|
+
if (e.length !== 3)
|
29364
|
+
throw S2.APIErrors.InvalidTokenFormat("INIT", "Expected 3 '.' separate fields - header, payload and signature respectively");
|
29365
|
+
let t2 = atob(e[1]);
|
29366
|
+
try {
|
29367
|
+
let i2 = JSON.parse(t2);
|
29368
|
+
return { roomId: i2.room_id, userId: i2.user_id, role: i2.role };
|
29369
|
+
} catch (i2) {
|
29370
|
+
throw S2.APIErrors.InvalidTokenFormat("INIT", `couldn't parse to json - ${i2.message}`);
|
29371
|
+
}
|
29372
|
+
}
|
29362
29373
|
var Fa = { published: false, isInitialised: false, isReconnecting: false, isPreviewInProgress: false, isPreviewCalled: false, isJoinInProgress: false, deviceManagersInitialised: false };
|
29363
29374
|
var hr = class {
|
29364
29375
|
constructor() {
|
29365
29376
|
this.TAG = "[HMSSdk]:";
|
29366
29377
|
this.transportState = "Disconnected";
|
29367
|
-
this.analyticsTimer = new
|
29378
|
+
this.analyticsTimer = new ci();
|
29368
29379
|
this.sdkState = m({}, Fa);
|
29380
|
+
this.isDiagnostics = false;
|
29369
29381
|
this.playlistSettings = { video: { bitrate: Dr }, audio: { bitrate: wr } };
|
29370
29382
|
this.handleAutoplayError = (e) => {
|
29371
29383
|
var t2, i2;
|
@@ -29434,7 +29446,7 @@ var hr = class {
|
|
29434
29446
|
var s2, o2, n2, l2;
|
29435
29447
|
if (e.error && e.type) {
|
29436
29448
|
let u2 = e.type.includes("audio") ? (s2 = this.localPeer) == null ? void 0 : s2.audioTrack : (o2 = this.localPeer) == null ? void 0 : o2.videoTrack;
|
29437
|
-
(n2 = this.errorListener) == null || n2.onError(e.error), [
|
29449
|
+
(n2 = this.errorListener) == null || n2.onError(e.error), [E2.TracksErrors.CANT_ACCESS_CAPTURE_DEVICE, E2.TracksErrors.DEVICE_IN_USE, E2.TracksErrors.DEVICE_NOT_AVAILABLE].includes(e.error.code) && u2 && (u2.setEnabled(false), (l2 = this.listener) == null || l2.onTrackUpdate(2, u2, this.localPeer));
|
29438
29450
|
}
|
29439
29451
|
})();
|
29440
29452
|
};
|
@@ -29447,8 +29459,9 @@ var hr = class {
|
|
29447
29459
|
yield this.transport.handleLocalRoleUpdate({ oldRole: e, newRole: t2 }), yield (r2 = this.roleChangeManager) == null ? void 0 : r2.handleLocalPeerRoleUpdate({ oldRole: e, newRole: t2 }), yield this.interactivityCenter.whiteboard.handleLocalRoleUpdate();
|
29448
29460
|
});
|
29449
29461
|
this.sendAudioPresenceFailed = () => {
|
29462
|
+
var t2;
|
29450
29463
|
let e = S2.TracksErrors.NoAudioDetected("PREVIEW");
|
29451
|
-
d2.w(this.TAG, "Audio Presence Failure", this.transportState, e);
|
29464
|
+
d2.w(this.TAG, "Audio Presence Failure", this.transportState, e), this.isDiagnostics && ((t2 = this.listener) == null || t2.onError(e));
|
29452
29465
|
};
|
29453
29466
|
this.sendJoinAnalyticsEvent = (e = false, t2) => {
|
29454
29467
|
this.eventBus.analytics.publish(y2.join(M2(m({ error: t2 }, this.analyticsTimer.getTimes()), { time: this.analyticsTimer.getTimeTaken("join_time"), is_preview_called: e, retries_join: this.transport.joinRetryCount })));
|
@@ -29457,11 +29470,11 @@ var hr = class {
|
|
29457
29470
|
this.eventBus.analytics.publish(y2.preview(M2(m({ error: e }, this.analyticsTimer.getTimes()), { time: this.analyticsTimer.getTimeTaken("preview_time") })));
|
29458
29471
|
};
|
29459
29472
|
this.sendAnalyticsEvent = (e) => {
|
29460
|
-
this.
|
29473
|
+
this.isDiagnostics || this.analyticsEventsService.queue(e).flush();
|
29461
29474
|
};
|
29462
29475
|
}
|
29463
29476
|
initNotificationManager() {
|
29464
|
-
this.notificationManager || (this.notificationManager = new
|
29477
|
+
this.notificationManager || (this.notificationManager = new Xi(this.store, this.eventBus, this.transport, this.listener, this.audioListener));
|
29465
29478
|
}
|
29466
29479
|
initStoreAndManagers(e) {
|
29467
29480
|
var t2, i2;
|
@@ -29469,7 +29482,7 @@ var hr = class {
|
|
29469
29482
|
(i2 = this.notificationManager) == null || i2.setListener(this.listener), this.audioSinkManager.setListener(this.listener), this.interactivityCenter.setListener(this.listener);
|
29470
29483
|
return;
|
29471
29484
|
}
|
29472
|
-
this.sdkState.isInitialised = true, this.store = new
|
29485
|
+
this.sdkState.isInitialised = true, this.store = new Nt(), this.eventBus = new Ut(), this.pluginUsageTracker = new Oi(this.eventBus), this.wakeLockManager = new _i(), this.networkTestManager = new wi(this.eventBus, this.listener), this.playlistManager = new bt(this, this.eventBus), this.deviceManager = new xt(this.store, this.eventBus), this.audioSinkManager = new Ot(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 zt(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 Vt(this.transport, this.store, this.listener), this.eventBus.analytics.subscribe(this.sendAnalyticsEvent), this.eventBus.deviceChange.subscribe(this.handleDeviceChange), this.eventBus.audioPluginFailed.subscribe(this.handleAudioPluginError);
|
29473
29486
|
}
|
29474
29487
|
validateJoined(e) {
|
29475
29488
|
if (!this.localPeer)
|
@@ -29516,7 +29529,7 @@ var hr = class {
|
|
29516
29529
|
return this.interactivityCenter;
|
29517
29530
|
}
|
29518
29531
|
getPeerListIterator(e) {
|
29519
|
-
return new
|
29532
|
+
return new hi(this.transport, this.store, e);
|
29520
29533
|
}
|
29521
29534
|
updatePlaylistSettings(e) {
|
29522
29535
|
e.video && Object.assign(this.playlistSettings.video, e.video), e.audio && Object.assign(this.playlistSettings.audio, e.audio);
|
@@ -29527,7 +29540,7 @@ var hr = class {
|
|
29527
29540
|
}
|
29528
29541
|
preview(e, t2) {
|
29529
29542
|
return c2(this, null, function* () {
|
29530
|
-
if (
|
29543
|
+
if (gt(), St(), this.sdkState.isPreviewInProgress)
|
29531
29544
|
return Promise.reject(S2.GenericErrors.PreviewAlreadyInProgress("PREVIEW", "Preview already called"));
|
29532
29545
|
if (["Joined", "Reconnecting"].includes(this.transportState))
|
29533
29546
|
return this.midCallPreview(e.asRole, e.settings);
|
@@ -29587,17 +29600,17 @@ var hr = class {
|
|
29587
29600
|
join(e, t2) {
|
29588
29601
|
return c2(this, null, function* () {
|
29589
29602
|
var l2, u2, p2, h2, T, g2;
|
29590
|
-
if (
|
29603
|
+
if (gt(), St(), this.sdkState.isPreviewInProgress)
|
29591
29604
|
throw S2.GenericErrors.NotReady("JOIN", "Preview is in progress, can't join");
|
29592
29605
|
this.analyticsTimer.start("join_time"), this.sdkState.isJoinInProgress = true;
|
29593
|
-
let { roomId: i2, userId: r2, role: s2 } =
|
29594
|
-
(T = this.networkTestManager) == null || T.stop(), this.commonSetup(e, i2, t2), this.removeDevicesFromConfig(e), this.store.setConfig(e), this.store.createAndSetUserAgent(this.frameworkInfo),
|
29606
|
+
let { roomId: i2, userId: r2, role: s2 } = pr(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);
|
29607
|
+
(T = this.networkTestManager) == null || T.stop(), this.commonSetup(e, i2, t2), this.removeDevicesFromConfig(e), this.store.setConfig(e), this.store.createAndSetUserAgent(this.frameworkInfo), He.resumeContext();
|
29595
29608
|
let n2 = this.store.getConfig();
|
29596
|
-
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
|
29609
|
+
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 wt(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}`);
|
29597
29610
|
try {
|
29598
29611
|
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);
|
29599
|
-
} catch (
|
29600
|
-
throw this.analyticsTimer.end("join_time"), this.sdkState.isJoinInProgress = false, (g2 = this.listener) == null || g2.onError(
|
29612
|
+
} catch (f2) {
|
29613
|
+
throw this.analyticsTimer.end("join_time"), this.sdkState.isJoinInProgress = false, (g2 = this.listener) == null || g2.onError(f2), this.sendJoinAnalyticsEvent(this.sdkState.isPreviewCalled, f2), d2.e(this.TAG, "Unable to join room", f2), f2;
|
29601
29614
|
}
|
29602
29615
|
d2.timeEnd(`join-room-${i2}`);
|
29603
29616
|
});
|
@@ -29607,20 +29620,22 @@ var hr = class {
|
|
29607
29620
|
}
|
29608
29621
|
cleanup() {
|
29609
29622
|
var e, t2, i2;
|
29610
|
-
this.cleanDeviceManagers(), this.eventBus.analytics.unsubscribe(this.sendAnalyticsEvent), this.analyticsTimer.cleanup(),
|
29623
|
+
this.cleanDeviceManagers(), this.eventBus.analytics.unsubscribe(this.sendAnalyticsEvent), this.analyticsTimer.cleanup(), Q2.cleanup(), this.playlistManager.cleanup(), (e = this.wakeLockManager) == null || e.cleanup(), ve.cleanup(), this.notificationManager = void 0, d2.cleanup(), this.sdkState = m({}, Fa), this.localPeer && ((t2 = this.localPeer.audioTrack) == null || t2.cleanup(), this.localPeer.audioTrack = void 0, (i2 = this.localPeer.videoTrack) == null || i2.cleanup(), this.localPeer.videoTrack = void 0), this.store.cleanup(), this.listener = void 0, this.roleChangeManager && this.eventBus.localRoleUpdate.unsubscribe(this.handleLocalRoleUpdate);
|
29611
29624
|
}
|
29612
29625
|
leave(e) {
|
29613
29626
|
return this.internalLeave(e);
|
29614
29627
|
}
|
29615
29628
|
internalLeave(e = true, t2) {
|
29616
29629
|
return c2(this, null, function* () {
|
29617
|
-
var r2, s2, o2;
|
29630
|
+
var r2, s2, o2, n2;
|
29618
29631
|
let i2 = (r2 = this.store) == null ? void 0 : r2.getRoom();
|
29619
29632
|
if (i2) {
|
29620
29633
|
for (; (this.sdkState.isPreviewInProgress || this.sdkState.isJoinInProgress) && !(t2 != null && t2.isTerminal); )
|
29621
|
-
yield
|
29622
|
-
let
|
29623
|
-
(s2 = this.networkTestManager) == null || s2.stop(), this.eventBus.leave.publish(t2)
|
29634
|
+
yield Le(100);
|
29635
|
+
let l2 = i2.id;
|
29636
|
+
(s2 = this.networkTestManager) == null || s2.stop(), this.eventBus.leave.publish(t2);
|
29637
|
+
let u2 = (o2 = this.localPeer) == null ? void 0 : o2.peerId;
|
29638
|
+
d2.d(this.TAG, `\u23F3 Leaving room ${l2}, peerId=${u2}`), yield (n2 = this.transport) == null ? void 0 : n2.leave(e), this.cleanup(), d2.d(this.TAG, `\u2705 Left room ${l2}, peerId=${u2}`);
|
29624
29639
|
}
|
29625
29640
|
});
|
29626
29641
|
}
|
@@ -29628,7 +29643,7 @@ var hr = class {
|
|
29628
29643
|
return c2(this, null, function* () {
|
29629
29644
|
let i2 = (t2 || {}).endpoint || "https://auth.100ms.live/v2/token";
|
29630
29645
|
this.analyticsTimer.start("GET_TOKEN");
|
29631
|
-
let r2 = yield
|
29646
|
+
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();
|
29632
29647
|
if (this.analyticsTimer.end("GET_TOKEN"), !r2.ok)
|
29633
29648
|
throw S2.APIErrors.ServerErrors(s2.code, "GET_TOKEN", s2.message, false);
|
29634
29649
|
let { token: o2 } = s2;
|
@@ -29786,6 +29801,9 @@ var hr = class {
|
|
29786
29801
|
var t2;
|
29787
29802
|
(t2 = this.notificationManager) == null || t2.setConnectionQualityListener(e);
|
29788
29803
|
}
|
29804
|
+
setIsDiagnostics(e) {
|
29805
|
+
this.isDiagnostics = e;
|
29806
|
+
}
|
29789
29807
|
changeRole(e, t2, i2 = false) {
|
29790
29808
|
return c2(this, null, function* () {
|
29791
29809
|
var r2;
|
@@ -30039,7 +30057,7 @@ var hr = class {
|
|
30039
30057
|
initDeviceManagers() {
|
30040
30058
|
return c2(this, null, function* () {
|
30041
30059
|
var e, t2, i2, r2, s2;
|
30042
|
-
this.sdkState.deviceManagersInitialised || (this.sdkState.deviceManagersInitialised = true, yield this.deviceManager.init(), (yield this.deviceManager.updateOutputDevice((t2 = (e = this.store.getConfig()) == null ? void 0 : e.settings) == null ? void 0 : t2.audioOutputDeviceId)) || (yield this.deviceManager.updateOutputDevice((r2 = (i2 =
|
30060
|
+
this.sdkState.deviceManagersInitialised || (this.sdkState.deviceManagersInitialised = true, yield this.deviceManager.init(), (yield this.deviceManager.updateOutputDevice((t2 = (e = this.store.getConfig()) == null ? void 0 : e.settings) == null ? void 0 : t2.audioOutputDeviceId)) || (yield this.deviceManager.updateOutputDevice((r2 = (i2 = Q2.getSelection()) == null ? void 0 : i2.audioOutput) == null ? void 0 : r2.deviceId)), this.audioSinkManager.init((s2 = this.store.getConfig()) == null ? void 0 : s2.audioSinkElementId));
|
30043
30061
|
});
|
30044
30062
|
}
|
30045
30063
|
cleanDeviceManagers() {
|
@@ -30076,7 +30094,7 @@ var hr = class {
|
|
30076
30094
|
}
|
30077
30095
|
setUpPreview(e, t2) {
|
30078
30096
|
this.sdkState.isPreviewCalled = true, this.sdkState.isPreviewInProgress = true;
|
30079
|
-
let { roomId: i2, userId: r2, role: s2 } =
|
30097
|
+
let { roomId: i2, userId: r2, role: s2 } = pr(e.authToken);
|
30080
30098
|
this.commonSetup(e, i2, t2), this.store.setConfig(e), this.store.createAndSetUserAgent(this.frameworkInfo), this.createAndAddLocalPeerToStore(e, s2, r2, e.asRole);
|
30081
30099
|
}
|
30082
30100
|
setPlaylistSettings(r2) {
|
@@ -30101,7 +30119,7 @@ var hr = class {
|
|
30101
30119
|
this.store.addPeer(n2);
|
30102
30120
|
}
|
30103
30121
|
commonSetup(e, t2, i2) {
|
30104
|
-
this.stringifyMetadata(e), e.initEndpoint || (e.initEndpoint = "https://prod-init.100ms.live"), this.initStoreAndManagers(i2), this.store.getRoom() || this.store.setRoom(new
|
30122
|
+
this.stringifyMetadata(e), e.initEndpoint || (e.initEndpoint = "https://prod-init.100ms.live"), this.initStoreAndManagers(i2), this.store.getRoom() || this.store.setRoom(new Ke(t2));
|
30105
30123
|
}
|
30106
30124
|
removeDevicesFromConfig(e) {
|
30107
30125
|
this.store.getConfig() && e.settings && (delete e.settings.audioOutputDeviceId, delete e.settings.videoDeviceId, delete e.settings.audioInputDeviceId);
|
@@ -30124,11 +30142,11 @@ var hr = class {
|
|
30124
30142
|
e.source === "audioplaylist" ? this.playlistManager.stop("audio") : e.source === "videoplaylist" && this.playlistManager.stop("video");
|
30125
30143
|
}
|
30126
30144
|
};
|
30127
|
-
var
|
30145
|
+
var lt = class a10 {
|
30128
30146
|
constructor(e, t2, i2) {
|
30129
|
-
this.getStats = () => (this.stats || (this.stats = new
|
30147
|
+
this.getStats = () => (this.stats || (this.stats = new Yt(this.store, this.sdk)), this.stats);
|
30130
30148
|
this.getDiagnosticsSDK = () => (this.diagnostics || (this.diagnostics = this.actions.initDiagnostics()), this.diagnostics);
|
30131
|
-
e ? this.store = e : this.store = a10.createNewHMSStore(
|
30149
|
+
e ? this.store = e : this.store = a10.createNewHMSStore(Di("HMSStore"), ei), i2 ? this.notifications = i2 : this.notifications = new ki(this.store), t2 ? this.actions = t2 : (this.sdk = new hr(), this.actions = new Li(this.store, this.sdk, this.notifications)), this.actions.setFrameworkInfo({ type: "js", sdkVersion: Mr().version }), this.initialTriggerOnSubscribe = false, O2 && (window.__hms = this);
|
30132
30150
|
}
|
30133
30151
|
triggerOnSubscribe() {
|
30134
30152
|
this.initialTriggerOnSubscribe || (a10.makeStoreTriggerOnSubscribe(this.store), this.initialTriggerOnSubscribe = true);
|
@@ -30228,13 +30246,13 @@ var vn2 = (a11, e) => {
|
|
30228
30246
|
s2 && e.namedSetState((o2) => {
|
30229
30247
|
o2.localPeer.id = s2;
|
30230
30248
|
}, "localpeer-id");
|
30231
|
-
}, ye), a11.getState(
|
30232
|
-
s2.localPeer.videoTrack = a11.getState(
|
30249
|
+
}, ye), a11.getState(Y2) ? e.namedSetState((s2) => {
|
30250
|
+
s2.localPeer.videoTrack = a11.getState(Y2);
|
30233
30251
|
}, "localpeer-videotrack-id") : i2 = a11.subscribe((s2) => {
|
30234
30252
|
s2 && e.namedSetState((o2) => {
|
30235
30253
|
o2.localPeer.videoTrack = s2;
|
30236
30254
|
}, "localpeer-videotrack-id");
|
30237
|
-
},
|
30255
|
+
}, Y2), a11.getState(ae) ? e.namedSetState((s2) => {
|
30238
30256
|
s2.localPeer.audioTrack = a11.getState(ae);
|
30239
30257
|
}, "localpeer-audiotrack-id") : r2 = a11.subscribe((s2) => {
|
30240
30258
|
s2 && e.namedSetState((o2) => {
|
@@ -30254,19 +30272,19 @@ var Mn = (a11, e, t2, i2) => {
|
|
30254
30272
|
}
|
30255
30273
|
Kr(s2.remoteTrackStats, n2);
|
30256
30274
|
let u2 = { [o2]: e.getLocalPeerStats() };
|
30257
|
-
Kr(s2.peerStats, u2),
|
30275
|
+
Kr(s2.peerStats, u2), Ia(s2.localTrackStats, e.getLocalTrackStats(), i2.store.getLocalPeerTracks());
|
30258
30276
|
}, "webrtc-stats");
|
30259
30277
|
};
|
30260
30278
|
var yn = (a11, e = "resetState") => {
|
30261
30279
|
a11.namedSetState((t2) => {
|
30262
|
-
Object.assign(t2,
|
30280
|
+
Object.assign(t2, ti());
|
30263
30281
|
}, e);
|
30264
30282
|
};
|
30265
|
-
var
|
30283
|
+
var Yt = class {
|
30266
30284
|
constructor(e, t2) {
|
30267
30285
|
this.hmsStore = e;
|
30268
30286
|
this.sdk = t2;
|
30269
|
-
this.store =
|
30287
|
+
this.store = lt.createNewHMSStore(Di("HMSStatsStore"), ti), this.getState = this.store.getState, this.subscribe = this.store.subscribe, this.getPublishPeerConnection = () => new Promise((i2) => {
|
30270
30288
|
var r2, s2;
|
30271
30289
|
this.hmsStore.getState(ie) === "Connected" ? i2((s2 = (r2 = this.sdk) == null ? void 0 : r2.getWebrtcInternals()) == null ? void 0 : s2.getPublishPeerConnection()) : this.hmsStore.subscribe((o2) => {
|
30272
30290
|
var n2, l2;
|
@@ -30290,11 +30308,11 @@ var Rn = (a11) => a11.remoteTrackStats;
|
|
30290
30308
|
var Ka = (a11) => a11.peerStats;
|
30291
30309
|
var Zr = (a11) => a11.localTrackStats;
|
30292
30310
|
var be = createSelector([Ka, kn], (a11, e) => a11[e]);
|
30293
|
-
var
|
30311
|
+
var In = createSelector(be, (a11) => {
|
30294
30312
|
var e;
|
30295
30313
|
return (e = a11 == null ? void 0 : a11.subscribe) == null ? void 0 : e.packetsLost;
|
30296
30314
|
});
|
30297
|
-
var
|
30315
|
+
var An = createSelector(be, (a11) => {
|
30298
30316
|
var e;
|
30299
30317
|
return (e = a11 == null ? void 0 : a11.subscribe) == null ? void 0 : e.jitter;
|
30300
30318
|
});
|
@@ -30325,18 +30343,18 @@ var _n = createSelector(be, (a11) => {
|
|
30325
30343
|
var Nn = createSelector([Ka, bn], (a11, e) => e ? a11[e] : void 0);
|
30326
30344
|
var On = createSelector([Rn, $a], (a11, e) => e ? a11[e] : void 0);
|
30327
30345
|
var es = createSelector([Zr, $a], (a11, e) => e ? a11[e] : void 0);
|
30328
|
-
var xn =
|
30329
|
-
var Un =
|
30346
|
+
var xn = A2(Nn);
|
30347
|
+
var Un = A2(On);
|
30330
30348
|
var Bn = createSelector([Zr, Pn], (a11, e) => {
|
30331
30349
|
var t2;
|
30332
30350
|
return e ? (t2 = a11[e]) == null ? void 0 : t2[0] : void 0;
|
30333
30351
|
});
|
30334
|
-
var Vn =
|
30352
|
+
var Vn = A2(createSelector(es, (a11) => a11 == null ? void 0 : a11[0]));
|
30335
30353
|
var Fn = createSelector([Zr, En], (a11, e) => {
|
30336
30354
|
var t2;
|
30337
30355
|
return e ? (t2 = a11[e]) == null ? void 0 : t2[0] : void 0;
|
30338
30356
|
});
|
30339
|
-
var Gn =
|
30357
|
+
var Gn = A2(createSelector(es, (a11) => a11));
|
30340
30358
|
|
30341
30359
|
// src/Prebuilt/components/Header/StreamActions.tsx
|
30342
30360
|
import {
|
@@ -32070,7 +32088,7 @@ var RoleOptions = ({ roleName, peerList }) => {
|
|
32070
32088
|
|
32071
32089
|
// src/Prebuilt/components/hooks/useGroupOnStageActions.tsx
|
32072
32090
|
init_define_process_env();
|
32073
|
-
import { match as match7, P as
|
32091
|
+
import { match as match7, P as P4 } from "ts-pattern";
|
32074
32092
|
import { selectPermissions as selectPermissions11, useHMSActions as useHMSActions26, useHMSStore as useHMSStore37 } from "@100mslive/react-sdk";
|
32075
32093
|
var useGroupOnStageActions = ({ peers }) => {
|
32076
32094
|
var _a8;
|
@@ -32087,9 +32105,9 @@ var useGroupOnStageActions = ({ peers }) => {
|
|
32087
32105
|
const offStageRolePeers = peers.filter(
|
32088
32106
|
(peer) => match7({ on_stage_role, bring_to_stage_label, roleName: peer.roleName }).with(
|
32089
32107
|
{
|
32090
|
-
on_stage_role:
|
32091
|
-
bring_to_stage_label:
|
32092
|
-
roleName:
|
32108
|
+
on_stage_role: P4.when((role) => !!role),
|
32109
|
+
bring_to_stage_label: P4.when((label) => !!label),
|
32110
|
+
roleName: P4.when((role) => !!role && off_stage_roles.includes(role))
|
32093
32111
|
},
|
32094
32112
|
() => true
|
32095
32113
|
).otherwise(() => false)
|
@@ -39746,7 +39764,7 @@ var useCloseScreenshareWhiteboard = () => {
|
|
39746
39764
|
};
|
39747
39765
|
|
39748
39766
|
// src/Prebuilt/layouts/VideoStreamingSection.tsx
|
39749
|
-
var HLSView = React155.lazy(() => import("./HLSView-
|
39767
|
+
var HLSView = React155.lazy(() => import("./HLSView-MWFODCX2.js"));
|
39750
39768
|
var VideoStreamingSection = ({
|
39751
39769
|
screenType,
|
39752
39770
|
elements,
|
@@ -40508,7 +40526,7 @@ import { ExitIcon as ExitIcon3 } from "@100mslive/react-icons";
|
|
40508
40526
|
init_define_process_env();
|
40509
40527
|
import React162, { useContext as useContext4, useEffect as useEffect59 } from "react";
|
40510
40528
|
import { usePreviousDistinct } from "react-use";
|
40511
|
-
import { match as match13, P as
|
40529
|
+
import { match as match13, P as P5 } from "ts-pattern";
|
40512
40530
|
import { HMSRoomState as HMSRoomState8, selectRoomState as selectRoomState8, useHMSStore as useHMSStore89 } from "@100mslive/react-sdk";
|
40513
40531
|
|
40514
40532
|
// src/Prebuilt/components/hooks/useRedirectToLeave.tsx
|
@@ -40558,7 +40576,7 @@ var useAppStateManager = () => {
|
|
40558
40576
|
if (!roomLayout) {
|
40559
40577
|
return;
|
40560
40578
|
}
|
40561
|
-
match13([roomState, prevRoomState]).with([HMSRoomState8.Connected,
|
40579
|
+
match13([roomState, prevRoomState]).with([HMSRoomState8.Connected, P5.any], () => setActiveState("meeting" /* MEETING */)).with(
|
40562
40580
|
[HMSRoomState8.Disconnecting, HMSRoomState8.Connected],
|
40563
40581
|
[HMSRoomState8.Disconnecting, HMSRoomState8.Connecting],
|
40564
40582
|
[HMSRoomState8.Disconnecting, HMSRoomState8.Reconnecting],
|
@@ -40572,7 +40590,7 @@ var useAppStateManager = () => {
|
|
40572
40590
|
VBHandler.reset();
|
40573
40591
|
redirectToLeave(1e3);
|
40574
40592
|
}
|
40575
|
-
).with([HMSRoomState8.Disconnected,
|
40593
|
+
).with([HMSRoomState8.Disconnected, P5.nullish], () => {
|
40576
40594
|
setActiveState(isPreviewScreenEnabled ? "preview" /* PREVIEW */ : "meeting" /* MEETING */);
|
40577
40595
|
}).otherwise(() => {
|
40578
40596
|
});
|
@@ -40628,7 +40646,7 @@ var LeaveScreen = () => {
|
|
40628
40646
|
init_define_process_env();
|
40629
40647
|
import React164, { useEffect as useEffect60, useState as useState69 } from "react";
|
40630
40648
|
import { useMedia as useMedia40 } from "react-use";
|
40631
|
-
import { match as match14, P as
|
40649
|
+
import { match as match14, P as P6 } from "ts-pattern";
|
40632
40650
|
import { RefreshIcon } from "@100mslive/react-icons";
|
40633
40651
|
var MwebLandscapePrompt = () => {
|
40634
40652
|
const [showMwebLandscapePrompt, setShowMwebLandscapePrompt] = useState69(false);
|
@@ -40648,7 +40666,7 @@ var MwebLandscapePrompt = () => {
|
|
40648
40666
|
const angle = window.screen.orientation.angle;
|
40649
40667
|
const type = window.screen.orientation.type || "";
|
40650
40668
|
setShowMwebLandscapePrompt(
|
40651
|
-
match14({ angle, isLandscapeHLSStream, isLandscape, type }).with({ isLandscapeHLSStream: true }, () => false).with({ angle:
|
40669
|
+
match14({ angle, isLandscapeHLSStream, isLandscape, type }).with({ isLandscapeHLSStream: true }, () => false).with({ angle: P6.when((angle2) => angle2 && angle2 >= 90) }, ({ type: type2 }) => type2.includes("landscape")).otherwise(() => isLandscape)
|
40652
40670
|
);
|
40653
40671
|
};
|
40654
40672
|
handleRotation();
|
@@ -41109,18 +41127,19 @@ var android_perm_1_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAngA
|
|
41109
41127
|
var ios_perm_0_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATwAAAChCAYAAABaigMvAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAACJ6SURBVHgB7Z1bkBzVecfPaNFK6LIs4mbt4opIqtBCOWaNhHBewgopfsHACj/E4CDJDxiXuQQQVQGcihZXIcUVjEkMlMGpIAlb8YsRIKhUbNZa/BCbi4wcJ2glJ2iJtFpuQsvuSlpddjvn/3V/vWd6e3a6Z2almen/r2pqZnrOnHO6++t/f+fS58uZ08CiRe3Ns2ebZkMIITGMjprBvr5dg2aayZkKIsI2x3SOmxnXGOO128whcosMIYQko8+qUt/4eO53uRnjb584Yl6spBBWRPAgdI1zZvx1LufdYzx6coSQyuGZ3KYZ4+MP9/bu6jNlUrbgtX2uvcPzctsodISQaWSf53n37d296wVTBg2mDC69/Mr1Vug22Y+zDSGETB/n5nK5vzzvghZz6KOB10yJlCx4ELuc8boMIYScHnK2SXrN+ed/5tNDH7//G1MCJTVppRk7ntthCCHk9OPlxr1rbZ9ej0nJDFMCVuyeNYQQcmbIeTNy/4LBUpOS1IIn/XacakIIObNc0jjH3GNSklrwbL/dWkMIIWeYnMndbVKSSvDa2to7DL07Qkh10BxoUmJSCZ7XYNoNIYRUCV4unSalE7xxPDJGCCFVQc4K3ufT/CGV4Nn+Oz5NQQipGnK5dF1s6Ty8HB8fI4RUEV5uUZrkKT08Ch4hpHZJNy2FHh4hpLpIpUnpBI8rohBCqotpFDxCCKlhKHiEkMxAwSOEZIZMCF5rS4uZP3++fMY7vhdK56aNsuyqpWZV5/Xyam1ZaKZC065Ysbxo2tMF6rNl0zPyDpZdtcS8+ZvXzAs/+1czHeix1uOpx7eaiR6jQmCfkA6vQqy+9Rb5fcWKDvmOdxzvBx+4P3EepLKcZeocGFX3L142m5/bajb+/aNiyA9Zg1v1lZvN7t49YZo777jdrLEGCp548mnzxFNP5+Xx5A++JyLmgjRI64ILeuOGrkRpTzeoG+r1xhs7/e+tvhjNb5pvpgM9ZqvX3maP9V45D0PDw2bZF6v3gZ3oMSpEkz1m0XMc5bK2xZJm27bt/vfFi+V4L1u2JHEe5eDfmFvMthdfMv39A4ZkQPBWBnfXN958K++7il1b26XmyX96TC7+QkAgYZj9Bw+KaMFo77ICeee3bpcLeMuWrWFa3K2RV6/NHyLbZo18zepbJO0bb7xl67HTVAvbXthuL4SDIkbTAS54gH3WC7ua9v90g5se7HC6jncUCJ6Ity2TgudT94KnF9rB4ITj++49e8LfIWYQKAgZ3qNNGdwhdRs8Fddw8F8ImQoe8kYeEMY77r4vSLvdDFtRhAeJ1+q135C0EAMIpwovhHhoeMT07u61/x8IPIGlpmn+PMlHBVvB78ijtXVh3v/S4Dc1c5IP8tc69ff35+WlZQG3Hv7+xpcvnqN9qaeEGwvo7o5fKBvN/tbWVjlWeky0jGi5cfXEd72ZoT7Rcgrtm3seUPZUx8o9R6Wgx/tiayPuPkbROrnHIs35Rtomp1vG70oYELt005RrP7VIZjw8GI5ePK5o4fPqJ28Tz2PjIw9P+r/2v+DCdf8H7wheXlNgOMh/xbWaNv+OCk8PYofy1ZAffGCdfH/w2+tFOLWfCx4XxDLqdbpNYhiwepIuaZvNqDfyQZkrvvRl03nj9eKNavNfgahj+7YXXhLhSVK+CuSrv9yR9z0q3Eqb/f3JHzwmv+tNAcdH+7dW/MV14QW58ZEuSY9uCWy7M/C2XbBPd9rjqN5UeLwfWm+beNvDdLodN7NC3if64nCu9RzBq3ePT1Jgi7Ax2NLqr99m4o/DpeE+37r2tnBb1B60DrDDKHpelY0bfLvWY1ioVVMN3S7TTV0PWrQtvtQMDY3Yi65HvqPvRLylNyYuOgjOVM2sQhcqRAsXlZYjaS/z36NNFqRV7+HiiJHhAthsPcQN1nhxB4YRbtn0IxFQ1E0NGhe0XnDoG0M6CBOMWDxP+1+kwUBEqXQH4hT1cq8O+py0Lip2KB9lo57ixTrlw3PAsX4zOLaoO85DoaaVnoO24HgDd1/0ZoV8kAb7i2OEuqJclI+LVY+Z1M8ex0IDUEmBuOsNCUKF/Lu7e2JvjuWCsiBEKOuOu+6z3SJ7w23R441gNKjDZYHn7AK7xLFQ+8SNCt/hybn5YTvKgdDp+Ss2WFPr1LWH17tnr/Vcrgu/y2BEyjsYLtxCDEWaQNqMGB6a3DSC8MKQW2x+bnPGHSCBgcLLEeO7e51sw8ULz8BvglwqwqB35i1bfiJ3bLw6b7pZmr8w6lJB3hAk7DPERsqyF4gKDL7Di0X5EK/QywnSwdPCqDTSod6u9wFvayqwz7ipQNjUY8YNSi561Md+hmcW3oCCm5ZeoBscb8cXvIXhSPmW57aaUtH8UQ/1yrTvE/tbKVyvGV6o3gCw3ypOcce7s/MGszvibUpfs7Wpif9uD/ODLWGbL95dsq0bDoFnJD/sb5zXWC9wHl4RIFSVJCqGeheW3wKx6j8wMGUdVDC7f/GKecJ6e2hyXSaiNDBlP1QScGEB9ah0RFEFRrdfbPvc0LTUl/bRYSSyVLS/76rAs0NZr1sRfN1uh5D624L6qCAE9emNeNWaV5wHlAb1OJ8PjoviNosrgYodboBu3rp/OL/u8Z7wpNNN84nrEwVa5nSOGlcDdd+HVy4qIHFTN9SjGxrx0xzoH5ALJDZt0zxTKe64a50/cmzFaOW1y+UFIJ6dtl+rHNGD4Ut/I4TuKdvvE+S95Tl/rl5TsG/+lJamvP+WOxLoX4S3i0jphYfBBxxT8UxaFk4IcOSCHRoayv8eHIPWllZTDnre4rz2SqLCBQ8LTdfoOazU8Xb7irMIBa8I0k9krp/kKWhTD/QGHhfecWHi5Taj0MenhlaJaRky6PHt9X49Wlvkbg+R0lHmcppwuBC0aakjk9pfpr+D522zp5SO+6nAscG+oWx4tUPSzN0pnisEHl6eNHftKLte7EgvE5xldDx/9BW4I/JxNBXp45NyrrLn8DKbn+N5VXoCNZrL6JPDfuBc6rEdCoT2B9bzK+e8KmG/c4H9GRqeXmE/07BJWwT0Z+hF6Hair1rl9+24o7fqdfj9UBMCuWb114K8XjLlgotbmzUABix9NEETrsl5qgEz+kvphH7VdsoDDI5IvbdNXBi6j9GnTfAddSq30xvNV1z0ENre3X4zFfuIY4yRYneqi1vX1atvCbf5k4fzPUE9R+ohymd7ntxBkjhU6N39RR1W33qzqSQycmtHp2FrmACv+6MDSdjmDsDo8dZZBFPhtjjcgSn3/On+FJo2VC/QwysCDBB3V3gYGD3FNAuIija5HvzbvwvTwhvBiKtM4fjZT/PSyijiU+UP+SMf36tb6s/it2KH/rOV1vvBb5hVD9Cvp0+OQBTSNHORp062lu8vvpS3j/jdfwTrR+JBucej3H2EQGnH+mbHo3nVXohrVAScixLliVdtm97dP39ZvFGdxwYR6Q4EETcb/7HAG8LzIYMx/Qen7AfDvqJciCj6THW+4nRM5EVd1NYwYtr96g453upx4xFA93gXsyn1TjEqizx0MCTM7/mfiqBj/7F/lbLRaoYensOQTDUZmOTWoykhw/z2YsKFpY8eRScig43ffVTSwnjctLdG0uKzlDUyURb6oaLb/LQH8/6L0TVciOhPQ/Pn6mWTy1DPBttV7KL7p+VF9wHpIZL+FJ6dk35Hc1pGu3NG9lEmLtt0nV/5atlC0B1MXXGntOj+6HZ32o/2W+rx0OYw6neHMzKMC13PofaHqQC4dY4eIxwLeF7q6UuT2nqed9x9b+yxcwnzGtHjPTzp/EbzUFsbtvuwccN3gikq6+RGGj3et8bYnwvEC/X2p7e0hiP4mt9Q0HJpCm4OlTh/1U4uTeLFl3/BMxlHmwFJZqUjLYys3JFTQkhBvD3vvJ3YcWOTNiVpHr/JwqM6hNQSbNISQjIDBY8QkhkoeISQzEDBI4RkBgoeISQzUPAIIZmBgkcIyQwUvDridETBKhbZTesRTacRu/QZ4GoEdZNlmqokylw1oJHX6mVhUApejaIr/boLlOqjVdO5phkij+GlCwvEgWdbNd3Kaztk20TErupdb23ZVVfV/XpwadHIa9UeXjMpfNKiRjnTEanclYmjRONLgNMdsYuQOOpK8KKRqwpFYsKFqiv0xkUES5OXRu4CErynxPLcfPCwd6GoVkkiUrm/YTmkJPUvJXIVlnuP1lMjt8XVu1DErqnqEBfdzT2GxaJv6e8aAUzLKnQe3P9FI8lFKXZe4+oOCtlJElsqVE+Q9PglqUOx41Or1I3gRSNLKW4gHIAITqtuzO+PwIobfiAc3wA0WLeblwRGCVafAEkDbhcrr1A+0chhylQRqVyikbyiUbzKDRguq4gEEc7cxRG0r0eXIFLiInYliX6mUcU2fPdRc1cQyEijp0FsnosJ1OP+X8vFfyAIumSWHhP3vCsrVi4Py1JKsaMnJFjOwry6K1jJRZeuKhTovZANKElsvlB0PIB6aYjRuDrUYzzbuujD08hSAMFcYHSbgxP5oHOSZUFMa6TwhpAOEZsk7GBrSygcIgT2AsF/YHBIg7wkuIqTl4ZdxDptSIOXRg7Ti17WXwvKQ52w/A7SI6/VwaKgmg8MFKKFNFg5WRaBdC5OZaqIVC4oG/voRkN7MDhGQMVOI1fhgojWfypwTOBpumk1hm/cklJxqNghPeqgdY2LvvbQ39wvyzJhXxFAyI3w5UbfkmMa83+sFwjxix4TPe8uOPZuJDngHjvXjnDc9NynyQ/7E+5bsPagHgeNQof/xXUP6LFOYvOKRsdDfV8N1hN0I+FpHTT6G/KMi9Nc69SFhzcka5bdJu8azAXrnMHIcYdFNC+cyJuCk3fnXetCFx/p4CVgvTB/JVtfZNwoUVijbXhk2Br5DXLRwDBhCHJxBtHFAMrAopga+Uk7etF80KXdkd4dBdQmDBYLFc/Avm5d+42CEcimikjV5Kxs6+4jBBT10tV9seQ8jNu/YLsm8rYi6tZ/KnAzwMKY7nL2umouFgwt1vmv0c/kZuDEaEVdNz7yHV84nfXwcD7cuuI8TRV9yw16DnBu3fXekBYLhvod8gvzvDwJpONEQMPocpOMPC/M8xKjdvTLX7wcrozt1j0uP39NPv98YV9hu/D61FuG8L3ws5/Kb3GLcia1eeOcL80Hax1evcxfB0+7GFTYHgjCUGpdsU/lhrqsJupC8IaD2AcSUNkaI04klrV2A+doXImhSGR7/BcXgqKxZTWWreKGeNSA27rcuqKGkR8Z6nZZZRdN0ddltdmdIoBqjLhgkV5XpcV3XZW2HNx91ItZ+/4uuyxY1twzsfUvtuw5QP2xHDsETy9wXGwQMFwoxQQvDNQdXFyKhIL80nWT0rvLugPNXwN9KxqEKLoPUa8T4g5xbQtGId1IYW4EtOFgEU+9MWm94+xIjwfydAUvPzLdhAhBlFpbJ4IMPfTAOhNFhTG6pmISm3dxV4nGfzVs6HxbB42rjH3qds6HLgRbT15eXQieNG9s/4Ma+VTNqUpEn1JPCqunYiqDi1s2DBJNCHiG8MhQP3gHbn8g3v3my9fyppQU6l+qBCps/jSWwvUvxpbnfiIX+ArxKlrC+Klp6lDq+SgWTaxYcB5QKGBNNAJaHHHlqiglKVtRIZ3KlqLemvwvhc0nJT6ecn0tXlsXgoc7HE48+ibQvFHj6P75KxMX1ojfPIy7Y2rTE8KjMWCj8450dHRI7o7+f3GHd5tNcWhAag2kjbrCE0L/idvM8YNHt8jd9qEH7w+jV7nNuEqh+w6P88677jOlop4oPICD/X6fWdKYCNqXFQ107h7nqVaKLhZNLDpqHRdQvVDaJPWGNzXJjoIyikVKc9m92097wOa76qbkgYGS2HxSprw2Wutj/p1SF4MW6nGhKaInCyN4rpFr+EHgRoz3g7O8bLZs9kc+NQ08Mbev7TnbwY508NTccIJ5/XEy4NEVdjTDKPEdQqdNEG0WayQpdDAjjfQj2Tqib0k7n5PEVI2LgVsMbUaiKTpV/ZPmBYHCxQfvLqmnoaEtxTt06oB+QRznuOZdfrlTR9/SwOGKP1A0MQikYS1BmrmBEl/EihP2eY2TX5sTS7e3N7ngafB0TMx2B1qKnYskNp+4Dk7MFPfawP6sTBAVrZaoCw9PvQzpu7F9cE1BnFKNWapAbLZsWipiBhHSdEBDEYZRqlpbpAPfjYKFz9rHodGlEMkK/UhoDsBzQzqNGQvQf4eLGn0o6PDWgROdDoB+NI2khX5DNF+Qj9TlxcLNw7iIVEnRkTgcL408Vqj+xcDx0qkRxQY6XNzoZxoNTIUzSfQs3Bh06kvceYr+H9swNeSmYCqJNgU14FIaNmx81DYnHwtHg7Xeml+a5mVcVDz3XBSaIhS1eXB1MMpayiDDE0/9UEZycW3g6ZgwqhtGn+vkKQtQF4KnI6KIFYuoTjJyZwXgzm99M88lx0WGfjFs10ecYJxukGONUgVj9sMF+kaEUS70WSlbgvln6HtDmZK/LXfzj38SiqKbBqIWVx6inCEN6q6jf9F84tALWibdBhGpcNcvdLFFt7t9h279YfhTBQuPi3CG0UUcf/d/SSJ2yVQY611g33VKBOqw4bv/EJYjUb1aJkdyA4i+JedpZUfe/xE6M1rP/gMDZsNzj1px/qZ4Qvh9sz2fbnBrd3Ahf5/zt0NsMYoq/a6OHSXPL79uhWwJN7xCN5E4m0ed9ObploXjV2yftBzUQY/PhmCWArbVS4BuRi0jdY0fsDp/wjOpK1JFLePiAYSQzEDBI3VNXFOaZBc2aQkhtQybtIQQEgcFjxCSGSh4hJDMQMEjhGQGCh4hJDMwpgUJcZcsx5Mb7jJWhNQDFDxScLl3PH60+cdbJ577JaTGoeBlHDeuBLy551/YLg+v48FxPEusS5FT9Eg9QMHLOLpMksbdcB9sx4P5GgwIq8lo89aNFAaiEbCwXBNW8u3v75emcVykLDdSmbsar+JG4yoWEQzLlKMpjs+6WnE0mldcGSR7UPAyjq7BFreskcTOCMIuYjktrIYCYXlSonEVjjSGFTsglP5S70vy0kJUV626IS/iF8TMXUg1LhpXoYhgKFfXjEP5ELxoxDb9vxu1jWQTPlqWYSBECGQDrvriNYkGKJAe/8NyWd1BBDYN/wdBgiiqZ+jHRNgh29YEK/T6MSIOyv/bFi8OF9HU/664drksXS5r2gXR2SCgEjTJfl7xpS8H9XhFBE9jSWDRTQinH27wsbz/6yrTUWEldUGqR8vo4WUYd2HHpKOxWMPOjZRlgkAy/srDyG9iTbzX35yIKIaVkRGtC4KE9fN8b9Jf1t4PBLRUBE8DxriRvrAd4hYXEQyrQ7uLfcrKxoEnqGu+wauD4BULLETqHwpehkkSrCYKxAb9Zypw8yUQ0JLYtL2786N6KW7TOSq0GhVsRRANTVFxjkYE645El4PIYYUU5IPochrNixBAwcsw0YGGJBHSEGha+99C4cpVrqcjDIe4uG3Sb3GrOUdFOzrqrEGZCAEUvAzjBxZ6K2iS3hAbR0L77NBMRHMUYof+sc6bbg69M6wovKqzMnEPNAasP8CQPBiOgvmEqK/EEQ72B/VGc5oQPlqWcbSfDIMMblQvCebzwP3hlBU0IzVSFpqNKnbwqAo1aUtBo5F1RoI/uxHgpkIjvbmhEuspkDQpD3p4GcefOuIPOmCS8Zq/ukXETGOUAg3mgoGHjY+YIFLYMyJ8GmGtUmz58VYJyqOR5VAG6oIyIbzF4vQiVCTEG/uCfXIj0xFCwSMy8ormo4anVDSCmI7ISoSyu+6TyF8iQC1+BDYZab12+USEMo1YFhmQiO2Di6T159tNRI3TaGRoom5OEBEMaSDUN626XsIW7t69V5rjW579Z0MI5+GRPCAWiI2LpxO4cACpATgPj5QORI5CR+oVDloQQjIDBY8QkhkoeISQzEDBI4RkBgoeISQzUPAIIZmBgkcIyQwUPEJIZqDgEUIyAwWPEJIZKHiEkMxAwSOEZAYKHiEkM1DwCCGZgYJHCMkMFDxCSGag4BFCMgMFjxCSGVIt8X5WQ4MhhJBaJZXgNc5qNISUS+PMmcYbHzcnx8YMIaeTVIJ39OgxQ0i5jDWOSby848dPGEJOJ+zDI4RkBgoeISQzUPAIIZmBgkcIyQwUPEJIZqDgEUIyAwWPEJIZKHiEkMxAwSOEZAYKHiEkM1DwCCGZgYJHCMkMFDxCSGag4BFCMkOq5aHqhfGZ882RP7nenGy+VL7PHNxrzt6/w5x1ZMBUM8cvXGo++bMuc8Grt1V9XbPOqbkt5vhFS+Tz2Qd6zIwTw5PS7L/lt/L+2a1XyvuHK5+Rc7zgN+vN3He3G1J5Mid4R/74ejO45H5jPGMarGjMODlst91ghj53u2ne+aiZu6+6DQ0XEql+hv70drE10PT7p8059kXOPJkSPIjFJ1982Mz64C1z/q/Widjp9sEl66z39LAVwYNm9oc7DSHloN4dGP1sBwWvSsiU4KE5eNbIQWkyqNiBs45gW5c5eMNSM9L2tTzBG7VNDDXexsO26XtgR/ibNlvQZDnRvDhMN/fdl2KbnG5esz7Yact5q6Q0pLpBsxS2ATs4Na9Fvo9euKTkGylsYvTiDjPeOM82jUfMbGtvahfHbb6jFy01s+1NfFaQP8qGd4lm9Pw9W8N8sE3rldUukcwI3njjfDG8+b1bY082jONC2zeGpccVeIMwkplW6CCQaKY0Ht5jLuj+hqQfCzxG9LccswaJvkD0CyIdmsdqbOgz/PjPv2eFbKnkBZAGvyOd8uGKZyalYXOo9tCmLG6EJ89d7AvexctLErzDtvtlZPEteduG224J7QKCCjtBOSp4uGFiG0AXjfYfwlaBK4JZIzOCd9J6YGDWFB5T4+De8DPunBCfi/7tq+LZ6bYPV/5IxM3tVMZdc+GLXxZRhLBCuEasUaphoc8QBglBVaMctkaM7TOtgCIvNVq3PE2DJjib2bXDUWsfEBkIHm5enwb9ec2/fTRVPvgPxE5bJehugXhCBGEvsAuUAWCbyjErrhOffVvF/wDsL24AJStkblpKLuHJhmEsfPG6UHx0G7zD6MBB0+9/GDaRYUy4q7ppYLhoCs9yRAtieP6v7rPGPJCXxi0PaWYO7gk9BlL94Fx59qanXR/oLsFNFjfCUUeUkuYF5lk7UNuDbTUFN1Jttmr+p+YulO0nz71Uyoet643+xAJ/RgJmI2SZzI3SwhiTotNXxua0SP+Ja1QuMGoX9w56Ipj6ondiF93m59tiGuahidyVl8azdTh17mJDagP1ruDZ6U0P3SClNGvH5rYGee3J267f1S5Q1nHp+11qxj/ZI+U2/efTYlfH7IAJPEv18KJ5ZY3MCB48JXDCGkmc+EQ5Ye+SH9nma4P1wGCwaE5gGstoYDiVBMIKIJQNkf7FOe9uz3QTpJaA0KAJCdAVIdOfHOCRNf3X02WfTwxcuMyxXhuavurNAfH6Zs03g1feLzdpeH0oN+tdI5kRPHX9MdpVaBAAxuHZQYtz7UACjHXG8WHzGdun5jIc6UAuxllHfQGLE1pcIKgXPEQ0P9C85QBF7aKj6+hzmxOZzwm7gccFjz+p6DQc6Q/EanH+zIGgHL05YrAM9oPyMYiBGzSav7Pe9/ur4XXC1pLc6OudTPXhYYQWwvNpMILlgk5gjH41fuJ7griLulNXAH5P0yT28/GFFndgtzkMAxy48eWwnwZ9M/60gYk0OrqbVmTJmSE60dh96YT2oc/fnji/uf/r/wcDYGoXaGEc1VHgoD8ONtZoWzCwbXiYmM4EGgMh1DKz3n8HMtWHhzscjA+CB6M5e3+PbEfzFf0fGM1Sw4RxYCIyBAd9JGgSoMlQyvylBb/uMh/ZkVs0kbVM9A3CE9DObYjxaGtHXhr0v+CJEHfqCqlOZE5mOBI6eSaA2+yEp5ekWQtbPPbZ5SJiAze+kvcb7MV9Kgi2reXPduaKYrsK5CzO6TQNaRKff8HCLlPjyGiXFZrxxia5I55c4IvYgjceyZufhLsj0p065xIzfvb5MnqKycnjs88zsz7+vZk53CfpZESuv8fkxk6E//WkTy4XNiHgKeIztp+w5XkNs8wc+x35NYweKpjm7IH/yEtTqLxa46yGBpnvODY2ZuqFU/OsB2bP2Tx705w98OtJv8PGMG9z5lCfmXHs4/C7P5m9R9JACBuOHZLpJnpjnfPev4sdmlxO7GC29d4gdk27N+Xlj//BNpAfhFDto0GENRdur0cOffT+w0nT5kwKFl/+hX32bZEhpAxmNTaK5R0/XruiXS+cPHHCHP7kQzMy/KmZObPRNDUvMOc0n2dqiMN73nl7QdLEmVwthRDii93+9/5gTp70bzx4P3p0xIyPj5lzF1xoaoTBNIm5Hh4hGeXjjwZE5Do6Oszbb79tvv/97wfb3xfRqxGmT/A8L7fLEELqguOjx+QdQtfe3m7uueceeR+3faujx46ZmiDnTaeHN/6pIYTUBWOBF9fc3Bxucz/XAuPj5ndp0qcSvNwMQw+PEFIteDkvnSalE7wx84IhhJAqwQrYaynTJ6e3d1ef8UyPIYSQM88u0aQUpB6lzXle4kl+hJDapH//u2Z/3x/Mp4OHTJXieePeP5qUpBY8q6g99PIIqW8wLQVz8t4/+H/mow8OiPAdPVI9q/Z4xtu0t3fXZpOSkubhWS/v67bEPkMIqSlOnjwu006mAtNT9u3bZ9avXy/fPzn0kQjf/vf+x7z7h/+WCctnFM/smzFuvmNKoKQnLdBuvvzy9lVjudwOW3htjWMTkkFGhgfNh+/3h09VzJt/TkHhw1y8RYsWma6uLvPaa6+Zvr4+mZzc09Mjn/ve7ZV0c+bOMxdedLGZiUcFTx+HrcN1bdq+O6XkJy3eeWfXrtyY9wV6eoRUN/DI+vfvE7HTeXZ4djbJ0xQQvrVr15pnn31WnsbAd/wPL+TRt6/XjI6epknK1rPLjXtXlip2oKxHy1CwVdvlnuelbksTQk4PeIQMoIl6+PBhaa5CuNICsezs7JQX8lizZo14iQftAMf04207fqw8sQNlP0uLCuzdvWutVd7ltlKcp0dIlXEqaMaiWQrUa4sDInbNNdeE32+88UZzxRVXhN8henghj02bNslnWXTgyIiZFjyvB9qy551dN/X17Ur1GFkcqZaHSsKiRe3Ns2ebdi9nrhg35pIZOfNHef18OS4vlXVmNc4yuVzOjB4fNWT6OXigr3l4aLAZfXI6EDE4OGguueQSeU/j8aEPD/9BPx+49957zeOPP24WnHfh4AUXtaQXJKdLzGqGfMbTE/b1u9FRs6sSIkcIyRYd9uVZD89zsaOxHrZbwfNKxfbtSR729aypAbg8FCH1T499Deooq4Lmatag4BGSDWRgcfPmifFF9OlB9GpthRRCCClGh315tq/OqyRs0hJCqpEe+xpEkxZN26xCwSMkO0h7Fk9PVIr33nsv/GgIIaSK6LAvz/bZeZXC9gFqkzZ7IyCEkKrnsH15O3bs8CoB+gSNL3jthhBCqowu+/La29u9coFoGl/s9hlCCKlCMAcFAuV1dXV55eB4d2sMIYRUKR3GFypv06ZNXilALA29O0JIjdBlAtF7/PHHSxU7vDoNIYTUAF0mEC706RUbyMDveB7XTIhdl6kxKr5aCiGkplhrX1hCZRG+4DEzXfEYL10dBZOV8R7QZ19fN4axbQghtcci4wufDGZM8cLvXcbUblgHeniEEJdFxp9T1xx87rMvuHa7gs+EEEJqgf8H6NcF0Jrj9NcAAAAASUVORK5CYII=";
|
41110
41128
|
|
41111
41129
|
// src/Prebuilt/components/Notifications/PermissionErrorModal.tsx
|
41112
|
-
function
|
41130
|
+
function PermissionErrorNotificationModal() {
|
41113
41131
|
const notification = useHMSNotifications5(HMSNotificationTypes5.ERROR);
|
41132
|
+
return /* @__PURE__ */ React169.createElement(PermissionErrorModal, { error: notification == null ? void 0 : notification.data });
|
41133
|
+
}
|
41134
|
+
var PermissionErrorModal = ({ error }) => {
|
41114
41135
|
const [deviceType, setDeviceType] = useState71("");
|
41115
41136
|
const [isSystemError, setIsSystemError] = useState71(false);
|
41116
41137
|
const isMobile = useMedia41(config.media.md);
|
41117
41138
|
useEffect65(() => {
|
41118
|
-
|
41119
|
-
if (!notification || ((_a8 = notification.data) == null ? void 0 : _a8.code) !== 3001 && ((_b7 = notification.data) == null ? void 0 : _b7.code) !== 3011 || ((_c = notification.data) == null ? void 0 : _c.code) === 3001 && ((_d = notification.data) == null ? void 0 : _d.message.includes("screen"))) {
|
41139
|
+
if (!error || (error == null ? void 0 : error.code) !== 3001 && (error == null ? void 0 : error.code) !== 3011 || (error == null ? void 0 : error.code) === 3001 && (error == null ? void 0 : error.message.includes("screen"))) {
|
41120
41140
|
return;
|
41121
41141
|
}
|
41122
|
-
|
41123
|
-
const errorMessage = (_e2 = notification.data) == null ? void 0 : _e2.message;
|
41142
|
+
const errorMessage = error == null ? void 0 : error.message;
|
41124
41143
|
const hasAudio = errorMessage.includes("audio");
|
41125
41144
|
const hasVideo = errorMessage.includes("video");
|
41126
41145
|
const hasScreen = errorMessage.includes("screen");
|
@@ -41133,8 +41152,8 @@ function PermissionErrorModal() {
|
|
41133
41152
|
} else if (hasScreen) {
|
41134
41153
|
setDeviceType("screen");
|
41135
41154
|
}
|
41136
|
-
setIsSystemError(
|
41137
|
-
}, [
|
41155
|
+
setIsSystemError(error.code === 3011);
|
41156
|
+
}, [error]);
|
41138
41157
|
return deviceType ? /* @__PURE__ */ React169.createElement(Dialog.Root, { open: !!deviceType }, /* @__PURE__ */ React169.createElement(Dialog.Portal, null, /* @__PURE__ */ React169.createElement(Dialog.Overlay, null), /* @__PURE__ */ React169.createElement(
|
41139
41158
|
Dialog.Content,
|
41140
41159
|
{
|
@@ -41168,7 +41187,7 @@ function PermissionErrorModal() {
|
|
41168
41187
|
isMobile && isAndroid ? /* @__PURE__ */ React169.createElement(React169.Fragment, null, /* @__PURE__ */ React169.createElement(Button, { onClick: () => setDeviceType(""), css: { w: "100%", mb: "$6" } }, "I've allowed access"), /* @__PURE__ */ React169.createElement(Button, { outlined: true, variant: "standard", onClick: () => setDeviceType(""), css: { w: "100%" } }, "Continue anyway")) : null,
|
41169
41188
|
!isMobile ? /* @__PURE__ */ React169.createElement(Flex, { justify: "end", css: { w: "100%" } }, /* @__PURE__ */ React169.createElement(Button, { outlined: true, variant: "standard", onClick: () => setDeviceType("") }, "Dismiss")) : null
|
41170
41189
|
))) : null;
|
41171
|
-
}
|
41190
|
+
};
|
41172
41191
|
|
41173
41192
|
// src/Prebuilt/components/Notifications/ReconnectNotifications.tsx
|
41174
41193
|
init_define_process_env();
|
@@ -41532,7 +41551,7 @@ function Notifications() {
|
|
41532
41551
|
if (isNotificationDisabled) {
|
41533
41552
|
return null;
|
41534
41553
|
}
|
41535
|
-
return /* @__PURE__ */ React174.createElement(React174.Fragment, null, /* @__PURE__ */ React174.createElement(TrackUnmuteModal, null), /* @__PURE__ */ React174.createElement(TrackBulkUnmuteModal, null), /* @__PURE__ */ React174.createElement(TrackNotifications, null), roomState === HMSRoomState10.Connected ? /* @__PURE__ */ React174.createElement(PeerNotifications, null) : null, /* @__PURE__ */ React174.createElement(ReconnectNotifications, null), /* @__PURE__ */ React174.createElement(AutoplayBlockedModal, null), /* @__PURE__ */ React174.createElement(
|
41554
|
+
return /* @__PURE__ */ React174.createElement(React174.Fragment, null, /* @__PURE__ */ React174.createElement(TrackUnmuteModal, null), /* @__PURE__ */ React174.createElement(TrackBulkUnmuteModal, null), /* @__PURE__ */ React174.createElement(TrackNotifications, null), roomState === HMSRoomState10.Connected ? /* @__PURE__ */ React174.createElement(PeerNotifications, null) : null, /* @__PURE__ */ React174.createElement(ReconnectNotifications, null), /* @__PURE__ */ React174.createElement(AutoplayBlockedModal, null), /* @__PURE__ */ React174.createElement(PermissionErrorNotificationModal, null), /* @__PURE__ */ React174.createElement(InitErrorModal, null), /* @__PURE__ */ React174.createElement(ChatNotifications, null), /* @__PURE__ */ React174.createElement(HandRaisedNotifications, null), /* @__PURE__ */ React174.createElement(TranscriptionNotifications, null));
|
41536
41555
|
}
|
41537
41556
|
|
41538
41557
|
// src/Prebuilt/components/Preview/PreviewScreen.tsx
|
@@ -42090,7 +42109,7 @@ import React183, { useContext as useContext5 } from "react";
|
|
42090
42109
|
|
42091
42110
|
// src/Diagnostics/hms.ts
|
42092
42111
|
init_define_process_env();
|
42093
|
-
var hms = new
|
42112
|
+
var hms = new lt();
|
42094
42113
|
var hmsStore = hms.getStore();
|
42095
42114
|
var hmsActions = hms.getActions();
|
42096
42115
|
var hmsNotifications = hms.getNotifications();
|
@@ -42170,7 +42189,7 @@ import {
|
|
42170
42189
|
useHMSActions as useHMSActions58,
|
42171
42190
|
useHMSStore as useHMSStore99
|
42172
42191
|
} from "@100mslive/react-sdk";
|
42173
|
-
import { MicOnIcon as MicOnIcon7, SpeakerIcon as SpeakerIcon5 } from "@100mslive/react-icons";
|
42192
|
+
import { MicOnIcon as MicOnIcon7, SpeakerIcon as SpeakerIcon5, StopIcon as StopIcon3 } from "@100mslive/react-icons";
|
42174
42193
|
|
42175
42194
|
// src/Diagnostics/DeviceSelector.jsx
|
42176
42195
|
init_define_process_env();
|
@@ -42241,12 +42260,11 @@ DeviceSelector2.propTypes = {
|
|
42241
42260
|
|
42242
42261
|
// src/Diagnostics/AudioTest.tsx
|
42243
42262
|
var SelectContainer = ({ children }) => /* @__PURE__ */ React185.createElement(Box, { css: { w: "calc(50% - 0.75rem)", "@lg": { w: "100%" } } }, children);
|
42244
|
-
var MicTest = () => {
|
42263
|
+
var MicTest = ({ setError }) => {
|
42245
42264
|
var _a8, _b7;
|
42246
42265
|
const devices = useHMSStore99(selectDevices);
|
42247
42266
|
const [isRecording, setIsRecording] = useState78(false);
|
42248
|
-
const
|
42249
|
-
const [selectedMic, setSelectedMic] = useState78(audioInputDeviceId || ((_a8 = devices.audioInput[0]) == null ? void 0 : _a8.deviceId));
|
42267
|
+
const [selectedMic, setSelectedMic] = useState78(((_a8 = devices.audioInput[0]) == null ? void 0 : _a8.deviceId) || "default");
|
42250
42268
|
const trackID = useHMSStore99(selectLocalAudioTrackID2);
|
42251
42269
|
const audioLevel = useHMSStore99(selectTrackAudioByID2(trackID));
|
42252
42270
|
const { audioOutputDeviceId } = useHMSStore99(selectLocalMediaSettings);
|
@@ -42263,7 +42281,6 @@ var MicTest = () => {
|
|
42263
42281
|
onChange: (deviceId) => {
|
42264
42282
|
setSelectedMic(deviceId);
|
42265
42283
|
hmsDiagnostics.stopMicCheck();
|
42266
|
-
setIsRecording(false);
|
42267
42284
|
}
|
42268
42285
|
}
|
42269
42286
|
), /* @__PURE__ */ React185.createElement(Flex, { css: { gap: "$6", alignItems: "center" } }, /* @__PURE__ */ React185.createElement(
|
@@ -42271,15 +42288,23 @@ var MicTest = () => {
|
|
42271
42288
|
{
|
42272
42289
|
variant: "standard",
|
42273
42290
|
icon: true,
|
42274
|
-
onClick: () =>
|
42275
|
-
|
42276
|
-
|
42277
|
-
|
42278
|
-
|
42279
|
-
|
42291
|
+
onClick: () => {
|
42292
|
+
isRecording ? hmsDiagnostics.stopMicCheck() : hmsDiagnostics.startMicCheck({
|
42293
|
+
inputDevice: selectedMic,
|
42294
|
+
onError: (err) => {
|
42295
|
+
setError(err);
|
42296
|
+
},
|
42297
|
+
onStop: () => {
|
42298
|
+
setIsRecording(false);
|
42299
|
+
}
|
42300
|
+
}).then(() => {
|
42301
|
+
setIsRecording(true);
|
42302
|
+
});
|
42303
|
+
},
|
42304
|
+
disabled: devices.audioInput.length === 0 || playing
|
42280
42305
|
},
|
42281
|
-
/* @__PURE__ */ React185.createElement(MicOnIcon7, null),
|
42282
|
-
isRecording ? "Recording
|
42306
|
+
isRecording ? /* @__PURE__ */ React185.createElement(StopIcon3, null) : /* @__PURE__ */ React185.createElement(MicOnIcon7, null),
|
42307
|
+
isRecording ? "Stop Recording" : "Record"
|
42283
42308
|
), /* @__PURE__ */ React185.createElement(
|
42284
42309
|
Button,
|
42285
42310
|
{
|
@@ -42352,9 +42377,9 @@ var AudioTest = () => {
|
|
42352
42377
|
}
|
42353
42378
|
}
|
42354
42379
|
},
|
42355
|
-
|
42380
|
+
/* @__PURE__ */ React185.createElement(MicTest, { setError }),
|
42356
42381
|
/* @__PURE__ */ React185.createElement(SpeakerTest, null)
|
42357
|
-
)), /* @__PURE__ */ React185.createElement(TestFooter, { error, ctaText: "Does your audio sound good?" }));
|
42382
|
+
)), /* @__PURE__ */ React185.createElement(TestFooter, { error, ctaText: "Does your audio sound good?" }), /* @__PURE__ */ React185.createElement(PermissionErrorModal, { error }));
|
42358
42383
|
};
|
42359
42384
|
|
42360
42385
|
// src/Diagnostics/BrowserTest.tsx
|
@@ -42571,7 +42596,7 @@ var ConnectivityTestReport = ({
|
|
42571
42596
|
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 }));
|
42572
42597
|
}
|
42573
42598
|
if (progress !== void 0) {
|
42574
|
-
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(
|
42599
|
+
return /* @__PURE__ */ React187.createElement(TestContainer, { css: { textAlign: "center" } }, /* @__PURE__ */ React187.createElement(Text, { css: { c: "$primary_bright", textAlign: "center" } }, /* @__PURE__ */ React187.createElement(Loading, { size: "3.5rem", color: "currentColor" })), /* @__PURE__ */ React187.createElement(Text, { variant: "h6", css: { mt: "$8" } }, "Checking your connection..."), /* @__PURE__ */ React187.createElement(
|
42575
42600
|
Text,
|
42576
42601
|
{
|
42577
42602
|
variant: "body2",
|
@@ -42669,7 +42694,12 @@ var downloadJson = (obj, fileName) => {
|
|
42669
42694
|
// src/Diagnostics/VideoTest.tsx
|
42670
42695
|
init_define_process_env();
|
42671
42696
|
import React188, { useEffect as useEffect78, useState as useState81 } from "react";
|
42672
|
-
import {
|
42697
|
+
import {
|
42698
|
+
selectDevices as selectDevices2,
|
42699
|
+
selectLocalMediaSettings as selectLocalMediaSettings2,
|
42700
|
+
selectLocalVideoTrackID as selectLocalVideoTrackID4,
|
42701
|
+
useHMSStore as useHMSStore100
|
42702
|
+
} from "@100mslive/react-sdk";
|
42673
42703
|
import { VideoOnIcon as VideoOnIcon5 } from "@100mslive/react-icons";
|
42674
42704
|
var VideoTest = () => {
|
42675
42705
|
const allDevices = useHMSStore100(selectDevices2);
|
@@ -42703,7 +42733,7 @@ var VideoTest = () => {
|
|
42703
42733
|
hmsDiagnostics.startCameraCheck(deviceId);
|
42704
42734
|
})
|
42705
42735
|
}
|
42706
|
-
))), /* @__PURE__ */ React188.createElement(TestFooter, { error, ctaText: "Does your video look good?" }));
|
42736
|
+
))), /* @__PURE__ */ React188.createElement(TestFooter, { error, ctaText: "Does your video look good?" }), /* @__PURE__ */ React188.createElement(PermissionErrorModal, { error }));
|
42707
42737
|
};
|
42708
42738
|
|
42709
42739
|
// src/Diagnostics/Diagnostics.tsx
|
@@ -42907,4 +42937,4 @@ object-assign/index.js:
|
|
42907
42937
|
@license MIT
|
42908
42938
|
*)
|
42909
42939
|
*/
|
42910
|
-
//# sourceMappingURL=chunk-
|
42940
|
+
//# sourceMappingURL=chunk-VO7L2JWV.js.map
|