@100mslive/roomkit-react 0.3.14-alpha.7 → 0.3.14-alpha.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{HLSView-RRYP5FV5.js → HLSView-C7QKK3HT.js} +2 -2
- package/dist/{HLSView-YIIBVIYC.css → HLSView-UMOI3RZE.css} +3 -3
- package/dist/{HLSView-YIIBVIYC.css.map → HLSView-UMOI3RZE.css.map} +1 -1
- package/dist/Prebuilt/components/Notifications/PermissionErrorModal.d.ts +5 -1
- package/dist/{chunk-DR5OAQOV.js → chunk-EODBFJ5Y.js} +530 -503
- package/dist/{chunk-DR5OAQOV.js.map → chunk-EODBFJ5Y.js.map} +3 -3
- package/dist/index.cjs.css +2 -2
- package/dist/index.cjs.css.map +1 -1
- package/dist/index.cjs.js +569 -545
- 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 +32 -22
- package/dist/meta.esbuild.json +42 -32
- package/package.json +7 -7
- package/src/Diagnostics/AudioTest.tsx +27 -18
- 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-C7QKK3HT.js.map} +0 -0
package/dist/index.cjs.js
CHANGED
|
@@ -109,7 +109,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
109
109
|
var define_process_env_default;
|
|
110
110
|
var init_define_process_env = __esm({
|
|
111
111
|
"<define:process.env>"() {
|
|
112
|
-
define_process_env_default = { GITHUB_STATE: "/home/runner/work/_temp/_runner_file_commands/save_state_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" };
|
|
112
|
+
define_process_env_default = { GITHUB_STATE: "/home/runner/work/_temp/_runner_file_commands/save_state_27575a21-5737-454e-8e27-786155458b41", 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.8", 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.8", RUNNER_ENVIRONMENT: "github-hosted", GITHUB_ENV: "/home/runner/work/_temp/_runner_file_commands/set_env_27575a21-5737-454e-8e27-786155458b41", 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.8", JAVA_HOME_8_X64: "/usr/lib/jvm/temurin-8-jdk-amd64", NODE_AUTH_TOKEN: "XXXXX-XXXXX-XXXXX-XXXXX", SHLVL: "1", npm_package_dependencies__radix_ui_react_tooltip: "1.0.6", npm_package_dependencies__radix_ui_react_popover: "1.0.6", npm_package_dependencies__100mslive_types_prebuilt: "0.12.9", npm_package_peerDependencies_react: ">=17.0.2 <19.0.0", npm_package_devDependencies__storybook_addon_links: "^7.0.27", npm_package_files_0: "dist", HOME: "/home/runner", npm_package_devDependencies__typescript_eslint_parser: "^5.4.0", npm_package_dependencies__radix_ui_react_dialog: "1.0.4", npm_package_devDependencies__types_react_window: "^1.8.5", npm_package_files_1: "src", npm_package_repository_directory: "packages/roomkit-react", RUNNER_TEMP: "/home/runner/work/_temp", GITHUB_EVENT_PATH: "/home/runner/work/_temp/_github_workflow/event.json", npm_package_scripts_controller: "cd packages/hls-controller && yarn start", npm_package_dependencies__stitches_react: "^1.2.8", JAVA_HOME_11_X64: "/usr/lib/jvm/temurin-11-jdk-amd64", PIPX_BIN_DIR: "/opt/pipx_bin", GITHUB_REPOSITORY_OWNER: "100mslive", npm_package_engines_node: ">=16", npm_package_devDependencies_typedoc_plugin_markdown: "^3.14.0", npm_config_init_license: "MIT", GRADLE_HOME: "/usr/share/gradle-8.8", ANDROID_NDK_LATEST_HOME: "/usr/local/lib/android/sdk/ndk/26.3.11579264", JAVA_HOME_21_X64: "/usr/lib/jvm/temurin-21-jdk-amd64", STATS_RDCL: "true", GITHUB_RETENTION_DAYS: "90", YARN_WRAP_OUTPUT: "false", npm_config_version_tag_prefix: "v", GITHUB_REPOSITORY_OWNER_ID: "73883131", POWERSHELL_DISTRIBUTION_CHANNEL: "GitHub-Actions-ubuntu22", AZURE_EXTENSION_DIR: "/opt/az/azcliextensions", GITHUB_HEAD_REF: "", npm_package_scripts_lint_fix: "yarn lint --fix", npm_config_userconfig: "/home/runner/work/_temp/.npmrc", npm_package_devDependencies__storybook_addon_a11y: "^7.0.27", SYSTEMD_EXEC_PID: "593", npm_package_scripts_postinstall: "husky install && lerna bootstrap", npm_package_devDependencies_husky: "^6.0.0", npm_package_dependencies_recordrtc: "^5.6.2", npm_package_dependencies_eventemitter2: "^6.4.9", npm_package_dependencies__radix_ui_react_label: "1.0.0", npm_package_dependencies__radix_ui_react_dropdown_menu: "2.0.5", npm_package_keywords_0: "100mslive", GITHUB_GRAPHQL_URL: "https://api.github.com/graphql", npm_package_description: "100ms Room Kit provides simple & easy to use UI components to build Live Streaming & Video Conferencing experiences in your apps.", npm_package_devDependencies_typescript: "~4.7.4", npm_package_devDependencies_typedoc: "^0.24.8", npm_package_devDependencies_babel_loader: "^8.2.5", npm_package_keywords_1: "react", GOROOT_1_20_X64: "/opt/hostedtoolcache/go/1.20.14/x64", NVM_DIR: "/home/runner/.nvm", npm_package_readmeFilename: "README.md", npm_package_devDependencies_react: "^18.1.0", npm_package_devDependencies__babel_preset_env: "^7.22.5", npm_package_keywords_2: "prebuilt", DOTNET_SKIP_FIRST_TIME_EXPERIENCE: "1", GOROOT_1_21_X64: "/opt/hostedtoolcache/go/1.21.11/x64", JAVA_HOME_17_X64: "/usr/lib/jvm/temurin-17-jdk-amd64", ImageVersion: "20240616.1.0", npm_package_devDependencies_prettier: "^2.4.1", npm_package_devDependencies_babel_jest: "^26.6.0", npm_package_scripts_dev: "node ../../scripts/dev", npm_package_keywords_3: "roomkit", RUNNER_OS: "Linux", GITHUB_API_URL: "https://api.github.com", GOROOT_1_22_X64: "/opt/hostedtoolcache/go/1.22.4/x64", SWIFT_PATH: "/usr/share/swift/usr/bin", FORCE_COLOR: "true", npm_package_dependencies__radix_ui_react_toast: "1.0.0", npm_package_dependencies__radix_ui_react_radio_group: "1.0.0", npm_package_dependencies__100mslive_hms_noise_cancellation: "0.0.1", npm_package_devDependencies__babel_preset_typescript: "^7.22.5", npm_package_exports___default: "./dist/index.js", RUNNER_USER: "runner", STATS_V3PS: "true", CHROMEWEBDRIVER: "/usr/local/share/chromedriver-linux64", JOURNAL_STREAM: "8:16135", 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.8", 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: "9613734740", 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: "16a110b525265ba74c72960c828e6ce933df52cf", 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: "b1fde51e3dfa43537b62c313ed425931ffc6c01ee0651880125bf51b6a28d58c", npm_package_exports___import: "./dist/index.js", STATS_BLT: "true", GITHUB_WORKFLOW_REF: "100mslive/web-sdks/.github/workflows/publish.yml@refs/heads/publish-alpha", PERFLOG_LOCATION_SETTING: "RUNNER_PERFLOG", GITHUB_ACTION_REPOSITORY: "", npm_package_scripts_prebuilt: "cd packages/roomkit-react && yarn start", npm_package_devDependencies_postcss_loader: "^6.2.1", npm_package_devDependencies_esbuild_loader: "^4.0.2", PATH: "/tmp/yarn--1718973604964-0.10726757358908445:/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--1718973604770-0.33744061216691046:/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--1718973579202-0.226299014918115:/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--1718973579021-0.0699281435738186:/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_7ad3cca2-cc6f-4b07-8c13-cddbd3cd61ad", INVOCATION_ID: "19e1902fb66a4b0faa182d54d9c9486b", 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: "585", 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 374", 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.8", 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.8", 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: "16a110b525265ba74c72960c828e6ce933df52cf", 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_27575a21-5737-454e-8e27-786155458b41", 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_27575a21-5737-454e-8e27-786155458b41", 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_27575a21-5737-454e-8e27-786155458b41" };
|
|
113
113
|
}
|
|
114
114
|
});
|
|
115
115
|
|
|
@@ -16876,11 +16876,11 @@ function shimOnTrack(window2) {
|
|
|
16876
16876
|
get() {
|
|
16877
16877
|
return this._ontrack;
|
|
16878
16878
|
},
|
|
16879
|
-
set(
|
|
16879
|
+
set(f2) {
|
|
16880
16880
|
if (this._ontrack) {
|
|
16881
16881
|
this.removeEventListener("track", this._ontrack);
|
|
16882
16882
|
}
|
|
16883
|
-
this.addEventListener("track", this._ontrack =
|
|
16883
|
+
this.addEventListener("track", this._ontrack = f2);
|
|
16884
16884
|
},
|
|
16885
16885
|
enumerable: true,
|
|
16886
16886
|
configurable: true
|
|
@@ -17888,12 +17888,12 @@ function shimRemoteStreamsAPI(window2) {
|
|
|
17888
17888
|
get() {
|
|
17889
17889
|
return this._onaddstream;
|
|
17890
17890
|
},
|
|
17891
|
-
set(
|
|
17891
|
+
set(f2) {
|
|
17892
17892
|
if (this._onaddstream) {
|
|
17893
17893
|
this.removeEventListener("addstream", this._onaddstream);
|
|
17894
17894
|
this.removeEventListener("track", this._onaddstreampoly);
|
|
17895
17895
|
}
|
|
17896
|
-
this.addEventListener("addstream", this._onaddstream =
|
|
17896
|
+
this.addEventListener("addstream", this._onaddstream = f2);
|
|
17897
17897
|
this.addEventListener("track", this._onaddstreampoly = (e) => {
|
|
17898
17898
|
e.streams.forEach((stream) => {
|
|
17899
17899
|
if (!this._remoteStreams) {
|
|
@@ -19343,14 +19343,14 @@ function M(n2, r2, t2) {
|
|
|
19343
19343
|
}
|
|
19344
19344
|
return e.o;
|
|
19345
19345
|
}
|
|
19346
|
-
function A(e, i2, o2, a11, c3, s2,
|
|
19346
|
+
function A(e, i2, o2, a11, c3, s2, v3) {
|
|
19347
19347
|
if ("production" !== define_process_env_default.NODE_ENV && c3 === o2 && n(5), r(c3)) {
|
|
19348
19348
|
var p2 = M(e, c3, s2 && i2 && 3 !== i2.i && !u(i2.R, a11) ? s2.concat(a11) : void 0);
|
|
19349
19349
|
if (f(o2, a11, p2), !r(p2))
|
|
19350
19350
|
return;
|
|
19351
19351
|
e.m = false;
|
|
19352
19352
|
} else
|
|
19353
|
-
|
|
19353
|
+
v3 && o2.add(c3);
|
|
19354
19354
|
if (t(c3) && !y(c3)) {
|
|
19355
19355
|
if (!e.h.D && e._ < 1)
|
|
19356
19356
|
return;
|
|
@@ -19383,8 +19383,8 @@ function N(n2, r2, t2) {
|
|
|
19383
19383
|
var e = s(r2) ? b("MapSet").F(r2, t2) : v(r2) ? b("MapSet").T(r2, t2) : n2.O ? function(n3, r3) {
|
|
19384
19384
|
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;
|
|
19385
19385
|
t3 && (i2 = [e2], o2 = on);
|
|
19386
|
-
var u2 = Proxy.revocable(i2, o2), a11 = u2.revoke,
|
|
19387
|
-
return e2.k =
|
|
19386
|
+
var u2 = Proxy.revocable(i2, o2), a11 = u2.revoke, f2 = u2.proxy;
|
|
19387
|
+
return e2.k = f2, e2.j = a11, f2;
|
|
19388
19388
|
}(r2, t2) : b("ES5").J(r2, t2);
|
|
19389
19389
|
return (t2 ? t2.A : _()).p.push(e), e;
|
|
19390
19390
|
}
|
|
@@ -19519,26 +19519,26 @@ var init_immer_esm = __esm({
|
|
|
19519
19519
|
});
|
|
19520
19520
|
};
|
|
19521
19521
|
}
|
|
19522
|
-
var
|
|
19522
|
+
var f2;
|
|
19523
19523
|
if ("function" != typeof i3 && n(6), void 0 !== o2 && "function" != typeof o2 && n(7), t(r3)) {
|
|
19524
|
-
var c3 = w(e2), s2 = N(e2, r3, void 0),
|
|
19524
|
+
var c3 = w(e2), s2 = N(e2, r3, void 0), v3 = true;
|
|
19525
19525
|
try {
|
|
19526
|
-
|
|
19526
|
+
f2 = i3(s2), v3 = false;
|
|
19527
19527
|
} finally {
|
|
19528
|
-
|
|
19528
|
+
v3 ? g(c3) : O(c3);
|
|
19529
19529
|
}
|
|
19530
|
-
return "undefined" != typeof Promise &&
|
|
19530
|
+
return "undefined" != typeof Promise && f2 instanceof Promise ? f2.then(function(n2) {
|
|
19531
19531
|
return j(c3, o2), P3(n2, c3);
|
|
19532
19532
|
}, function(n2) {
|
|
19533
19533
|
throw g(c3), n2;
|
|
19534
|
-
}) : (j(c3, o2), P3(
|
|
19534
|
+
}) : (j(c3, o2), P3(f2, c3));
|
|
19535
19535
|
}
|
|
19536
19536
|
if (!r3 || "object" != typeof r3) {
|
|
19537
|
-
if (void 0 === (
|
|
19537
|
+
if (void 0 === (f2 = i3(r3)) && (f2 = r3), f2 === H && (f2 = void 0), e2.D && d(f2, true), o2) {
|
|
19538
19538
|
var p2 = [], l2 = [];
|
|
19539
|
-
b("Patches").M(r3,
|
|
19539
|
+
b("Patches").M(r3, f2, p2, l2), o2(p2, l2);
|
|
19540
19540
|
}
|
|
19541
|
-
return
|
|
19541
|
+
return f2;
|
|
19542
19542
|
}
|
|
19543
19543
|
n(21, r3);
|
|
19544
19544
|
}, this.produceWithPatches = function(n2, r3) {
|
|
@@ -20144,8 +20144,8 @@ var require_grammar = __commonJS({
|
|
|
20144
20144
|
var require_parser = __commonJS({
|
|
20145
20145
|
"../../node_modules/sdp-transform/lib/parser.js"(exports) {
|
|
20146
20146
|
init_define_process_env();
|
|
20147
|
-
var toIntIfInt = function(
|
|
20148
|
-
return String(Number(
|
|
20147
|
+
var toIntIfInt = function(v3) {
|
|
20148
|
+
return String(Number(v3)) === v3 ? Number(v3) : v3;
|
|
20149
20149
|
};
|
|
20150
20150
|
var attachProperties = function(match18, location, names, rawName) {
|
|
20151
20151
|
if (rawName && !names) {
|
|
@@ -20373,7 +20373,7 @@ var require_lib = __commonJS({
|
|
|
20373
20373
|
});
|
|
20374
20374
|
|
|
20375
20375
|
// ../hms-video-store/dist/index.js
|
|
20376
|
-
function
|
|
20376
|
+
function Ue(a11, e) {
|
|
20377
20377
|
let t2, i2;
|
|
20378
20378
|
if (e)
|
|
20379
20379
|
for (let r2 of e.auxiliaryTracks) {
|
|
@@ -20400,7 +20400,7 @@ function mt(a11) {
|
|
|
20400
20400
|
function os(a11) {
|
|
20401
20401
|
return a11 ? !!(a11 != null && a11.degraded) : false;
|
|
20402
20402
|
}
|
|
20403
|
-
function
|
|
20403
|
+
function je(a11, e) {
|
|
20404
20404
|
return e && a11.tracks[e] ? a11.tracks[e].enabled : false;
|
|
20405
20405
|
}
|
|
20406
20406
|
function ns(a11, e) {
|
|
@@ -20436,11 +20436,11 @@ function oe(a11) {
|
|
|
20436
20436
|
return a11 != null;
|
|
20437
20437
|
}
|
|
20438
20438
|
function ft(a11 = "prod", e) {
|
|
20439
|
-
let t2 = "web", i2 =
|
|
20440
|
-
if (
|
|
20441
|
-
return vs({ os: "web_nodejs", os_version: process.version, sdk: t2, sdk_version: fs, env: i2, domain:
|
|
20439
|
+
let t2 = "web", i2 = Qe !== "LOCAL" && a11 === "prod" ? "prod" : "debug";
|
|
20440
|
+
if (Be)
|
|
20441
|
+
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 });
|
|
20442
20442
|
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;
|
|
20443
|
-
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:
|
|
20443
|
+
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 });
|
|
20444
20444
|
}
|
|
20445
20445
|
function yr(a11) {
|
|
20446
20446
|
return a11.replace(/ /g, "_");
|
|
@@ -20471,7 +20471,7 @@ function po(a11, e = "") {
|
|
|
20471
20471
|
return uo(a11.message, e);
|
|
20472
20472
|
}
|
|
20473
20473
|
}
|
|
20474
|
-
function
|
|
20474
|
+
function Ae(a11, e) {
|
|
20475
20475
|
let t2 = po(a11, e);
|
|
20476
20476
|
return t2.addNativeError(a11), t2;
|
|
20477
20477
|
}
|
|
@@ -20480,7 +20480,7 @@ function ys(a11) {
|
|
|
20480
20480
|
try {
|
|
20481
20481
|
return (yield navigator.mediaDevices.getUserMedia({ audio: a11 ? a11.toConstraints() : false })).getAudioTracks()[0];
|
|
20482
20482
|
} catch (e) {
|
|
20483
|
-
throw
|
|
20483
|
+
throw Ae(e, "audio");
|
|
20484
20484
|
}
|
|
20485
20485
|
});
|
|
20486
20486
|
}
|
|
@@ -20489,25 +20489,25 @@ function ks(a11) {
|
|
|
20489
20489
|
try {
|
|
20490
20490
|
return (yield navigator.mediaDevices.getUserMedia({ video: a11 ? a11.toConstraints() : false })).getVideoTracks()[0];
|
|
20491
20491
|
} catch (e) {
|
|
20492
|
-
throw
|
|
20492
|
+
throw Ae(e, "video");
|
|
20493
20493
|
}
|
|
20494
20494
|
});
|
|
20495
20495
|
}
|
|
20496
20496
|
function ue(a11) {
|
|
20497
20497
|
return "canvas" in a11 || a11.label === "MediaStreamAudioDestinationNode" || a11.label === "";
|
|
20498
20498
|
}
|
|
20499
|
-
function
|
|
20499
|
+
function Z2(a11) {
|
|
20500
20500
|
if (a11 < 0)
|
|
20501
20501
|
throw Error("`ms` should be a positive integer");
|
|
20502
20502
|
return new Promise((e) => {
|
|
20503
20503
|
setTimeout(e, a11);
|
|
20504
20504
|
});
|
|
20505
20505
|
}
|
|
20506
|
-
function
|
|
20506
|
+
function Le(a11) {
|
|
20507
20507
|
if (a11 < 0)
|
|
20508
20508
|
throw Error("`ms` should be a positive integer");
|
|
20509
20509
|
if (typeof Worker == "undefined")
|
|
20510
|
-
return
|
|
20510
|
+
return Z2(a11);
|
|
20511
20511
|
let e = new Worker(URL.createObjectURL(new Blob([Ps], { type: "application/javascript" })));
|
|
20512
20512
|
return e.postMessage(["start", a11]), new Promise((t2) => {
|
|
20513
20513
|
e.onmessage = (i2) => {
|
|
@@ -20517,7 +20517,7 @@ function Ce(a11) {
|
|
|
20517
20517
|
}
|
|
20518
20518
|
function Es() {
|
|
20519
20519
|
if (typeof Worker == "undefined")
|
|
20520
|
-
return { sleep: (e) =>
|
|
20520
|
+
return { sleep: (e) => Z2(e) };
|
|
20521
20521
|
let a11 = new Worker(URL.createObjectURL(new Blob([Ps], { type: "application/javascript" })));
|
|
20522
20522
|
return { sleep: (e) => (a11.postMessage(["start", e]), new Promise((t2) => {
|
|
20523
20523
|
a11.onmessage = (i2) => {
|
|
@@ -20545,7 +20545,7 @@ function xs(a11, e) {
|
|
|
20545
20545
|
return !(0, import_lodash4.default)(a11[i2], e[i2]);
|
|
20546
20546
|
};
|
|
20547
20547
|
}
|
|
20548
|
-
function
|
|
20548
|
+
function A2(a11) {
|
|
20549
20549
|
return (e) => (t2) => a11(t2, e);
|
|
20550
20550
|
}
|
|
20551
20551
|
function xm(a11) {
|
|
@@ -20606,7 +20606,7 @@ function un2(a11, e) {
|
|
|
20606
20606
|
var t2;
|
|
20607
20607
|
return M2(m({}, a11), { rtcConfiguration: M2(m({}, a11.rtcConfiguration), { iceServers: Ua((t2 = a11.rtcConfiguration) == null ? void 0 : t2.ice_servers, e) }) });
|
|
20608
20608
|
}
|
|
20609
|
-
var import_ua_parser_js, import_lodash3, import_uuid3, import_uuid4, import_lodash4, import_uuid5, import_uuid6, import_uuid7, import_eventemitter2, import_eventemitter22, import_uuid8, import_eventemitter23, Kt, import_eventemitter24, import_uuid9, import_uuid10, qa, ja, Ja, ei, Qa, is, rs, za, ts, m, M2, mr, Ya,
|
|
20609
|
+
var import_ua_parser_js, import_lodash3, import_uuid3, import_uuid4, import_lodash4, import_uuid5, import_uuid6, import_uuid7, import_eventemitter2, import_eventemitter22, import_uuid8, import_eventemitter23, Kt, import_eventemitter24, import_uuid9, import_uuid10, qa, ja, Ja, ei, Qa, is, rs, za, ts, m, M2, mr, Ya, J, c2, Mr, Sr, ti, ii, Xa, ss, gr, as, cs, eo, d2, Je, ge, O2, ds, Be, io, tc, Te, ps, Tr, ls, us, hs, si, Re, Ie, ms, Qe, E2, v2, so, S2, vr, Ss, le, gs, Ts, gt, Tt, fs, vs, H2, y2, kr, Q2, Pr, Er, ne, ai, co, lo, vt, He, Ce, Ps, mo, So, ni, br, bs, Rs, Is, As, Hs, Ve, Cs, ee, Fe, z2, Ge, De, ze, ce, se, Ye, Mt, To, ws, Rr, _s, Ir, Ns, Xe, Ar, Hr, yt, Ze, Os, vo, Mo, kt, ci, yo, di, Cr, pe, li, ve, F, et, ui, tt, Us, Bs, Pt, G2, Vs, Fs, Me, Dr, wr, Gs, Ws, U2, _r, We, fe, $s, Ks, Eo, Or, bo, qs, js, Et, Nr, xr, pi, hi, it, rt, $e, bt, he, mi, st, we, Si, gi, Ti, Rt, B2, Ao, Wh, $h, K, fi, Js, N2, Qs, Ur, Ho, _e, jh, Co, me, Lo, te, ye, Jh, Qh, ae, Y2, Do, zs, zh, Yh, Br, Ys, Vr, wo, Zh, em, tm, im, rm, sm, am, om, It, _o, nm, ie, Xs, cm, dm, Se, lm, at, No, Zs, um, ea, pm, hm, mm, Sm, gm, Tm, fm, vm, Mm, ta, Em, Oo, bm, ra, Fr, sa, aa, oa, na, ca, da, la, ua, At, b2, Gr, Ht, pa, xo, Uo, q2, Wr, Bo, Vo, Fo, Go, Wo, X2, Om, Bm, Vm, vi, ha, Fm, Gm, Wm, $o, Ko, Km, ma, qm, qo, jm, Jm, Qm, zm, Ym, Xm, Sa, ga, eS, tS, Ta, iS, rS, fa, sS, aS, oS, va, Ma, jo, Jo, Qo, nS, cS, dS, lS, uS, ya, PS, zo, ES, bS, RS, Xo, Zo, yi, Ct, ki, ka, $r, Pi, Ei, Ea, ba, Ra, Kr, Ia, qr, Ke, jr, bi, re, Lt, _2, Dt, Ri, Ii, Aa, Ha, ot, Ca, Ai, tn2, de, Ne, Hi, rn2, La, Da, Ci, Oe, Li, wt, Di, wi, _i, _t, Jr, Pe, Nt, Ot, Ni, Oi, wa, xt, xi, Ut, Ui, V, Bt, Bi, Vi, Fi, ct, Gi, Wi, C, $i, Ki, Vt, qi, Ft, ji, Ji, Qi, zi, Yi, Xi, Zi, er, tr, j2, _a7, ir, rr, sr, ar, or, nr, dt, lt, cr, dr, Gt, Wt, zr, $t, Xr, ur, Ee, qe, qt, jt, Jt, Ua, pr, Qt, zt, Ba, I2, Yt, Fa, hr, ut, Wa, Ga, vn2, Mn, yn, Xt, kn, Pn, En, bn, $a, Rn, Ka, Zr, be, In, An, Hn, Cn, Ln, Dn, wn, _n, Nn, On, es, xn, Un, Bn, Vn, Fn, Gn;
|
|
20610
20610
|
var init_dist = __esm({
|
|
20611
20611
|
"../hms-video-store/dist/index.js"() {
|
|
20612
20612
|
"use strict";
|
|
@@ -20665,7 +20665,7 @@ var init_dist = __esm({
|
|
|
20665
20665
|
return t2;
|
|
20666
20666
|
};
|
|
20667
20667
|
Ya = (a11, e) => () => (e || a11((e = { exports: {} }).exports, e), e.exports);
|
|
20668
|
-
|
|
20668
|
+
J = (a11, e, t2) => za(Qa(a11), t2, e);
|
|
20669
20669
|
c2 = (a11, e, t2) => new Promise((i2, r2) => {
|
|
20670
20670
|
var s2 = (l2) => {
|
|
20671
20671
|
try {
|
|
@@ -20683,7 +20683,7 @@ var init_dist = __esm({
|
|
|
20683
20683
|
n2((t2 = t2.apply(a11, e)).next());
|
|
20684
20684
|
});
|
|
20685
20685
|
Mr = Ya((Vc, oo) => {
|
|
20686
|
-
oo.exports = { version: "0.12.14-alpha.
|
|
20686
|
+
oo.exports = { version: "0.12.14-alpha.8", license: "MIT", repository: { type: "git", url: "https://github.com/100mslive/web-sdks.git", directory: "packages/hms-video-store" }, main: "dist/index.cjs.js", module: "dist/index.js", typings: "dist/index.d.ts", files: ["dist", "src"], engines: { node: ">=12" }, exports: { ".": { require: "./dist/index.cjs.js", import: "./dist/index.js", default: "./dist/index.js" } }, sideEffects: false, scripts: { prestart: "rm -rf dist && yarn types:build", start: 'concurrently "yarn dev" "yarn types"', dev: "node ../../scripts/dev", "build:only": "node ../../scripts/build", build: "yarn build:only && yarn types:build", types: "tsc -w", "types:build": "tsc -p tsconfig.json", format: "prettier --write src/**/*.ts", test: "jest --maxWorkers=1", "test:watch": "jest --watch", "test:coverage": "jest --coverage", lint: "eslint -c ../../.eslintrc .", "lint:fix": "yarn lint --fix", prepare: "yarn build", size: "size-limit", analyze: "size-limit --why", docs: "rm -rf ./docs && typedoc && rm -f ./docs/README.md && mkdir ./docs/home &&mv ./docs/modules.md ./docs/home/content.md && node ../../scripts/docs-store && npx prettier --write './docs/**/*'" }, name: "@100mslive/hms-video-store", author: "100ms", dependencies: { eventemitter2: "^6.4.9", immer: "^9.0.6", "lodash.isequal": "^4.5.0", reselect: "4.0.0", "sdp-transform": "^2.14.1", "ua-parser-js": "^1.0.1", uuid: "^8.3.2", "webrtc-adapter": "^8.0.0", zustand: "3.5.7" }, devDependencies: { "@types/dom-screen-wake-lock": "^1.0.1", "@types/lodash.isequal": "^4.5.8", "@types/sdp-transform": "^2.4.4", "@types/ua-parser-js": "^0.7.36", "@types/uuid": "^8.3.0", "jest-canvas-mock": "^2.3.1", "jsdom-worker": "^0.3.0", tslib: "^2.2.0" }, description: "@100mslive Core SDK which abstracts the complexities of webRTC while providing a reactive store for data management with a unidirectional data flow", keywords: ["video", "webrtc", "conferencing", "100ms"] };
|
|
20687
20687
|
});
|
|
20688
20688
|
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 || {});
|
|
20689
20689
|
ti = () => ({ room: { id: "", isConnected: false, name: "", peers: [], localPeer: "", roomState: "Disconnected", recording: { browser: { running: false }, server: { running: false }, hls: { running: false } }, rtmp: { running: false }, hls: { running: false, variants: [] }, sessionId: "" }, peers: {}, tracks: {}, playlist: { audio: { list: {}, selection: { id: "", hasPrevious: false, hasNext: false }, progress: 0, volume: 0, currentTime: 0, playbackRate: 1 }, video: { list: {}, selection: { id: "", hasPrevious: false, hasNext: false }, progress: 0, volume: 0, currentTime: 0, playbackRate: 1 } }, messages: { byID: {}, allIDs: [] }, speakers: {}, connectionQualities: {}, settings: { audioInputDeviceId: "", audioOutputDeviceId: "", videoInputDeviceId: "" }, devices: { audioInput: [], audioOutput: [], videoInput: [] }, roles: {}, roleChangeRequests: [], errors: [], sessionStore: {}, templateAppData: {}, polls: {}, whiteboards: {}, hideLocalPeer: false });
|
|
@@ -20760,7 +20760,7 @@ var init_dist = __esm({
|
|
|
20760
20760
|
}
|
|
20761
20761
|
};
|
|
20762
20762
|
d2.level = eo ? 7 : 0;
|
|
20763
|
-
|
|
20763
|
+
Je = class {
|
|
20764
20764
|
constructor(e) {
|
|
20765
20765
|
this.tracks = new Array();
|
|
20766
20766
|
this.nativeStream = e, this.id = e.id;
|
|
@@ -20771,8 +20771,8 @@ var init_dist = __esm({
|
|
|
20771
20771
|
};
|
|
20772
20772
|
ge = new import_ua_parser_js.UAParser();
|
|
20773
20773
|
O2 = typeof window != "undefined";
|
|
20774
|
-
|
|
20775
|
-
io = () => !
|
|
20774
|
+
Be = typeof window == "undefined" && !((ds = ge.getBrowser().name) != null && ds.toLowerCase().includes("electron"));
|
|
20775
|
+
io = () => !Be;
|
|
20776
20776
|
tc = io();
|
|
20777
20777
|
Te = () => ge.getDevice().type === "mobile";
|
|
20778
20778
|
ps = () => typeof document != "undefined" && document.hidden;
|
|
@@ -20831,7 +20831,7 @@ var init_dist = __esm({
|
|
|
20831
20831
|
}`;
|
|
20832
20832
|
}
|
|
20833
20833
|
};
|
|
20834
|
-
|
|
20834
|
+
Ie = class extends Re {
|
|
20835
20835
|
constructor(t2, i2, r2) {
|
|
20836
20836
|
super(t2, i2, r2);
|
|
20837
20837
|
this.type = "audio";
|
|
@@ -20886,9 +20886,9 @@ var init_dist = __esm({
|
|
|
20886
20886
|
}
|
|
20887
20887
|
};
|
|
20888
20888
|
ms = ((i2) => (i2.CUSTOM = "CUSTOM", i2.LOCAL = "LOCAL", i2.HMS = "HMS", i2))(ms || {});
|
|
20889
|
-
|
|
20890
|
-
|
|
20891
|
-
|
|
20889
|
+
Qe = ro();
|
|
20890
|
+
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 } };
|
|
20891
|
+
v2 = class a2 extends Error {
|
|
20892
20892
|
constructor(t2, i2, r2, s2, o2, n2 = false) {
|
|
20893
20893
|
super(s2);
|
|
20894
20894
|
this.code = t2;
|
|
@@ -20919,111 +20919,111 @@ var init_dist = __esm({
|
|
|
20919
20919
|
};
|
|
20920
20920
|
so = ["join", "offer", "answer", "trickle", "on-error", "JOIN"];
|
|
20921
20921
|
S2 = { WebSocketConnectionErrors: { FailedToConnect(a11, e = "") {
|
|
20922
|
-
return new
|
|
20922
|
+
return new v2(E2.WebSocketConnectionErrors.FAILED_TO_CONNECT, "WebsocketFailedToConnect", a11, `[WS]: ${e}`, `[WS]: ${e}`);
|
|
20923
20923
|
}, WebSocketConnectionLost(a11, e = "") {
|
|
20924
|
-
return new
|
|
20924
|
+
return new v2(E2.WebSocketConnectionErrors.WEBSOCKET_CONNECTION_LOST, "WebSocketConnectionLost", a11, "Network connection lost", e);
|
|
20925
20925
|
}, AbnormalClose(a11, e = "") {
|
|
20926
|
-
return new
|
|
20926
|
+
return new v2(E2.WebSocketConnectionErrors.ABNORMAL_CLOSE, "WebSocketAbnormalClose", a11, "Websocket closed abnormally", e);
|
|
20927
20927
|
} }, APIErrors: { ServerErrors(a11, e, t2 = "", i2 = true) {
|
|
20928
|
-
return new
|
|
20928
|
+
return new v2(a11, "ServerErrors", e, `[${e}]: Server error ${t2}`, t2, i2);
|
|
20929
20929
|
}, EndpointUnreachable(a11, e = "") {
|
|
20930
|
-
return new
|
|
20930
|
+
return new v2(E2.APIErrors.ENDPOINT_UNREACHABLE, "EndpointUnreachable", a11, `Endpoint is not reachable - ${e}`, e);
|
|
20931
20931
|
}, InvalidTokenFormat(a11, e = "") {
|
|
20932
|
-
return new
|
|
20932
|
+
return new v2(E2.APIErrors.INVALID_TOKEN_FORMAT, "InvalidTokenFormat", a11, `Token is not in proper JWT format - ${e}`, e, true);
|
|
20933
20933
|
}, InitConfigNotAvailable(a11, e = "") {
|
|
20934
|
-
return new
|
|
20934
|
+
return new v2(E2.APIErrors.INIT_CONFIG_NOT_AVAILABLE, "InitError", a11, `[INIT]: ${e}`, `[INIT]: ${e}`);
|
|
20935
20935
|
} }, TracksErrors: { GenericTrack(a11, e = "") {
|
|
20936
|
-
return new
|
|
20936
|
+
return new v2(E2.TracksErrors.GENERIC_TRACK, "GenericTrack", a11, `[TRACK]: ${e}`, `[TRACK]: ${e}`);
|
|
20937
20937
|
}, CantAccessCaptureDevice(a11, e, t2 = "") {
|
|
20938
|
-
return new
|
|
20938
|
+
return new v2(E2.TracksErrors.CANT_ACCESS_CAPTURE_DEVICE, "CantAccessCaptureDevice", a11, `User denied permission to access capture device - ${e}`, t2);
|
|
20939
20939
|
}, DeviceNotAvailable(a11, e, t2 = "") {
|
|
20940
|
-
return new
|
|
20940
|
+
return new v2(E2.TracksErrors.DEVICE_NOT_AVAILABLE, "DeviceNotAvailable", a11, `[TRACK]: Capture device is no longer available - ${e}`, t2);
|
|
20941
20941
|
}, DeviceInUse(a11, e, t2 = "") {
|
|
20942
|
-
return new
|
|
20942
|
+
return new v2(E2.TracksErrors.DEVICE_IN_USE, "DeviceInUse", a11, `[TRACK]: Capture device is in use by another application - ${e}`, t2);
|
|
20943
20943
|
}, DeviceLostMidway(a11, e, t2 = "") {
|
|
20944
|
-
return new
|
|
20944
|
+
return new v2(E2.TracksErrors.DEVICE_LOST_MIDWAY, "DeviceLostMidway", a11, `Lost access to capture device midway - ${e}`, t2);
|
|
20945
20945
|
}, NothingToReturn(a11, e = "", t2 = "There is no media to return. Please select either video or audio or both.") {
|
|
20946
|
-
return new
|
|
20946
|
+
return new v2(E2.TracksErrors.NOTHING_TO_RETURN, "NothingToReturn", a11, t2, e);
|
|
20947
20947
|
}, InvalidVideoSettings(a11, e = "") {
|
|
20948
|
-
return new
|
|
20948
|
+
return new v2(E2.TracksErrors.INVALID_VIDEO_SETTINGS, "InvalidVideoSettings", a11, "Cannot enable simulcast when no video settings are provided", e);
|
|
20949
20949
|
}, AutoplayBlocked(a11, e = "") {
|
|
20950
|
-
return new
|
|
20950
|
+
return new v2(E2.TracksErrors.AUTOPLAY_ERROR, "AutoplayBlocked", a11, "Autoplay blocked because the user didn't interact with the document first", e);
|
|
20951
20951
|
}, CodecChangeNotPermitted(a11, e = "") {
|
|
20952
|
-
return new
|
|
20952
|
+
return new v2(E2.TracksErrors.CODEC_CHANGE_NOT_PERMITTED, "CodecChangeNotPermitted", a11, "Codec can't be changed mid call.", e);
|
|
20953
20953
|
}, OverConstrained(a11, e, t2 = "") {
|
|
20954
|
-
return new
|
|
20954
|
+
return new v2(E2.TracksErrors.OVER_CONSTRAINED, "OverConstrained", a11, `[TRACK]: Requested constraints cannot be satisfied with the device hardware - ${e}`, t2);
|
|
20955
20955
|
}, NoAudioDetected(a11, e = "Please check the mic or use another audio input") {
|
|
20956
|
-
return new
|
|
20956
|
+
return new v2(E2.TracksErrors.NO_AUDIO_DETECTED, "NoAudioDetected", a11, "No audio input detected from microphone", e);
|
|
20957
20957
|
}, SystemDeniedPermission(a11, e, t2 = "") {
|
|
20958
|
-
return new
|
|
20958
|
+
return new v2(E2.TracksErrors.SYSTEM_DENIED_PERMISSION, "SystemDeniedPermission", a11, `Operating System denied permission to access capture device - ${e}`, t2);
|
|
20959
20959
|
}, CurrentTabNotShared() {
|
|
20960
|
-
return new
|
|
20960
|
+
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");
|
|
20961
20961
|
}, AudioPlaybackError(a11) {
|
|
20962
|
-
return new
|
|
20962
|
+
return new v2(E2.TracksErrors.AUDIO_PLAYBACK_ERROR, "Audio playback error", "TRACK", a11, a11);
|
|
20963
20963
|
}, SelectedDeviceMissing(a11) {
|
|
20964
|
-
return new
|
|
20964
|
+
return new v2(E2.TracksErrors.SELECTED_DEVICE_MISSING, "SelectedDeviceMissing", "TRACK", `Could not detect selected ${a11} device`, `Please check connection to the ${a11} device`, false);
|
|
20965
20965
|
} }, WebrtcErrors: { CreateOfferFailed(a11, e = "") {
|
|
20966
|
-
return new
|
|
20966
|
+
return new v2(E2.WebrtcErrors.CREATE_OFFER_FAILED, "CreateOfferFailed", a11, `[${a11.toString()}]: Failed to create offer. `, e);
|
|
20967
20967
|
}, CreateAnswerFailed(a11, e = "") {
|
|
20968
|
-
return new
|
|
20968
|
+
return new v2(E2.WebrtcErrors.CREATE_ANSWER_FAILED, "CreateAnswerFailed", a11, `[${a11.toString()}]: Failed to create answer. `, e);
|
|
20969
20969
|
}, SetLocalDescriptionFailed(a11, e = "") {
|
|
20970
|
-
return new
|
|
20970
|
+
return new v2(E2.WebrtcErrors.SET_LOCAL_DESCRIPTION_FAILED, "SetLocalDescriptionFailed", a11, `[${a11.toString()}]: Failed to set offer. `, e);
|
|
20971
20971
|
}, SetRemoteDescriptionFailed(a11, e = "") {
|
|
20972
|
-
return new
|
|
20972
|
+
return new v2(E2.WebrtcErrors.SET_REMOTE_DESCRIPTION_FAILED, "SetRemoteDescriptionFailed", a11, `[${a11.toString()}]: Failed to set answer. `, e, true);
|
|
20973
20973
|
}, ICEFailure(a11, e = "", t2 = false) {
|
|
20974
|
-
return new
|
|
20974
|
+
return new v2(E2.WebrtcErrors.ICE_FAILURE, "ICEFailure", a11, `[${a11.toString()}]: Ice connection state FAILED`, e, t2);
|
|
20975
20975
|
}, ICEDisconnected(a11, e = "") {
|
|
20976
|
-
return new
|
|
20976
|
+
return new v2(E2.WebrtcErrors.ICE_DISCONNECTED, "ICEDisconnected", a11, `[${a11.toString()}]: Ice connection state DISCONNECTED`, e);
|
|
20977
20977
|
}, StatsFailed(a11, e = "") {
|
|
20978
|
-
return new
|
|
20978
|
+
return new v2(E2.WebrtcErrors.STATS_FAILED, "StatsFailed", a11, `Failed to WebRTC get stats - ${e}`, e);
|
|
20979
20979
|
} }, WebsocketMethodErrors: { ServerErrors(a11, e, t2) {
|
|
20980
|
-
return new
|
|
20980
|
+
return new v2(a11, "ServerErrors", e, t2, t2, so.includes(e));
|
|
20981
20981
|
}, AlreadyJoined(a11, e = "") {
|
|
20982
|
-
return new
|
|
20982
|
+
return new v2(E2.WebsocketMethodErrors.ALREADY_JOINED, "AlreadyJoined", a11, "[JOIN]: You have already joined this room.", e);
|
|
20983
20983
|
}, CannotJoinPreviewInProgress(a11, e = "") {
|
|
20984
|
-
return new
|
|
20984
|
+
return new v2(E2.WebsocketMethodErrors.CANNOT_JOIN_PREVIEW_IN_PROGRESS, "CannotJoinPreviewInProgress", a11, "[JOIN]: Cannot join if preview is in progress", e);
|
|
20985
20985
|
} }, GenericErrors: { NotConnected(a11, e = "") {
|
|
20986
|
-
return new
|
|
20986
|
+
return new v2(E2.GenericErrors.NOT_CONNECTED, "NotConnected", a11, "Client is not connected", e);
|
|
20987
20987
|
}, Signalling(a11, e) {
|
|
20988
|
-
return new
|
|
20988
|
+
return new v2(E2.GenericErrors.SIGNALLING, "Signalling", a11, `Unknown signalling error: ${a11.toString()} ${e} `, e);
|
|
20989
20989
|
}, Unknown(a11, e) {
|
|
20990
|
-
return new
|
|
20990
|
+
return new v2(E2.GenericErrors.UNKNOWN, "Unknown", a11, `Unknown exception: ${e}`, e);
|
|
20991
20991
|
}, NotReady(a11, e = "") {
|
|
20992
|
-
return new
|
|
20992
|
+
return new v2(E2.GenericErrors.NOT_READY, "NotReady", a11, e, e);
|
|
20993
20993
|
}, JsonParsingFailed(a11, e, t2 = "") {
|
|
20994
|
-
return new
|
|
20994
|
+
return new v2(E2.GenericErrors.JSON_PARSING_FAILED, "JsonParsingFailed", a11, `Failed to parse JSON message - ${e}`, t2);
|
|
20995
20995
|
}, TrackMetadataMissing(a11, e = "") {
|
|
20996
|
-
return new
|
|
20996
|
+
return new v2(E2.GenericErrors.TRACK_METADATA_MISSING, "TrackMetadataMissing", a11, "Track Metadata Missing", e);
|
|
20997
20997
|
}, RTCTrackMissing(a11, e = "") {
|
|
20998
|
-
return new
|
|
20998
|
+
return new v2(E2.GenericErrors.RTC_TRACK_MISSING, "RTCTrackMissing", a11, "RTC Track missing", e);
|
|
20999
20999
|
}, PeerMetadataMissing(a11, e = "") {
|
|
21000
|
-
return new
|
|
21000
|
+
return new v2(E2.GenericErrors.PEER_METADATA_MISSING, "PeerMetadataMissing", a11, "Peer Metadata Missing", e);
|
|
21001
21001
|
}, ValidationFailed(a11, e) {
|
|
21002
|
-
return new
|
|
21002
|
+
return new v2(E2.GenericErrors.VALIDATION_FAILED, "ValidationFailed", "VALIDATION", a11, e ? JSON.stringify(e) : "");
|
|
21003
21003
|
}, InvalidRole(a11, e) {
|
|
21004
|
-
return new
|
|
21004
|
+
return new v2(E2.GenericErrors.INVALID_ROLE, "InvalidRole", a11, "Invalid role. Join with valid role", e, true);
|
|
21005
21005
|
}, PreviewAlreadyInProgress(a11, e = "") {
|
|
21006
|
-
return new
|
|
21006
|
+
return new v2(E2.GenericErrors.PREVIEW_IN_PROGRESS, "PreviewAlreadyInProgress", a11, "[Preview]: Cannot join if preview is in progress", e);
|
|
21007
21007
|
}, LocalStorageAccessDenied(a11 = "Access to localStorage has been denied") {
|
|
21008
|
-
return new
|
|
21008
|
+
return new v2(E2.GenericErrors.LOCAL_STORAGE_ACCESS_DENIED, "LocalStorageAccessDenied", "NONE", "LocalStorageAccessDenied", a11);
|
|
21009
21009
|
}, MissingMediaDevices() {
|
|
21010
|
-
return new
|
|
21010
|
+
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);
|
|
21011
21011
|
}, MissingRTCPeerConnection() {
|
|
21012
|
-
return new
|
|
21012
|
+
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);
|
|
21013
21013
|
} }, MediaPluginErrors: { PlatformNotSupported(a11, e = "") {
|
|
21014
|
-
return new
|
|
21014
|
+
return new v2(7001, "PlatformNotSupported", a11, "Check HMS Docs to see the list of supported platforms", e);
|
|
21015
21015
|
}, InitFailed(a11, e = "") {
|
|
21016
|
-
return new
|
|
21016
|
+
return new v2(7002, "InitFailed", a11, "Plugin init failed", e);
|
|
21017
21017
|
}, ProcessingFailed(a11, e = "") {
|
|
21018
|
-
return new
|
|
21018
|
+
return new v2(7003, "ProcessingFailed", a11, "Plugin processing failed", e);
|
|
21019
21019
|
}, AddAlreadyInProgress(a11, e = "") {
|
|
21020
|
-
return new
|
|
21020
|
+
return new v2(7004, "AddAlreadyInProgress", a11, "Plugin add already in progress", e);
|
|
21021
21021
|
}, DeviceNotSupported(a11, e = "") {
|
|
21022
|
-
return new
|
|
21022
|
+
return new v2(7005, "DeviceNotSupported", a11, "Check HMS Docs to see the list of supported devices", e);
|
|
21023
21023
|
} }, PlaylistErrors: { NoEntryToPlay(a11, e) {
|
|
21024
|
-
return new
|
|
21024
|
+
return new v2(E2.PlaylistErrors.NO_ENTRY_TO_PLAY, "NoEntryToPlay", a11, "Reached end of playlist", e);
|
|
21025
21025
|
}, NoEntryPlaying(a11, e) {
|
|
21026
|
-
return new
|
|
21026
|
+
return new v2(E2.PlaylistErrors.NO_ENTRY_IS_PLAYING, "NoEntryIsPlaying", a11, "No entry is playing at this time", e);
|
|
21027
21027
|
} } };
|
|
21028
21028
|
vr = class {
|
|
21029
21029
|
constructor() {
|
|
@@ -21109,7 +21109,7 @@ var init_dist = __esm({
|
|
|
21109
21109
|
this.name = e, this.level = t2, this.includesPII = r2 || false, this.properties = i2 || {}, this.timestamp = s2 || (/* @__PURE__ */ new Date()).getTime(), this.event_id = (0, import_uuid3.v4)(), this.device_id = gs();
|
|
21110
21110
|
}
|
|
21111
21111
|
toSignalParams() {
|
|
21112
|
-
return { name: this.name, info: M2(m({}, this.properties), { timestamp: this.timestamp, domain:
|
|
21112
|
+
return { name: this.name, info: M2(m({}, this.properties), { timestamp: this.timestamp, domain: Qe }), timestamp: (/* @__PURE__ */ new Date()).getTime() };
|
|
21113
21113
|
}
|
|
21114
21114
|
};
|
|
21115
21115
|
y2 = class {
|
|
@@ -21205,7 +21205,7 @@ var init_dist = __esm({
|
|
|
21205
21205
|
return e = m(m({}, i2), e), e;
|
|
21206
21206
|
}
|
|
21207
21207
|
static getErrorProperties(e) {
|
|
21208
|
-
return e ? e instanceof
|
|
21208
|
+
return e ? e instanceof v2 ? e.toAnalyticsProperties() : { error_name: e.name, error_message: e.message, error_description: e.cause } : {};
|
|
21209
21209
|
}
|
|
21210
21210
|
};
|
|
21211
21211
|
y2.KEY_REQUESTED_AT = "requested_at", y2.KEY_RESPONDED_AT = "responded_at";
|
|
@@ -21243,7 +21243,7 @@ var init_dist = __esm({
|
|
|
21243
21243
|
return e.deviceId === t2.deviceId && (e.groupId === t2.groupId || !e.groupId);
|
|
21244
21244
|
}
|
|
21245
21245
|
};
|
|
21246
|
-
|
|
21246
|
+
Q2 = new kr();
|
|
21247
21247
|
Pr = ((t2) => (t2.TRANSFORM = "TRANSFORM", t2.ANALYZE = "ANALYZE", t2))(Pr || {});
|
|
21248
21248
|
Er = ((t2) => (t2.PLATFORM_NOT_SUPPORTED = "PLATFORM_NOT_SUPPORTED", t2.DEVICE_NOT_SUPPORTED = "DEVICE_NOT_SUPPORTED", t2))(Er || {});
|
|
21249
21249
|
ne = class {
|
|
@@ -21481,7 +21481,7 @@ var init_dist = __esm({
|
|
|
21481
21481
|
this.audioContext || (lo() ? this.audioContext = new AudioContext() : this.audioContext = new AudioContext({ sampleRate: co }));
|
|
21482
21482
|
}
|
|
21483
21483
|
};
|
|
21484
|
-
|
|
21484
|
+
He = { audioContext: null, getAudioContext() {
|
|
21485
21485
|
return this.audioContext || (this.audioContext = new AudioContext()), this.audioContext;
|
|
21486
21486
|
}, resumeContext() {
|
|
21487
21487
|
return c2(this, null, function* () {
|
|
@@ -21492,7 +21492,7 @@ var init_dist = __esm({
|
|
|
21492
21492
|
}
|
|
21493
21493
|
});
|
|
21494
21494
|
} };
|
|
21495
|
-
|
|
21495
|
+
Ce = class {
|
|
21496
21496
|
constructor(e = 1 / 0) {
|
|
21497
21497
|
this.capacity = e;
|
|
21498
21498
|
this.storage = [];
|
|
@@ -21540,7 +21540,7 @@ var init_dist = __esm({
|
|
|
21540
21540
|
this.isMonitored = false;
|
|
21541
21541
|
this.interval = 100;
|
|
21542
21542
|
this.historyInterval = 700;
|
|
21543
|
-
this.history = new
|
|
21543
|
+
this.history = new Ce(this.historyInterval / this.interval);
|
|
21544
21544
|
this.detectSilence = () => c2(this, null, function* () {
|
|
21545
21545
|
let i3 = 0;
|
|
21546
21546
|
for (; this.isMonitored; ) {
|
|
@@ -21552,7 +21552,7 @@ var init_dist = __esm({
|
|
|
21552
21552
|
}
|
|
21553
21553
|
} else
|
|
21554
21554
|
break;
|
|
21555
|
-
yield
|
|
21555
|
+
yield Z2(20);
|
|
21556
21556
|
}
|
|
21557
21557
|
});
|
|
21558
21558
|
try {
|
|
@@ -21575,7 +21575,7 @@ var init_dist = __esm({
|
|
|
21575
21575
|
loop() {
|
|
21576
21576
|
return c2(this, null, function* () {
|
|
21577
21577
|
for (; this.isMonitored; )
|
|
21578
|
-
this.sendAudioLevel(this.getMaxAudioLevelOverPeriod()), yield
|
|
21578
|
+
this.sendAudioLevel(this.getMaxAudioLevelOverPeriod()), yield Z2(this.interval);
|
|
21579
21579
|
});
|
|
21580
21580
|
}
|
|
21581
21581
|
sendAudioLevel(e = 0) {
|
|
@@ -21615,17 +21615,17 @@ var init_dist = __esm({
|
|
|
21615
21615
|
return this.analyserNode.getByteTimeDomainData(e), !e.some((t2) => t2 !== 128 && t2 !== 0);
|
|
21616
21616
|
}
|
|
21617
21617
|
createAnalyserNodeForStream(e) {
|
|
21618
|
-
let t2 =
|
|
21618
|
+
let t2 = He.getAudioContext(), i2 = t2.createAnalyser();
|
|
21619
21619
|
return t2.createMediaStreamSource(e).connect(i2), i2;
|
|
21620
21620
|
}
|
|
21621
21621
|
};
|
|
21622
21622
|
br = ((t2) => (t2.SIP = "sip", t2.REGULAR = "regular", t2))(br || {});
|
|
21623
21623
|
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 || {});
|
|
21624
21624
|
Rs = ((t2) => (t2.DVR = "dvr", t2.NO_DVR = "no-dvr", t2))(Rs || {});
|
|
21625
|
-
|
|
21626
|
-
|
|
21625
|
+
Is = ((i2) => (i2.REGULAR = "regular", i2.SCREEN = "screen", i2.COMPOSITE = "composite", i2))(Is || {});
|
|
21626
|
+
As = ((r2) => (r2.INITIALISED = "initialised", r2.STARTED = "started", r2.STOPPED = "stopped", r2.FAILED = "failed", r2))(As || {});
|
|
21627
21627
|
Hs = ((e) => (e.CAPTION = "caption", e))(Hs || {});
|
|
21628
|
-
|
|
21628
|
+
Ve = { f: "high", h: "medium", q: "low" };
|
|
21629
21629
|
Cs = ((i2) => (i2.videoInput = "videoInput", i2.audioInput = "audioInput", i2.audioOutput = "audioOutput", i2))(Cs || {});
|
|
21630
21630
|
ee = class {
|
|
21631
21631
|
constructor() {
|
|
@@ -21659,10 +21659,10 @@ var init_dist = __esm({
|
|
|
21659
21659
|
return this._advanced = e, this;
|
|
21660
21660
|
}
|
|
21661
21661
|
build() {
|
|
21662
|
-
return new
|
|
21662
|
+
return new Fe(this._volume, this._codec, this._maxBitrate, this._deviceId, this._advanced, this._audioMode);
|
|
21663
21663
|
}
|
|
21664
21664
|
};
|
|
21665
|
-
|
|
21665
|
+
Fe = class {
|
|
21666
21666
|
constructor(e, t2, i2, r2, s2, o2) {
|
|
21667
21667
|
this.volume = e, this.codec = t2, this.maxBitrate = i2, this.deviceId = r2, this.advanced = s2, this.audioMode = o2, this.audioMode === "music" && (this.maxBitrate = 320);
|
|
21668
21668
|
}
|
|
@@ -21673,7 +21673,7 @@ var init_dist = __esm({
|
|
|
21673
21673
|
return { audio_bitrate: this.maxBitrate, audio_codec: this.codec };
|
|
21674
21674
|
}
|
|
21675
21675
|
};
|
|
21676
|
-
|
|
21676
|
+
z2 = class {
|
|
21677
21677
|
constructor() {
|
|
21678
21678
|
this._width = 320;
|
|
21679
21679
|
this._height = 180;
|
|
@@ -21711,10 +21711,10 @@ var init_dist = __esm({
|
|
|
21711
21711
|
return this._facingMode = e, this;
|
|
21712
21712
|
}
|
|
21713
21713
|
build() {
|
|
21714
|
-
return new
|
|
21714
|
+
return new Ge(this._width, this._height, this._codec, this._maxFramerate, this._deviceId, this._advanced, this._maxBitrate, this._facingMode);
|
|
21715
21715
|
}
|
|
21716
21716
|
};
|
|
21717
|
-
|
|
21717
|
+
Ge = class {
|
|
21718
21718
|
constructor(e, t2, i2, r2, s2, o2, n2, l2) {
|
|
21719
21719
|
this.width = e, this.height = t2, this.codec = i2, this.maxFramerate = r2, this.maxBitrate = n2, this.deviceId = s2, this.advanced = o2, this.facingMode = l2;
|
|
21720
21720
|
}
|
|
@@ -21731,11 +21731,11 @@ var init_dist = __esm({
|
|
|
21731
21731
|
return Te() && this.height && this.width && this.height > this.width ? { width: this.height, height: this.width } : { width: this.width, height: this.height };
|
|
21732
21732
|
}
|
|
21733
21733
|
};
|
|
21734
|
-
|
|
21734
|
+
De = class {
|
|
21735
21735
|
constructor() {
|
|
21736
|
-
this._video = new
|
|
21736
|
+
this._video = new z2().build();
|
|
21737
21737
|
this._audio = new ee().build();
|
|
21738
|
-
this._screen = new
|
|
21738
|
+
this._screen = new z2().build();
|
|
21739
21739
|
this._simulcast = false;
|
|
21740
21740
|
}
|
|
21741
21741
|
video(e) {
|
|
@@ -21767,7 +21767,7 @@ var init_dist = __esm({
|
|
|
21767
21767
|
return this.audio && (e = m(m({}, this.audio.toAnalyticsProperties()), e)), this.video && (e = m(m({}, this.video.toAnalyticsProperties()), e)), e;
|
|
21768
21768
|
}
|
|
21769
21769
|
};
|
|
21770
|
-
ce = class a3 extends
|
|
21770
|
+
ce = class a3 extends Ie {
|
|
21771
21771
|
constructor(t2, i2, r2, s2, o2 = new ee().build(), n2) {
|
|
21772
21772
|
super(t2, i2, r2);
|
|
21773
21773
|
this.eventBus = s2;
|
|
@@ -21791,7 +21791,7 @@ var init_dist = __esm({
|
|
|
21791
21791
|
if (Ds(t3, this.settings)("deviceId")) {
|
|
21792
21792
|
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);
|
|
21793
21793
|
let s3 = this.nativeTrack.getSettings().groupId;
|
|
21794
|
-
!i3 && t3.deviceId && (
|
|
21794
|
+
!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 } }));
|
|
21795
21795
|
}
|
|
21796
21796
|
});
|
|
21797
21797
|
t2.tracks.push(this), this.settings = o2, o2.deviceId !== i2.getSettings().deviceId && !ue(i2) && (this.settings = this.buildNewSettings({ deviceId: i2.getSettings().deviceId })), this.pluginsManager = new vt(this, s2, n2), this.setFirstTrackId(i2.id), Tr() && O2 && document.addEventListener("visibilitychange", this.handleVisibilityChange);
|
|
@@ -21822,7 +21822,7 @@ var init_dist = __esm({
|
|
|
21822
21822
|
}
|
|
21823
21823
|
setEnabled(t2) {
|
|
21824
21824
|
return c2(this, null, function* () {
|
|
21825
|
-
t2 !== this.enabled && (t2 && ue(this.nativeTrack) && (yield this.replaceTrackWith(this.settings)), yield
|
|
21825
|
+
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 }));
|
|
21826
21826
|
});
|
|
21827
21827
|
}
|
|
21828
21828
|
isPublishedTrackId(t2) {
|
|
@@ -21869,7 +21869,7 @@ var init_dist = __esm({
|
|
|
21869
21869
|
cleanup() {
|
|
21870
21870
|
return c2(this, null, function* () {
|
|
21871
21871
|
var t2;
|
|
21872
|
-
|
|
21872
|
+
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);
|
|
21873
21873
|
});
|
|
21874
21874
|
}
|
|
21875
21875
|
getTrackIDBeingSent() {
|
|
@@ -21880,13 +21880,13 @@ var init_dist = __esm({
|
|
|
21880
21880
|
}
|
|
21881
21881
|
buildNewSettings(t2) {
|
|
21882
21882
|
let { volume: i2, codec: r2, maxBitrate: s2, deviceId: o2, advanced: n2, audioMode: l2 } = m(m({}, this.settings), t2);
|
|
21883
|
-
return new
|
|
21883
|
+
return new Fe(i2, r2, s2, o2, n2, l2);
|
|
21884
21884
|
}
|
|
21885
21885
|
};
|
|
21886
|
-
se = class a4 extends
|
|
21886
|
+
se = class a4 extends Ie {
|
|
21887
21887
|
setEnabled(e) {
|
|
21888
21888
|
return c2(this, null, function* () {
|
|
21889
|
-
e !== this.enabled && (yield
|
|
21889
|
+
e !== this.enabled && (yield J(a4.prototype, this, "setEnabled").call(this, e), yield this.subscribeToAudio(e));
|
|
21890
21890
|
});
|
|
21891
21891
|
}
|
|
21892
21892
|
};
|
|
@@ -21995,7 +21995,7 @@ var init_dist = __esm({
|
|
|
21995
21995
|
}
|
|
21996
21996
|
};
|
|
21997
21997
|
_s = new Rr();
|
|
21998
|
-
|
|
21998
|
+
Ir = class {
|
|
21999
21999
|
constructor() {
|
|
22000
22000
|
this.TAG = "[HMSResizeObserverWrapper]";
|
|
22001
22001
|
this.listeners = /* @__PURE__ */ new WeakMap();
|
|
@@ -22022,7 +22022,7 @@ var init_dist = __esm({
|
|
|
22022
22022
|
return e || d2.w(this.TAG, "Resize Observer is not supported"), e;
|
|
22023
22023
|
}
|
|
22024
22024
|
};
|
|
22025
|
-
Ns = new
|
|
22025
|
+
Ns = new Ir();
|
|
22026
22026
|
Xe = class {
|
|
22027
22027
|
constructor(e) {
|
|
22028
22028
|
this.track = e;
|
|
@@ -22093,7 +22093,7 @@ var init_dist = __esm({
|
|
|
22093
22093
|
});
|
|
22094
22094
|
}
|
|
22095
22095
|
};
|
|
22096
|
-
|
|
22096
|
+
Ar = ((t2) => (t2.TRANSFORM = "TRANSFORM", t2.ANALYZE = "ANALYZE", t2))(Ar || {});
|
|
22097
22097
|
Hr = ((t2) => (t2["2D"] = "2d", t2.WEBGL = "webgl", t2.WEBGL2 = "webgl2", t2))(Hr || {});
|
|
22098
22098
|
yt = class {
|
|
22099
22099
|
constructor() {
|
|
@@ -22269,7 +22269,7 @@ var init_dist = __esm({
|
|
|
22269
22269
|
return c2(this, null, function* () {
|
|
22270
22270
|
if (!(!this.pluginsLoopRunning || this.pluginsLoopState === "running"))
|
|
22271
22271
|
for (; this.pluginsLoopState === "paused"; )
|
|
22272
|
-
yield
|
|
22272
|
+
yield Le(100);
|
|
22273
22273
|
});
|
|
22274
22274
|
}
|
|
22275
22275
|
cleanup() {
|
|
@@ -22484,7 +22484,7 @@ var init_dist = __esm({
|
|
|
22484
22484
|
}
|
|
22485
22485
|
getTracksToPublish() {
|
|
22486
22486
|
return c2(this, arguments, function* (e = Cr) {
|
|
22487
|
-
var T, g2,
|
|
22487
|
+
var T, g2, f2, P8;
|
|
22488
22488
|
let t2 = this.getAVTrackSettings(e);
|
|
22489
22489
|
if (!t2)
|
|
22490
22490
|
return [];
|
|
@@ -22498,7 +22498,7 @@ var init_dist = __esm({
|
|
|
22498
22498
|
} catch (k2) {
|
|
22499
22499
|
s2 = yield this.retryGetLocalTracks(k2, t2, h2, l2);
|
|
22500
22500
|
}
|
|
22501
|
-
return h2.audio && ((
|
|
22501
|
+
return h2.audio && ((f2 = this.analyticsTimer) == null || f2.end("local_audio_track_time")), h2.video && ((P8 = this.analyticsTimer) == null || P8.end("local_video_track_time")), o2 && r2 && !u2 && s2.push(o2), n2 && i2 && !p2 && s2.push(n2), s2;
|
|
22502
22502
|
});
|
|
22503
22503
|
}
|
|
22504
22504
|
getLocalTracks() {
|
|
@@ -22529,8 +22529,8 @@ var init_dist = __esm({
|
|
|
22529
22529
|
r2.srcObject = e, r2.addEventListener("loadedmetadata", () => c2(this, null, function* () {
|
|
22530
22530
|
let { videoWidth: l2, videoHeight: u2 } = r2, p2 = i2.screen, h2 = p2.width * p2.height, T = l2 / u2, g2 = p2.width / p2.height;
|
|
22531
22531
|
if (T > g2) {
|
|
22532
|
-
let
|
|
22533
|
-
l2 * u2 > h2 ? (
|
|
22532
|
+
let f2 = t2.video, P8 = T / g2, k2 = Math.sqrt(P8);
|
|
22533
|
+
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);
|
|
22534
22534
|
}
|
|
22535
22535
|
}));
|
|
22536
22536
|
});
|
|
@@ -22548,16 +22548,16 @@ var init_dist = __esm({
|
|
|
22548
22548
|
d2.d("retrieving screenshare with ", { config: i2 }, { constraints: s2 }), o2 = yield navigator.mediaDevices.getDisplayMedia(s2), t2 && (yield this.optimizeScreenShareConstraint(o2, s2));
|
|
22549
22549
|
} catch (g2) {
|
|
22550
22550
|
d2.w(this.TAG, "error in getting screenshare - ", g2);
|
|
22551
|
-
let
|
|
22552
|
-
throw this.eventBus.analytics.publish(y2.publish({ error:
|
|
22551
|
+
let f2 = Ae(g2, "screen");
|
|
22552
|
+
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;
|
|
22553
22553
|
}
|
|
22554
|
-
let n2 = [], l2 = new
|
|
22554
|
+
let n2 = [], l2 = new We(o2), u2 = o2.getVideoTracks()[0], p2 = new F(l2, u2, "screen", this.eventBus, r2 == null ? void 0 : r2.video, this.store.getRoom());
|
|
22555
22555
|
p2.setSimulcastDefinitons(this.store.getSimulcastDefinitionsForPeer(this.store.getLocalPeer(), "screen"));
|
|
22556
22556
|
try {
|
|
22557
22557
|
let g2 = this.validateCurrentTabCapture(p2, i2.forceCurrentTab);
|
|
22558
22558
|
p2.isCurrentTab = g2, yield p2.cropTo(i2.cropTarget);
|
|
22559
22559
|
} catch (g2) {
|
|
22560
|
-
throw o2.getTracks().forEach((
|
|
22560
|
+
throw o2.getTracks().forEach((f2) => f2.stop()), g2;
|
|
22561
22561
|
}
|
|
22562
22562
|
n2.push(p2);
|
|
22563
22563
|
let h2 = o2.getAudioTracks()[0];
|
|
@@ -22598,7 +22598,7 @@ var init_dist = __esm({
|
|
|
22598
22598
|
return o2.enabled = false, o2;
|
|
22599
22599
|
}
|
|
22600
22600
|
static getEmptyAudioTrack() {
|
|
22601
|
-
let e =
|
|
22601
|
+
let e = He.getAudioContext(), t2 = e.createOscillator(), i2 = e.createMediaStreamDestination();
|
|
22602
22602
|
t2.connect(i2), t2.start();
|
|
22603
22603
|
let r2 = i2.stream.getAudioTracks()[0];
|
|
22604
22604
|
return r2.enabled = false, r2;
|
|
@@ -22614,13 +22614,13 @@ var init_dist = __esm({
|
|
|
22614
22614
|
} catch (t2) {
|
|
22615
22615
|
yield this.deviceManager.init();
|
|
22616
22616
|
let i2 = !!(!this.deviceManager.hasWebcamPermission && e.video), r2 = !!(!this.deviceManager.hasMicrophonePermission && e.audio), s2 = this.getErrorType(i2, r2);
|
|
22617
|
-
throw
|
|
22617
|
+
throw Ae(t2, s2);
|
|
22618
22618
|
}
|
|
22619
22619
|
});
|
|
22620
22620
|
}
|
|
22621
22621
|
getAVTrackSettings(e) {
|
|
22622
22622
|
let t2 = this.getAudioSettings(e), i2 = this.getVideoSettings(e);
|
|
22623
|
-
return !t2 && !i2 ? null : new
|
|
22623
|
+
return !t2 && !i2 ? null : new De().video(i2).audio(t2).build();
|
|
22624
22624
|
}
|
|
22625
22625
|
isInIframe() {
|
|
22626
22626
|
try {
|
|
@@ -22631,16 +22631,16 @@ var init_dist = __esm({
|
|
|
22631
22631
|
}
|
|
22632
22632
|
retryGetLocalTracks(e, t2, i2, r2) {
|
|
22633
22633
|
return c2(this, null, function* () {
|
|
22634
|
-
if (e instanceof
|
|
22634
|
+
if (e instanceof v2 && e.action === "TRACK") {
|
|
22635
22635
|
this.observer.onFailure(e);
|
|
22636
|
-
let s2 = e.code ===
|
|
22636
|
+
let s2 = e.code === E2.TracksErrors.OVER_CONSTRAINED, o2 = e.message.includes("audio"), n2 = e.message.includes("video");
|
|
22637
22637
|
if (s2) {
|
|
22638
|
-
let l2 = new
|
|
22638
|
+
let l2 = new De().video(new Ge()).audio(new Fe()).build();
|
|
22639
22639
|
d2.w(this.TAG, "Fetch AV Tracks failed with overconstrained error", { fetchTrackOptions: i2 }, { error: e });
|
|
22640
22640
|
try {
|
|
22641
22641
|
return yield this.getLocalTracks(i2, l2, r2);
|
|
22642
22642
|
} catch (u2) {
|
|
22643
|
-
let p2 = u2 instanceof
|
|
22643
|
+
let p2 = u2 instanceof v2 ? u2.nativeError : u2, h2 = u2;
|
|
22644
22644
|
if ((p2 == null ? void 0 : p2.name) === "OverconstrainedError") {
|
|
22645
22645
|
let T = S2.TracksErrors.GenericTrack("TRACK", "Overconstrained error after dropping all constraints");
|
|
22646
22646
|
T.addNativeError(p2), h2 = T;
|
|
@@ -22687,7 +22687,7 @@ var init_dist = __esm({
|
|
|
22687
22687
|
if (!t2 || !((n2 = t2.allowed) != null && n2.includes("video")))
|
|
22688
22688
|
return null;
|
|
22689
22689
|
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;
|
|
22690
|
-
return new
|
|
22690
|
+
return new z2().codec(o2.codec).maxBitrate(o2.bitRate).maxFramerate(o2.frameRate).setWidth(o2.width).setHeight(o2.height).deviceId(s2 || Cr.videoDeviceId).build();
|
|
22691
22691
|
}
|
|
22692
22692
|
getScreenshareSettings(e = false) {
|
|
22693
22693
|
var r2;
|
|
@@ -22695,7 +22695,7 @@ var init_dist = __esm({
|
|
|
22695
22695
|
if (!t2 || !((r2 = t2.allowed) != null && r2.includes("screen")))
|
|
22696
22696
|
return null;
|
|
22697
22697
|
let i2 = t2.screen;
|
|
22698
|
-
return { video: new
|
|
22698
|
+
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() };
|
|
22699
22699
|
}
|
|
22700
22700
|
getOrDefaultScreenshareConfig(e) {
|
|
22701
22701
|
return c2(this, null, function* () {
|
|
@@ -22706,7 +22706,7 @@ var init_dist = __esm({
|
|
|
22706
22706
|
}
|
|
22707
22707
|
createHMSLocalTracks(e, t2, i2) {
|
|
22708
22708
|
let r2 = e.find((n2) => n2.kind === "video"), s2 = e.find((n2) => n2.kind === "audio");
|
|
22709
|
-
i2 ? e.forEach((n2) => i2 == null ? void 0 : i2.nativeStream.addTrack(n2)) : i2 = new
|
|
22709
|
+
i2 ? e.forEach((n2) => i2 == null ? void 0 : i2.nativeStream.addTrack(n2)) : i2 = new We(new MediaStream(e));
|
|
22710
22710
|
let o2 = [];
|
|
22711
22711
|
if (s2 && (t2 != null && t2.audio)) {
|
|
22712
22712
|
let n2 = new ce(i2, s2, "regular", this.eventBus, t2.audio, this.store.getRoom());
|
|
@@ -22720,7 +22720,7 @@ var init_dist = __esm({
|
|
|
22720
22720
|
}
|
|
22721
22721
|
};
|
|
22722
22722
|
F = class a6 extends Ye {
|
|
22723
|
-
constructor(t2, i2, r2, s2, o2 = new
|
|
22723
|
+
constructor(t2, i2, r2, s2, o2 = new z2().build(), n2) {
|
|
22724
22724
|
super(t2, i2, r2);
|
|
22725
22725
|
this.eventBus = s2;
|
|
22726
22726
|
this._layerDefinitions = [];
|
|
@@ -22737,7 +22737,7 @@ var init_dist = __esm({
|
|
|
22737
22737
|
});
|
|
22738
22738
|
this.buildNewSettings = (t3) => {
|
|
22739
22739
|
let { width: i3, height: r3, codec: s3, maxFramerate: o3, maxBitrate: n3, deviceId: l2, advanced: u2, facingMode: p2 } = m(m({}, this.settings), t3);
|
|
22740
|
-
return new
|
|
22740
|
+
return new Ge(i3, r3, s3, o3, l2, u2, n3, p2);
|
|
22741
22741
|
};
|
|
22742
22742
|
this.handleSettingsChange = (t3) => c2(this, null, function* () {
|
|
22743
22743
|
let i3 = this.stream, r3 = xs(t3, this.settings);
|
|
@@ -22756,7 +22756,7 @@ var init_dist = __esm({
|
|
|
22756
22756
|
yield this.replaceSender(o3, this.enabled), this.nativeTrack = o3, yield this.processPlugins(), this.videoHandler.updateSinks();
|
|
22757
22757
|
}
|
|
22758
22758
|
let s3 = this.nativeTrack.getSettings().groupId;
|
|
22759
|
-
!i3 && t3.deviceId && (
|
|
22759
|
+
!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 } }));
|
|
22760
22760
|
}
|
|
22761
22761
|
});
|
|
22762
22762
|
this.removeOrReplaceProcessedTrack = (t3) => c2(this, null, function* () {
|
|
@@ -22779,7 +22779,7 @@ var init_dist = __esm({
|
|
|
22779
22779
|
if (t2 !== this.enabled) {
|
|
22780
22780
|
if (this.source === "regular") {
|
|
22781
22781
|
let r2;
|
|
22782
|
-
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
|
|
22782
|
+
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();
|
|
22783
22783
|
}
|
|
22784
22784
|
this.eventBus.localVideoEnabled.publish({ enabled: t2, track: this });
|
|
22785
22785
|
}
|
|
@@ -22850,7 +22850,7 @@ var init_dist = __esm({
|
|
|
22850
22850
|
cleanup() {
|
|
22851
22851
|
return c2(this, null, function* () {
|
|
22852
22852
|
var t2;
|
|
22853
|
-
|
|
22853
|
+
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);
|
|
22854
22854
|
});
|
|
22855
22855
|
}
|
|
22856
22856
|
cropTo(t2) {
|
|
@@ -22893,7 +22893,7 @@ var init_dist = __esm({
|
|
|
22893
22893
|
let i2 = t2 === "environment" ? "user" : "environment";
|
|
22894
22894
|
(s2 = this.nativeTrack) == null || s2.stop();
|
|
22895
22895
|
let r2 = yield this.replaceTrackWith(this.buildNewSettings({ facingMode: i2, deviceId: void 0 }));
|
|
22896
|
-
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 }),
|
|
22896
|
+
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 });
|
|
22897
22897
|
});
|
|
22898
22898
|
}
|
|
22899
22899
|
replaceTrackWith(t2) {
|
|
@@ -22958,7 +22958,7 @@ var init_dist = __esm({
|
|
|
22958
22958
|
}
|
|
22959
22959
|
setEnabled(t2) {
|
|
22960
22960
|
return c2(this, null, function* () {
|
|
22961
|
-
t2 !== this.enabled && (
|
|
22961
|
+
t2 !== this.enabled && (J(a7.prototype, this, "setEnabled").call(this, t2), this.videoHandler.updateSinks(true));
|
|
22962
22962
|
});
|
|
22963
22963
|
}
|
|
22964
22964
|
setPreferredLayer(t2) {
|
|
@@ -22997,12 +22997,12 @@ var init_dist = __esm({
|
|
|
22997
22997
|
}
|
|
22998
22998
|
addSink(t2, i2 = true) {
|
|
22999
22999
|
return c2(this, null, function* () {
|
|
23000
|
-
ue(this.nativeTrack) ? yield this.requestLayer(this.preferredLayer, "addSink") : (
|
|
23000
|
+
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");
|
|
23001
23001
|
});
|
|
23002
23002
|
}
|
|
23003
23003
|
removeSink(t2, i2 = true) {
|
|
23004
23004
|
return c2(this, null, function* () {
|
|
23005
|
-
|
|
23005
|
+
J(a7.prototype, this, "removeSink").call(this, t2), i2 && (yield this.updateLayer("removeSink")), this._degraded = false, this.pushInHistory("uiSetLayer-none");
|
|
23006
23006
|
});
|
|
23007
23007
|
}
|
|
23008
23008
|
getSimulcastDefinitions() {
|
|
@@ -23062,7 +23062,7 @@ var init_dist = __esm({
|
|
|
23062
23062
|
e.time = (/* @__PURE__ */ new Date()).toISOString().split("T")[1], this.history.push(e);
|
|
23063
23063
|
}
|
|
23064
23064
|
};
|
|
23065
|
-
|
|
23065
|
+
We = class extends Je {
|
|
23066
23066
|
constructor() {
|
|
23067
23067
|
super(...arguments);
|
|
23068
23068
|
this.TAG = "[HMSLocalStream]";
|
|
@@ -23108,12 +23108,12 @@ var init_dist = __esm({
|
|
|
23108
23108
|
d2.d(this.TAG, "Simulcast enabled with layers", i2), r2.push(...i2);
|
|
23109
23109
|
else {
|
|
23110
23110
|
let s2 = { active: this.nativeStream.active };
|
|
23111
|
-
t2.settings.maxBitrate && !
|
|
23111
|
+
t2.settings.maxBitrate && !Be && (s2.maxBitrate = t2.settings.maxBitrate), r2.push(s2);
|
|
23112
23112
|
}
|
|
23113
23113
|
return r2;
|
|
23114
23114
|
}
|
|
23115
23115
|
};
|
|
23116
|
-
fe = class extends
|
|
23116
|
+
fe = class extends Je {
|
|
23117
23117
|
constructor(t2, i2) {
|
|
23118
23118
|
super(t2);
|
|
23119
23119
|
this.audio = true;
|
|
@@ -23175,8 +23175,8 @@ var init_dist = __esm({
|
|
|
23175
23175
|
var k2, w2;
|
|
23176
23176
|
let h2 = (k2 = l2[p2]) == null ? void 0 : k2.codecId, T = h2 ? n2[h2] : void 0, g2;
|
|
23177
23177
|
T && (g2 = T.substring(T.indexOf("/") + 1));
|
|
23178
|
-
let
|
|
23179
|
-
s2[p2] = M2(m({},
|
|
23178
|
+
let f2 = M2(m({}, l2[p2]), { rid: (w2 = l2[p2]) == null ? void 0 : w2.rid }), P8 = u2[f2.ssrc];
|
|
23179
|
+
s2[p2] = M2(m({}, f2), { bitrate: Et("bytesSent", f2, i2 == null ? void 0 : i2[p2]), packetsLost: P8 == null ? void 0 : P8.packetsLost, jitter: P8 == null ? void 0 : P8.jitter, roundTripTime: P8 == null ? void 0 : P8.roundTripTime, totalRoundTripTime: P8 == null ? void 0 : P8.totalRoundTripTime, peerName: t2, peerID: e.peerId, enabled: e.enabled, codec: g2 });
|
|
23180
23180
|
});
|
|
23181
23181
|
} catch (n2) {
|
|
23182
23182
|
a11.analytics.publish(y2.rtcStatsFailed(S2.WebrtcErrors.StatsFailed("TRACK", `Error getting local track stats ${e.trackId} - ${n2.message}`))), d2.w("[HMSWebrtcStats]", "Error in getting local track stats", e, n2, n2.name);
|
|
@@ -23260,7 +23260,7 @@ var init_dist = __esm({
|
|
|
23260
23260
|
yield this.updateLocalPeerStats(), yield this.updateLocalTrackStats(), yield this.updateRemoteTrackStats();
|
|
23261
23261
|
});
|
|
23262
23262
|
this.updateLocalPeerStats = () => c2(this, null, function* () {
|
|
23263
|
-
var p2, h2, T, g2,
|
|
23263
|
+
var p2, h2, T, g2, f2, P8;
|
|
23264
23264
|
let e2 = this.getLocalPeerStats(), t3;
|
|
23265
23265
|
try {
|
|
23266
23266
|
t3 = yield (h2 = (p2 = this.getStats).publish) == null ? void 0 : h2.call(p2);
|
|
@@ -23273,7 +23273,7 @@ var init_dist = __esm({
|
|
|
23273
23273
|
} catch (k2) {
|
|
23274
23274
|
this.eventBus.analytics.publish(y2.rtcStatsFailed(S2.WebrtcErrors.StatsFailed("SUBSCRIBE", k2.message))), d2.w(this.TAG, "Error in getting subscribe stats", k2);
|
|
23275
23275
|
}
|
|
23276
|
-
let s2 = r3 && Or("subscribe", r3, e2), { packetsLost: o2, jitter: n2 } = qs(r3), l2 = xr(o2, (
|
|
23276
|
+
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, (P8 = e2 == null ? void 0 : e2.subscribe) == null ? void 0 : P8.timestamp), u2 = s2 && Object.assign(s2, { packetsLostRate: l2, jitter: n2, packetsLost: o2 });
|
|
23277
23277
|
this.peerStats[this.localPeerID] = { publish: i3, subscribe: u2 };
|
|
23278
23278
|
});
|
|
23279
23279
|
this.updateRemoteTrackStats = () => c2(this, null, function* () {
|
|
@@ -23352,7 +23352,7 @@ var init_dist = __esm({
|
|
|
23352
23352
|
startLoop() {
|
|
23353
23353
|
return c2(this, null, function* () {
|
|
23354
23354
|
for (; this.isMonitored; )
|
|
23355
|
-
yield this.handleStatsUpdate(), yield
|
|
23355
|
+
yield this.handleStatsUpdate(), yield Z2(this.interval);
|
|
23356
23356
|
});
|
|
23357
23357
|
}
|
|
23358
23358
|
cleanup() {
|
|
@@ -23401,7 +23401,7 @@ var init_dist = __esm({
|
|
|
23401
23401
|
rt = class {
|
|
23402
23402
|
};
|
|
23403
23403
|
rt.makePeerId = () => (0, import_uuid7.v4)();
|
|
23404
|
-
|
|
23404
|
+
$e = class extends it {
|
|
23405
23405
|
constructor(t2) {
|
|
23406
23406
|
super(M2(m({}, t2), { peerId: rt.makePeerId(), isLocal: true }));
|
|
23407
23407
|
this.isLocal = true;
|
|
@@ -23500,7 +23500,7 @@ var init_dist = __esm({
|
|
|
23500
23500
|
});
|
|
23501
23501
|
}
|
|
23502
23502
|
};
|
|
23503
|
-
|
|
23503
|
+
we = class extends import_eventemitter2.EventEmitter2 {
|
|
23504
23504
|
on(e, t2) {
|
|
23505
23505
|
return super.on(e, t2);
|
|
23506
23506
|
}
|
|
@@ -23514,7 +23514,7 @@ var init_dist = __esm({
|
|
|
23514
23514
|
return super.listeners(e);
|
|
23515
23515
|
}
|
|
23516
23516
|
};
|
|
23517
|
-
Si = class extends
|
|
23517
|
+
Si = class extends we {
|
|
23518
23518
|
constructor() {
|
|
23519
23519
|
super(...arguments);
|
|
23520
23520
|
this.audioElement = null;
|
|
@@ -23566,7 +23566,7 @@ var init_dist = __esm({
|
|
|
23566
23566
|
}), this.audioContextManager = new st(t2), t2;
|
|
23567
23567
|
}
|
|
23568
23568
|
};
|
|
23569
|
-
gi = class extends
|
|
23569
|
+
gi = class extends we {
|
|
23570
23570
|
constructor() {
|
|
23571
23571
|
super(...arguments);
|
|
23572
23572
|
this.TAG = "[PlaylistVideoManager]";
|
|
@@ -23641,7 +23641,7 @@ var init_dist = __esm({
|
|
|
23641
23641
|
}
|
|
23642
23642
|
};
|
|
23643
23643
|
Ti = { audio: { list: [], currentIndex: -1, isAutoplayOn: true }, video: { list: [], currentIndex: -1, isAutoplayOn: true } };
|
|
23644
|
-
Rt = class extends
|
|
23644
|
+
Rt = class extends we {
|
|
23645
23645
|
constructor(t2, i2) {
|
|
23646
23646
|
super();
|
|
23647
23647
|
this.sdk = t2;
|
|
@@ -23862,34 +23862,34 @@ var init_dist = __esm({
|
|
|
23862
23862
|
}
|
|
23863
23863
|
};
|
|
23864
23864
|
B2 = (a11) => a11.room;
|
|
23865
|
-
|
|
23866
|
-
Wh = createSelector(
|
|
23865
|
+
Ao = (a11) => a11.errors;
|
|
23866
|
+
Wh = createSelector(Ao, (a11) => a11.length === 0 ? null : a11.at(-1));
|
|
23867
23867
|
$h = createSelector(B2, (a11) => a11.id);
|
|
23868
|
-
|
|
23868
|
+
K = (a11) => a11.peers;
|
|
23869
23869
|
fi = (a11) => a11.messages.byID;
|
|
23870
23870
|
Js = (a11) => a11.messages.allIDs;
|
|
23871
23871
|
N2 = (a11) => a11.tracks;
|
|
23872
23872
|
Qs = (a11) => a11.settings;
|
|
23873
23873
|
Ur = (a11) => a11.appData;
|
|
23874
23874
|
Ho = (a11) => a11.speakers;
|
|
23875
|
-
|
|
23876
|
-
jh = createSelector([
|
|
23875
|
+
_e = createSelector([B2], (a11) => a11 && a11.isConnected);
|
|
23876
|
+
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));
|
|
23877
23877
|
Co = (a11) => a11.hideLocalPeer;
|
|
23878
|
-
me = createSelector([B2,
|
|
23878
|
+
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]));
|
|
23879
23879
|
Lo = createSelector(N2, (a11) => Object.values(a11));
|
|
23880
|
-
te = createSelector(B2,
|
|
23880
|
+
te = createSelector(B2, K, (a11, e) => e[a11.localPeer]);
|
|
23881
23881
|
ye = createSelector(B2, (a11) => a11.localPeer);
|
|
23882
23882
|
Jh = createSelector(te, (a11) => a11 == null ? void 0 : a11.name);
|
|
23883
23883
|
Qh = createSelector(te, (a11) => a11 == null ? void 0 : a11.roleName);
|
|
23884
23884
|
ae = createSelector(te, (a11) => a11 == null ? void 0 : a11.audioTrack);
|
|
23885
|
-
|
|
23885
|
+
Y2 = createSelector(te, (a11) => a11 == null ? void 0 : a11.videoTrack);
|
|
23886
23886
|
Do = createSelector(te, (a11) => a11 == null ? void 0 : a11.auxiliaryTracks);
|
|
23887
|
-
zs = createSelector([ae,
|
|
23887
|
+
zs = createSelector([ae, Y2, Do], (a11, e, t2) => {
|
|
23888
23888
|
let i2 = t2 ? [...t2] : [];
|
|
23889
23889
|
return a11 && i2.unshift(a11), e && i2.unshift(e), i2;
|
|
23890
23890
|
});
|
|
23891
23891
|
zh = createSelector(me, (a11) => a11.filter((e) => !e.isLocal));
|
|
23892
|
-
Yh = createSelector(
|
|
23892
|
+
Yh = createSelector(K, Ho, (a11, e) => {
|
|
23893
23893
|
let t2 = Object.entries(e).sort((i2, r2) => {
|
|
23894
23894
|
var n2, l2;
|
|
23895
23895
|
let s2 = ((n2 = i2[1]) == null ? void 0 : n2.audioLevel) || 0;
|
|
@@ -23904,20 +23904,20 @@ var init_dist = __esm({
|
|
|
23904
23904
|
});
|
|
23905
23905
|
Br = (a11) => {
|
|
23906
23906
|
let e = te(a11);
|
|
23907
|
-
return
|
|
23907
|
+
return je(a11, e == null ? void 0 : e.videoTrack);
|
|
23908
23908
|
};
|
|
23909
23909
|
Ys = (a11) => {
|
|
23910
23910
|
let e = te(a11);
|
|
23911
23911
|
return ns(a11, e == null ? void 0 : e.videoTrack);
|
|
23912
23912
|
};
|
|
23913
23913
|
Vr = createSelector(te, N2, (a11, e) => {
|
|
23914
|
-
let { video: t2, audio: i2 } =
|
|
23914
|
+
let { video: t2, audio: i2 } = Ue(e, a11);
|
|
23915
23915
|
return !!(t2 || i2);
|
|
23916
23916
|
});
|
|
23917
|
-
wo = createSelector(
|
|
23917
|
+
wo = createSelector(K, N2, (a11, e) => {
|
|
23918
23918
|
let t2;
|
|
23919
23919
|
for (let i2 in a11) {
|
|
23920
|
-
let r2 = a11[i2], { video: s2, audio: o2 } =
|
|
23920
|
+
let r2 = a11[i2], { video: s2, audio: o2 } = Ue(e, r2);
|
|
23921
23921
|
if (s2)
|
|
23922
23922
|
return r2;
|
|
23923
23923
|
o2 && !t2 && (t2 = r2);
|
|
@@ -23925,29 +23925,29 @@ var init_dist = __esm({
|
|
|
23925
23925
|
return t2;
|
|
23926
23926
|
});
|
|
23927
23927
|
Zh = createSelector(wo, (a11) => !!a11);
|
|
23928
|
-
em = createSelector(
|
|
23928
|
+
em = createSelector(K, N2, (a11, e) => {
|
|
23929
23929
|
for (let t2 in a11) {
|
|
23930
|
-
let i2 = a11[t2], { audio: r2, video: s2 } =
|
|
23930
|
+
let i2 = a11[t2], { audio: r2, video: s2 } = Ue(e, i2);
|
|
23931
23931
|
if (!s2 && r2)
|
|
23932
23932
|
return i2;
|
|
23933
23933
|
}
|
|
23934
23934
|
});
|
|
23935
|
-
tm = createSelector(
|
|
23935
|
+
tm = createSelector(K, N2, (a11, e) => {
|
|
23936
23936
|
let t2 = [], i2 = [];
|
|
23937
23937
|
for (let r2 in a11) {
|
|
23938
|
-
let s2 = a11[r2], { video: o2, audio: n2 } =
|
|
23938
|
+
let s2 = a11[r2], { video: o2, audio: n2 } = Ue(e, s2);
|
|
23939
23939
|
o2 ? t2.push(s2) : n2 && i2.push(s2);
|
|
23940
23940
|
}
|
|
23941
23941
|
return t2.concat(i2);
|
|
23942
23942
|
});
|
|
23943
|
-
im = createSelector(
|
|
23943
|
+
im = createSelector(K, N2, (a11, e) => {
|
|
23944
23944
|
for (let t2 in e) {
|
|
23945
23945
|
let i2 = e[t2];
|
|
23946
23946
|
if (mt(i2) && ht(i2) && i2.peerId)
|
|
23947
23947
|
return a11[i2.peerId];
|
|
23948
23948
|
}
|
|
23949
23949
|
});
|
|
23950
|
-
rm = createSelector(
|
|
23950
|
+
rm = createSelector(K, N2, (a11, e) => {
|
|
23951
23951
|
for (let t2 in e) {
|
|
23952
23952
|
let i2 = e[t2];
|
|
23953
23953
|
if (ri(i2) && i2.peerId)
|
|
@@ -23957,13 +23957,13 @@ var init_dist = __esm({
|
|
|
23957
23957
|
sm = createSelector(Lo, (a11) => a11.filter(os));
|
|
23958
23958
|
am = createSelector(Js, (a11) => a11.length);
|
|
23959
23959
|
om = createSelector(fi, (a11) => Object.values(a11).filter((e) => !e.read).length);
|
|
23960
|
-
|
|
23960
|
+
It = createSelector(Js, fi, (a11, e) => {
|
|
23961
23961
|
let t2 = [];
|
|
23962
23962
|
return a11.forEach((i2) => {
|
|
23963
23963
|
t2.push(e[i2]);
|
|
23964
23964
|
}), t2;
|
|
23965
23965
|
});
|
|
23966
|
-
_o = createSelector(
|
|
23966
|
+
_o = createSelector(It, (a11) => a11.filter((e) => {
|
|
23967
23967
|
var t2;
|
|
23968
23968
|
return !e.recipientPeer && !(e.recipientRoles && ((t2 = e.recipientRoles) == null ? void 0 : t2.length) > 0);
|
|
23969
23969
|
}));
|
|
@@ -24011,7 +24011,7 @@ var init_dist = __esm({
|
|
|
24011
24011
|
});
|
|
24012
24012
|
la = { selection: Fr("audio"), progress: sa("audio"), currentTime: aa("audio"), playbackRate: oa("audio"), volume: na("audio"), list: ca("audio"), selectedItem: da("audio") };
|
|
24013
24013
|
ua = { selection: Fr("video"), progress: sa("video"), currentTime: aa("video"), playbackRate: oa("video"), volume: na("video"), list: ca("video"), selectedItem: da("video") };
|
|
24014
|
-
|
|
24014
|
+
At = "HMS-Store:";
|
|
24015
24015
|
b2 = class {
|
|
24016
24016
|
static v(e, ...t2) {
|
|
24017
24017
|
this.log(0, e, ...t2);
|
|
@@ -24041,23 +24041,23 @@ var init_dist = __esm({
|
|
|
24041
24041
|
if (!(this.level.valueOf() > e.valueOf()))
|
|
24042
24042
|
switch (e) {
|
|
24043
24043
|
case 0: {
|
|
24044
|
-
console.log(
|
|
24044
|
+
console.log(At, ...t2);
|
|
24045
24045
|
break;
|
|
24046
24046
|
}
|
|
24047
24047
|
case 1: {
|
|
24048
|
-
console.debug(
|
|
24048
|
+
console.debug(At, ...t2);
|
|
24049
24049
|
break;
|
|
24050
24050
|
}
|
|
24051
24051
|
case 2: {
|
|
24052
|
-
console.info(
|
|
24052
|
+
console.info(At, ...t2);
|
|
24053
24053
|
break;
|
|
24054
24054
|
}
|
|
24055
24055
|
case 3: {
|
|
24056
|
-
console.warn(
|
|
24056
|
+
console.warn(At, ...t2);
|
|
24057
24057
|
break;
|
|
24058
24058
|
}
|
|
24059
24059
|
case 6: {
|
|
24060
|
-
console.error(
|
|
24060
|
+
console.error(At, ...t2);
|
|
24061
24061
|
break;
|
|
24062
24062
|
}
|
|
24063
24063
|
case 4: {
|
|
@@ -24083,7 +24083,7 @@ var init_dist = __esm({
|
|
|
24083
24083
|
pa = (a11, e) => e;
|
|
24084
24084
|
xo = (a11, e) => e;
|
|
24085
24085
|
Uo = (a11, e) => e;
|
|
24086
|
-
|
|
24086
|
+
q2 = createSelector([K, Gr], (a11, e) => e ? a11[e] : null);
|
|
24087
24087
|
Wr = createSelector([N2, Ht], (a11, e) => e ? a11[e] : null);
|
|
24088
24088
|
Bo = createSelector([N2, Ht], (a11, e) => {
|
|
24089
24089
|
if (!e)
|
|
@@ -24110,94 +24110,94 @@ var init_dist = __esm({
|
|
|
24110
24110
|
return (t2 == null ? void 0 : t2.type) === "video" && (t2 == null ? void 0 : t2.source) === "screen" ? t2 : null;
|
|
24111
24111
|
});
|
|
24112
24112
|
Wo = createSelector([ta, Uo], (a11, e) => e ? a11[e] : null);
|
|
24113
|
-
|
|
24114
|
-
Om =
|
|
24113
|
+
X2 = A2(q2);
|
|
24114
|
+
Om = A2(createSelector([Ur, xo], (a11, e) => {
|
|
24115
24115
|
if (a11)
|
|
24116
24116
|
return e ? a11[e] : a11;
|
|
24117
24117
|
}));
|
|
24118
|
-
Bm =
|
|
24119
|
-
Vm =
|
|
24120
|
-
vi =
|
|
24121
|
-
ha =
|
|
24122
|
-
Fm =
|
|
24123
|
-
Gm =
|
|
24124
|
-
Wm =
|
|
24125
|
-
$o =
|
|
24126
|
-
let t2 =
|
|
24118
|
+
Bm = A2(createSelector(q2, (a11) => a11 == null ? void 0 : a11.name));
|
|
24119
|
+
Vm = A2(createSelector(q2, (a11) => a11 == null ? void 0 : a11.type));
|
|
24120
|
+
vi = A2(Wr);
|
|
24121
|
+
ha = A2(Bo);
|
|
24122
|
+
Fm = A2(Vo);
|
|
24123
|
+
Gm = A2(Fo);
|
|
24124
|
+
Wm = A2(Go);
|
|
24125
|
+
$o = A2((a11, e) => {
|
|
24126
|
+
let t2 = q2(a11, e);
|
|
24127
24127
|
if (t2 && t2.videoTrack && t2.videoTrack !== "")
|
|
24128
24128
|
return a11.tracks[t2.videoTrack];
|
|
24129
24129
|
});
|
|
24130
|
-
Ko =
|
|
24131
|
-
let t2 =
|
|
24130
|
+
Ko = A2((a11, e) => {
|
|
24131
|
+
let t2 = q2(a11, e);
|
|
24132
24132
|
if (t2 && t2.audioTrack && t2.audioTrack !== "")
|
|
24133
24133
|
return a11.tracks[t2.audioTrack];
|
|
24134
24134
|
});
|
|
24135
|
-
Km =
|
|
24136
|
-
let t2 =
|
|
24135
|
+
Km = A2((a11, e) => {
|
|
24136
|
+
let t2 = q2(a11, e);
|
|
24137
24137
|
return (t2 == null ? void 0 : t2.auxiliaryTracks.map((i2) => a11.tracks[i2])) || [];
|
|
24138
24138
|
});
|
|
24139
24139
|
ma = (a11, e) => e ? a11.speakers[e] : null;
|
|
24140
|
-
qm =
|
|
24140
|
+
qm = A2(createSelector(ma, (a11) => (a11 == null ? void 0 : a11.audioLevel) || 0));
|
|
24141
24141
|
qo = (a11, e) => {
|
|
24142
24142
|
let t2 = Ko(e)(a11);
|
|
24143
24143
|
return ma(a11, t2 == null ? void 0 : t2.id);
|
|
24144
24144
|
};
|
|
24145
|
-
jm =
|
|
24146
|
-
Jm =
|
|
24145
|
+
jm = A2(createSelector(qo, (a11) => (a11 == null ? void 0 : a11.audioLevel) || 0));
|
|
24146
|
+
Jm = A2((a11, e) => {
|
|
24147
24147
|
if (e)
|
|
24148
24148
|
return a11.connectionQualities[e];
|
|
24149
24149
|
});
|
|
24150
|
-
Qm =
|
|
24151
|
-
let t2 =
|
|
24150
|
+
Qm = A2((a11, e) => {
|
|
24151
|
+
let t2 = q2(a11, e);
|
|
24152
24152
|
if (t2) {
|
|
24153
24153
|
let i2 = t2 == null ? void 0 : t2.auxiliaryTracks.find((r2) => pt(a11.tracks[r2]));
|
|
24154
24154
|
return i2 ? a11.tracks[i2] : void 0;
|
|
24155
24155
|
}
|
|
24156
24156
|
});
|
|
24157
|
-
zm =
|
|
24157
|
+
zm = A2(createSelector(N2, q2, (a11, e) => {
|
|
24158
24158
|
let t2 = e == null ? void 0 : e.auxiliaryTracks.find((i2) => {
|
|
24159
24159
|
let r2 = a11[i2];
|
|
24160
24160
|
return mt(r2) && ht(r2);
|
|
24161
24161
|
});
|
|
24162
24162
|
return t2 ? a11[t2] : void 0;
|
|
24163
24163
|
}));
|
|
24164
|
-
Ym =
|
|
24164
|
+
Ym = A2(createSelector(N2, q2, (a11, e) => {
|
|
24165
24165
|
let t2 = e == null ? void 0 : e.auxiliaryTracks.find((i2) => {
|
|
24166
24166
|
let r2 = a11[i2];
|
|
24167
24167
|
return mt(r2) && pt(r2);
|
|
24168
24168
|
});
|
|
24169
24169
|
return t2 ? a11[t2] : void 0;
|
|
24170
24170
|
}));
|
|
24171
|
-
Xm =
|
|
24171
|
+
Xm = A2(createSelector(N2, q2, (a11, e) => {
|
|
24172
24172
|
let t2 = e == null ? void 0 : e.auxiliaryTracks.find((i2) => {
|
|
24173
24173
|
let r2 = a11[i2];
|
|
24174
24174
|
return ri(r2) && pt(r2);
|
|
24175
24175
|
});
|
|
24176
24176
|
return t2 ? a11[t2] : void 0;
|
|
24177
24177
|
}));
|
|
24178
|
-
Sa =
|
|
24178
|
+
Sa = A2(createSelector(N2, q2, (a11, e) => Ue(a11, e)));
|
|
24179
24179
|
ga = (a11) => createSelector(Sa(a11), (e) => e.audio);
|
|
24180
|
-
eS =
|
|
24181
|
-
let t2 =
|
|
24182
|
-
return
|
|
24180
|
+
eS = A2((a11, e) => {
|
|
24181
|
+
let t2 = q2(a11, e);
|
|
24182
|
+
return je(a11, t2 == null ? void 0 : t2.audioTrack);
|
|
24183
24183
|
});
|
|
24184
|
-
tS =
|
|
24185
|
-
let t2 =
|
|
24186
|
-
return
|
|
24184
|
+
tS = A2((a11, e) => {
|
|
24185
|
+
let t2 = q2(a11, e);
|
|
24186
|
+
return je(a11, t2 == null ? void 0 : t2.videoTrack);
|
|
24187
24187
|
});
|
|
24188
|
-
Ta =
|
|
24188
|
+
Ta = A2((a11, e) => {
|
|
24189
24189
|
if (e && a11.tracks[e])
|
|
24190
24190
|
return a11.tracks[e].volume === 0;
|
|
24191
24191
|
});
|
|
24192
|
-
iS =
|
|
24193
|
-
let t2 =
|
|
24192
|
+
iS = A2((a11, e) => {
|
|
24193
|
+
let t2 = q2(a11, e);
|
|
24194
24194
|
return Ta(t2 == null ? void 0 : t2.audioTrack)(a11);
|
|
24195
24195
|
});
|
|
24196
|
-
rS =
|
|
24196
|
+
rS = A2((a11, e) => {
|
|
24197
24197
|
let t2 = ga(e)(a11);
|
|
24198
24198
|
return Ta(t2 == null ? void 0 : t2.id)(a11);
|
|
24199
24199
|
});
|
|
24200
|
-
fa =
|
|
24200
|
+
fa = A2((a11, e) => {
|
|
24201
24201
|
let t2 = Wr(a11, e);
|
|
24202
24202
|
if (t2) {
|
|
24203
24203
|
if (t2.type !== "audio") {
|
|
@@ -24207,15 +24207,15 @@ var init_dist = __esm({
|
|
|
24207
24207
|
return t2.volume;
|
|
24208
24208
|
}
|
|
24209
24209
|
});
|
|
24210
|
-
sS =
|
|
24211
|
-
let t2 =
|
|
24210
|
+
sS = A2((a11, e) => {
|
|
24211
|
+
let t2 = q2(a11, e);
|
|
24212
24212
|
return fa(t2 == null ? void 0 : t2.audioTrack)(a11);
|
|
24213
24213
|
});
|
|
24214
|
-
aS =
|
|
24214
|
+
aS = A2((a11, e) => {
|
|
24215
24215
|
let t2 = ga(e)(a11);
|
|
24216
24216
|
return fa(t2 == null ? void 0 : t2.id)(a11);
|
|
24217
24217
|
});
|
|
24218
|
-
oS =
|
|
24218
|
+
oS = A2((a11, e) => {
|
|
24219
24219
|
let t2 = Wr(a11, e);
|
|
24220
24220
|
if (t2) {
|
|
24221
24221
|
if (t2.type !== "video") {
|
|
@@ -24225,41 +24225,41 @@ var init_dist = __esm({
|
|
|
24225
24225
|
return t2.layer;
|
|
24226
24226
|
}
|
|
24227
24227
|
});
|
|
24228
|
-
va = createSelector([
|
|
24228
|
+
va = createSelector([It, ye, Gr], (a11, e, t2) => {
|
|
24229
24229
|
if (t2)
|
|
24230
24230
|
return a11.filter((i2) => {
|
|
24231
24231
|
var r2;
|
|
24232
24232
|
return !i2.recipientPeer && !((r2 = i2.recipientRoles) != null && r2.length) || i2.sender && ![e, t2].includes(i2.sender) ? false : [e, t2].includes(i2.recipientPeer);
|
|
24233
24233
|
});
|
|
24234
24234
|
});
|
|
24235
|
-
Ma = createSelector([
|
|
24235
|
+
Ma = createSelector([It, pa], (a11, e) => {
|
|
24236
24236
|
if (e)
|
|
24237
24237
|
return a11.filter((t2) => {
|
|
24238
24238
|
var i2, r2;
|
|
24239
24239
|
return (i2 = t2.recipientRoles) != null && i2.length ? (r2 = t2.recipientRoles) == null ? void 0 : r2.includes(e) : false;
|
|
24240
24240
|
});
|
|
24241
24241
|
});
|
|
24242
|
-
jo = createSelector(
|
|
24242
|
+
jo = createSelector(It, (a11) => a11.filter((e) => {
|
|
24243
24243
|
var t2;
|
|
24244
24244
|
return !e.recipientPeer && !((t2 = e.recipientRoles) != null && t2.length);
|
|
24245
24245
|
}));
|
|
24246
24246
|
Jo = createSelector([Ma, pa], (a11) => a11 ? a11.filter((e) => !e.read).length : 0);
|
|
24247
24247
|
Qo = createSelector([va, Gr], (a11) => a11 ? a11.filter((e) => !e.read).length : 0);
|
|
24248
24248
|
nS = createSelector(jo, (a11) => a11.filter((e) => !e.read).length);
|
|
24249
|
-
cS =
|
|
24250
|
-
dS =
|
|
24251
|
-
lS =
|
|
24252
|
-
uS =
|
|
24253
|
-
ya =
|
|
24254
|
-
PS = createSelector([
|
|
24249
|
+
cS = A2(va);
|
|
24250
|
+
dS = A2(Ma);
|
|
24251
|
+
lS = A2(Jo);
|
|
24252
|
+
uS = A2(Qo);
|
|
24253
|
+
ya = A2(Wo);
|
|
24254
|
+
PS = createSelector([K, N2], (a11, e) => Object.values(a11).map((i2) => {
|
|
24255
24255
|
var r2;
|
|
24256
24256
|
return { peer: i2, isAudioEnabled: i2.audioTrack ? (r2 = e[i2.audioTrack]) == null ? void 0 : r2.enabled : false };
|
|
24257
24257
|
}));
|
|
24258
24258
|
zo = (a11) => a11.roleChangeRequests[0] || null;
|
|
24259
|
-
ES = createSelector([zo,
|
|
24259
|
+
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);
|
|
24260
24260
|
bS = createSelector([at], (a11) => St(a11));
|
|
24261
24261
|
RS = createSelector([Zs], (a11) => St(a11));
|
|
24262
|
-
Xo = createSelector([
|
|
24262
|
+
Xo = createSelector([Y2, N2], (a11, e) => {
|
|
24263
24263
|
let t2 = null;
|
|
24264
24264
|
return a11 && (t2 = e[a11]), (t2 == null ? void 0 : t2.plugins) || [];
|
|
24265
24265
|
});
|
|
@@ -24311,7 +24311,7 @@ var init_dist = __esm({
|
|
|
24311
24311
|
this.emitEvent(t2);
|
|
24312
24312
|
}
|
|
24313
24313
|
sendPeerUpdate(e, t2) {
|
|
24314
|
-
let i2 = this.store.getState(
|
|
24314
|
+
let i2 = this.store.getState(X2(t2 == null ? void 0 : t2.id)) || t2, r2 = yi[e];
|
|
24315
24315
|
if (r2 && i2) {
|
|
24316
24316
|
let s2 = this.createNotification(r2, i2, "info");
|
|
24317
24317
|
this.emitEvent(s2);
|
|
@@ -24397,31 +24397,31 @@ var init_dist = __esm({
|
|
|
24397
24397
|
let t2 = Lt(Object.keys(a11), Object.keys(e));
|
|
24398
24398
|
for (let i2 of t2) {
|
|
24399
24399
|
let r2 = a11[i2], s2 = e[i2];
|
|
24400
|
-
|
|
24400
|
+
Ke(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] : bi(r2, s2) && (a11[i2] = s2);
|
|
24401
24401
|
}
|
|
24402
24402
|
};
|
|
24403
24403
|
ba = (a11, e) => {
|
|
24404
24404
|
let t2 = Lt(Object.keys(a11), Object.keys(e));
|
|
24405
24405
|
for (let i2 of t2) {
|
|
24406
24406
|
let r2 = a11[i2], s2 = e[i2];
|
|
24407
|
-
|
|
24407
|
+
Ke(r2, s2) ? (qr(r2, s2), Object.assign(r2, s2)) : jr(r2, s2) ? delete a11[i2] : bi(r2, s2) && (a11[i2] = s2);
|
|
24408
24408
|
}
|
|
24409
24409
|
};
|
|
24410
24410
|
Ra = (a11, e) => {
|
|
24411
24411
|
let t2 = Lt(Object.keys(a11), Object.keys(e));
|
|
24412
24412
|
for (let i2 of t2) {
|
|
24413
24413
|
let r2 = a11[i2], s2 = e[i2];
|
|
24414
|
-
|
|
24414
|
+
Ke(r2, s2) ? (r2.questions && re(r2.questions, s2.questions) && (s2.questions = r2.questions), Object.assign(r2, s2)) : bi(r2, s2) && (a11[i2] = s2);
|
|
24415
24415
|
}
|
|
24416
24416
|
};
|
|
24417
24417
|
Kr = (a11, e) => {
|
|
24418
24418
|
let t2 = Lt(Object.keys(a11), Object.keys(e));
|
|
24419
24419
|
for (let i2 of t2) {
|
|
24420
24420
|
let r2 = a11[i2], s2 = e[i2];
|
|
24421
|
-
|
|
24421
|
+
Ke(r2, s2) ? Object.assign(r2, s2) : jr(r2, s2) ? delete a11[i2] : bi(r2, s2) && (a11[i2] = s2);
|
|
24422
24422
|
}
|
|
24423
24423
|
};
|
|
24424
|
-
|
|
24424
|
+
Ia = (a11, e, t2) => {
|
|
24425
24425
|
let i2 = t2.reduce((s2, o2) => (s2[o2.firstTrackId] = Object.values(e[o2.getTrackIDBeingSent()] || {}).sort((n2, l2) => !n2.rid || !l2.rid ? 0 : n2.rid < l2.rid ? -1 : 1), s2), {}), r2 = Lt(Object.keys(a11), Object.keys(i2));
|
|
24426
24426
|
for (let s2 of r2) {
|
|
24427
24427
|
if (!i2[s2]) {
|
|
@@ -24434,7 +24434,7 @@ var init_dist = __esm({
|
|
|
24434
24434
|
qr = (a11, e) => {
|
|
24435
24435
|
a11.plugins && re(a11.plugins, e.plugins) && (e.plugins = a11.plugins), a11.type === "video" && a11.layerDefinitions && re(a11.layerDefinitions, e.layerDefinitions) && (e.layerDefinitions = a11.layerDefinitions);
|
|
24436
24436
|
};
|
|
24437
|
-
|
|
24437
|
+
Ke = (a11, e) => a11 && e;
|
|
24438
24438
|
jr = (a11, e) => a11 && !e;
|
|
24439
24439
|
bi = (a11, e) => !a11 && e;
|
|
24440
24440
|
re = (a11, e) => {
|
|
@@ -24630,7 +24630,7 @@ var init_dist = __esm({
|
|
|
24630
24630
|
});
|
|
24631
24631
|
}
|
|
24632
24632
|
};
|
|
24633
|
-
|
|
24633
|
+
Ii = class {
|
|
24634
24634
|
constructor(e, t2) {
|
|
24635
24635
|
this.intervalMs = 100, this.shouldMonitor = false, this.hasStarted = false, this.unsubs = [], this.analysers = {}, this.store = e, this.actions = t2;
|
|
24636
24636
|
}
|
|
@@ -24639,9 +24639,9 @@ var init_dist = __esm({
|
|
|
24639
24639
|
if (this.hasStarted)
|
|
24640
24640
|
return;
|
|
24641
24641
|
this.hasStarted = true, b2.d("starting audio level monitor for remote peers", this.store);
|
|
24642
|
-
let e = this.store.getState(
|
|
24642
|
+
let e = this.store.getState(_e);
|
|
24643
24643
|
b2.d("starting audio levels is connected to room", e), e && (yield this.monitorAudioLevels());
|
|
24644
|
-
let t2 = this.store.subscribe(this.monitorAudioLevels.bind(this),
|
|
24644
|
+
let t2 = this.store.subscribe(this.monitorAudioLevels.bind(this), _e);
|
|
24645
24645
|
this.unsubs.push(t2);
|
|
24646
24646
|
});
|
|
24647
24647
|
}
|
|
@@ -24652,7 +24652,7 @@ var init_dist = __esm({
|
|
|
24652
24652
|
}
|
|
24653
24653
|
monitorAudioLevels() {
|
|
24654
24654
|
return c2(this, null, function* () {
|
|
24655
|
-
if (!this.store.getState(
|
|
24655
|
+
if (!this.store.getState(_e)) {
|
|
24656
24656
|
this.shouldMonitor && (b2.i("room no longer connected, stopping audio level monitoring for remote"), this.shouldMonitor = false);
|
|
24657
24657
|
return;
|
|
24658
24658
|
}
|
|
@@ -24706,11 +24706,11 @@ var init_dist = __esm({
|
|
|
24706
24706
|
return Math.ceil(Math.min(Math.max(s2 * 100, 0), 100));
|
|
24707
24707
|
}
|
|
24708
24708
|
};
|
|
24709
|
-
|
|
24709
|
+
Aa = 2e4;
|
|
24710
24710
|
Ha = 1e4;
|
|
24711
24711
|
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 } };
|
|
24712
24712
|
Ca = "https://100ms.live/test-audio.wav";
|
|
24713
|
-
|
|
24713
|
+
Ai = class {
|
|
24714
24714
|
constructor() {
|
|
24715
24715
|
this.networkScores = [];
|
|
24716
24716
|
this.lastPushedAt = 0;
|
|
@@ -24732,7 +24732,7 @@ var init_dist = __esm({
|
|
|
24732
24732
|
};
|
|
24733
24733
|
tn2 = (a11) => !!a11 && !isNaN(a11);
|
|
24734
24734
|
de = (a11) => a11[a11.length - 1];
|
|
24735
|
-
|
|
24735
|
+
Ne = (a11, e) => {
|
|
24736
24736
|
let t2 = a11.filter((i2) => tn2(e(i2)));
|
|
24737
24737
|
return t2.reduce((i2, r2) => i2 + (e(r2) || 0), 0) / t2.length;
|
|
24738
24738
|
};
|
|
@@ -24747,30 +24747,30 @@ var init_dist = __esm({
|
|
|
24747
24747
|
}
|
|
24748
24748
|
handleStatsUpdate(e) {
|
|
24749
24749
|
return c2(this, null, function* () {
|
|
24750
|
-
var n2, l2, u2, p2, h2, T, g2,
|
|
24750
|
+
var n2, l2, u2, p2, h2, T, g2, f2;
|
|
24751
24751
|
let t2 = e.getLocalPeerStats();
|
|
24752
24752
|
t2 && this.peerStatsList.push(t2);
|
|
24753
24753
|
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();
|
|
24754
24754
|
s2 && (i2 && this.localAudioTrackStatsList.push(s2[i2]), r2 && this.localVideoTrackStatsList.push(s2[r2]));
|
|
24755
|
-
let o2 = yield (
|
|
24756
|
-
o2 == null || o2.forEach((
|
|
24757
|
-
if (
|
|
24758
|
-
let k2 =
|
|
24759
|
-
k2.push(M2(m({},
|
|
24755
|
+
let o2 = yield (f2 = (g2 = this.sdk.getWebrtcInternals()) == null ? void 0 : g2.getSubscribePeerConnection()) == null ? void 0 : f2.getStats();
|
|
24756
|
+
o2 == null || o2.forEach((P8) => {
|
|
24757
|
+
if (P8.type === "inbound-rtp") {
|
|
24758
|
+
let k2 = P8.kind === "audio" ? this.remoteAudioTrackStatsList : this.remoteVideoTrackStatsList, w2 = Et("bytesReceived", P8, de(k2));
|
|
24759
|
+
k2.push(M2(m({}, P8), { bitrate: w2 }));
|
|
24760
24760
|
}
|
|
24761
24761
|
});
|
|
24762
24762
|
});
|
|
24763
24763
|
}
|
|
24764
24764
|
buildReport() {
|
|
24765
|
-
var T, g2,
|
|
24766
|
-
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 = ((
|
|
24767
|
-
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:
|
|
24765
|
+
var T, g2, f2, P8, k2, w2, xe, Zt;
|
|
24766
|
+
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 = ((P8 = de(this.remoteVideoTrackStatsList)) == null ? void 0 : P8.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);
|
|
24767
|
+
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) => {
|
|
24768
24768
|
var $;
|
|
24769
24769
|
return ($ = x2.publish) == null ? void 0 : $.bitrate;
|
|
24770
|
-
}), bitrateReceived:
|
|
24770
|
+
}), bitrateReceived: Ne(this.peerStatsList, (x2) => {
|
|
24771
24771
|
var $;
|
|
24772
24772
|
return ($ = x2.subscribe) == null ? void 0 : $.bitrate;
|
|
24773
|
-
}) }, 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:
|
|
24773
|
+
}) }, 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: ((xe = de(this.remoteVideoTrackStatsList)) == null ? void 0 : xe.packetsLost) || 0, bytesReceived: ((Zt = de(this.remoteVideoTrackStatsList)) == null ? void 0 : Zt.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 } };
|
|
24774
24774
|
}
|
|
24775
24775
|
};
|
|
24776
24776
|
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 || {});
|
|
@@ -24791,7 +24791,7 @@ var init_dist = __esm({
|
|
|
24791
24791
|
this.isVideoTrackCaptured = false;
|
|
24792
24792
|
this.isAudioTrackPublished = false;
|
|
24793
24793
|
this.isVideoTrackPublished = false;
|
|
24794
|
-
this.cqsCalculator = new
|
|
24794
|
+
this.cqsCalculator = new Ai();
|
|
24795
24795
|
this.timestamp = Date.now();
|
|
24796
24796
|
this.onRoomUpdate = this.sdkListener.onRoomUpdate.bind(this.sdkListener);
|
|
24797
24797
|
this.onPeerUpdate = this.sdkListener.onPeerUpdate.bind(this.sdkListener);
|
|
@@ -24856,7 +24856,7 @@ var init_dist = __esm({
|
|
|
24856
24856
|
var t2, i2;
|
|
24857
24857
|
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(() => {
|
|
24858
24858
|
this.cleanupAndReport();
|
|
24859
|
-
},
|
|
24859
|
+
}, Aa);
|
|
24860
24860
|
}
|
|
24861
24861
|
onError(e) {
|
|
24862
24862
|
this.sdkListener.onError(e), this.errors.push(e), e != null && e.isTerminal && this.cleanupAndReport();
|
|
@@ -24889,7 +24889,7 @@ var init_dist = __esm({
|
|
|
24889
24889
|
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 } };
|
|
24890
24890
|
}
|
|
24891
24891
|
};
|
|
24892
|
-
|
|
24892
|
+
Oe = class {
|
|
24893
24893
|
constructor(e) {
|
|
24894
24894
|
this.recording = { server: { running: false }, browser: { running: false }, hls: { running: false } };
|
|
24895
24895
|
this.rtmp = { running: false };
|
|
@@ -24927,8 +24927,12 @@ var init_dist = __esm({
|
|
|
24927
24927
|
}
|
|
24928
24928
|
requestPermission(e) {
|
|
24929
24929
|
return c2(this, null, function* () {
|
|
24930
|
-
|
|
24931
|
-
|
|
24930
|
+
try {
|
|
24931
|
+
let t2 = yield navigator.mediaDevices.getUserMedia(e);
|
|
24932
|
+
return t2.getTracks().forEach((i2) => i2.stop()), yield this.sdk.deviceManager.init(true), { audio: t2.getAudioTracks().length > 0, video: t2.getVideoTracks().length > 0 };
|
|
24933
|
+
} catch (t2) {
|
|
24934
|
+
throw Ae(t2, this.sdk.localTrackManager.getErrorType(!!e.video, !!e.audio));
|
|
24935
|
+
}
|
|
24932
24936
|
});
|
|
24933
24937
|
}
|
|
24934
24938
|
startCameraCheck(e) {
|
|
@@ -24937,7 +24941,7 @@ var init_dist = __esm({
|
|
|
24937
24941
|
if (this.initSdkWithLocalPeer(), !this.localPeer)
|
|
24938
24942
|
throw new Error("Local peer not found");
|
|
24939
24943
|
this.sdk.store.setSimulcastEnabled(false), this.localPeer.role = M2(m({}, ot), { publishParams: M2(m({}, ot.publishParams), { allowed: ["video"] }) });
|
|
24940
|
-
let t2 = new
|
|
24944
|
+
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");
|
|
24941
24945
|
if (!r2)
|
|
24942
24946
|
throw new Error("No video track found");
|
|
24943
24947
|
(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]);
|
|
@@ -24947,26 +24951,32 @@ var init_dist = __esm({
|
|
|
24947
24951
|
var e, t2;
|
|
24948
24952
|
(t2 = (e = this.localPeer) == null ? void 0 : e.videoTrack) == null || t2.cleanup(), this.localPeer && (this.localPeer.videoTrack = void 0);
|
|
24949
24953
|
}
|
|
24950
|
-
startMicCheck(
|
|
24951
|
-
return c2(this, arguments, function* (e, t2, i2 = Ha) {
|
|
24952
|
-
var
|
|
24953
|
-
this.initSdkWithLocalPeer()
|
|
24954
|
+
startMicCheck(s2) {
|
|
24955
|
+
return c2(this, arguments, function* ({ inputDevice: e, onError: t2, onStop: i2, time: r2 = Ha }) {
|
|
24956
|
+
var u2, p2, h2, T;
|
|
24957
|
+
this.initSdkWithLocalPeer((g2) => {
|
|
24958
|
+
this.stopMicCheck(), t2 == null || t2(g2);
|
|
24959
|
+
});
|
|
24954
24960
|
let o2 = yield this.getLocalAudioTrack(e);
|
|
24955
|
-
if ((
|
|
24961
|
+
if ((u2 = this.sdk) == null || u2.deviceManager.init(true), !this.localPeer)
|
|
24956
24962
|
throw new Error("Local peer not found");
|
|
24957
24963
|
if (!o2)
|
|
24958
24964
|
throw new Error("No audio track found");
|
|
24959
|
-
this.localPeer.audioTrack = o2, (
|
|
24965
|
+
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);
|
|
24960
24966
|
let n2 = [];
|
|
24961
|
-
this.mediaRecorder.ondataavailable = function(
|
|
24962
|
-
n2.push(
|
|
24967
|
+
this.mediaRecorder.ondataavailable = function(g2) {
|
|
24968
|
+
n2.push(g2.data);
|
|
24963
24969
|
}, this.mediaRecorder.onstop = () => {
|
|
24964
|
-
var
|
|
24965
|
-
let
|
|
24966
|
-
this.recordedAudio = URL.createObjectURL(
|
|
24967
|
-
}, this.mediaRecorder.start()
|
|
24968
|
-
|
|
24969
|
-
|
|
24970
|
+
var f2, P8;
|
|
24971
|
+
let g2 = new Blob(n2, { type: (f2 = this.mediaRecorder) == null ? void 0 : f2.mimeType });
|
|
24972
|
+
this.recordedAudio = URL.createObjectURL(g2), (P8 = this.onStopMicCheck) == null || P8.call(this);
|
|
24973
|
+
}, this.mediaRecorder.start();
|
|
24974
|
+
let l2 = setTimeout(() => {
|
|
24975
|
+
this.stopMicCheck();
|
|
24976
|
+
}, r2);
|
|
24977
|
+
this.onStopMicCheck = () => {
|
|
24978
|
+
clearTimeout(l2), i2 == null || i2();
|
|
24979
|
+
};
|
|
24970
24980
|
});
|
|
24971
24981
|
}
|
|
24972
24982
|
stopMicCheck() {
|
|
@@ -24983,7 +24993,7 @@ var init_dist = __esm({
|
|
|
24983
24993
|
throw new Error("SDK not found");
|
|
24984
24994
|
this.connectivityCheck = new Ci(this.sdk, this.sdkListener, e, t2);
|
|
24985
24995
|
let r2 = yield this.getAuthToken(i2), { roomId: s2 } = nt(r2);
|
|
24986
|
-
yield this.sdk.leave(), (o2 = this.sdk) == null || o2.store.setRoom(new
|
|
24996
|
+
yield this.sdk.leave(), (o2 = this.sdk) == null || o2.store.setRoom(new Oe(s2)), yield this.sdk.join({ authToken: r2, userName: "diagonistic-test", initEndpoint: "https://qa-in2-ipv6.100ms.live/init" }, this.connectivityCheck), this.sdk.addConnectionQualityListener({ onConnectionQualityUpdate: (n2) => {
|
|
24987
24997
|
var l2;
|
|
24988
24998
|
(l2 = this.connectivityCheck) == null || l2.handleConnectionQualityUpdate(n2);
|
|
24989
24999
|
} });
|
|
@@ -24995,13 +25005,15 @@ var init_dist = __esm({
|
|
|
24995
25005
|
return (e = this.connectivityCheck) == null ? void 0 : e.cleanupAndReport();
|
|
24996
25006
|
});
|
|
24997
25007
|
}
|
|
24998
|
-
initSdkWithLocalPeer() {
|
|
24999
|
-
var
|
|
25000
|
-
this.sdkListener && ((
|
|
25001
|
-
|
|
25002
|
-
|
|
25003
|
-
let t2 = new
|
|
25004
|
-
|
|
25008
|
+
initSdkWithLocalPeer(e) {
|
|
25009
|
+
var r2, s2, o2;
|
|
25010
|
+
this.sdkListener && ((r2 = this.sdk) == null || r2.initStoreAndManagers(M2(m({}, this.sdkListener), { onError: (n2) => {
|
|
25011
|
+
e == null || e(n2), this.sdkListener.onError(n2);
|
|
25012
|
+
} })));
|
|
25013
|
+
let t2 = new $e({ name: "diagnostics-peer", role: ot, type: "regular" });
|
|
25014
|
+
(s2 = this.sdk) == null || s2.store.addPeer(t2);
|
|
25015
|
+
let i2 = new Oe("diagnostics-room");
|
|
25016
|
+
this.sdk.store.setRoom(i2), this.sdkListener.onRoomUpdate("ROOM_PEER_COUNT_UPDATED", i2), (o2 = this.sdk) == null || o2.deviceManager.init(true);
|
|
25005
25017
|
}
|
|
25006
25018
|
getAuthToken(e) {
|
|
25007
25019
|
return c2(this, null, function* () {
|
|
@@ -25022,7 +25034,7 @@ var init_dist = __esm({
|
|
|
25022
25034
|
if (!this.localPeer)
|
|
25023
25035
|
return;
|
|
25024
25036
|
this.localPeer.role = M2(m({}, ot), { publishParams: M2(m({}, ot.publishParams), { allowed: ["audio"] }) });
|
|
25025
|
-
let t2 = new
|
|
25037
|
+
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);
|
|
25026
25038
|
return i2 == null ? void 0 : i2.find((s2) => s2.type === "audio");
|
|
25027
25039
|
});
|
|
25028
25040
|
}
|
|
@@ -25042,18 +25054,18 @@ var init_dist = __esm({
|
|
|
25042
25054
|
}, e2);
|
|
25043
25055
|
};
|
|
25044
25056
|
this.sendPeerUpdateNotification = (e2, t3) => {
|
|
25045
|
-
let i3 = this.store.getState(
|
|
25057
|
+
let i3 = this.store.getState(X2(t3.peerId)), r2 = yi[e2] || "peerUpdate";
|
|
25046
25058
|
if (e2 === 8)
|
|
25047
25059
|
this.syncRoomState(r2), this.updateMidCallPreviewRoomState(e2, t3);
|
|
25048
25060
|
else if ([0, 1].includes(e2))
|
|
25049
|
-
this.syncRoomState(r2), i3 || (i3 = this.store.getState(
|
|
25061
|
+
this.syncRoomState(r2), i3 || (i3 = this.store.getState(X2(t3.peerId)));
|
|
25050
25062
|
else if ([12, 13, 14].includes(e2))
|
|
25051
|
-
this.syncRoomState(r2), i3 || (i3 = this.store.getState(
|
|
25063
|
+
this.syncRoomState(r2), i3 || (i3 = this.store.getState(X2(t3.peerId)));
|
|
25052
25064
|
else {
|
|
25053
25065
|
let s2 = _2.convertPeer(t3);
|
|
25054
25066
|
this.setState((o2) => {
|
|
25055
25067
|
let n2 = o2.peers[s2.id];
|
|
25056
|
-
|
|
25068
|
+
Ke(n2, s2) && (re(n2.auxiliaryTracks, s2.auxiliaryTracks) && (n2.auxiliaryTracks = s2.auxiliaryTracks), Object.assign(n2, s2)), i3 = s2;
|
|
25057
25069
|
}, r2);
|
|
25058
25070
|
}
|
|
25059
25071
|
this.hmsNotifications.sendPeerUpdate(e2, i3);
|
|
@@ -25165,7 +25177,7 @@ var init_dist = __esm({
|
|
|
25165
25177
|
}
|
|
25166
25178
|
leave() {
|
|
25167
25179
|
return c2(this, null, function* () {
|
|
25168
|
-
let e = this.store.getState(
|
|
25180
|
+
let e = this.store.getState(_e), t2 = true;
|
|
25169
25181
|
e || (t2 = false, this.logPossibleInconsistency("room leave is called when no room is connected"));
|
|
25170
25182
|
let i2 = this.store.getState(ie);
|
|
25171
25183
|
return this.setState((r2) => {
|
|
@@ -25207,7 +25219,7 @@ var init_dist = __esm({
|
|
|
25207
25219
|
}
|
|
25208
25220
|
setLocalVideoEnabled(e) {
|
|
25209
25221
|
return c2(this, null, function* () {
|
|
25210
|
-
let t2 = this.store.getState(
|
|
25222
|
+
let t2 = this.store.getState(Y2);
|
|
25211
25223
|
t2 && (yield this.setEnabledTrack(t2, e));
|
|
25212
25224
|
});
|
|
25213
25225
|
}
|
|
@@ -25240,13 +25252,13 @@ var init_dist = __esm({
|
|
|
25240
25252
|
}
|
|
25241
25253
|
setVideoSettings(e) {
|
|
25242
25254
|
return c2(this, null, function* () {
|
|
25243
|
-
let t2 = this.store.getState(
|
|
25255
|
+
let t2 = this.store.getState(Y2);
|
|
25244
25256
|
t2 && (yield this.setSDKLocalVideoTrackSettings(t2, e), this.syncRoomState("setVideoSettings"));
|
|
25245
25257
|
});
|
|
25246
25258
|
}
|
|
25247
25259
|
switchCamera() {
|
|
25248
25260
|
return c2(this, null, function* () {
|
|
25249
|
-
let e = this.store.getState(
|
|
25261
|
+
let e = this.store.getState(Y2);
|
|
25250
25262
|
if (e) {
|
|
25251
25263
|
let t2 = this.sdk.store.getLocalPeerTracks().find((i2) => i2.trackId === e);
|
|
25252
25264
|
t2 && (yield t2.switchCamera(), this.syncRoomState("switchCamera"));
|
|
@@ -25333,7 +25345,7 @@ var init_dist = __esm({
|
|
|
25333
25345
|
let t2 = {};
|
|
25334
25346
|
if (t2.isSupported = false, !e)
|
|
25335
25347
|
return b2.w("no plugin passed in for checking support"), t2.errMsg = "no plugin passed in for checking support", t2;
|
|
25336
|
-
let i2 = this.store.getState(
|
|
25348
|
+
let i2 = this.store.getState(Y2);
|
|
25337
25349
|
if (!i2)
|
|
25338
25350
|
return b2.w("video Track not added to local peer yet"), t2.errMsg = "call this function only after local peer has video track", t2;
|
|
25339
25351
|
let r2 = this.getTrackById(i2);
|
|
@@ -25564,7 +25576,7 @@ var init_dist = __esm({
|
|
|
25564
25576
|
}
|
|
25565
25577
|
enableBeamSpeakerLabelsLogging() {
|
|
25566
25578
|
return c2(this, null, function* () {
|
|
25567
|
-
this.beamSpeakerLabelsLogger || (b2.i("enabling beam speaker labels logging"), this.beamSpeakerLabelsLogger = new
|
|
25579
|
+
this.beamSpeakerLabelsLogger || (b2.i("enabling beam speaker labels logging"), this.beamSpeakerLabelsLogger = new Ii(this.store, this), yield this.beamSpeakerLabelsLogger.start());
|
|
25568
25580
|
});
|
|
25569
25581
|
}
|
|
25570
25582
|
initDiagnostics() {
|
|
@@ -25583,7 +25595,7 @@ var init_dist = __esm({
|
|
|
25583
25595
|
}
|
|
25584
25596
|
onRemovedFromRoom(e) {
|
|
25585
25597
|
var r2;
|
|
25586
|
-
let t2 = this.store.getState(
|
|
25598
|
+
let t2 = this.store.getState(X2((r2 = e.requestedBy) == null ? void 0 : r2.peerId));
|
|
25587
25599
|
this.hmsNotifications.sendLeaveRoom(M2(m({}, e), { requestedBy: t2 || void 0 }));
|
|
25588
25600
|
let i2 = e.roomEnded || !t2 ? "roomEnded" : "removedFromRoom";
|
|
25589
25601
|
b2.i(`resetting state after peer removed ${i2}`, e), this.resetState(i2);
|
|
@@ -25655,10 +25667,10 @@ var init_dist = __esm({
|
|
|
25655
25667
|
e = `${e}_fullSync`, b2.time(`store-sync-${e}`);
|
|
25656
25668
|
let t2 = {}, i2 = [], r2 = {}, s2 = {}, o2 = {}, n2, l2 = this.sdk.getPeers();
|
|
25657
25669
|
for (let g2 of l2) {
|
|
25658
|
-
let
|
|
25659
|
-
t2[
|
|
25660
|
-
let
|
|
25661
|
-
for (let k2 of
|
|
25670
|
+
let f2 = _2.convertPeer(g2);
|
|
25671
|
+
t2[f2.id] = f2, i2.push(f2.id), o2[f2.id] = { peerID: f2.id, downlinkQuality: g2.networkQuality || -1 };
|
|
25672
|
+
let P8 = [g2.audioTrack, g2.videoTrack, ...g2.auxiliaryTracks];
|
|
25673
|
+
for (let k2 of P8) {
|
|
25662
25674
|
if (!k2)
|
|
25663
25675
|
continue;
|
|
25664
25676
|
let w2 = _2.convertTrack(k2);
|
|
@@ -25673,8 +25685,8 @@ var init_dist = __esm({
|
|
|
25673
25685
|
this.setState((g2) => {
|
|
25674
25686
|
var k2;
|
|
25675
25687
|
g2.room.peers = i2;
|
|
25676
|
-
let
|
|
25677
|
-
Ea(
|
|
25688
|
+
let f2 = g2.peers, P8 = g2.tracks;
|
|
25689
|
+
Ea(f2, t2), ba(P8, 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());
|
|
25678
25690
|
}, e), b2.timeEnd(`store-sync-${e}`);
|
|
25679
25691
|
}
|
|
25680
25692
|
onPreview(e) {
|
|
@@ -25705,17 +25717,17 @@ var init_dist = __esm({
|
|
|
25705
25717
|
onPeerUpdate(e, t2) {
|
|
25706
25718
|
if (![4, 5].includes(e)) {
|
|
25707
25719
|
if (Array.isArray(t2)) {
|
|
25708
|
-
let i2 = this.store.getState(
|
|
25709
|
-
if (this.syncRoomState("peersJoined"), this.store.getState(
|
|
25720
|
+
let i2 = this.store.getState(K), r2 = t2.filter((o2) => !i2[o2.peerId]);
|
|
25721
|
+
if (this.syncRoomState("peersJoined"), this.store.getState(_e)) {
|
|
25710
25722
|
let o2 = [];
|
|
25711
25723
|
for (let n2 of t2) {
|
|
25712
|
-
let l2 = this.store.getState(
|
|
25724
|
+
let l2 = this.store.getState(X2(n2.peerId));
|
|
25713
25725
|
l2 && o2.push(l2);
|
|
25714
25726
|
}
|
|
25715
25727
|
this.hmsNotifications.sendPeerList(o2);
|
|
25716
25728
|
} else
|
|
25717
25729
|
r2.forEach((o2) => {
|
|
25718
|
-
let n2 = this.store.getState(
|
|
25730
|
+
let n2 = this.store.getState(X2(o2.peerId));
|
|
25719
25731
|
n2 && this.hmsNotifications.sendPeerUpdate(0, n2);
|
|
25720
25732
|
});
|
|
25721
25733
|
return;
|
|
@@ -25733,7 +25745,7 @@ var init_dist = __esm({
|
|
|
25733
25745
|
let r2 = Ct[e] || "trackUpdate", s2 = _2.convertTrack(t2);
|
|
25734
25746
|
this.setState((o2) => {
|
|
25735
25747
|
let n2 = o2.tracks[s2.id];
|
|
25736
|
-
|
|
25748
|
+
Ke(n2, s2) && (qr(n2, s2), Object.assign(n2, s2));
|
|
25737
25749
|
}, r2), this.hmsNotifications.sendTrackUpdate(e, t2.trackId);
|
|
25738
25750
|
}
|
|
25739
25751
|
}
|
|
@@ -25770,14 +25782,14 @@ var init_dist = __esm({
|
|
|
25770
25782
|
}
|
|
25771
25783
|
onChangeTrackStateRequest(e) {
|
|
25772
25784
|
var s2;
|
|
25773
|
-
let t2 = this.store.getState(
|
|
25785
|
+
let t2 = this.store.getState(X2((s2 = e.requestedBy) == null ? void 0 : s2.peerId)), i2 = this.getStoreLocalTrackIDfromSDKTrack(e.track), r2 = this.store.getState(vi(i2));
|
|
25774
25786
|
if (!r2)
|
|
25775
25787
|
return this.logPossibleInconsistency(`Not found track for which track state change was requested, ${e.track}`);
|
|
25776
25788
|
e.enabled || this.syncRoomState("changeTrackStateRequest"), this.hmsNotifications.sendChangeTrackStateRequest({ requestedBy: t2 || void 0, track: r2, enabled: e.enabled });
|
|
25777
25789
|
}
|
|
25778
25790
|
onChangeMultiTrackStateRequest(e) {
|
|
25779
25791
|
var s2;
|
|
25780
|
-
let t2 = this.store.getState(
|
|
25792
|
+
let t2 = this.store.getState(X2((s2 = e.requestedBy) == null ? void 0 : s2.peerId));
|
|
25781
25793
|
e.enabled || this.syncRoomState("changeMultiTrackStateRequest");
|
|
25782
25794
|
let i2 = [], r2 = this.store.getState(N2);
|
|
25783
25795
|
for (let o2 of e.tracks) {
|
|
@@ -25803,7 +25815,7 @@ var init_dist = __esm({
|
|
|
25803
25815
|
i2.room.roomState = "Failed", i2.errors.push(t2);
|
|
25804
25816
|
}, "errorTerminal")) : this.store.getState().errors.length < 50 && this.setState((r2) => {
|
|
25805
25817
|
r2.errors.push(t2);
|
|
25806
|
-
}, "error"), this.syncRoomState("errorSync"), this.hmsNotifications.sendError(t2), b2.e("received error from sdk", t2 instanceof
|
|
25818
|
+
}, "error"), this.syncRoomState("errorSync"), this.hmsNotifications.sendError(t2), b2.e("received error from sdk", t2 instanceof v2 ? `${t2}` : t2);
|
|
25807
25819
|
}
|
|
25808
25820
|
handleTrackRemove(e, t2) {
|
|
25809
25821
|
this.setState((i2) => {
|
|
@@ -25853,7 +25865,7 @@ var init_dist = __esm({
|
|
|
25853
25865
|
setTrackVolume(e, t2) {
|
|
25854
25866
|
return c2(this, null, function* () {
|
|
25855
25867
|
let i2 = this.getTrackById(t2);
|
|
25856
|
-
i2 ? i2 instanceof
|
|
25868
|
+
i2 ? i2 instanceof Ie ? (yield i2.setVolume(e), this.setState((r2) => {
|
|
25857
25869
|
let s2 = r2.tracks[t2];
|
|
25858
25870
|
s2 && s2.type === "audio" && (s2.volume = e);
|
|
25859
25871
|
}, "trackVolume")) : b2.w(`track ${t2} is not an audio track`) : this.logPossibleInconsistency(`track ${t2} not present, unable to set volume`);
|
|
@@ -25875,7 +25887,7 @@ var init_dist = __esm({
|
|
|
25875
25887
|
b2.w("Invalid plugin received in store");
|
|
25876
25888
|
return;
|
|
25877
25889
|
}
|
|
25878
|
-
let r2 = this.store.getState(
|
|
25890
|
+
let r2 = this.store.getState(Y2);
|
|
25879
25891
|
if (r2) {
|
|
25880
25892
|
let s2 = this.getLocalTrack(r2);
|
|
25881
25893
|
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`);
|
|
@@ -25888,7 +25900,7 @@ var init_dist = __esm({
|
|
|
25888
25900
|
b2.w("Invalid plugin received in store");
|
|
25889
25901
|
return;
|
|
25890
25902
|
}
|
|
25891
|
-
let i2 = this.store.getState(
|
|
25903
|
+
let i2 = this.store.getState(Y2);
|
|
25892
25904
|
if (i2) {
|
|
25893
25905
|
let r2 = this.getLocalTrack(i2);
|
|
25894
25906
|
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`);
|
|
@@ -25953,7 +25965,7 @@ var init_dist = __esm({
|
|
|
25953
25965
|
var u2;
|
|
25954
25966
|
if (!e2)
|
|
25955
25967
|
return;
|
|
25956
|
-
let { url: t3, timeout: i2, scoreMap: r2 } = e2, s2 = this.controller.signal, o2 = Date.now(), n2 = 0, l2 =
|
|
25968
|
+
let { url: t3, timeout: i2, scoreMap: r2 } = e2, s2 = this.controller.signal, o2 = Date.now(), n2 = 0, l2 = Z2(i2).then(() => {
|
|
25957
25969
|
this.controller.abort();
|
|
25958
25970
|
});
|
|
25959
25971
|
try {
|
|
@@ -25965,8 +25977,8 @@ var init_dist = __esm({
|
|
|
25965
25977
|
try {
|
|
25966
25978
|
let g2 = false;
|
|
25967
25979
|
for (; !g2; ) {
|
|
25968
|
-
let { value:
|
|
25969
|
-
g2 =
|
|
25980
|
+
let { value: f2, done: P8 } = yield h2.read();
|
|
25981
|
+
g2 = P8, f2 && (n2 += f2.byteLength, this.sendScore({ scoreMap: r2, downloadedSize: n2, startTime: o2 }));
|
|
25970
25982
|
}
|
|
25971
25983
|
} catch (g2) {
|
|
25972
25984
|
g2.name !== "AbortError" && d2.d(this.TAG, g2);
|
|
@@ -26012,8 +26024,8 @@ var init_dist = __esm({
|
|
|
26012
26024
|
r3 && (yield this.diffRolesAndPublishTracks({ oldRole: e2, newRole: t3 }), (s3 = this.listener) == null || s3.onPeerUpdate(8, r3));
|
|
26013
26025
|
});
|
|
26014
26026
|
this.diffRolesAndPublishTracks = (i3) => c2(this, [i3], function* ({ oldRole: e2, newRole: t3 }) {
|
|
26015
|
-
var g2,
|
|
26016
|
-
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, (
|
|
26027
|
+
var g2, f2, P8, k2, w2, xe;
|
|
26028
|
+
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((P8 = e2.publishParams.simulcast) == null ? void 0 : P8.screen, (k2 = t3.publishParams.simulcast) == null ? void 0 : k2.screen), h2 = (xe = (w2 = this.store.getLocalPeer()) == null ? void 0 : w2.videoTrack) == null ? void 0 : xe.enabled;
|
|
26017
26029
|
yield this.removeAudioTrack(n2), yield this.removeVideoTracks(o3 || u2), yield this.removeScreenTracks(l2 || p2);
|
|
26018
26030
|
let T = this.getSettings();
|
|
26019
26031
|
u2 && (T.isVideoMuted = !h2), yield this.publish(T), yield this.syncDevices(T, t3);
|
|
@@ -26273,8 +26285,8 @@ var init_dist = __esm({
|
|
|
26273
26285
|
}
|
|
26274
26286
|
setConfig(e) {
|
|
26275
26287
|
var t2, i2, r2;
|
|
26276
|
-
if (
|
|
26277
|
-
let s2 =
|
|
26288
|
+
if (Q2.rememberDevices(!!e.rememberDeviceSelection), e.rememberDeviceSelection) {
|
|
26289
|
+
let s2 = Q2.getSelection();
|
|
26278
26290
|
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));
|
|
26279
26291
|
}
|
|
26280
26292
|
e.autoManageVideo = e.autoManageVideo !== false, e.autoManageWakeLock = e.autoManageWakeLock !== false, this.config = e, this.setEnv();
|
|
@@ -26328,7 +26340,7 @@ var init_dist = __esm({
|
|
|
26328
26340
|
return [];
|
|
26329
26341
|
let i2 = this.getPolicyForRole(e.role.name).publishParams, r2, s2, o2;
|
|
26330
26342
|
return t2 === "regular" ? (r2 = (n2 = i2.simulcast) == null ? void 0 : n2.video, s2 = i2.video.width, o2 = i2.video.height) : t2 === "screen" && (r2 = (l2 = i2.simulcast) == null ? void 0 : l2.screen, s2 = i2.screen.width, o2 = i2.screen.height), ((u2 = r2 == null ? void 0 : r2.layers) == null ? void 0 : u2.map((p2) => {
|
|
26331
|
-
let h2 =
|
|
26343
|
+
let h2 = Ve[p2.rid], T = { width: Math.floor(s2 / p2.scaleResolutionDownBy), height: Math.floor(o2 / p2.scaleResolutionDownBy) };
|
|
26332
26344
|
return { layer: h2, resolution: T };
|
|
26333
26345
|
})) || [];
|
|
26334
26346
|
}
|
|
@@ -26500,7 +26512,7 @@ var init_dist = __esm({
|
|
|
26500
26512
|
var u2, p2;
|
|
26501
26513
|
d2.e(this.TAG, "error on audio element", s2.error);
|
|
26502
26514
|
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}`);
|
|
26503
|
-
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
|
|
26515
|
+
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 }));
|
|
26504
26516
|
}), 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);
|
|
26505
26517
|
});
|
|
26506
26518
|
this.handleAutoplayError = (e2) => c2(this, null, function* () {
|
|
@@ -26665,7 +26677,7 @@ var init_dist = __esm({
|
|
|
26665
26677
|
this.audioInputChanged = false;
|
|
26666
26678
|
this.updateOutputDevice = (e2, t3) => c2(this, null, function* () {
|
|
26667
26679
|
let i3 = this.audioOutput.find((r2) => r2.deviceId === e2);
|
|
26668
|
-
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" })),
|
|
26680
|
+
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;
|
|
26669
26681
|
});
|
|
26670
26682
|
this.getCurrentSelection = () => {
|
|
26671
26683
|
var o2, n2;
|
|
@@ -26678,7 +26690,7 @@ var init_dist = __esm({
|
|
|
26678
26690
|
let e2 = yield navigator.mediaDevices.enumerateDevices(), t3 = this.videoInput.map(this.createIdentifier), i3 = this.audioInput.map(this.createIdentifier);
|
|
26679
26691
|
this.audioInput = [], this.audioOutput = [], this.videoInput = [], e2.forEach((r2) => {
|
|
26680
26692
|
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));
|
|
26681
|
-
}), this.videoInputChanged = this.computeChange(t3, this.videoInput), this.audioInputChanged = this.computeChange(i3, this.audioInput),
|
|
26693
|
+
}), 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");
|
|
26682
26694
|
} catch (e2) {
|
|
26683
26695
|
d2.e(this.TAG, "Failed enumerating devices", e2);
|
|
26684
26696
|
}
|
|
@@ -26728,7 +26740,7 @@ var init_dist = __esm({
|
|
|
26728
26740
|
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");
|
|
26729
26741
|
return;
|
|
26730
26742
|
}
|
|
26731
|
-
let { settings: i3 } = e2, r2 = new
|
|
26743
|
+
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();
|
|
26732
26744
|
try {
|
|
26733
26745
|
yield e2.setSettings(r2, true), this.eventBus.deviceChange.publish({ devices: this.getDevices(), selection: t3, type: "video" }), this.logDevices("Video Device Change Success");
|
|
26734
26746
|
} catch (s2) {
|
|
@@ -26815,7 +26827,7 @@ var init_dist = __esm({
|
|
|
26815
26827
|
}
|
|
26816
26828
|
unblockAutoplay() {
|
|
26817
26829
|
return c2(this, null, function* () {
|
|
26818
|
-
yield this.audioSinkManager.unblockAutoplay(), yield
|
|
26830
|
+
yield this.audioSinkManager.unblockAutoplay(), yield He.resumeContext();
|
|
26819
26831
|
});
|
|
26820
26832
|
}
|
|
26821
26833
|
};
|
|
@@ -27399,8 +27411,8 @@ var init_dist = __esm({
|
|
|
27399
27411
|
var h2, T;
|
|
27400
27412
|
let p2 = (h2 = e == null ? void 0 : e.questions) == null ? void 0 : h2.find((g2) => g2.index === n2.question);
|
|
27401
27413
|
if (p2) {
|
|
27402
|
-
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 },
|
|
27403
|
-
(T = r2.questions) != null && T[n2.question - 1] && (r2.questions[n2.question - 1].responses = [...
|
|
27414
|
+
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] : [];
|
|
27415
|
+
(T = r2.questions) != null && T[n2.question - 1] && (r2.questions[n2.question - 1].responses = [...f2, g2]);
|
|
27404
27416
|
}
|
|
27405
27417
|
}), this.store.setPoll(r2), (o2 = this.listener) == null || o2.onPollsUpdate(4, [r2]);
|
|
27406
27418
|
});
|
|
@@ -27415,9 +27427,9 @@ var init_dist = __esm({
|
|
|
27415
27427
|
}
|
|
27416
27428
|
for (let l2 of r2) {
|
|
27417
27429
|
let u2 = yield this.transport.signal.getPollQuestions({ poll_id: l2.poll_id, index: 0, count: 50 }), p2 = ji(l2), h2 = this.store.getPoll(l2.poll_id);
|
|
27418
|
-
p2.questions = u2.questions.map(({ question: T, options: g2, answer:
|
|
27430
|
+
p2.questions = u2.questions.map(({ question: T, options: g2, answer: f2 }, P8) => {
|
|
27419
27431
|
var k2, w2;
|
|
27420
|
-
return M2(m({}, T), { options: g2, answer:
|
|
27432
|
+
return M2(m({}, T), { options: g2, answer: f2, responses: (w2 = (k2 = h2 == null ? void 0 : h2.questions) == null ? void 0 : k2[P8]) == null ? void 0 : w2.responses });
|
|
27421
27433
|
}), t2.push(p2), this.store.setPoll(p2);
|
|
27422
27434
|
}
|
|
27423
27435
|
return (n2 = this.listener) == null || n2.onPollsUpdate(3, t2), t2;
|
|
@@ -27751,7 +27763,7 @@ var init_dist = __esm({
|
|
|
27751
27763
|
toSdkError(e) {
|
|
27752
27764
|
if (!(e != null && e.code))
|
|
27753
27765
|
return;
|
|
27754
|
-
let t2 = e.message || "error in streaming/recording", i2 = new
|
|
27766
|
+
let t2 = e.message || "error in streaming/recording", i2 = new v2(e.code, "ServerErrors", "NONE", t2, t2);
|
|
27755
27767
|
return d2.e(this.TAG, "error in streaming/recording", i2), i2;
|
|
27756
27768
|
}
|
|
27757
27769
|
};
|
|
@@ -27930,7 +27942,7 @@ var init_dist = __esm({
|
|
|
27930
27942
|
this.iceServers = n2;
|
|
27931
27943
|
}
|
|
27932
27944
|
};
|
|
27933
|
-
|
|
27945
|
+
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 || {});
|
|
27934
27946
|
_a7 = { 0: [], 1: [], 2: [1], 3: [1], 4: [1] };
|
|
27935
27947
|
ir = ((n2) => (n2.Disconnected = "Disconnected", n2.Connecting = "Connecting", n2.Joined = "Joined", n2.Preview = "Preview", n2.Failed = "Failed", n2.Reconnecting = "Reconnecting", n2.Leaving = "Leaving", n2))(ir || {});
|
|
27936
27948
|
rr = class {
|
|
@@ -27961,29 +27973,29 @@ var init_dist = __esm({
|
|
|
27961
27973
|
}
|
|
27962
27974
|
scheduleTask(l2) {
|
|
27963
27975
|
return c2(this, arguments, function* ({ category: e, error: t2, changeState: i2, task: r2, originalState: s2, maxFailedRetries: o2 = 5, failedRetryCount: n2 = 0 }) {
|
|
27964
|
-
if (d2.d(this.TAG, "schedule: ", { category:
|
|
27976
|
+
if (d2.d(this.TAG, "schedule: ", { category: j2[e], error: t2 }), n2 === 0) {
|
|
27965
27977
|
let g2 = this.inProgress.get(e);
|
|
27966
27978
|
if (g2) {
|
|
27967
|
-
d2.d(this.TAG, `schedule: Already a task for ${
|
|
27979
|
+
d2.d(this.TAG, `schedule: Already a task for ${j2[e]} scheduled, waiting for its completion`), yield g2.promise;
|
|
27968
27980
|
return;
|
|
27969
27981
|
}
|
|
27970
|
-
let
|
|
27982
|
+
let f2 = new rr((P8, k2) => {
|
|
27971
27983
|
});
|
|
27972
|
-
this.inProgress.set(e,
|
|
27984
|
+
this.inProgress.set(e, f2), this.sendEvent(t2, e);
|
|
27973
27985
|
}
|
|
27974
27986
|
let u2 = false, p2 = _a7[e];
|
|
27975
27987
|
for (let g2 in p2) {
|
|
27976
|
-
let
|
|
27988
|
+
let f2 = p2[parseInt(g2)];
|
|
27977
27989
|
try {
|
|
27978
|
-
let
|
|
27979
|
-
|
|
27980
|
-
} catch (
|
|
27981
|
-
d2.d(this.TAG, `schedule: Stopping retry task of ${
|
|
27990
|
+
let P8 = this.inProgress.get(f2);
|
|
27991
|
+
P8 && (d2.d(this.TAG, `schedule: Suspending retry task of ${j2[e]}, waiting for ${j2[f2]} to recover`), yield P8.promise, d2.d(this.TAG, `schedule: Resuming retry task ${j2[e]} as it's dependency ${j2[f2]} is recovered`));
|
|
27992
|
+
} catch (P8) {
|
|
27993
|
+
d2.d(this.TAG, `schedule: Stopping retry task of ${j2[e]} as it's dependency ${j2[f2]} failed to recover`), u2 = true;
|
|
27982
27994
|
break;
|
|
27983
27995
|
}
|
|
27984
27996
|
}
|
|
27985
27997
|
if (n2 >= o2 || u2) {
|
|
27986
|
-
if (t2.description += `. [${
|
|
27998
|
+
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)
|
|
27987
27999
|
this.onStateChange("Failed", t2);
|
|
27988
28000
|
else
|
|
27989
28001
|
throw t2;
|
|
@@ -27991,16 +28003,16 @@ var init_dist = __esm({
|
|
|
27991
28003
|
}
|
|
27992
28004
|
i2 && this.onStateChange("Reconnecting", t2);
|
|
27993
28005
|
let h2 = this.getDelayForRetryCount(e, n2);
|
|
27994
|
-
d2.d(this.TAG, `schedule: [${
|
|
28006
|
+
d2.d(this.TAG, `schedule: [${j2[e]}] [failedRetryCount=${n2}] Scheduling retry task in ${h2}ms`);
|
|
27995
28007
|
let T;
|
|
27996
28008
|
try {
|
|
27997
28009
|
T = yield this.setTimeoutPromise(r2, h2);
|
|
27998
28010
|
} catch (g2) {
|
|
27999
|
-
T = false, d2.w(this.TAG, `[${
|
|
28011
|
+
T = false, d2.w(this.TAG, `[${j2[e]}] Un-caught exception ${g2.name} in retry-task, initiating retry`, g2);
|
|
28000
28012
|
}
|
|
28001
28013
|
if (T) {
|
|
28002
28014
|
let g2 = this.inProgress.get(e);
|
|
28003
|
-
this.inProgress.delete(e), g2 == null || g2.resolve(n2), i2 && this.inProgress.size === 0 && this.onStateChange(s2), d2.d(this.TAG, `schedule: [${
|
|
28015
|
+
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`);
|
|
28004
28016
|
} else
|
|
28005
28017
|
yield this.scheduleTask({ category: e, error: t2, changeState: i2, task: r2, originalState: s2, maxFailedRetries: o2, failedRetryCount: n2 + 1 });
|
|
28006
28018
|
});
|
|
@@ -28028,7 +28040,7 @@ var init_dist = __esm({
|
|
|
28028
28040
|
});
|
|
28029
28041
|
}
|
|
28030
28042
|
};
|
|
28031
|
-
ar = class extends
|
|
28043
|
+
ar = class extends Ce {
|
|
28032
28044
|
constructor() {
|
|
28033
28045
|
super(100);
|
|
28034
28046
|
this.localStorage = new le("hms-analytics");
|
|
@@ -28105,7 +28117,7 @@ var init_dist = __esm({
|
|
|
28105
28117
|
startLoop() {
|
|
28106
28118
|
return c2(this, null, function* () {
|
|
28107
28119
|
for (; this.shouldSendEvent; )
|
|
28108
|
-
yield
|
|
28120
|
+
yield Z2(this.pushInterval * 1e3), this.sendEvent();
|
|
28109
28121
|
});
|
|
28110
28122
|
}
|
|
28111
28123
|
sendEvent() {
|
|
@@ -28187,13 +28199,13 @@ var init_dist = __esm({
|
|
|
28187
28199
|
Object.keys(r2).forEach((s2) => {
|
|
28188
28200
|
let o2 = r2[s2], n2 = this.store.getLocalPeerTracks().find((l2) => l2.getTrackIDBeingSent() === s2);
|
|
28189
28201
|
Object.keys(o2).forEach((l2) => {
|
|
28190
|
-
var g2,
|
|
28202
|
+
var g2, f2, P8;
|
|
28191
28203
|
let u2 = o2[l2];
|
|
28192
28204
|
if (!n2)
|
|
28193
28205
|
return;
|
|
28194
|
-
let p2 = this.getTrackIdentifier(n2.trackId, u2), h2 = M2(m({}, u2), { availableOutgoingBitrate: (
|
|
28206
|
+
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 });
|
|
28195
28207
|
if (p2 && this.trackAnalytics.has(p2))
|
|
28196
|
-
(
|
|
28208
|
+
(P8 = this.trackAnalytics.get(p2)) == null || P8.pushTempStat(h2);
|
|
28197
28209
|
else if (n2) {
|
|
28198
28210
|
let k2 = new zr({ track: n2, sampleWindowSize: this.sampleWindowSize, rid: u2.rid, ssrc: u2.ssrc.toString(), kind: u2.kind });
|
|
28199
28211
|
k2.pushTempStat(h2), this.trackAnalytics.set(this.getTrackIdentifier(n2.trackId, u2), k2);
|
|
@@ -28240,9 +28252,9 @@ var init_dist = __esm({
|
|
|
28240
28252
|
handleStatsUpdate(t2) {
|
|
28241
28253
|
let i2 = t2.getAllRemoteTracksStats(), r2 = false;
|
|
28242
28254
|
Object.keys(i2).forEach((s2) => {
|
|
28243
|
-
var
|
|
28244
|
-
let o2 = this.store.getTrackById(s2), n2 = i2[s2], l2 = (
|
|
28245
|
-
let
|
|
28255
|
+
var f2, P8;
|
|
28256
|
+
let o2 = this.store.getTrackById(s2), n2 = i2[s2], l2 = (f2 = this.trackAnalytics.get(s2)) == null ? void 0 : f2.getLatestStat(), p2 = ((k2, w2) => {
|
|
28257
|
+
let xe = (w2 == null ? void 0 : w2.jitterBufferDelay) || 0, Zt = (w2 == null ? void 0 : w2.jitterBufferEmittedCount) || 0, x2 = ((k2 == null ? void 0 : k2.jitterBufferDelay) || 0) - xe, $ = ((k2 == null ? void 0 : k2.jitterBufferEmittedCount) || 0) - Zt;
|
|
28246
28258
|
return $ > 0 ? x2 * 1e3 / $ : (w2 == null ? void 0 : w2.calculatedJitterBufferDelay) || 0;
|
|
28247
28259
|
})(n2, l2), h2 = this.calculateAvSyncForStat(n2, t2), T = M2(m({}, n2), { calculatedJitterBufferDelay: p2, avSync: h2 });
|
|
28248
28260
|
if (n2.kind === "video") {
|
|
@@ -28250,7 +28262,7 @@ var init_dist = __esm({
|
|
|
28250
28262
|
T.expectedFrameHeight = k2 == null ? void 0 : k2.resolution.height, T.expectedFrameWidth = k2 == null ? void 0 : k2.resolution.width;
|
|
28251
28263
|
}
|
|
28252
28264
|
if (this.trackAnalytics.has(s2))
|
|
28253
|
-
(
|
|
28265
|
+
(P8 = this.trackAnalytics.get(s2)) == null || P8.pushTempStat(T);
|
|
28254
28266
|
else if (o2) {
|
|
28255
28267
|
let k2 = new Xr({ track: o2, sampleWindowSize: this.sampleWindowSize, ssrc: n2.ssrc.toString(), kind: n2.kind });
|
|
28256
28268
|
k2.pushTempStat(T), this.trackAnalytics.set(s2, k2);
|
|
@@ -28298,7 +28310,7 @@ var init_dist = __esm({
|
|
|
28298
28310
|
};
|
|
28299
28311
|
ur = ((t2) => (t2[t2.Publish = 0] = "Publish", t2[t2.Subscribe = 1] = "Subscribe", t2))(ur || {});
|
|
28300
28312
|
Ee = "[HMSConnection]";
|
|
28301
|
-
|
|
28313
|
+
qe = class {
|
|
28302
28314
|
constructor(e, t2) {
|
|
28303
28315
|
this.candidates = new Array();
|
|
28304
28316
|
this.role = e, this.signal = t2;
|
|
@@ -28414,7 +28426,7 @@ var init_dist = __esm({
|
|
|
28414
28426
|
return this.nativeConnection.getReceivers();
|
|
28415
28427
|
}
|
|
28416
28428
|
};
|
|
28417
|
-
qt = class extends
|
|
28429
|
+
qt = class extends qe {
|
|
28418
28430
|
constructor(t2, i2, r2) {
|
|
28419
28431
|
super(0, t2);
|
|
28420
28432
|
this.TAG = "[HMSPublishConnection]";
|
|
@@ -28461,7 +28473,7 @@ var init_dist = __esm({
|
|
|
28461
28473
|
this.nativeChannel.close();
|
|
28462
28474
|
}
|
|
28463
28475
|
};
|
|
28464
|
-
Jt = class a9 extends
|
|
28476
|
+
Jt = class a9 extends qe {
|
|
28465
28477
|
constructor(t2, i2, r2, s2) {
|
|
28466
28478
|
super(1, t2);
|
|
28467
28479
|
this.isFlagEnabled = r2;
|
|
@@ -28488,7 +28500,7 @@ var init_dist = __esm({
|
|
|
28488
28500
|
if (d2.d(this.TAG, `Failed sending ${i3}`, { request: t3, try: o2 + 1, error: n2 }), !(n2.code / 100 === 5 || n2.code === 429))
|
|
28489
28501
|
throw Error(`code=${n2.code}, message=${n2.message}`);
|
|
28490
28502
|
let u2 = (2 + Math.random() * 2) * 1e3;
|
|
28491
|
-
yield
|
|
28503
|
+
yield Le(u2);
|
|
28492
28504
|
} else
|
|
28493
28505
|
break;
|
|
28494
28506
|
}
|
|
@@ -28553,7 +28565,7 @@ var init_dist = __esm({
|
|
|
28553
28565
|
close() {
|
|
28554
28566
|
return c2(this, null, function* () {
|
|
28555
28567
|
var t2;
|
|
28556
|
-
yield
|
|
28568
|
+
yield J(a9.prototype, this, "close").call(this), (t2 = this.apiChannel) == null || t2.close();
|
|
28557
28569
|
});
|
|
28558
28570
|
}
|
|
28559
28571
|
};
|
|
@@ -28581,7 +28593,7 @@ var init_dist = __esm({
|
|
|
28581
28593
|
return this.handleError(u2, p2), d2.d(pr, `config is ${JSON.stringify(p2, null, 2)}`), un2(p2, o2);
|
|
28582
28594
|
} catch (p2) {
|
|
28583
28595
|
let h2 = yield u2.text();
|
|
28584
|
-
throw d2.e(pr, "json error", p2.message, h2), p2 instanceof
|
|
28596
|
+
throw d2.e(pr, "json error", p2.message, h2), p2 instanceof v2 ? p2 : S2.APIErrors.ServerErrors(u2.status, "INIT", p2.message);
|
|
28585
28597
|
}
|
|
28586
28598
|
} catch (u2) {
|
|
28587
28599
|
let p2 = u2;
|
|
@@ -28593,7 +28605,7 @@ var init_dist = __esm({
|
|
|
28593
28605
|
zt = class {
|
|
28594
28606
|
constructor(e) {
|
|
28595
28607
|
this.TAG = "[SIGNAL]: ";
|
|
28596
|
-
this.pongResponseTimes = new
|
|
28608
|
+
this.pongResponseTimes = new Ce(5);
|
|
28597
28609
|
this.isJoinCompleted = false;
|
|
28598
28610
|
this.pendingTrickle = [];
|
|
28599
28611
|
this.socket = null;
|
|
@@ -28635,7 +28647,7 @@ var init_dist = __esm({
|
|
|
28635
28647
|
this.callbacks.set(i2, { resolve: n2, reject: l2, metadata: { method: e } });
|
|
28636
28648
|
});
|
|
28637
28649
|
} catch (o2) {
|
|
28638
|
-
if (o2 instanceof
|
|
28650
|
+
if (o2 instanceof v2)
|
|
28639
28651
|
throw o2;
|
|
28640
28652
|
let n2 = o2;
|
|
28641
28653
|
throw S2.WebsocketMethodErrors.ServerErrors(Number(n2.code), fr(e), n2.message);
|
|
@@ -28949,7 +28961,7 @@ var init_dist = __esm({
|
|
|
28949
28961
|
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))
|
|
28950
28962
|
break;
|
|
28951
28963
|
let l2 = (2 + Math.random() * 2) * 1e3;
|
|
28952
|
-
yield
|
|
28964
|
+
yield Le(l2);
|
|
28953
28965
|
}
|
|
28954
28966
|
throw d2.e(`Sending ${e} over WS failed after ${Math.min(s2, 3)} retries`, { method: e, params: t2, error: r2 }), r2;
|
|
28955
28967
|
});
|
|
@@ -28961,7 +28973,7 @@ var init_dist = __esm({
|
|
|
28961
28973
|
let a11 = navigator.connection;
|
|
28962
28974
|
return { downlink: a11.downlink, downlinkMax: a11.downlinkMax, effectiveType: a11.effectiveType, rtt: a11.rtt, saveData: a11.saveData, type: a11.type };
|
|
28963
28975
|
};
|
|
28964
|
-
|
|
28976
|
+
I2 = "[HMSTransport]:";
|
|
28965
28977
|
Yt = class {
|
|
28966
28978
|
constructor(e, t2, i2, r2, s2, o2, n2) {
|
|
28967
28979
|
this.observer = e;
|
|
@@ -28982,16 +28994,16 @@ var init_dist = __esm({
|
|
|
28982
28994
|
try {
|
|
28983
28995
|
if (!this.subscribeConnection)
|
|
28984
28996
|
return;
|
|
28985
|
-
yield this.subscribeConnection.setRemoteDescription(e2), d2.d(
|
|
28997
|
+
yield this.subscribeConnection.setRemoteDescription(e2), d2.d(I2, `[SUBSCRIBE] Adding ${this.subscribeConnection.candidates.length} ice-candidates`, this.subscribeConnection.candidates);
|
|
28986
28998
|
for (let i3 of this.subscribeConnection.candidates)
|
|
28987
28999
|
yield this.subscribeConnection.addIceCandidate(i3);
|
|
28988
29000
|
this.subscribeConnection.candidates.length = 0;
|
|
28989
29001
|
let t3 = yield this.subscribeConnection.createAnswer();
|
|
28990
|
-
yield this.subscribeConnection.setLocalDescription(t3), this.signal.answer(t3), d2.d(
|
|
29002
|
+
yield this.subscribeConnection.setLocalDescription(t3), this.signal.answer(t3), d2.d(I2, "[role=SUBSCRIBE] onOffer renegotiation DONE \u2705");
|
|
28991
29003
|
} catch (t3) {
|
|
28992
|
-
d2.d(
|
|
29004
|
+
d2.d(I2, "[role=SUBSCRIBE] onOffer renegotiation FAILED \u274C", t3), this.state = "Failed";
|
|
28993
29005
|
let i3;
|
|
28994
|
-
t3 instanceof
|
|
29006
|
+
t3 instanceof v2 ? i3 = t3 : i3 = S2.GenericErrors.Unknown("PUBLISH", t3.message), this.observer.onFailure(i3), this.eventBus.analytics.publish(y2.subscribeFail(i3));
|
|
28995
29007
|
}
|
|
28996
29008
|
}), onTrickle: (e2) => c2(this, null, function* () {
|
|
28997
29009
|
let t3 = e2.target === 0 ? this.publishConnection : this.subscribeConnection;
|
|
@@ -29001,7 +29013,7 @@ var init_dist = __esm({
|
|
|
29001
29013
|
}), onFailure: (e2) => {
|
|
29002
29014
|
this.joinParameters && this.retryScheduler.schedule({ category: 1, error: e2, task: this.retrySignalDisconnectTask, originalState: this.state });
|
|
29003
29015
|
}, onOffline: (e2) => c2(this, null, function* () {
|
|
29004
|
-
d2.d(
|
|
29016
|
+
d2.d(I2, "socket offline", ir[this.state]);
|
|
29005
29017
|
try {
|
|
29006
29018
|
this.state !== "Leaving" && this.joinParameters && this.retryScheduler.schedule({ category: 1, error: S2.WebSocketConnectionErrors.WebSocketConnectionLost("RECONNECT_SIGNAL", e2), task: this.retrySignalDisconnectTask, originalState: this.state });
|
|
29007
29019
|
} catch (t3) {
|
|
@@ -29009,7 +29021,7 @@ var init_dist = __esm({
|
|
|
29009
29021
|
}
|
|
29010
29022
|
}), onOnline: () => {
|
|
29011
29023
|
var e2;
|
|
29012
|
-
d2.d(
|
|
29024
|
+
d2.d(I2, "socket online", ir[this.state]), this.analyticsSignalTransport.flushFailedEvents((e2 = this.store.getLocalPeer()) == null ? void 0 : e2.peerId);
|
|
29013
29025
|
}, onNetworkOnline: () => {
|
|
29014
29026
|
this.analyticsEventsService.flushFailedClientEvents();
|
|
29015
29027
|
} };
|
|
@@ -29021,7 +29033,7 @@ var init_dist = __esm({
|
|
|
29021
29033
|
yield this.performPublishRenegotiation();
|
|
29022
29034
|
}), onDTLSTransportStateChange: (e2) => {
|
|
29023
29035
|
var r3, s3, o3;
|
|
29024
|
-
if ((e2 === "failed" ? d2.w.bind(d2) : d2.d.bind(d2))(
|
|
29036
|
+
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"))
|
|
29025
29037
|
return;
|
|
29026
29038
|
let i3 = (o3 = (s3 = (r3 = this.initConfig) == null ? void 0 : r3.config) == null ? void 0 : s3.dtlsStateTimeouts) == null ? void 0 : o3[e2];
|
|
29027
29039
|
!i3 || i3 <= 0 || (this.publishDtlsStateTimer = window.setTimeout(() => {
|
|
@@ -29033,14 +29045,14 @@ var init_dist = __esm({
|
|
|
29033
29045
|
}
|
|
29034
29046
|
}, i3));
|
|
29035
29047
|
}, onDTLSTransportError: (e2) => {
|
|
29036
|
-
d2.e(
|
|
29048
|
+
d2.e(I2, `onDTLSTransportError ${e2.name} ${e2.message}`, e2), this.eventBus.analytics.publish(y2.disconnect(e2));
|
|
29037
29049
|
}, onIceConnectionChange: (e2) => c2(this, null, function* () {
|
|
29038
|
-
(e2 === "disconnected" ? d2.w.bind(d2) : d2.d.bind(d2))(
|
|
29050
|
+
(e2 === "disconnected" ? d2.w.bind(d2) : d2.d.bind(d2))(I2, `Publish ice connection state change: ${e2}`);
|
|
29039
29051
|
}), onConnectionStateChange: (e2) => c2(this, null, function* () {
|
|
29040
29052
|
var i3, r3, s3, o3, n3, l3, u3, p3;
|
|
29041
|
-
(e2 === "disconnected" ? d2.w.bind(d2) : d2.d.bind(d2))(
|
|
29042
|
-
var h2, T, g2,
|
|
29043
|
-
((h2 = this.publishConnection) == null ? void 0 : h2.connectionState) === "disconnected" && this.handleIceConnectionFailure(0, S2.WebrtcErrors.ICEDisconnected("PUBLISH", `local candidate - ${(
|
|
29053
|
+
(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(() => {
|
|
29054
|
+
var h2, T, g2, f2, P8, k2, w2;
|
|
29055
|
+
((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 = (P8 = this.publishConnection) == null ? void 0 : P8.selectedCandidatePair) == null ? void 0 : k2.remote) == null ? void 0 : w2.candidate}`));
|
|
29044
29056
|
}, 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}`)));
|
|
29045
29057
|
}), onIceCandidate: (e2) => {
|
|
29046
29058
|
var t3;
|
|
@@ -29052,20 +29064,20 @@ var init_dist = __esm({
|
|
|
29052
29064
|
this.subscribeConnectionObserver = { onApiChannelMessage: (e2) => {
|
|
29053
29065
|
this.observer.onNotification(JSON.parse(e2));
|
|
29054
29066
|
}, onTrackAdd: (e2) => {
|
|
29055
|
-
d2.d(
|
|
29067
|
+
d2.d(I2, "[Subscribe] onTrackAdd", `${e2}`), this.observer.onTrackAdd(e2);
|
|
29056
29068
|
}, onTrackRemove: (e2) => {
|
|
29057
|
-
d2.d(
|
|
29069
|
+
d2.d(I2, "[Subscribe] onTrackRemove", `${e2}`), this.observer.onTrackRemove(e2);
|
|
29058
29070
|
}, onIceConnectionChange: (e2) => c2(this, null, function* () {
|
|
29059
29071
|
var i3;
|
|
29060
|
-
if ((e2 === "disconnected" ? d2.w.bind(d2) : d2.d.bind(d2))(
|
|
29072
|
+
if ((e2 === "disconnected" ? d2.w.bind(d2) : d2.d.bind(d2))(I2, `Subscribe ice connection state change: ${e2}`), e2 === "connected") {
|
|
29061
29073
|
let r3 = this.callbacks.get(tt);
|
|
29062
29074
|
this.callbacks.delete(tt), (i3 = this.connectivityListener) == null || i3.onICESuccess(false), r3 && r3.promise.resolve(true);
|
|
29063
29075
|
}
|
|
29064
29076
|
}), onConnectionStateChange: (e2) => c2(this, null, function* () {
|
|
29065
29077
|
var i3, r3, s3, o3, n3, l3;
|
|
29066
|
-
(e2 === "disconnected" ? d2.w.bind(d2) : d2.d.bind(d2))(
|
|
29067
|
-
var u3, p3, h2, T, g2,
|
|
29068
|
-
((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 - ${(
|
|
29078
|
+
(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(() => {
|
|
29079
|
+
var u3, p3, h2, T, g2, f2, P8;
|
|
29080
|
+
((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 - ${(P8 = (f2 = (g2 = this.subscribeConnection) == null ? void 0 : g2.selectedCandidatePair) == null ? void 0 : f2.remote) == null ? void 0 : P8.candidate}`));
|
|
29069
29081
|
}, 5e3), e2 === "connected" && this.handleSubscribeConnectionConnected();
|
|
29070
29082
|
}), onIceCandidate: (e2) => {
|
|
29071
29083
|
var t3;
|
|
@@ -29075,7 +29087,7 @@ var init_dist = __esm({
|
|
|
29075
29087
|
(t3 = this.connectivityListener) == null || t3.onSelectedICECandidatePairChange(e2, false);
|
|
29076
29088
|
} };
|
|
29077
29089
|
this.handleLocalRoleUpdate = (i3) => c2(this, [i3], function* ({ oldRole: e2, newRole: t3 }) {
|
|
29078
|
-
!this.doesRoleNeedWebRTC(e2) && this.doesRoleNeedWebRTC(t3) && (d2.d(
|
|
29090
|
+
!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());
|
|
29079
29091
|
});
|
|
29080
29092
|
this.retryPublishIceFailedTask = () => c2(this, null, function* () {
|
|
29081
29093
|
if (this.publishConnection) {
|
|
@@ -29099,7 +29111,7 @@ var init_dist = __esm({
|
|
|
29099
29111
|
});
|
|
29100
29112
|
this.retrySignalDisconnectTask = () => c2(this, null, function* () {
|
|
29101
29113
|
var t3;
|
|
29102
|
-
d2.d(
|
|
29114
|
+
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));
|
|
29103
29115
|
let e2 = (t3 = this.store.getRoom()) != null && t3.joinedAt ? this.signal.isConnected && (yield this.retryPublishIceFailedTask()) : this.signal.isConnected;
|
|
29104
29116
|
return this.signal.trackUpdate(this.trackStates), e2;
|
|
29105
29117
|
});
|
|
@@ -29109,8 +29121,8 @@ var init_dist = __esm({
|
|
|
29109
29121
|
h2 !== this.state && (this.state = h2, yield this.observer.onStateChange(this.state, T));
|
|
29110
29122
|
});
|
|
29111
29123
|
this.retryScheduler = new sr(l2, this.sendErrorAnalyticsEvent.bind(this)), this.eventBus.statsUpdate.subscribe((h2) => {
|
|
29112
|
-
var g2,
|
|
29113
|
-
let T = ((
|
|
29124
|
+
var g2, f2;
|
|
29125
|
+
let T = ((f2 = (g2 = h2.getLocalPeerStats()) == null ? void 0 : g2.subscribe) == null ? void 0 : f2.bitrate) || 0;
|
|
29114
29126
|
this.maxSubscribeBitrate = Math.max(this.maxSubscribeBitrate, T);
|
|
29115
29127
|
}), this.eventBus.localAudioEnabled.subscribe(({ track: h2 }) => this.trackUpdate(h2)), this.eventBus.localVideoEnabled.subscribe(({ track: h2 }) => this.trackUpdate(h2));
|
|
29116
29128
|
}
|
|
@@ -29133,15 +29145,15 @@ var init_dist = __esm({
|
|
|
29133
29145
|
}
|
|
29134
29146
|
join(e, t2, i2, r2, s2 = false, o2) {
|
|
29135
29147
|
return c2(this, null, function* () {
|
|
29136
|
-
d2.d(
|
|
29148
|
+
d2.d(I2, "join: started \u23F0");
|
|
29137
29149
|
try {
|
|
29138
|
-
(!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(
|
|
29150
|
+
(!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"));
|
|
29139
29151
|
} catch (n2) {
|
|
29140
|
-
d2.e(
|
|
29152
|
+
d2.e(I2, `join: failed \u274C [token=${e}]`, n2), this.state = "Failed";
|
|
29141
29153
|
let l2 = n2;
|
|
29142
29154
|
throw l2.isTerminal = l2.isTerminal || l2.code === 500, yield this.observer.onStateChange(this.state, l2), l2;
|
|
29143
29155
|
}
|
|
29144
|
-
d2.d(
|
|
29156
|
+
d2.d(I2, "\u2705 join: successful"), this.state = "Joined", this.observer.onStateChange(this.state);
|
|
29145
29157
|
});
|
|
29146
29158
|
}
|
|
29147
29159
|
connect(e, t2, i2, r2, s2 = false, o2) {
|
|
@@ -29150,7 +29162,7 @@ var init_dist = __esm({
|
|
|
29150
29162
|
try {
|
|
29151
29163
|
return yield this.internalConnect(e, t2, i2, o2);
|
|
29152
29164
|
} catch (n2) {
|
|
29153
|
-
if (n2 instanceof
|
|
29165
|
+
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"))) {
|
|
29154
29166
|
let u2 = () => c2(this, null, function* () {
|
|
29155
29167
|
return yield this.internalConnect(e, t2, i2, o2), !!(this.initConfig && this.initConfig.endpoint);
|
|
29156
29168
|
});
|
|
@@ -29163,18 +29175,18 @@ var init_dist = __esm({
|
|
|
29163
29175
|
leave(e) {
|
|
29164
29176
|
return c2(this, null, function* () {
|
|
29165
29177
|
var t2, i2, r2, s2, o2;
|
|
29166
|
-
this.retryScheduler.reset(), this.joinParameters = void 0, d2.d(
|
|
29178
|
+
this.retryScheduler.reset(), this.joinParameters = void 0, d2.d(I2, "leaving in transport");
|
|
29167
29179
|
try {
|
|
29168
29180
|
let n2 = this.pluginUsageTracker.getPluginUsage("HMSKrispPlugin");
|
|
29169
29181
|
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)
|
|
29170
29182
|
try {
|
|
29171
|
-
this.signal.leave(), d2.d(
|
|
29183
|
+
this.signal.leave(), d2.d(I2, "signal leave done");
|
|
29172
29184
|
} catch (l2) {
|
|
29173
|
-
d2.w(
|
|
29185
|
+
d2.w(I2, "failed to send leave on websocket to server", l2);
|
|
29174
29186
|
}
|
|
29175
29187
|
this.analyticsEventsService.flushFailedClientEvents(), this.analyticsEventsService.reset(), yield this.signal.close();
|
|
29176
29188
|
} catch (n2) {
|
|
29177
|
-
this.eventBus.analytics.publish(y2.disconnect(n2)), d2.e(
|
|
29189
|
+
this.eventBus.analytics.publish(y2.disconnect(n2)), d2.e(I2, "leave: FAILED \u274C", n2);
|
|
29178
29190
|
} finally {
|
|
29179
29191
|
this.state = "Disconnected", this.observer.onStateChange(this.state);
|
|
29180
29192
|
}
|
|
@@ -29201,25 +29213,25 @@ var init_dist = __esm({
|
|
|
29201
29213
|
let i2 = Array.from(this.trackStates.values()).find((r2) => e.type === r2.type && e.source === r2.source);
|
|
29202
29214
|
if (i2) {
|
|
29203
29215
|
let r2 = new Nt(M2(m({}, i2), { mute: !e.enabled }));
|
|
29204
|
-
this.trackStates.set(i2.track_id, r2), d2.d(
|
|
29216
|
+
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]]));
|
|
29205
29217
|
}
|
|
29206
29218
|
}
|
|
29207
29219
|
publishTrack(e) {
|
|
29208
29220
|
return c2(this, null, function* () {
|
|
29209
|
-
e.publishedTrackId = e.getTrackIDBeingSent(), d2.d(
|
|
29221
|
+
e.publishedTrackId = e.getTrackIDBeingSent(), d2.d(I2, `\u23F3 publishTrack: trackId=${e.trackId}, toPublishTrackId=${e.publishedTrackId}`, `${e}`), this.trackStates.set(e.publishedTrackId, new Nt(e));
|
|
29210
29222
|
let t2 = new Promise((s2, o2) => {
|
|
29211
29223
|
this.callbacks.set(et, { promise: { resolve: s2, reject: o2 }, action: "PUBLISH", extra: {} });
|
|
29212
29224
|
}), i2 = e.stream;
|
|
29213
29225
|
i2.setConnection(this.publishConnection);
|
|
29214
29226
|
let r2 = this.store.getSimulcastLayers(e.source);
|
|
29215
29227
|
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(() => {
|
|
29216
|
-
d2.d(
|
|
29217
|
-
}).catch((s2) => d2.w(
|
|
29228
|
+
d2.d(I2, `Setting maxBitrate=${e.settings.maxBitrate} kpbs${e instanceof F ? ` and maxFramerate=${e.settings.maxFramerate}` : ""} for ${e.source} ${e.type} ${e.trackId}`);
|
|
29229
|
+
}).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);
|
|
29218
29230
|
});
|
|
29219
29231
|
}
|
|
29220
29232
|
unpublishTrack(e) {
|
|
29221
29233
|
return c2(this, null, function* () {
|
|
29222
|
-
if (d2.d(
|
|
29234
|
+
if (d2.d(I2, `\u23F3 unpublishTrack: trackId=${e.trackId}`, `${e}`), e.publishedTrackId && this.trackStates.has(e.publishedTrackId))
|
|
29223
29235
|
this.trackStates.delete(e.publishedTrackId);
|
|
29224
29236
|
else {
|
|
29225
29237
|
let s2 = Array.from(this.trackStates.values()).find((o2) => e.type === o2.type && e.source === o2.source);
|
|
@@ -29228,7 +29240,7 @@ var init_dist = __esm({
|
|
|
29228
29240
|
let t2 = new Promise((r2, s2) => {
|
|
29229
29241
|
this.callbacks.set(et, { promise: { resolve: r2, reject: s2 }, action: "UNPUBLISH", extra: {} });
|
|
29230
29242
|
});
|
|
29231
|
-
e.stream.removeSender(e), yield t2, yield e.cleanup(), this.store.removeTrack(e), d2.d(
|
|
29243
|
+
e.stream.removeSender(e), yield t2, yield e.cleanup(), this.store.removeTrack(e), d2.d(I2, `\u2705 unpublishTrack: trackId=${e.trackId}`, this.callbacks);
|
|
29232
29244
|
});
|
|
29233
29245
|
}
|
|
29234
29246
|
waitForLocalRoleAvailability() {
|
|
@@ -29251,8 +29263,8 @@ var init_dist = __esm({
|
|
|
29251
29263
|
try {
|
|
29252
29264
|
yield this.negotiateJoin({ name: e, data: t2, autoSubscribeVideo: i2, isWebRTC: r2 });
|
|
29253
29265
|
} catch (o2) {
|
|
29254
|
-
d2.e(
|
|
29255
|
-
let n2 = o2 instanceof
|
|
29266
|
+
d2.e(I2, "Join negotiation failed \u274C", o2);
|
|
29267
|
+
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);
|
|
29256
29268
|
if (n2.code === 410 && (n2.isTerminal = true), l2) {
|
|
29257
29269
|
this.joinRetryCount = 0, n2.isTerminal = false;
|
|
29258
29270
|
let u2 = () => c2(this, null, function* () {
|
|
@@ -29271,8 +29283,8 @@ var init_dist = __esm({
|
|
|
29271
29283
|
}
|
|
29272
29284
|
negotiateJoinWebRTC(r2) {
|
|
29273
29285
|
return c2(this, arguments, function* ({ name: e, data: t2, autoSubscribeVideo: i2 }) {
|
|
29274
|
-
if (d2.d(
|
|
29275
|
-
return d2.e(
|
|
29286
|
+
if (d2.d(I2, "\u23F3 join: Negotiating over PUBLISH connection"), !this.publishConnection)
|
|
29287
|
+
return d2.e(I2, "Publish peer connection not found, cannot negotiate"), false;
|
|
29276
29288
|
let s2 = yield this.publishConnection.createOffer();
|
|
29277
29289
|
yield this.publishConnection.setLocalDescription(s2);
|
|
29278
29290
|
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);
|
|
@@ -29284,15 +29296,15 @@ var init_dist = __esm({
|
|
|
29284
29296
|
}
|
|
29285
29297
|
negotiateJoinNonWebRTC(r2) {
|
|
29286
29298
|
return c2(this, arguments, function* ({ name: e, data: t2, autoSubscribeVideo: i2 }) {
|
|
29287
|
-
d2.d(
|
|
29299
|
+
d2.d(I2, "\u23F3 join: Negotiating Non-WebRTC");
|
|
29288
29300
|
let s2 = this.isFlagEnabled("subscribeDegradation"), o2 = this.isFlagEnabled("simulcast"), n2 = this.isFlagEnabled("onDemandTracks");
|
|
29289
29301
|
return !!(yield this.signal.join(e, t2, !i2, s2, o2, n2));
|
|
29290
29302
|
});
|
|
29291
29303
|
}
|
|
29292
29304
|
negotiateOnFirstPublish() {
|
|
29293
29305
|
return c2(this, null, function* () {
|
|
29294
|
-
if (d2.d(
|
|
29295
|
-
return d2.e(
|
|
29306
|
+
if (d2.d(I2, "\u23F3 Negotiating offer over PUBLISH connection"), !this.publishConnection)
|
|
29307
|
+
return d2.e(I2, "Publish peer connection not found, cannot negotiate"), false;
|
|
29296
29308
|
let e = yield this.publishConnection.createOffer(this.trackStates);
|
|
29297
29309
|
yield this.publishConnection.setLocalDescription(e);
|
|
29298
29310
|
let t2 = yield this.signal.offer(e, this.trackStates);
|
|
@@ -29304,21 +29316,21 @@ var init_dist = __esm({
|
|
|
29304
29316
|
}
|
|
29305
29317
|
performPublishRenegotiation(e) {
|
|
29306
29318
|
return c2(this, null, function* () {
|
|
29307
|
-
d2.d(
|
|
29319
|
+
d2.d(I2, "\u23F3 [role=PUBLISH] onRenegotiationNeeded START", this.trackStates);
|
|
29308
29320
|
let t2 = this.callbacks.get(et);
|
|
29309
29321
|
if (t2) {
|
|
29310
29322
|
if (!this.publishConnection) {
|
|
29311
|
-
d2.e(
|
|
29323
|
+
d2.e(I2, "Publish peer connection not found, cannot renegotiate");
|
|
29312
29324
|
return;
|
|
29313
29325
|
}
|
|
29314
29326
|
try {
|
|
29315
29327
|
let i2 = yield this.publishConnection.createOffer(this.trackStates, e);
|
|
29316
29328
|
yield this.publishConnection.setLocalDescription(i2), d2.time("renegotiation-offer-exchange");
|
|
29317
29329
|
let r2 = yield this.signal.offer(i2, this.trackStates);
|
|
29318
|
-
this.callbacks.delete(et), d2.timeEnd("renegotiation-offer-exchange"), yield this.publishConnection.setRemoteDescription(r2), t2.promise.resolve(true), d2.d(
|
|
29330
|
+
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");
|
|
29319
29331
|
} catch (i2) {
|
|
29320
29332
|
let r2;
|
|
29321
|
-
i2 instanceof
|
|
29333
|
+
i2 instanceof v2 ? r2 = i2 : r2 = S2.GenericErrors.Unknown("PUBLISH", i2.message), t2.promise.reject(r2), d2.d(I2, "[role=PUBLISH] onRenegotiationNeeded FAILED \u274C");
|
|
29322
29334
|
}
|
|
29323
29335
|
}
|
|
29324
29336
|
});
|
|
@@ -29331,28 +29343,28 @@ var init_dist = __esm({
|
|
|
29331
29343
|
internalConnect(e, t2, i2, r2) {
|
|
29332
29344
|
return c2(this, null, function* () {
|
|
29333
29345
|
var o2, n2, l2;
|
|
29334
|
-
d2.d(
|
|
29346
|
+
d2.d(I2, "connect: started \u23F0");
|
|
29335
29347
|
let s2 = /* @__PURE__ */ new Date();
|
|
29336
29348
|
try {
|
|
29337
29349
|
this.analyticsTimer.start("init_response_time"), this.initConfig = yield Qt.fetchInitConfig({ token: e, peerId: i2, userAgent: this.store.getUserAgent(), initEndpoint: t2, iceServers: r2 }), (o2 = this.connectivityListener) == null || o2.onInitSuccess(this.initConfig.endpoint);
|
|
29338
29350
|
let u2 = this.store.getRoom();
|
|
29339
|
-
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(
|
|
29351
|
+
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;
|
|
29340
29352
|
} catch (u2) {
|
|
29341
|
-
throw this.state !== "Reconnecting" && this.eventBus.analytics.publish(y2.connect(u2, this.getAdditionalAnalyticsProperties(), s2, /* @__PURE__ */ new Date(), t2)), d2.e(
|
|
29353
|
+
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;
|
|
29342
29354
|
}
|
|
29343
29355
|
});
|
|
29344
29356
|
}
|
|
29345
29357
|
validateNotDisconnected(e) {
|
|
29346
29358
|
if (this.state === "Disconnected")
|
|
29347
|
-
throw d2.w(
|
|
29359
|
+
throw d2.w(I2, "aborting join as transport state is disconnected"), S2.GenericErrors.ValidationFailed(`leave called before join could complete - stage=${e}`);
|
|
29348
29360
|
}
|
|
29349
29361
|
openSignal(e, t2) {
|
|
29350
29362
|
return c2(this, null, function* () {
|
|
29351
29363
|
if (!this.initConfig)
|
|
29352
29364
|
throw S2.APIErrors.InitConfigNotAvailable("INIT", "Init Config not found");
|
|
29353
|
-
d2.d(
|
|
29365
|
+
d2.d(I2, "\u23F3 internal connect: connecting to ws endpoint", this.initConfig.endpoint);
|
|
29354
29366
|
let i2 = new URL(this.initConfig.endpoint);
|
|
29355
|
-
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(
|
|
29367
|
+
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");
|
|
29356
29368
|
});
|
|
29357
29369
|
}
|
|
29358
29370
|
initRtcStatsMonitor() {
|
|
@@ -29418,7 +29430,7 @@ var init_dist = __esm({
|
|
|
29418
29430
|
}
|
|
29419
29431
|
getAdditionalAnalyticsProperties() {
|
|
29420
29432
|
var o2, n2, l2, u2, p2, h2, T, g2;
|
|
29421
|
-
let e = Ba(), t2 = typeof document != "undefined" && document.hidden, i2 = this.store.getRemoteVideoTracks().filter((
|
|
29433
|
+
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;
|
|
29422
29434
|
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 };
|
|
29423
29435
|
}
|
|
29424
29436
|
};
|
|
@@ -29497,7 +29509,7 @@ var init_dist = __esm({
|
|
|
29497
29509
|
var s2, o2, n2, l2;
|
|
29498
29510
|
if (e.error && e.type) {
|
|
29499
29511
|
let u2 = e.type.includes("audio") ? (s2 = this.localPeer) == null ? void 0 : s2.audioTrack : (o2 = this.localPeer) == null ? void 0 : o2.videoTrack;
|
|
29500
|
-
(n2 = this.errorListener) == null || n2.onError(e.error), [
|
|
29512
|
+
(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));
|
|
29501
29513
|
}
|
|
29502
29514
|
})();
|
|
29503
29515
|
};
|
|
@@ -29510,8 +29522,9 @@ var init_dist = __esm({
|
|
|
29510
29522
|
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();
|
|
29511
29523
|
});
|
|
29512
29524
|
this.sendAudioPresenceFailed = () => {
|
|
29525
|
+
var t2;
|
|
29513
29526
|
let e = S2.TracksErrors.NoAudioDetected("PREVIEW");
|
|
29514
|
-
d2.w(this.TAG, "Audio Presence Failure", this.transportState, e);
|
|
29527
|
+
d2.w(this.TAG, "Audio Presence Failure", this.transportState, e), (t2 = this.listener) == null || t2.onError(e);
|
|
29515
29528
|
};
|
|
29516
29529
|
this.sendJoinAnalyticsEvent = (e = false, t2) => {
|
|
29517
29530
|
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 })));
|
|
@@ -29654,13 +29667,13 @@ var init_dist = __esm({
|
|
|
29654
29667
|
throw S2.GenericErrors.NotReady("JOIN", "Preview is in progress, can't join");
|
|
29655
29668
|
this.analyticsTimer.start("join_time"), this.sdkState.isJoinInProgress = true;
|
|
29656
29669
|
let { roomId: i2, userId: r2, role: s2 } = nt(e.authToken), o2 = ((u2 = (l2 = this.localPeer) == null ? void 0 : l2.asRole) == null ? void 0 : u2.name) || ((h2 = (p2 = this.localPeer) == null ? void 0 : p2.role) == null ? void 0 : h2.name);
|
|
29657
|
-
(T = this.networkTestManager) == null || T.stop(), this.commonSetup(e, i2, t2), this.removeDevicesFromConfig(e), this.store.setConfig(e), this.store.createAndSetUserAgent(this.frameworkInfo),
|
|
29670
|
+
(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();
|
|
29658
29671
|
let n2 = this.store.getConfig();
|
|
29659
29672
|
n2 != null && n2.autoManageWakeLock && this.wakeLockManager.acquireLock(), this.localPeer ? (this.localPeer.name = e.userName, this.localPeer.role = this.store.getPolicyForRole(s2), this.localPeer.customerUserId = r2, this.localPeer.metadata = e.metaData, delete this.localPeer.asRole) : this.createAndAddLocalPeerToStore(e, s2, r2), this.roleChangeManager = new _t(this.store, this.transport, this.deviceManager, this.getAndPublishTracks.bind(this), this.removeTrack.bind(this), this.listener), this.eventBus.localRoleUpdate.subscribe(this.handleLocalRoleUpdate), d2.d(this.TAG, `\u23F3 Joining room ${i2}`), d2.time(`join-room-${i2}`);
|
|
29660
29673
|
try {
|
|
29661
29674
|
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);
|
|
29662
|
-
} catch (
|
|
29663
|
-
throw this.analyticsTimer.end("join_time"), this.sdkState.isJoinInProgress = false, (g2 = this.listener) == null || g2.onError(
|
|
29675
|
+
} catch (f2) {
|
|
29676
|
+
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;
|
|
29664
29677
|
}
|
|
29665
29678
|
d2.timeEnd(`join-room-${i2}`);
|
|
29666
29679
|
});
|
|
@@ -29670,20 +29683,22 @@ var init_dist = __esm({
|
|
|
29670
29683
|
}
|
|
29671
29684
|
cleanup() {
|
|
29672
29685
|
var e, t2, i2;
|
|
29673
|
-
this.cleanDeviceManagers(), this.eventBus.analytics.unsubscribe(this.sendAnalyticsEvent), this.analyticsTimer.cleanup(),
|
|
29686
|
+
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);
|
|
29674
29687
|
}
|
|
29675
29688
|
leave(e) {
|
|
29676
29689
|
return this.internalLeave(e);
|
|
29677
29690
|
}
|
|
29678
29691
|
internalLeave(e = true, t2) {
|
|
29679
29692
|
return c2(this, null, function* () {
|
|
29680
|
-
var r2, s2, o2;
|
|
29693
|
+
var r2, s2, o2, n2;
|
|
29681
29694
|
let i2 = (r2 = this.store) == null ? void 0 : r2.getRoom();
|
|
29682
29695
|
if (i2) {
|
|
29683
29696
|
for (; (this.sdkState.isPreviewInProgress || this.sdkState.isJoinInProgress) && !(t2 != null && t2.isTerminal); )
|
|
29684
|
-
yield
|
|
29685
|
-
let
|
|
29686
|
-
(s2 = this.networkTestManager) == null || s2.stop(), this.eventBus.leave.publish(t2)
|
|
29697
|
+
yield Le(100);
|
|
29698
|
+
let l2 = i2.id;
|
|
29699
|
+
(s2 = this.networkTestManager) == null || s2.stop(), this.eventBus.leave.publish(t2);
|
|
29700
|
+
let u2 = (o2 = this.localPeer) == null ? void 0 : o2.peerId;
|
|
29701
|
+
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}`);
|
|
29687
29702
|
}
|
|
29688
29703
|
});
|
|
29689
29704
|
}
|
|
@@ -29818,7 +29833,7 @@ var init_dist = __esm({
|
|
|
29818
29833
|
throw S2.GenericErrors.NotConnected("VALIDATION", "No local peer present, cannot addTrack");
|
|
29819
29834
|
if (this.localPeer.auxiliaryTracks.find((g2) => g2.trackId === e.id))
|
|
29820
29835
|
return;
|
|
29821
|
-
let r2 = e.kind, s2 = new MediaStream([e]), o2 = new
|
|
29836
|
+
let r2 = e.kind, s2 = new MediaStream([e]), o2 = new We(s2), n2 = r2 === "audio" ? ce : F, l2 = new n2(o2, e, t2, this.eventBus);
|
|
29822
29837
|
this.setPlaylistSettings({ track: e, hmsTrack: l2, source: t2 }), yield (u2 = this.transport) == null ? void 0 : u2.publish([l2]), l2.peerId = (p2 = this.localPeer) == null ? void 0 : p2.peerId, (h2 = this.localPeer) == null || h2.auxiliaryTracks.push(l2), (T = this.listener) == null || T.onTrackUpdate(0, l2, this.localPeer);
|
|
29823
29838
|
});
|
|
29824
29839
|
}
|
|
@@ -30061,7 +30076,7 @@ var init_dist = __esm({
|
|
|
30061
30076
|
publish(e, t2) {
|
|
30062
30077
|
return c2(this, null, function* () {
|
|
30063
30078
|
var i2, r2, s2;
|
|
30064
|
-
if ([this.store.getPublishParams(), !this.sdkState.published, !
|
|
30079
|
+
if ([this.store.getPublishParams(), !this.sdkState.published, !Be].every((o2) => !!o2)) {
|
|
30065
30080
|
let o2 = t2 && t2 !== ((r2 = (i2 = this.localPeer) == null ? void 0 : i2.role) == null ? void 0 : r2.name) ? () => {
|
|
30066
30081
|
var n2;
|
|
30067
30082
|
return (n2 = this.roleChangeManager) == null ? void 0 : n2.diffRolesAndPublishTracks({ oldRole: this.store.getPolicyForRole(t2), newRole: this.localPeer.role });
|
|
@@ -30102,7 +30117,7 @@ var init_dist = __esm({
|
|
|
30102
30117
|
initDeviceManagers() {
|
|
30103
30118
|
return c2(this, null, function* () {
|
|
30104
30119
|
var e, t2, i2, r2, s2;
|
|
30105
|
-
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 =
|
|
30120
|
+
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));
|
|
30106
30121
|
});
|
|
30107
30122
|
}
|
|
30108
30123
|
cleanDeviceManagers() {
|
|
@@ -30160,11 +30175,11 @@ var init_dist = __esm({
|
|
|
30160
30175
|
});
|
|
30161
30176
|
}
|
|
30162
30177
|
createAndAddLocalPeerToStore(e, t2, i2, r2) {
|
|
30163
|
-
let s2 = this.store.getPolicyForRole(t2), o2 = r2 ? this.store.getPolicyForRole(r2) : void 0, n2 = new
|
|
30178
|
+
let s2 = this.store.getPolicyForRole(t2), o2 = r2 ? this.store.getPolicyForRole(r2) : void 0, n2 = new $e({ name: e.userName || "", customerUserId: i2, metadata: e.metaData || "", role: s2, asRole: o2 || s2, type: "regular" });
|
|
30164
30179
|
this.store.addPeer(n2);
|
|
30165
30180
|
}
|
|
30166
30181
|
commonSetup(e, t2, i2) {
|
|
30167
|
-
this.stringifyMetadata(e), e.initEndpoint || (e.initEndpoint = "https://prod-init.100ms.live"), this.initStoreAndManagers(i2), this.store.getRoom() || this.store.setRoom(new
|
|
30182
|
+
this.stringifyMetadata(e), e.initEndpoint || (e.initEndpoint = "https://prod-init.100ms.live"), this.initStoreAndManagers(i2), this.store.getRoom() || this.store.setRoom(new Oe(t2));
|
|
30168
30183
|
}
|
|
30169
30184
|
removeDevicesFromConfig(e) {
|
|
30170
30185
|
this.store.getConfig() && e.settings && (delete e.settings.audioOutputDeviceId, delete e.settings.videoDeviceId, delete e.settings.audioInputDeviceId);
|
|
@@ -30291,13 +30306,13 @@ var init_dist = __esm({
|
|
|
30291
30306
|
s2 && e.namedSetState((o2) => {
|
|
30292
30307
|
o2.localPeer.id = s2;
|
|
30293
30308
|
}, "localpeer-id");
|
|
30294
|
-
}, ye), a11.getState(
|
|
30295
|
-
s2.localPeer.videoTrack = a11.getState(
|
|
30309
|
+
}, ye), a11.getState(Y2) ? e.namedSetState((s2) => {
|
|
30310
|
+
s2.localPeer.videoTrack = a11.getState(Y2);
|
|
30296
30311
|
}, "localpeer-videotrack-id") : i2 = a11.subscribe((s2) => {
|
|
30297
30312
|
s2 && e.namedSetState((o2) => {
|
|
30298
30313
|
o2.localPeer.videoTrack = s2;
|
|
30299
30314
|
}, "localpeer-videotrack-id");
|
|
30300
|
-
},
|
|
30315
|
+
}, Y2), a11.getState(ae) ? e.namedSetState((s2) => {
|
|
30301
30316
|
s2.localPeer.audioTrack = a11.getState(ae);
|
|
30302
30317
|
}, "localpeer-audiotrack-id") : r2 = a11.subscribe((s2) => {
|
|
30303
30318
|
s2 && e.namedSetState((o2) => {
|
|
@@ -30317,7 +30332,7 @@ var init_dist = __esm({
|
|
|
30317
30332
|
}
|
|
30318
30333
|
Kr(s2.remoteTrackStats, n2);
|
|
30319
30334
|
let u2 = { [o2]: e.getLocalPeerStats() };
|
|
30320
|
-
Kr(s2.peerStats, u2),
|
|
30335
|
+
Kr(s2.peerStats, u2), Ia(s2.localTrackStats, e.getLocalTrackStats(), i2.store.getLocalPeerTracks());
|
|
30321
30336
|
}, "webrtc-stats");
|
|
30322
30337
|
};
|
|
30323
30338
|
yn = (a11, e = "resetState") => {
|
|
@@ -30353,11 +30368,11 @@ var init_dist = __esm({
|
|
|
30353
30368
|
Ka = (a11) => a11.peerStats;
|
|
30354
30369
|
Zr = (a11) => a11.localTrackStats;
|
|
30355
30370
|
be = createSelector([Ka, kn], (a11, e) => a11[e]);
|
|
30356
|
-
|
|
30371
|
+
In = createSelector(be, (a11) => {
|
|
30357
30372
|
var e;
|
|
30358
30373
|
return (e = a11 == null ? void 0 : a11.subscribe) == null ? void 0 : e.packetsLost;
|
|
30359
30374
|
});
|
|
30360
|
-
|
|
30375
|
+
An = createSelector(be, (a11) => {
|
|
30361
30376
|
var e;
|
|
30362
30377
|
return (e = a11 == null ? void 0 : a11.subscribe) == null ? void 0 : e.jitter;
|
|
30363
30378
|
});
|
|
@@ -30388,18 +30403,18 @@ var init_dist = __esm({
|
|
|
30388
30403
|
Nn = createSelector([Ka, bn], (a11, e) => e ? a11[e] : void 0);
|
|
30389
30404
|
On = createSelector([Rn, $a], (a11, e) => e ? a11[e] : void 0);
|
|
30390
30405
|
es = createSelector([Zr, $a], (a11, e) => e ? a11[e] : void 0);
|
|
30391
|
-
xn =
|
|
30392
|
-
Un =
|
|
30406
|
+
xn = A2(Nn);
|
|
30407
|
+
Un = A2(On);
|
|
30393
30408
|
Bn = createSelector([Zr, Pn], (a11, e) => {
|
|
30394
30409
|
var t2;
|
|
30395
30410
|
return e ? (t2 = a11[e]) == null ? void 0 : t2[0] : void 0;
|
|
30396
30411
|
});
|
|
30397
|
-
Vn =
|
|
30412
|
+
Vn = A2(createSelector(es, (a11) => a11 == null ? void 0 : a11[0]));
|
|
30398
30413
|
Fn = createSelector([Zr, En], (a11, e) => {
|
|
30399
30414
|
var t2;
|
|
30400
30415
|
return e ? (t2 = a11[e]) == null ? void 0 : t2[0] : void 0;
|
|
30401
30416
|
});
|
|
30402
|
-
Gn =
|
|
30417
|
+
Gn = A2(createSelector(es, (a11) => a11));
|
|
30403
30418
|
}
|
|
30404
30419
|
});
|
|
30405
30420
|
|
|
@@ -40105,9 +40120,9 @@ var init_ScreenshareLayout = __esm({
|
|
|
40105
40120
|
}
|
|
40106
40121
|
});
|
|
40107
40122
|
|
|
40108
|
-
// ../../../../../../../tmp/tmp-
|
|
40109
|
-
var
|
|
40110
|
-
"../../../../../../../tmp/tmp-
|
|
40123
|
+
// ../../../../../../../tmp/tmp-2968-qBDqAe9kdYHs/1903acfa61c0/index.css
|
|
40124
|
+
var init_acfa61c0 = __esm({
|
|
40125
|
+
"../../../../../../../tmp/tmp-2968-qBDqAe9kdYHs/1903acfa61c0/index.css"() {
|
|
40111
40126
|
}
|
|
40112
40127
|
});
|
|
40113
40128
|
|
|
@@ -40129,7 +40144,7 @@ var init_WhiteboardLayout = __esm({
|
|
|
40129
40144
|
init_ProminenceLayout();
|
|
40130
40145
|
init_useUISettings();
|
|
40131
40146
|
init_constants();
|
|
40132
|
-
|
|
40147
|
+
init_acfa61c0();
|
|
40133
40148
|
WhiteboardEmbed = () => {
|
|
40134
40149
|
const isMobile = (0, import_react_use42.useMedia)(config.media.md);
|
|
40135
40150
|
const { token, endpoint, zoomToContent } = (0, import_react_sdk93.useWhiteboard)(isMobile);
|
|
@@ -44125,67 +44140,11 @@ var init_ios_perm_0 = __esm({
|
|
|
44125
44140
|
});
|
|
44126
44141
|
|
|
44127
44142
|
// src/Prebuilt/components/Notifications/PermissionErrorModal.tsx
|
|
44128
|
-
function
|
|
44143
|
+
function PermissionErrorNotificationModal() {
|
|
44129
44144
|
const notification = (0, import_react_sdk115.useHMSNotifications)(import_react_sdk115.HMSNotificationTypes.ERROR);
|
|
44130
|
-
|
|
44131
|
-
const [isSystemError, setIsSystemError] = (0, import_react223.useState)(false);
|
|
44132
|
-
const isMobile = (0, import_react_use53.useMedia)(config.media.md);
|
|
44133
|
-
(0, import_react223.useEffect)(() => {
|
|
44134
|
-
var _a8, _b7, _c, _d, _e2;
|
|
44135
|
-
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"))) {
|
|
44136
|
-
return;
|
|
44137
|
-
}
|
|
44138
|
-
console.error(`[${notification.type}]`, notification);
|
|
44139
|
-
const errorMessage = (_e2 = notification.data) == null ? void 0 : _e2.message;
|
|
44140
|
-
const hasAudio = errorMessage.includes("audio");
|
|
44141
|
-
const hasVideo = errorMessage.includes("video");
|
|
44142
|
-
const hasScreen = errorMessage.includes("screen");
|
|
44143
|
-
if (hasAudio && hasVideo) {
|
|
44144
|
-
setDeviceType("camera and microphone");
|
|
44145
|
-
} else if (hasAudio) {
|
|
44146
|
-
setDeviceType("microphone");
|
|
44147
|
-
} else if (hasVideo) {
|
|
44148
|
-
setDeviceType("camera");
|
|
44149
|
-
} else if (hasScreen) {
|
|
44150
|
-
setDeviceType("screen");
|
|
44151
|
-
}
|
|
44152
|
-
setIsSystemError(notification.data.code === 3011);
|
|
44153
|
-
}, [notification]);
|
|
44154
|
-
return deviceType ? /* @__PURE__ */ import_react223.default.createElement(Dialog.Root, { open: !!deviceType }, /* @__PURE__ */ import_react223.default.createElement(Dialog.Portal, null, /* @__PURE__ */ import_react223.default.createElement(Dialog.Overlay, null), /* @__PURE__ */ import_react223.default.createElement(
|
|
44155
|
-
Dialog.Content,
|
|
44156
|
-
{
|
|
44157
|
-
css: {
|
|
44158
|
-
w: "min(380px, 90%)",
|
|
44159
|
-
p: "$8",
|
|
44160
|
-
// overlay over Sheet.tsx
|
|
44161
|
-
zIndex: 23
|
|
44162
|
-
}
|
|
44163
|
-
},
|
|
44164
|
-
/* @__PURE__ */ import_react223.default.createElement(
|
|
44165
|
-
Dialog.Title,
|
|
44166
|
-
{
|
|
44167
|
-
css: {
|
|
44168
|
-
borderBottom: "1px solid $border_default"
|
|
44169
|
-
}
|
|
44170
|
-
},
|
|
44171
|
-
isMobile && isIOS ? /* @__PURE__ */ import_react223.default.createElement("img", { style: { maxWidth: "100%", maxHeight: "100%" }, src: ios_perm_0_default, alt: "iOS Permission flow" }) : null,
|
|
44172
|
-
isMobile && isAndroid ? /* @__PURE__ */ import_react223.default.createElement(
|
|
44173
|
-
"img",
|
|
44174
|
-
{
|
|
44175
|
-
src: android_perm_1_default,
|
|
44176
|
-
style: { maxWidth: "100%", maxHeight: "100%" },
|
|
44177
|
-
alt: "Android Permission flow "
|
|
44178
|
-
}
|
|
44179
|
-
) : null,
|
|
44180
|
-
/* @__PURE__ */ import_react223.default.createElement(Text, { variant: "h6" }, "We can't access your ", deviceType)
|
|
44181
|
-
),
|
|
44182
|
-
/* @__PURE__ */ import_react223.default.createElement(Text, { variant: "sm", css: { pt: "$4", pb: "$10", color: "$on_surface_medium" } }, isMobile && isIOS ? 'Enable permissions by reloading this page and clicking "Allow" on the pop-up, or change settings from the address bar.' : null, isMobile && isAndroid ? `To allow other users to see and hear you, click the blocked camera icon in your browser's address bar.` : null, !isMobile ? `Access to ${deviceType} is required. ` : null, isSystemError && !isMobile ? `Enable permissions for ${deviceType}${deviceType === "screen" ? "share" : ""} from sytem settings` : null, !isSystemError && !isMobile ? `Enable permissions for ${deviceType}${deviceType === "screen" ? "share" : ""} from address bar or browser settings.` : null),
|
|
44183
|
-
isMobile && isIOS ? /* @__PURE__ */ import_react223.default.createElement(import_react223.default.Fragment, null, /* @__PURE__ */ import_react223.default.createElement(Button, { onClick: () => window.location.reload(), css: { w: "100%", mb: "$6" } }, "Reload"), /* @__PURE__ */ import_react223.default.createElement(Button, { outlined: true, variant: "standard", onClick: () => setDeviceType(""), css: { w: "100%" } }, "Continue anyway")) : null,
|
|
44184
|
-
isMobile && isAndroid ? /* @__PURE__ */ import_react223.default.createElement(import_react223.default.Fragment, null, /* @__PURE__ */ import_react223.default.createElement(Button, { onClick: () => setDeviceType(""), css: { w: "100%", mb: "$6" } }, "I've allowed access"), /* @__PURE__ */ import_react223.default.createElement(Button, { outlined: true, variant: "standard", onClick: () => setDeviceType(""), css: { w: "100%" } }, "Continue anyway")) : null,
|
|
44185
|
-
!isMobile ? /* @__PURE__ */ import_react223.default.createElement(Flex, { justify: "end", css: { w: "100%" } }, /* @__PURE__ */ import_react223.default.createElement(Button, { outlined: true, variant: "standard", onClick: () => setDeviceType("") }, "Dismiss")) : null
|
|
44186
|
-
))) : null;
|
|
44145
|
+
return /* @__PURE__ */ import_react223.default.createElement(PermissionErrorModal, { error: notification == null ? void 0 : notification.data });
|
|
44187
44146
|
}
|
|
44188
|
-
var import_react223, import_react_use53, import_react_sdk115;
|
|
44147
|
+
var import_react223, import_react_use53, import_react_sdk115, PermissionErrorModal;
|
|
44189
44148
|
var init_PermissionErrorModal = __esm({
|
|
44190
44149
|
"src/Prebuilt/components/Notifications/PermissionErrorModal.tsx"() {
|
|
44191
44150
|
"use strict";
|
|
@@ -44197,6 +44156,63 @@ var init_PermissionErrorModal = __esm({
|
|
|
44197
44156
|
init_android_perm_1();
|
|
44198
44157
|
init_ios_perm_0();
|
|
44199
44158
|
init_constants();
|
|
44159
|
+
PermissionErrorModal = ({ error }) => {
|
|
44160
|
+
const [deviceType, setDeviceType] = (0, import_react223.useState)("");
|
|
44161
|
+
const [isSystemError, setIsSystemError] = (0, import_react223.useState)(false);
|
|
44162
|
+
const isMobile = (0, import_react_use53.useMedia)(config.media.md);
|
|
44163
|
+
(0, import_react223.useEffect)(() => {
|
|
44164
|
+
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"))) {
|
|
44165
|
+
return;
|
|
44166
|
+
}
|
|
44167
|
+
const errorMessage = error == null ? void 0 : error.message;
|
|
44168
|
+
const hasAudio = errorMessage.includes("audio");
|
|
44169
|
+
const hasVideo = errorMessage.includes("video");
|
|
44170
|
+
const hasScreen = errorMessage.includes("screen");
|
|
44171
|
+
if (hasAudio && hasVideo) {
|
|
44172
|
+
setDeviceType("camera and microphone");
|
|
44173
|
+
} else if (hasAudio) {
|
|
44174
|
+
setDeviceType("microphone");
|
|
44175
|
+
} else if (hasVideo) {
|
|
44176
|
+
setDeviceType("camera");
|
|
44177
|
+
} else if (hasScreen) {
|
|
44178
|
+
setDeviceType("screen");
|
|
44179
|
+
}
|
|
44180
|
+
setIsSystemError(error.code === 3011);
|
|
44181
|
+
}, [error]);
|
|
44182
|
+
return deviceType ? /* @__PURE__ */ import_react223.default.createElement(Dialog.Root, { open: !!deviceType }, /* @__PURE__ */ import_react223.default.createElement(Dialog.Portal, null, /* @__PURE__ */ import_react223.default.createElement(Dialog.Overlay, null), /* @__PURE__ */ import_react223.default.createElement(
|
|
44183
|
+
Dialog.Content,
|
|
44184
|
+
{
|
|
44185
|
+
css: {
|
|
44186
|
+
w: "min(380px, 90%)",
|
|
44187
|
+
p: "$8",
|
|
44188
|
+
// overlay over Sheet.tsx
|
|
44189
|
+
zIndex: 23
|
|
44190
|
+
}
|
|
44191
|
+
},
|
|
44192
|
+
/* @__PURE__ */ import_react223.default.createElement(
|
|
44193
|
+
Dialog.Title,
|
|
44194
|
+
{
|
|
44195
|
+
css: {
|
|
44196
|
+
borderBottom: "1px solid $border_default"
|
|
44197
|
+
}
|
|
44198
|
+
},
|
|
44199
|
+
isMobile && isIOS ? /* @__PURE__ */ import_react223.default.createElement("img", { style: { maxWidth: "100%", maxHeight: "100%" }, src: ios_perm_0_default, alt: "iOS Permission flow" }) : null,
|
|
44200
|
+
isMobile && isAndroid ? /* @__PURE__ */ import_react223.default.createElement(
|
|
44201
|
+
"img",
|
|
44202
|
+
{
|
|
44203
|
+
src: android_perm_1_default,
|
|
44204
|
+
style: { maxWidth: "100%", maxHeight: "100%" },
|
|
44205
|
+
alt: "Android Permission flow "
|
|
44206
|
+
}
|
|
44207
|
+
) : null,
|
|
44208
|
+
/* @__PURE__ */ import_react223.default.createElement(Text, { variant: "h6" }, "We can't access your ", deviceType)
|
|
44209
|
+
),
|
|
44210
|
+
/* @__PURE__ */ import_react223.default.createElement(Text, { variant: "sm", css: { pt: "$4", pb: "$10", color: "$on_surface_medium" } }, isMobile && isIOS ? 'Enable permissions by reloading this page and clicking "Allow" on the pop-up, or change settings from the address bar.' : null, isMobile && isAndroid ? `To allow other users to see and hear you, click the blocked camera icon in your browser's address bar.` : null, !isMobile ? `Access to ${deviceType} is required. ` : null, isSystemError && !isMobile ? `Enable permissions for ${deviceType}${deviceType === "screen" ? "share" : ""} from sytem settings` : null, !isSystemError && !isMobile ? `Enable permissions for ${deviceType}${deviceType === "screen" ? "share" : ""} from address bar or browser settings.` : null),
|
|
44211
|
+
isMobile && isIOS ? /* @__PURE__ */ import_react223.default.createElement(import_react223.default.Fragment, null, /* @__PURE__ */ import_react223.default.createElement(Button, { onClick: () => window.location.reload(), css: { w: "100%", mb: "$6" } }, "Reload"), /* @__PURE__ */ import_react223.default.createElement(Button, { outlined: true, variant: "standard", onClick: () => setDeviceType(""), css: { w: "100%" } }, "Continue anyway")) : null,
|
|
44212
|
+
isMobile && isAndroid ? /* @__PURE__ */ import_react223.default.createElement(import_react223.default.Fragment, null, /* @__PURE__ */ import_react223.default.createElement(Button, { onClick: () => setDeviceType(""), css: { w: "100%", mb: "$6" } }, "I've allowed access"), /* @__PURE__ */ import_react223.default.createElement(Button, { outlined: true, variant: "standard", onClick: () => setDeviceType(""), css: { w: "100%" } }, "Continue anyway")) : null,
|
|
44213
|
+
!isMobile ? /* @__PURE__ */ import_react223.default.createElement(Flex, { justify: "end", css: { w: "100%" } }, /* @__PURE__ */ import_react223.default.createElement(Button, { outlined: true, variant: "standard", onClick: () => setDeviceType("") }, "Dismiss")) : null
|
|
44214
|
+
))) : null;
|
|
44215
|
+
};
|
|
44200
44216
|
}
|
|
44201
44217
|
});
|
|
44202
44218
|
|
|
@@ -44591,7 +44607,7 @@ function Notifications() {
|
|
|
44591
44607
|
if (isNotificationDisabled) {
|
|
44592
44608
|
return null;
|
|
44593
44609
|
}
|
|
44594
|
-
return /* @__PURE__ */ import_react229.default.createElement(import_react229.default.Fragment, null, /* @__PURE__ */ import_react229.default.createElement(TrackUnmuteModal, null), /* @__PURE__ */ import_react229.default.createElement(TrackBulkUnmuteModal, null), /* @__PURE__ */ import_react229.default.createElement(TrackNotifications, null), roomState === import_react_sdk121.HMSRoomState.Connected ? /* @__PURE__ */ import_react229.default.createElement(PeerNotifications, null) : null, /* @__PURE__ */ import_react229.default.createElement(ReconnectNotifications, null), /* @__PURE__ */ import_react229.default.createElement(AutoplayBlockedModal, null), /* @__PURE__ */ import_react229.default.createElement(
|
|
44610
|
+
return /* @__PURE__ */ import_react229.default.createElement(import_react229.default.Fragment, null, /* @__PURE__ */ import_react229.default.createElement(TrackUnmuteModal, null), /* @__PURE__ */ import_react229.default.createElement(TrackBulkUnmuteModal, null), /* @__PURE__ */ import_react229.default.createElement(TrackNotifications, null), roomState === import_react_sdk121.HMSRoomState.Connected ? /* @__PURE__ */ import_react229.default.createElement(PeerNotifications, null) : null, /* @__PURE__ */ import_react229.default.createElement(ReconnectNotifications, null), /* @__PURE__ */ import_react229.default.createElement(AutoplayBlockedModal, null), /* @__PURE__ */ import_react229.default.createElement(PermissionErrorNotificationModal, null), /* @__PURE__ */ import_react229.default.createElement(InitErrorModal, null), /* @__PURE__ */ import_react229.default.createElement(ChatNotifications, null), /* @__PURE__ */ import_react229.default.createElement(HandRaisedNotifications, null), /* @__PURE__ */ import_react229.default.createElement(TranscriptionNotifications, null));
|
|
44595
44611
|
}
|
|
44596
44612
|
var import_react229, import_react_sdk121, import_react_icons108, pollToastKey;
|
|
44597
44613
|
var init_Notifications = __esm({
|
|
@@ -45398,7 +45414,7 @@ var require_react_is_production_min = __commonJS({
|
|
|
45398
45414
|
var c3 = b3 ? Symbol.for("react.element") : 60103;
|
|
45399
45415
|
var d3 = b3 ? Symbol.for("react.portal") : 60106;
|
|
45400
45416
|
var e = b3 ? Symbol.for("react.fragment") : 60107;
|
|
45401
|
-
var
|
|
45417
|
+
var f2 = b3 ? Symbol.for("react.strict_mode") : 60108;
|
|
45402
45418
|
var g2 = b3 ? Symbol.for("react.profiler") : 60114;
|
|
45403
45419
|
var h2 = b3 ? Symbol.for("react.provider") : 60109;
|
|
45404
45420
|
var k2 = b3 ? Symbol.for("react.context") : 60110;
|
|
@@ -45409,7 +45425,7 @@ var require_react_is_production_min = __commonJS({
|
|
|
45409
45425
|
var q3 = b3 ? Symbol.for("react.suspense_list") : 60120;
|
|
45410
45426
|
var r2 = b3 ? Symbol.for("react.memo") : 60115;
|
|
45411
45427
|
var t2 = b3 ? Symbol.for("react.lazy") : 60116;
|
|
45412
|
-
var
|
|
45428
|
+
var v3 = b3 ? Symbol.for("react.block") : 60121;
|
|
45413
45429
|
var w2 = b3 ? Symbol.for("react.fundamental") : 60117;
|
|
45414
45430
|
var x2 = b3 ? Symbol.for("react.responder") : 60118;
|
|
45415
45431
|
var y3 = b3 ? Symbol.for("react.scope") : 60119;
|
|
@@ -45423,7 +45439,7 @@ var require_react_is_production_min = __commonJS({
|
|
|
45423
45439
|
case m2:
|
|
45424
45440
|
case e:
|
|
45425
45441
|
case g2:
|
|
45426
|
-
case
|
|
45442
|
+
case f2:
|
|
45427
45443
|
case p2:
|
|
45428
45444
|
return a11;
|
|
45429
45445
|
default:
|
|
@@ -45457,7 +45473,7 @@ var require_react_is_production_min = __commonJS({
|
|
|
45457
45473
|
exports.Memo = r2;
|
|
45458
45474
|
exports.Portal = d3;
|
|
45459
45475
|
exports.Profiler = g2;
|
|
45460
|
-
exports.StrictMode =
|
|
45476
|
+
exports.StrictMode = f2;
|
|
45461
45477
|
exports.Suspense = p2;
|
|
45462
45478
|
exports.isAsyncMode = function(a11) {
|
|
45463
45479
|
return A3(a11) || z3(a11) === l2;
|
|
@@ -45491,13 +45507,13 @@ var require_react_is_production_min = __commonJS({
|
|
|
45491
45507
|
return z3(a11) === g2;
|
|
45492
45508
|
};
|
|
45493
45509
|
exports.isStrictMode = function(a11) {
|
|
45494
|
-
return z3(a11) ===
|
|
45510
|
+
return z3(a11) === f2;
|
|
45495
45511
|
};
|
|
45496
45512
|
exports.isSuspense = function(a11) {
|
|
45497
45513
|
return z3(a11) === p2;
|
|
45498
45514
|
};
|
|
45499
45515
|
exports.isValidElementType = function(a11) {
|
|
45500
|
-
return "string" === typeof a11 || "function" === typeof a11 || a11 === e || a11 === m2 || a11 === g2 || a11 ===
|
|
45516
|
+
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);
|
|
45501
45517
|
};
|
|
45502
45518
|
exports.typeOf = z3;
|
|
45503
45519
|
}
|
|
@@ -46431,6 +46447,7 @@ var init_AudioTest = __esm({
|
|
|
46431
46447
|
import_react241 = __toESM(require("react"));
|
|
46432
46448
|
import_react_sdk128 = require("@100mslive/react-sdk");
|
|
46433
46449
|
import_react_icons110 = require("@100mslive/react-icons");
|
|
46450
|
+
init_PermissionErrorModal();
|
|
46434
46451
|
init_components();
|
|
46435
46452
|
init_Button2();
|
|
46436
46453
|
init_Layout();
|
|
@@ -46441,12 +46458,11 @@ var init_AudioTest = __esm({
|
|
|
46441
46458
|
init_useAudioOutputTest();
|
|
46442
46459
|
init_constants();
|
|
46443
46460
|
SelectContainer = ({ children }) => /* @__PURE__ */ import_react241.default.createElement(Box, { css: { w: "calc(50% - 0.75rem)", "@lg": { w: "100%" } } }, children);
|
|
46444
|
-
MicTest = () => {
|
|
46461
|
+
MicTest = ({ setError }) => {
|
|
46445
46462
|
var _a8, _b7;
|
|
46446
46463
|
const devices = (0, import_react_sdk128.useHMSStore)(import_react_sdk128.selectDevices);
|
|
46447
46464
|
const [isRecording, setIsRecording] = (0, import_react241.useState)(false);
|
|
46448
|
-
const
|
|
46449
|
-
const [selectedMic, setSelectedMic] = (0, import_react241.useState)(audioInputDeviceId || ((_a8 = devices.audioInput[0]) == null ? void 0 : _a8.deviceId));
|
|
46465
|
+
const [selectedMic, setSelectedMic] = (0, import_react241.useState)(((_a8 = devices.audioInput[0]) == null ? void 0 : _a8.deviceId) || "default");
|
|
46450
46466
|
const trackID = (0, import_react_sdk128.useHMSStore)(import_react_sdk128.selectLocalAudioTrackID);
|
|
46451
46467
|
const audioLevel = (0, import_react_sdk128.useHMSStore)((0, import_react_sdk128.selectTrackAudioByID)(trackID));
|
|
46452
46468
|
const { audioOutputDeviceId } = (0, import_react_sdk128.useHMSStore)(import_react_sdk128.selectLocalMediaSettings);
|
|
@@ -46463,7 +46479,6 @@ var init_AudioTest = __esm({
|
|
|
46463
46479
|
onChange: (deviceId) => {
|
|
46464
46480
|
setSelectedMic(deviceId);
|
|
46465
46481
|
hmsDiagnostics.stopMicCheck();
|
|
46466
|
-
setIsRecording(false);
|
|
46467
46482
|
}
|
|
46468
46483
|
}
|
|
46469
46484
|
), /* @__PURE__ */ import_react241.default.createElement(Flex, { css: { gap: "$6", alignItems: "center" } }, /* @__PURE__ */ import_react241.default.createElement(
|
|
@@ -46471,15 +46486,23 @@ var init_AudioTest = __esm({
|
|
|
46471
46486
|
{
|
|
46472
46487
|
variant: "standard",
|
|
46473
46488
|
icon: true,
|
|
46474
|
-
onClick: () =>
|
|
46475
|
-
|
|
46476
|
-
|
|
46477
|
-
|
|
46478
|
-
|
|
46479
|
-
|
|
46489
|
+
onClick: () => {
|
|
46490
|
+
isRecording ? hmsDiagnostics.stopMicCheck() : hmsDiagnostics.startMicCheck({
|
|
46491
|
+
inputDevice: selectedMic,
|
|
46492
|
+
onError: (err) => {
|
|
46493
|
+
setError(err);
|
|
46494
|
+
},
|
|
46495
|
+
onStop: () => {
|
|
46496
|
+
setIsRecording(false);
|
|
46497
|
+
}
|
|
46498
|
+
}).then(() => {
|
|
46499
|
+
setIsRecording(true);
|
|
46500
|
+
});
|
|
46501
|
+
},
|
|
46502
|
+
disabled: devices.audioInput.length === 0 || playing
|
|
46480
46503
|
},
|
|
46481
|
-
/* @__PURE__ */ import_react241.default.createElement(import_react_icons110.MicOnIcon, null),
|
|
46482
|
-
isRecording ? "Recording
|
|
46504
|
+
isRecording ? /* @__PURE__ */ import_react241.default.createElement(import_react_icons110.StopIcon, null) : /* @__PURE__ */ import_react241.default.createElement(import_react_icons110.MicOnIcon, null),
|
|
46505
|
+
isRecording ? "Stop Recording" : "Record"
|
|
46483
46506
|
), /* @__PURE__ */ import_react241.default.createElement(
|
|
46484
46507
|
Button,
|
|
46485
46508
|
{
|
|
@@ -46552,9 +46575,9 @@ var init_AudioTest = __esm({
|
|
|
46552
46575
|
}
|
|
46553
46576
|
}
|
|
46554
46577
|
},
|
|
46555
|
-
|
|
46578
|
+
/* @__PURE__ */ import_react241.default.createElement(MicTest, { setError }),
|
|
46556
46579
|
/* @__PURE__ */ import_react241.default.createElement(SpeakerTest, null)
|
|
46557
|
-
)), /* @__PURE__ */ import_react241.default.createElement(TestFooter, { error, ctaText: "Does your audio sound good?" }));
|
|
46580
|
+
)), /* @__PURE__ */ import_react241.default.createElement(TestFooter, { error, ctaText: "Does your audio sound good?" }), /* @__PURE__ */ import_react241.default.createElement(PermissionErrorModal, { error }));
|
|
46558
46581
|
};
|
|
46559
46582
|
}
|
|
46560
46583
|
});
|
|
@@ -46900,6 +46923,7 @@ var init_VideoTest = __esm({
|
|
|
46900
46923
|
import_react244 = __toESM(require("react"));
|
|
46901
46924
|
import_react_sdk131 = require("@100mslive/react-sdk");
|
|
46902
46925
|
import_react_icons112 = require("@100mslive/react-icons");
|
|
46926
|
+
init_PermissionErrorModal();
|
|
46903
46927
|
init_components();
|
|
46904
46928
|
init_Layout();
|
|
46905
46929
|
init_Text2();
|
|
@@ -46939,7 +46963,7 @@ var init_VideoTest = __esm({
|
|
|
46939
46963
|
hmsDiagnostics.startCameraCheck(deviceId);
|
|
46940
46964
|
})
|
|
46941
46965
|
}
|
|
46942
|
-
))), /* @__PURE__ */ import_react244.default.createElement(TestFooter, { error, ctaText: "Does your video look good?" }));
|
|
46966
|
+
))), /* @__PURE__ */ import_react244.default.createElement(TestFooter, { error, ctaText: "Does your video look good?" }), /* @__PURE__ */ import_react244.default.createElement(PermissionErrorModal, { error }));
|
|
46943
46967
|
};
|
|
46944
46968
|
}
|
|
46945
46969
|
});
|