@100mslive/roomkit-react 0.3.14-alpha.8 → 0.3.14-alpha.9
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{HLSView-C7QKK3HT.js → HLSView-MWFODCX2.js} +2 -2
- package/dist/{HLSView-UMOI3RZE.css → HLSView-PJMAGWYH.css} +3 -3
- package/dist/{HLSView-UMOI3RZE.css.map → HLSView-PJMAGWYH.css.map} +1 -1
- package/dist/{chunk-EODBFJ5Y.js → chunk-VO7L2JWV.js} +320 -317
- package/dist/{chunk-EODBFJ5Y.js.map → chunk-VO7L2JWV.js.map} +4 -4
- package/dist/index.cjs.css +2 -2
- package/dist/index.cjs.css.map +1 -1
- package/dist/index.cjs.js +322 -319
- 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 +16 -16
- package/dist/meta.esbuild.json +26 -26
- package/package.json +7 -7
- package/src/Diagnostics/ConnectivityTest.tsx +1 -1
- /package/dist/{HLSView-C7QKK3HT.js.map → HLSView-MWFODCX2.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_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" };
|
112
|
+
define_process_env_default = { GITHUB_STATE: "/home/runner/work/_temp/_runner_file_commands/save_state_64e68346-fe70-4da2-95d3-209214f9bdaf", npm_package_devDependencies_ts_node: "^10.4.0", npm_package_devDependencies__types_node: "^16.11.17", npm_package_exports___index_css: "./dist/index.css", npm_package_exports___require: "./dist/index.cjs.js", STATS_TRP: "true", DEPLOYMENT_BASEPATH: "/opt/runner", DOTNET_NOLOGO: "1", npm_package_dependencies_screenfull: "^5.1.0", npm_package_dependencies_react_draggable: "^4.4.5", npm_package_dependencies__radix_ui_react_switch: "1.0.0", npm_package_dependencies__100mslive_hms_whiteboard: "0.0.4-alpha.9", USER: "runner", npm_package_devDependencies_jest: "26.6.0", npm_config_version_commit_hooks: "true", npm_config_user_agent: "yarn/1.22.22 npm/? node/v18.20.3 linux x64", npm_config_always_auth: "", NX_WORKSPACE_ROOT: "/home/runner/work/web-sdks/web-sdks", npm_package_scripts_babel: "npx storybook@latest babelrc", CI: "true", npm_package_devDependencies__size_limit_file: "^5.0.3", npm_config_bin_links: "true", npm_config_wrap_output: "", npm_package_dependencies__radix_ui_react_tabs: "1.0.0", npm_package_dependencies__100mslive_react_sdk: "0.10.14-alpha.9", RUNNER_ENVIRONMENT: "github-hosted", GITHUB_ENV: "/home/runner/work/_temp/_runner_file_commands/set_env_64e68346-fe70-4da2-95d3-209214f9bdaf", PIPX_HOME: "/opt/pipx", npm_node_execpath: "/opt/hostedtoolcache/node/18.20.3/x64/bin/node", npm_config_init_version: "1.0.0", npm_package_dependencies__emoji_mart_react: "^1.0.1", npm_package_dependencies__emoji_mart_data: "^1.0.6", npm_package_dependencies__100mslive_hms_virtual_background: "1.13.14-alpha.9", JAVA_HOME_8_X64: "/usr/lib/jvm/temurin-8-jdk-amd64", NODE_AUTH_TOKEN: "XXXXX-XXXXX-XXXXX-XXXXX", SHLVL: "1", npm_package_dependencies__radix_ui_react_tooltip: "1.0.6", npm_package_dependencies__radix_ui_react_popover: "1.0.6", npm_package_dependencies__100mslive_types_prebuilt: "0.12.9", npm_package_peerDependencies_react: ">=17.0.2 <19.0.0", npm_package_devDependencies__storybook_addon_links: "^7.0.27", npm_package_files_0: "dist", HOME: "/home/runner", npm_package_devDependencies__typescript_eslint_parser: "^5.4.0", npm_package_dependencies__radix_ui_react_dialog: "1.0.4", npm_package_devDependencies__types_react_window: "^1.8.5", npm_package_files_1: "src", npm_package_repository_directory: "packages/roomkit-react", RUNNER_TEMP: "/home/runner/work/_temp", GITHUB_EVENT_PATH: "/home/runner/work/_temp/_github_workflow/event.json", npm_package_scripts_controller: "cd packages/hls-controller && yarn start", npm_package_dependencies__stitches_react: "^1.2.8", JAVA_HOME_11_X64: "/usr/lib/jvm/temurin-11-jdk-amd64", PIPX_BIN_DIR: "/opt/pipx_bin", GITHUB_REPOSITORY_OWNER: "100mslive", npm_package_engines_node: ">=16", npm_package_devDependencies_typedoc_plugin_markdown: "^3.14.0", npm_config_init_license: "MIT", GRADLE_HOME: "/usr/share/gradle-8.8", ANDROID_NDK_LATEST_HOME: "/usr/local/lib/android/sdk/ndk/26.3.11579264", JAVA_HOME_21_X64: "/usr/lib/jvm/temurin-21-jdk-amd64", STATS_RDCL: "true", GITHUB_RETENTION_DAYS: "90", YARN_WRAP_OUTPUT: "false", npm_config_version_tag_prefix: "v", GITHUB_REPOSITORY_OWNER_ID: "73883131", POWERSHELL_DISTRIBUTION_CHANNEL: "GitHub-Actions-ubuntu22", AZURE_EXTENSION_DIR: "/opt/az/azcliextensions", GITHUB_HEAD_REF: "", npm_package_scripts_lint_fix: "yarn lint --fix", npm_config_userconfig: "/home/runner/work/_temp/.npmrc", npm_package_devDependencies__storybook_addon_a11y: "^7.0.27", SYSTEMD_EXEC_PID: "592", npm_package_scripts_postinstall: "husky install && lerna bootstrap", npm_package_devDependencies_husky: "^6.0.0", npm_package_dependencies_recordrtc: "^5.6.2", npm_package_dependencies_eventemitter2: "^6.4.9", npm_package_dependencies__radix_ui_react_label: "1.0.0", npm_package_dependencies__radix_ui_react_dropdown_menu: "2.0.5", npm_package_keywords_0: "100mslive", GITHUB_GRAPHQL_URL: "https://api.github.com/graphql", npm_package_description: "100ms Room Kit provides simple & easy to use UI components to build Live Streaming & Video Conferencing experiences in your apps.", npm_package_devDependencies_typescript: "~4.7.4", npm_package_devDependencies_typedoc: "^0.24.8", npm_package_devDependencies_babel_loader: "^8.2.5", npm_package_keywords_1: "react", GOROOT_1_20_X64: "/opt/hostedtoolcache/go/1.20.14/x64", NVM_DIR: "/home/runner/.nvm", npm_package_readmeFilename: "README.md", npm_package_devDependencies_react: "^18.1.0", npm_package_devDependencies__babel_preset_env: "^7.22.5", npm_package_keywords_2: "prebuilt", DOTNET_SKIP_FIRST_TIME_EXPERIENCE: "1", GOROOT_1_21_X64: "/opt/hostedtoolcache/go/1.21.11/x64", JAVA_HOME_17_X64: "/usr/lib/jvm/temurin-17-jdk-amd64", ImageVersion: "20240616.1.0", npm_package_devDependencies_prettier: "^2.4.1", npm_package_devDependencies_babel_jest: "^26.6.0", npm_package_scripts_dev: "node ../../scripts/dev", npm_package_keywords_3: "roomkit", RUNNER_OS: "Linux", GITHUB_API_URL: "https://api.github.com", GOROOT_1_22_X64: "/opt/hostedtoolcache/go/1.22.4/x64", SWIFT_PATH: "/usr/share/swift/usr/bin", FORCE_COLOR: "true", npm_package_dependencies__radix_ui_react_toast: "1.0.0", npm_package_dependencies__radix_ui_react_radio_group: "1.0.0", npm_package_dependencies__100mslive_hms_noise_cancellation: "0.0.1", npm_package_devDependencies__babel_preset_typescript: "^7.22.5", npm_package_exports___default: "./dist/index.js", RUNNER_USER: "runner", STATS_V3PS: "true", CHROMEWEBDRIVER: "/usr/local/share/chromedriver-linux64", JOURNAL_STREAM: "8:16186", GITHUB_WORKFLOW: "Publish Packages", _: "/usr/local/bin/yarn", npm_package_devDependencies_ts_jest: "26.5.6", npm_package_devDependencies_lerna: "^5.6.2", npm_package_devDependencies__types_jest: "^27.0.3", npm_package_devDependencies__commitlint_config_conventional: "^15.0.0", npm_package_private: "true", npm_package_dependencies__radix_ui_react_accordion: "1.0.0", npm_package_devDependencies__babel_preset_react: "^7.22.5", npm_package_module: "dist/index.js", npm_package_scripts_lint: "eslint -c .eslintrc --no-error-on-unmatched-pattern src --ext .js --ext .jsx --ext .ts --ext .tsx", npm_package_devDependencies__typescript_eslint_eslint_plugin: "^5.4.0", npm_config_registry: "https://registry.yarnpkg.com", npm_package_dependencies_react_window: "^1.8.7", npm_package_dependencies__100mslive_hls_player: "0.3.14-alpha.9", npm_package_devDependencies__types_lodash_merge: "^4.6.6", npm_package_devDependencies__storybook_cli: "^7.0.27", ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE: "/opt/actionarchivecache", STATS_D: "false", GITHUB_RUN_ID: "9643076846", STATS_VMFE: "true", npm_package_workspaces_0: "packages/*", npm_package_scripts_store: "cd packages/hms-video-store && yarn start", npm_package_devDependencies__babel_core: "^7.18.2", npm_package_dependencies_ts_pattern: "4.3.0", npm_package_devDependencies__storybook_addon_interactions: "^7.0.27", npm_package_devDependencies__storybook_addon_actions: "^7.0.27", GITHUB_REF_TYPE: "branch", BOOTSTRAP_HASKELL_NONINTERACTIVE: "1", GITHUB_WORKFLOW_SHA: "3caf5ae1abb71e5e7dede48bc4b9b8dfa5a25a8a", GITHUB_BASE_REF: "", ImageOS: "ubuntu22", npm_package_workspaces_1: "examples/*", npm_package_scripts_start: 'concurrently "yarn dev" "yarn types"', npm_config_ignore_scripts: "", NX_TASK_HASH: "45931fde6bf77d2d1cd3b95a11a2f9c9943817998bd64fda1e0d9d0cbbf7acbf", npm_package_exports___import: "./dist/index.js", GITHUB_WORKFLOW_REF: "100mslive/web-sdks/.github/workflows/publish.yml@refs/heads/publish-alpha", PERFLOG_LOCATION_SETTING: "RUNNER_PERFLOG", GITHUB_ACTION_REPOSITORY: "", npm_package_scripts_prebuilt: "cd packages/roomkit-react && yarn start", npm_package_devDependencies_postcss_loader: "^6.2.1", npm_package_devDependencies_esbuild_loader: "^4.0.2", PATH: "/tmp/yarn--1719221877947-0.7338311406643205:/home/runner/work/web-sdks/web-sdks/packages/roomkit-react/node_modules/.bin:/home/runner/.config/yarn/link/node_modules/.bin:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/opt/hostedtoolcache/node/18.20.3/x64/libexec/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/bin/node_modules/npm/bin/node-gyp-bin:/tmp/yarn--1719221877752-0.7893639730050881:/home/runner/work/web-sdks/web-sdks/packages/roomkit-react/node_modules/.bin:/home/runner/.config/yarn/link/node_modules/.bin:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/opt/hostedtoolcache/node/18.20.3/x64/libexec/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/bin/node_modules/npm/bin/node-gyp-bin:/tmp/yarn--1719221852672-0.07427928548185037:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/home/runner/.config/yarn/link/node_modules/.bin:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/opt/hostedtoolcache/node/18.20.3/x64/libexec/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/bin/node_modules/npm/bin/node-gyp-bin:/tmp/yarn--1719221852496-0.7880008360495065:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/home/runner/.config/yarn/link/node_modules/.bin:/home/runner/work/web-sdks/web-sdks/node_modules/.bin:/opt/hostedtoolcache/node/18.20.3/x64/libexec/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/bin/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/18.20.3/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin", NODE: "/opt/hostedtoolcache/node/18.20.3/x64/bin/node", ANT_HOME: "/usr/share/ant", DOTNET_MULTILEVEL_LOOKUP: "0", RUNNER_TRACKING_ID: "github_b19dd9ee-c4a0-4f55-ae8f-3ea51e07fb3d", INVOCATION_ID: "0c5c352daeb1430cbd335645819f2fd5", NPM_CONFIG_USERCONFIG: "/home/runner/work/_temp/.npmrc", RUNNER_TOOL_CACHE: "/opt/hostedtoolcache", npm_package_scripts_size: "size-limit", npm_package_devDependencies_size_limit: "^5.0.3", npm_package_name: "@100mslive/roomkit-react", npm_package_devDependencies__storybook_react_webpack5: "^7.0.27", npm_package_repository_type: "git", GITHUB_ACTION: "__run_3", GITHUB_RUN_NUMBER: "586", GITHUB_TRIGGERING_ACTOR: "github-actions[bot]", RUNNER_ARCH: "X64", XDG_RUNTIME_DIR: "/run/user/1001", AGENT_TOOLSDIRECTORY: "/opt/hostedtoolcache", npm_package_lint_staged____js_ts_jsx_tsx_: "eslint", npm_package_devDependencies_babel_plugin_istanbul: "^6.1.1", LERNA_PACKAGE_NAME: "@100mslive/roomkit-react", npm_package_dependencies__radix_ui_react_select: "1.0.0", npm_package_size_limit_0_limit: "20 KB", npm_package_devDependencies__commitlint_cli: "^15.0.0", LANG: "C.UTF-8", VCPKG_INSTALLATION_ROOT: "/usr/local/share/vcpkg", npm_package_size_limit_1_limit: "20 KB", npm_package_devDependencies_eslint_plugin_simple_import_sort: "^8.0.0", npm_package_devDependencies_eslint: "^8.9.0", npm_package_dependencies_react_intersection_observer: "^9.4.3", npm_package_devDependencies__types_mdx: "2.0.2", CONDA: "/usr/share/miniconda", RUNNER_NAME: "GitHub Actions 469", XDG_CONFIG_HOME: "/home/runner/.config", STATS_VMD: "true", GITHUB_REF_NAME: "publish-alpha", GITHUB_REPOSITORY: "100mslive/web-sdks", STATS_D_D: "false", npm_lifecycle_script: "rm -rf dist && node ../../scripts/build-webapp", npm_package_size_limit_2_limit: "400 KB", npm_package_resolutions_loader_utils: "^2.0.4", npm_package_devDependencies_dotenv: "^14.2.0", npm_package_dependencies__radix_ui_react_slider: "1.0.0", npm_package_scripts_types_build: "tsc -p tsconfig.json", npm_package_main: "dist/index.cjs.js", STATS_UE: "true", ANDROID_NDK_ROOT: "/usr/local/lib/android/sdk/ndk/25.2.9519653", GITHUB_ACTION_REF: "", DEBIAN_FRONTEND: "noninteractive", npm_package_size_limit_3_limit: "20 KB", npm_package_size_limit_0_path: "packages/hms-video-store/dist/index.cjs.js", npm_package_scripts_cypress_open: "cypress open", npm_package_scripts_lerna_publish: "lerna publish from-package --dist-tag $PUBLISH_FLAG --yes --no-verify-access", npm_package_scripts_test: "yarn build --no-private && lerna run test", npm_package_devDependencies_concurrently: "^6.4.0", npm_config_version_git_message: "v%s", npm_package_dependencies__radix_ui_react_checkbox: "1.0.0", npm_package_dependencies__100mslive_react_icons: "0.10.14-alpha.9", npm_package_scripts_types: "tsc -w", GITHUB_REPOSITORY_ID: "429826515", GITHUB_ACTIONS: "true", npm_lifecycle_event: "build:only", npm_package_version: "0.3.14-alpha.9", npm_package_size_limit_4_limit: "20 KB", npm_package_size_limit_1_path: "packages/hms-video-store/dist/index.js", npm_package_scripts_build_only: "rm -rf dist && node ../../scripts/build-webapp", npm_package_devDependencies__types_react: "^18.1.0", npm_package_sideEffects: "false", npm_package_repository_url: "https://github.com/100mslive/web-sdks.git", npm_package_source: "src/index.ts", GITHUB_REF_PROTECTED: "true", npm_config_argv: '{"remain":[],"cooked":["run","test"],"original":["test"]}', npm_package_size_limit_5_limit: "20 KB", npm_package_size_limit_2_path: "packages/roomkit-react/dist/index.cjs.js", npm_package_scripts_build: "yarn build:only && yarn types:build", npm_package_devDependencies_tslib: "^2.2.0", npm_package_devDependencies_nx: "^14.5.1", npm_package_devDependencies_lint_staged: "^12.0.3", NX_CLI_SET: "true", npm_package_dependencies_uuid: "^8.3.2", npm_package_dependencies_react_virtualized_auto_sizer: "^1.0.7", npm_package_dependencies_lodash_merge: "^4.6.2", npm_package_dependencies_emoji_mart: "^5.2.2", GITHUB_WORKSPACE: "/home/runner/work/web-sdks/web-sdks", ACCEPT_EULA: "Y", GITHUB_JOB: "publish_packages", RUNNER_PERFLOG: "/home/runner/perflog", npm_package_size_limit_6_limit: "150 KB", npm_package_size_limit_3_path: "packages/roomkit-react/dist/index.js", npm_package_devDependencies_cypress: "^9.5.2", GITHUB_SHA: "3caf5ae1abb71e5e7dede48bc4b9b8dfa5a25a8a", GITHUB_RUN_ATTEMPT: "1", npm_package_size_limit_7_limit: "100 KB", npm_package_size_limit_4_path: "packages/hms-virtual-background/dist/index.cjs.js", npm_config_version_git_tag: "true", npm_config_version_git_sign: "", npm_package_dependencies_qrcode_react: "^3.1.0", GITHUB_REF: "refs/heads/publish-alpha", GITHUB_ACTOR: "github-actions[bot]", ANDROID_SDK_ROOT: "/usr/local/lib/android/sdk", npm_package_license: "MIT", npm_package_size_limit_5_path: "packages/hms-virtual-background/dist/index.js", npm_config_strict_ssl: "true", LEIN_HOME: "/usr/local/lib/lein", npm_package_size_limit_6_path: "packages/react-icons/dist/index.cjs.js", npm_package_scripts_format: "prettier -w src/**", npm_package_devDependencies_eslint_plugin_prettier: "^4.0.0", npm_package_devDependencies_eslint_config_react_app: "^7.0.0", NX_TASK_TARGET_PROJECT: "@100mslive/roomkit-react", GITHUB_PATH: "/home/runner/work/_temp/_runner_file_commands/add_path_64e68346-fe70-4da2-95d3-209214f9bdaf", JAVA_HOME: "/usr/lib/jvm/temurin-11-jdk-amd64", PWD: "/home/runner/work/web-sdks/web-sdks/packages/roomkit-react", GITHUB_ACTOR_ID: "41898282", RUNNER_WORKSPACE: "/home/runner/work/web-sdks", npm_execpath: "/usr/local/lib/node_modules/yarn/bin/yarn.js", npm_package_size_limit_7_path: "packages/react-icons/dist/index.js", npm_package_scripts_ybys: "yarn && yarn build --no-private && yarn storybook", npm_package_dependencies__radix_ui_react_progress: "1.0.0", HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS: "3650", STATS_TIS: "mining", GITHUB_EVENT_NAME: "workflow_dispatch", HOMEBREW_NO_AUTO_UPDATE: "1", ANDROID_HOME: "/usr/local/lib/android/sdk", GITHUB_SERVER_URL: "https://github.com", GECKOWEBDRIVER: "/usr/local/share/gecko_driver", LEIN_JAR: "/usr/local/lib/lein/self-installs/leiningen-2.11.2-standalone.jar", GHCUP_INSTALL_BASE_PREFIX: "/usr/local", GITHUB_OUTPUT: "/home/runner/work/_temp/_runner_file_commands/set_output_64e68346-fe70-4da2-95d3-209214f9bdaf", npm_package_scripts_prestart: "rm -rf dist && yarn types:build", npm_package_author_name: "100ms", EDGEWEBDRIVER: "/usr/local/share/edge_driver", STATS_EXT: "true", npm_package_scripts_build_storybook: "sb build", npm_package_devDependencies_postcss: "^8.4.5", npm_package_devDependencies_esbuild: "^0.18.13", npm_config_save_prefix: "^", npm_config_ignore_optional: "", npm_package_dependencies_worker_timers: "^7.0.40", npm_package_typings: "dist/index.d.ts", ANDROID_NDK: "/usr/local/lib/android/sdk/ndk/25.2.9519653", SGX_AESM_ADDR: "1", CHROME_BIN: "/usr/bin/google-chrome", npm_package_scripts_storybook: "sb dev -p 6006", npm_package_devDependencies_esbuild_plugin_postcss2: "0.1.1", npm_package_dependencies_react_swipeable: "^7.0.1", npm_package_devDependencies_babel_plugin_react_require: "3.1.3", npm_package_devDependencies__storybook_testing_library: "^0.2.0", npm_package_devDependencies__storybook_addon_essentials: "^7.0.27", SELENIUM_JAR_PATH: "/usr/share/java/selenium-server.jar", STATS_EXTP: "https://provjobdsettingscdn.blob.core.windows.net/settings/provjobdsettings-0.5.181+6/provjobd.data", npm_package_scripts_reactsdk: "cd packages/react-sdk && yarn start", npm_package_dependencies_react_use: "^17.4.0", npm_package_dependencies__radix_ui_react_collapsible: "1.0.0", npm_package_devDependencies_storybook_dark_mode: "^3.0.0", npm_package_devDependencies__storybook_react: "^7.0.27", INIT_CWD: "/home/runner/work/web-sdks/web-sdks", ANDROID_NDK_HOME: "/usr/local/lib/android/sdk/ndk/25.2.9519653", GITHUB_STEP_SUMMARY: "/home/runner/work/_temp/_runner_file_commands/step_summary_64e68346-fe70-4da2-95d3-209214f9bdaf" };
|
113
113
|
}
|
114
114
|
});
|
115
115
|
|
@@ -20373,28 +20373,28 @@ var require_lib = __commonJS({
|
|
20373
20373
|
});
|
20374
20374
|
|
20375
20375
|
// ../hms-video-store/dist/index.js
|
20376
|
-
function
|
20376
|
+
function xe(a11, e) {
|
20377
20377
|
let t2, i2;
|
20378
20378
|
if (e)
|
20379
20379
|
for (let r2 of e.auxiliaryTracks) {
|
20380
20380
|
let s2 = a11[r2];
|
20381
|
-
Za(s2) && (i2 =
|
20381
|
+
Za(s2) && (i2 = ut(s2) ? s2 : i2, t2 = pt(s2) ? s2 : t2);
|
20382
20382
|
}
|
20383
20383
|
return { video: t2, audio: i2 };
|
20384
20384
|
}
|
20385
|
-
function
|
20385
|
+
function ut(a11) {
|
20386
20386
|
return a11 && a11.type === "audio";
|
20387
20387
|
}
|
20388
|
-
function
|
20388
|
+
function pt(a11) {
|
20389
20389
|
return a11 && a11.type === "video";
|
20390
20390
|
}
|
20391
20391
|
function Za(a11) {
|
20392
20392
|
return a11 && a11.source === "screen";
|
20393
20393
|
}
|
20394
|
-
function
|
20394
|
+
function ii(a11) {
|
20395
20395
|
return a11 && a11.source === "audioplaylist";
|
20396
20396
|
}
|
20397
|
-
function
|
20397
|
+
function ht(a11) {
|
20398
20398
|
return a11 && a11.source === "videoplaylist";
|
20399
20399
|
}
|
20400
20400
|
function os(a11) {
|
@@ -20406,7 +20406,7 @@ function je(a11, e) {
|
|
20406
20406
|
function ns(a11, e) {
|
20407
20407
|
return e && a11.tracks[e] ? a11.tracks[e].displayEnabled : false;
|
20408
20408
|
}
|
20409
|
-
function
|
20409
|
+
function mt(a11) {
|
20410
20410
|
var r2;
|
20411
20411
|
let e = false, t2 = false, i2 = false;
|
20412
20412
|
return (r2 = a11 == null ? void 0 : a11.publishParams) != null && r2.allowed && (e = a11.publishParams.allowed.includes("video"), t2 = a11.publishParams.allowed.includes("audio"), i2 = a11.publishParams.allowed.includes("screen")), { video: e, audio: t2, screen: i2 };
|
@@ -20435,9 +20435,9 @@ function fr(a11) {
|
|
20435
20435
|
function oe(a11) {
|
20436
20436
|
return a11 != null;
|
20437
20437
|
}
|
20438
|
-
function
|
20438
|
+
function Tt(a11 = "prod", e) {
|
20439
20439
|
let t2 = "web", i2 = Qe !== "LOCAL" && a11 === "prod" ? "prod" : "debug";
|
20440
|
-
if (
|
20440
|
+
if (Ue)
|
20441
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
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 });
|
@@ -20525,7 +20525,7 @@ function Es() {
|
|
20525
20525
|
};
|
20526
20526
|
})) };
|
20527
20527
|
}
|
20528
|
-
function
|
20528
|
+
function ai(a11, e = 300) {
|
20529
20529
|
let t2;
|
20530
20530
|
return function(...i2) {
|
20531
20531
|
clearTimeout(t2), t2 = void 0;
|
@@ -20557,23 +20557,9 @@ function xm(a11) {
|
|
20557
20557
|
function Pa(a11) {
|
20558
20558
|
return a11 instanceof se || a11 instanceof U2;
|
20559
20559
|
}
|
20560
|
-
function nt(a11) {
|
20561
|
-
if (!a11 || a11.length === 0)
|
20562
|
-
throw S2.APIErrors.InvalidTokenFormat("INIT", "Token cannot be an empty string or undefined or null");
|
20563
|
-
let e = a11.split(".");
|
20564
|
-
if (e.length !== 3)
|
20565
|
-
throw S2.APIErrors.InvalidTokenFormat("INIT", "Expected 3 '.' separate fields - header, payload and signature respectively");
|
20566
|
-
let t2 = atob(e[1]);
|
20567
|
-
try {
|
20568
|
-
let i2 = JSON.parse(t2);
|
20569
|
-
return { roomId: i2.room_id, userId: i2.user_id, role: i2.role };
|
20570
|
-
} catch (i2) {
|
20571
|
-
throw S2.APIErrors.InvalidTokenFormat("INIT", `couldn't parse to json - ${i2.message}`);
|
20572
|
-
}
|
20573
|
-
}
|
20574
20560
|
function Na(a11, e) {
|
20575
20561
|
var r2;
|
20576
|
-
let t2 =
|
20562
|
+
let t2 = $t.parse(a11.sdp);
|
20577
20563
|
if (!((r2 = t2.origin) != null && r2.username.startsWith("mozilla")))
|
20578
20564
|
return a11;
|
20579
20565
|
let i2 = e ? Array.from(e.values()) : [];
|
@@ -20581,13 +20567,13 @@ function Na(a11, e) {
|
|
20581
20567
|
var l2, u2, p2;
|
20582
20568
|
let o2 = (l2 = s2.msid) == null ? void 0 : l2.split(" ")[0], n2 = (u2 = i2.find((h2) => h2.type === s2.type && h2.stream_id === o2)) == null ? void 0 : u2.track_id;
|
20583
20569
|
n2 && (s2.msid = (p2 = s2.msid) == null ? void 0 : p2.replace(/\s(.+)/, ` ${n2}`));
|
20584
|
-
}), { type: a11.type, sdp:
|
20570
|
+
}), { type: a11.type, sdp: $t.write(t2) };
|
20585
20571
|
}
|
20586
20572
|
function Oa(a11, e) {
|
20587
20573
|
var s2;
|
20588
20574
|
if (!(a11 != null && a11.sdp) || !e)
|
20589
20575
|
return;
|
20590
|
-
let i2 =
|
20576
|
+
let i2 = $t.parse(a11.sdp).media.find((o2) => oe(o2.mid) && parseInt(o2.mid) === parseInt(e));
|
20591
20577
|
return (s2 = i2 == null ? void 0 : i2.msid) == null ? void 0 : s2.split(" ")[1];
|
20592
20578
|
}
|
20593
20579
|
function xa(a11) {
|
@@ -20599,14 +20585,28 @@ function ln2(a11, e, t2, i2) {
|
|
20599
20585
|
return i2 && i2.trim().length > 0 && r2.searchParams.set("region", i2.trim()), r2.searchParams.set("peer_id", e), r2.searchParams.set("user_agent_v2", t2), r2.toString();
|
20600
20586
|
} catch (r2) {
|
20601
20587
|
let s2 = r2;
|
20602
|
-
throw d2.e(
|
20588
|
+
throw d2.e(ur, s2.name, s2.message), s2;
|
20603
20589
|
}
|
20604
20590
|
}
|
20605
20591
|
function un2(a11, e) {
|
20606
20592
|
var t2;
|
20607
20593
|
return M2(m({}, a11), { rtcConfiguration: M2(m({}, a11.rtcConfiguration), { iceServers: Ua((t2 = a11.rtcConfiguration) == null ? void 0 : t2.ice_servers, e) }) });
|
20608
20594
|
}
|
20609
|
-
|
20595
|
+
function pr(a11) {
|
20596
|
+
if (!a11 || a11.length === 0)
|
20597
|
+
throw S2.APIErrors.InvalidTokenFormat("INIT", "Token cannot be an empty string or undefined or null");
|
20598
|
+
let e = a11.split(".");
|
20599
|
+
if (e.length !== 3)
|
20600
|
+
throw S2.APIErrors.InvalidTokenFormat("INIT", "Expected 3 '.' separate fields - header, payload and signature respectively");
|
20601
|
+
let t2 = atob(e[1]);
|
20602
|
+
try {
|
20603
|
+
let i2 = JSON.parse(t2);
|
20604
|
+
return { roomId: i2.room_id, userId: i2.user_id, role: i2.role };
|
20605
|
+
} catch (i2) {
|
20606
|
+
throw S2.APIErrors.InvalidTokenFormat("INIT", `couldn't parse to json - ${i2.message}`);
|
20607
|
+
}
|
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, $t, import_eventemitter24, import_uuid9, import_uuid10, qa, ja, Ja, Zt, Qa, is, rs, za, ts, m, M2, mr, Ya, J, c2, Mr, Sr, ei, ti, Xa, ss, gr, as, cs, eo, d2, Je, ge, O2, ds, Ue, io, tc, Te, ps, Tr, ls, us, hs, ri, Re, Ie, ms, Qe, E2, v2, so, S2, vr, Ss, le, gs, Ts, St, gt, fs, vs, H2, y2, kr, Q2, Pr, Er, ne, si, co, lo, ft, He, Ce, Ps, mo, So, oi, br, bs, Rs, Is, As, Hs, Be, Cs, ee, Ve, z2, Fe, De, ze, ce, se, Ye, vt, To, ws, Rr, _s, Ir, Ns, Xe, Ar, Hr, Mt, Ze, Os, vo, Mo, yt, ni, yo, ci, Cr, pe, di, ve, F, et, li, tt, Us, Bs, kt, G2, Vs, Fs, Me, Dr, wr, Gs, Ws, U2, _r, Ge, fe, $s, Ks, Eo, Or, bo, qs, js, Pt, Nr, xr, ui, pi, it, rt, We, Et, he, hi, st, we, mi, Si, gi, bt, B2, Ao, Wh, $h, K, Ti, 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, Rt, _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, It, b2, Gr, At, pa, xo, Uo, q2, Wr, Bo, Vo, Fo, Go, Wo, X2, Om, Bm, Vm, fi, 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, Mi, Ht, yi, ka, $r, ki, Pi, Ea, ba, Ra, Kr, Ia, qr, $e, jr, Ei, re, Ct, _2, Lt, bi, Ri, Aa, Ha, ot, Ca, Ii, tn2, de, Ne, Ai, rn2, La, Da, Hi, Ke, Ci, Dt, Li, Di, wi, wt, Jr, Pe, _t, Nt, _i, Ni, wa, Ot, Oi, xt, xi, V, Ut, Ui, Bi, Vi, nt, Fi, Gi, C, Wi, $i, Bt, Ki, Vt, qi, ji, Ji, Qi, zi, Yi, Xi, Zi, er, j2, _a7, tr, ir, rr, sr, ar, or, ct, dt, nr, cr, Ft, Gt, zr, Wt, Xr, lr, Ee, qe, Kt, qt, jt, Ua, ur, Jt, Qt, Ba, I2, zt, Fa, hr, lt, Wa, Ga, vn2, Mn, yn, Yt, 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";
|
@@ -20632,7 +20632,7 @@ var init_dist = __esm({
|
|
20632
20632
|
import_eventemitter22 = require("eventemitter2");
|
20633
20633
|
import_uuid8 = require("uuid");
|
20634
20634
|
import_eventemitter23 = require("eventemitter2");
|
20635
|
-
|
20635
|
+
$t = __toESM(require_lib());
|
20636
20636
|
import_eventemitter24 = __toESM(require("eventemitter2"));
|
20637
20637
|
import_uuid9 = require("uuid");
|
20638
20638
|
import_uuid10 = require("uuid");
|
@@ -20640,7 +20640,7 @@ var init_dist = __esm({
|
|
20640
20640
|
qa = Object.defineProperty;
|
20641
20641
|
ja = Object.defineProperties;
|
20642
20642
|
Ja = Object.getOwnPropertyDescriptors;
|
20643
|
-
|
20643
|
+
Zt = Object.getOwnPropertySymbols;
|
20644
20644
|
Qa = Object.getPrototypeOf;
|
20645
20645
|
is = Object.prototype.hasOwnProperty;
|
20646
20646
|
rs = Object.prototype.propertyIsEnumerable;
|
@@ -20649,8 +20649,8 @@ var init_dist = __esm({
|
|
20649
20649
|
m = (a11, e) => {
|
20650
20650
|
for (var t2 in e || (e = {}))
|
20651
20651
|
is.call(e, t2) && ts(a11, t2, e[t2]);
|
20652
|
-
if (
|
20653
|
-
for (var t2 of
|
20652
|
+
if (Zt)
|
20653
|
+
for (var t2 of Zt(e))
|
20654
20654
|
rs.call(e, t2) && ts(a11, t2, e[t2]);
|
20655
20655
|
return a11;
|
20656
20656
|
};
|
@@ -20659,8 +20659,8 @@ var init_dist = __esm({
|
|
20659
20659
|
var t2 = {};
|
20660
20660
|
for (var i2 in a11)
|
20661
20661
|
is.call(a11, i2) && e.indexOf(i2) < 0 && (t2[i2] = a11[i2]);
|
20662
|
-
if (a11 != null &&
|
20663
|
-
for (var i2 of
|
20662
|
+
if (a11 != null && Zt)
|
20663
|
+
for (var i2 of Zt(a11))
|
20664
20664
|
e.indexOf(i2) < 0 && rs.call(a11, i2) && (t2[i2] = a11[i2]);
|
20665
20665
|
return t2;
|
20666
20666
|
};
|
@@ -20683,11 +20683,11 @@ 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.9", license: "MIT", repository: { type: "git", url: "https://github.com/100mslive/web-sdks.git", directory: "packages/hms-video-store" }, main: "dist/index.cjs.js", module: "dist/index.js", typings: "dist/index.d.ts", files: ["dist", "src"], engines: { node: ">=12" }, exports: { ".": { require: "./dist/index.cjs.js", import: "./dist/index.js", default: "./dist/index.js" } }, sideEffects: false, scripts: { prestart: "rm -rf dist && yarn types:build", start: 'concurrently "yarn dev" "yarn types"', dev: "node ../../scripts/dev", "build:only": "node ../../scripts/build", build: "yarn build:only && yarn types:build", types: "tsc -w", "types:build": "tsc -p tsconfig.json", format: "prettier --write src/**/*.ts", test: "jest --maxWorkers=1", "test:watch": "jest --watch", "test:coverage": "jest --coverage", lint: "eslint -c ../../.eslintrc .", "lint:fix": "yarn lint --fix", prepare: "yarn build", size: "size-limit", analyze: "size-limit --why", docs: "rm -rf ./docs && typedoc && rm -f ./docs/README.md && mkdir ./docs/home &&mv ./docs/modules.md ./docs/home/content.md && node ../../scripts/docs-store && npx prettier --write './docs/**/*'" }, name: "@100mslive/hms-video-store", author: "100ms", dependencies: { eventemitter2: "^6.4.9", immer: "^9.0.6", "lodash.isequal": "^4.5.0", reselect: "4.0.0", "sdp-transform": "^2.14.1", "ua-parser-js": "^1.0.1", uuid: "^8.3.2", "webrtc-adapter": "^8.0.0", zustand: "3.5.7" }, devDependencies: { "@types/dom-screen-wake-lock": "^1.0.1", "@types/lodash.isequal": "^4.5.8", "@types/sdp-transform": "^2.4.4", "@types/ua-parser-js": "^0.7.36", "@types/uuid": "^8.3.0", "jest-canvas-mock": "^2.3.1", "jsdom-worker": "^0.3.0", tslib: "^2.2.0" }, description: "@100mslive Core SDK which abstracts the complexities of webRTC while providing a reactive store for data management with a unidirectional data flow", keywords: ["video", "webrtc", "conferencing", "100ms"] };
|
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
|
-
|
20690
|
-
|
20689
|
+
ei = () => ({ room: { id: "", isConnected: false, name: "", peers: [], localPeer: "", roomState: "Disconnected", recording: { browser: { running: false }, server: { running: false }, hls: { running: false } }, rtmp: { running: false }, hls: { running: false, variants: [] }, sessionId: "" }, peers: {}, tracks: {}, playlist: { audio: { list: {}, selection: { id: "", hasPrevious: false, hasNext: false }, progress: 0, volume: 0, currentTime: 0, playbackRate: 1 }, video: { list: {}, selection: { id: "", hasPrevious: false, hasNext: false }, progress: 0, volume: 0, currentTime: 0, playbackRate: 1 } }, messages: { byID: {}, allIDs: [] }, speakers: {}, connectionQualities: {}, settings: { audioInputDeviceId: "", audioOutputDeviceId: "", videoInputDeviceId: "" }, devices: { audioInput: [], audioOutput: [], videoInput: [] }, roles: {}, roleChangeRequests: [], errors: [], sessionStore: {}, templateAppData: {}, polls: {}, whiteboards: {}, hideLocalPeer: false });
|
20690
|
+
ti = () => ({ peerStats: {}, remoteTrackStats: {}, localTrackStats: {}, localPeer: { id: "" } });
|
20691
20691
|
Xa = ((e) => (e.CHAT = "chat", e))(Xa || {});
|
20692
20692
|
ss = ((t2) => (t2.INFO = "info", t2.ERROR = "error", t2))(ss || {});
|
20693
20693
|
gr = ((D2) => (D2.PEER_JOINED = "PEER_JOINED", D2.PEER_LEFT = "PEER_LEFT", D2.PEER_LIST = "PEER_LIST", D2.NEW_MESSAGE = "NEW_MESSAGE", D2.ERROR = "ERROR", D2.RECONNECTING = "RECONNECTING", D2.RECONNECTED = "RECONNECTED", D2.TRACK_ADDED = "TRACK_ADDED", D2.TRACK_REMOVED = "TRACK_REMOVED", D2.TRACK_MUTED = "TRACK_MUTED", D2.TRACK_UNMUTED = "TRACK_UNMUTED", D2.TRACK_DEGRADED = "TRACK_DEGRADED", D2.TRACK_RESTORED = "TRACK_RESTORED", D2.TRACK_DESCRIPTION_CHANGED = "TRACK_DESCRIPTION_CHANGED", D2.ROLE_UPDATED = "ROLE_UPDATED", D2.CHANGE_TRACK_STATE_REQUEST = "CHANGE_TRACK_STATE_REQUEST", D2.CHANGE_MULTI_TRACK_STATE_REQUEST = "CHANGE_MULTI_TRACK_STATE_REQUEST", D2.ROOM_ENDED = "ROOM_ENDED", D2.REMOVED_FROM_ROOM = "REMOVED_FROM_ROOM", D2.DEVICE_CHANGE_UPDATE = "DEVICE_CHANGE_UPDATE", D2.PLAYLIST_TRACK_ENDED = "PLAYLIST_TRACK_ENDED", D2.NAME_UPDATED = "NAME_UPDATED", D2.METADATA_UPDATED = "METADATA_UPDATED", D2.POLL_CREATED = "POLL_CREATED", D2.POLL_STARTED = "POLL_STARTED", D2.POLL_STOPPED = "POLL_STOPPED", D2.POLL_VOTES_UPDATED = "POLL_VOTES_UPDATED", D2.POLLS_LIST = "POLLS_LIST", D2.HAND_RAISE_CHANGED = "HAND_RAISE_CHANGED", D2.TRANSCRIPTION_STATE_UPDATED = "TRANSCRIPTION_STATE_UPDATED", D2))(gr || {});
|
@@ -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
|
+
Ue = typeof window == "undefined" && !((ds = ge.getBrowser().name) != null && ds.toLowerCase().includes("electron"));
|
20775
|
+
io = () => !Ue;
|
20776
20776
|
tc = io();
|
20777
20777
|
Te = () => ge.getDevice().type === "mobile";
|
20778
20778
|
ps = () => typeof document != "undefined" && document.hidden;
|
@@ -20781,7 +20781,7 @@ var init_dist = __esm({
|
|
20781
20781
|
return ((a11 = ge.getOS().name) == null ? void 0 : a11.toLowerCase()) === "ios";
|
20782
20782
|
};
|
20783
20783
|
hs = ((us = (ls = ge.getBrowser()) == null ? void 0 : ls.name) == null ? void 0 : us.toLowerCase()) === "firefox";
|
20784
|
-
|
20784
|
+
ri = (a11) => a11 ? `{
|
20785
20785
|
trackId: ${a11.id};
|
20786
20786
|
kind: ${a11.kind};
|
20787
20787
|
enabled: ${a11.enabled};
|
@@ -20827,7 +20827,7 @@ var init_dist = __esm({
|
|
20827
20827
|
logIdentifier: ${this.logIdentifier};
|
20828
20828
|
source: ${this.source};
|
20829
20829
|
enabled: ${this.enabled};
|
20830
|
-
nativeTrack: ${
|
20830
|
+
nativeTrack: ${ri(this.nativeTrack)};
|
20831
20831
|
}`;
|
20832
20832
|
}
|
20833
20833
|
};
|
@@ -21089,13 +21089,13 @@ var init_dist = __esm({
|
|
21089
21089
|
return t2 ? a11 = t2 : (a11 = (0, import_uuid4.v4)(), e.set(a11)), a11;
|
21090
21090
|
};
|
21091
21091
|
Ts = "[VALIDATIONS]";
|
21092
|
-
|
21092
|
+
St = () => {
|
21093
21093
|
if (!oe(RTCPeerConnection)) {
|
21094
21094
|
let a11 = S2.GenericErrors.MissingRTCPeerConnection();
|
21095
21095
|
throw d2.e(Ts, a11), a11;
|
21096
21096
|
}
|
21097
21097
|
};
|
21098
|
-
|
21098
|
+
gt = () => {
|
21099
21099
|
if (!oe(navigator.mediaDevices)) {
|
21100
21100
|
let a11 = S2.GenericErrors.MissingMediaDevices();
|
21101
21101
|
throw d2.e(Ts, a11), a11;
|
@@ -21105,7 +21105,7 @@ var init_dist = __esm({
|
|
21105
21105
|
vs = (a11, e = ",") => Object.keys(a11).filter((t2) => oe(a11[t2])).map((t2) => `${t2}:${a11[t2]}`).join(e);
|
21106
21106
|
H2 = class {
|
21107
21107
|
constructor({ name: e, level: t2, properties: i2, includesPII: r2, timestamp: s2 }) {
|
21108
|
-
this.metadata = { peer: {}, userAgent:
|
21108
|
+
this.metadata = { peer: {}, userAgent: Tt() };
|
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() {
|
@@ -21268,7 +21268,7 @@ var init_dist = __esm({
|
|
21268
21268
|
return new H2({ name: l2, level: u2, properties: p2 });
|
21269
21269
|
}
|
21270
21270
|
};
|
21271
|
-
|
21271
|
+
si = class {
|
21272
21272
|
constructor(e) {
|
21273
21273
|
this.eventBus = e;
|
21274
21274
|
this.TAG = "[AudioPluginsAnalytics]";
|
@@ -21314,12 +21314,12 @@ var init_dist = __esm({
|
|
21314
21314
|
};
|
21315
21315
|
co = 48e3;
|
21316
21316
|
lo = () => navigator.userAgent.indexOf("Firefox") !== -1;
|
21317
|
-
|
21317
|
+
ft = class {
|
21318
21318
|
constructor(e, t2, i2) {
|
21319
21319
|
this.eventBus = t2;
|
21320
21320
|
this.TAG = "[AudioPluginsManager]";
|
21321
21321
|
this.pluginAddInProgress = false;
|
21322
|
-
this.hmsTrack = e, this.pluginsMap = /* @__PURE__ */ new Map(), this.analytics = new
|
21322
|
+
this.hmsTrack = e, this.pluginsMap = /* @__PURE__ */ new Map(), this.analytics = new si(t2), this.createAudioContext(), this.room = i2;
|
21323
21323
|
}
|
21324
21324
|
getPlugins() {
|
21325
21325
|
return Array.from(this.pluginsMap.keys());
|
@@ -21530,7 +21530,7 @@ var init_dist = __esm({
|
|
21530
21530
|
})()`;
|
21531
21531
|
mo = 35;
|
21532
21532
|
So = 5;
|
21533
|
-
|
21533
|
+
oi = class {
|
21534
21534
|
constructor(e, t2, i2) {
|
21535
21535
|
this.track = e;
|
21536
21536
|
this.audioLevelEvent = t2;
|
@@ -21625,7 +21625,7 @@ var init_dist = __esm({
|
|
21625
21625
|
Is = ((i2) => (i2.REGULAR = "regular", i2.SCREEN = "screen", i2.COMPOSITE = "composite", i2))(Is || {});
|
21626
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
|
+
Be = { 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 Ve(this._volume, this._codec, this._maxBitrate, this._deviceId, this._advanced, this._audioMode);
|
21663
21663
|
}
|
21664
21664
|
};
|
21665
|
-
|
21665
|
+
Ve = 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
|
}
|
@@ -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 Fe(this._width, this._height, this._codec, this._maxFramerate, this._deviceId, this._advanced, this._maxBitrate, this._facingMode);
|
21715
21715
|
}
|
21716
21716
|
};
|
21717
|
-
|
21717
|
+
Fe = 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
|
}
|
@@ -21794,7 +21794,7 @@ var init_dist = __esm({
|
|
21794
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
|
-
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
|
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 ft(this, s2, n2), this.setFirstTrackId(i2.id), Tr() && O2 && document.addEventListener("visibilitychange", this.handleVisibilityChange);
|
21798
21798
|
}
|
21799
21799
|
getManuallySelectedDeviceId() {
|
21800
21800
|
return this.manuallySelectedDeviceId;
|
@@ -21860,7 +21860,7 @@ var init_dist = __esm({
|
|
21860
21860
|
});
|
21861
21861
|
}
|
21862
21862
|
initAudioLevelMonitor() {
|
21863
|
-
this.audioLevelMonitor && this.destroyAudioLevelMonitor(), d2.d(this.TAG, "Monitor Audio Level for", this, this.getMediaTrackSettings().deviceId), this.audioLevelMonitor = new
|
21863
|
+
this.audioLevelMonitor && this.destroyAudioLevelMonitor(), d2.d(this.TAG, "Monitor Audio Level for", this, this.getMediaTrackSettings().deviceId), this.audioLevelMonitor = new oi(this, this.eventBus.trackAudioLevelUpdate, this.eventBus.localAudioSilence), this.audioLevelMonitor.start(), this.audioLevelMonitor.detectSilence();
|
21864
21864
|
}
|
21865
21865
|
destroyAudioLevelMonitor() {
|
21866
21866
|
var t2;
|
@@ -21880,7 +21880,7 @@ 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 Ve(i2, r2, s2, o2, n2, l2);
|
21884
21884
|
}
|
21885
21885
|
};
|
21886
21886
|
se = class a4 extends Ie {
|
@@ -21948,10 +21948,10 @@ var init_dist = __esm({
|
|
21948
21948
|
this.sinkCount > 0 && this.sinkCount--;
|
21949
21949
|
}
|
21950
21950
|
};
|
21951
|
-
|
21951
|
+
vt = { none: -1, low: 0, medium: 1, high: 2 };
|
21952
21952
|
To = 0.5;
|
21953
21953
|
ws = (a11, e) => {
|
21954
|
-
let t2 = "high", i2 = e.width > e.height ? "width" : "height", r2 = [...a11].sort((o2, n2) =>
|
21954
|
+
let t2 = "high", i2 = e.width > e.height ? "width" : "height", r2 = [...a11].sort((o2, n2) => vt[o2.layer] - vt[n2.layer]), s2 = e[i2] * ((window == null ? void 0 : window.devicePixelRatio) || 1);
|
21955
21955
|
for (let o2 = 0; o2 < r2.length; o2++) {
|
21956
21956
|
let { resolution: n2, layer: l2 } = r2[o2], u2 = n2[i2];
|
21957
21957
|
if (s2 <= u2) {
|
@@ -22008,7 +22008,7 @@ var init_dist = __esm({
|
|
22008
22008
|
(t2 = this.resizeObserver) == null || t2.unobserve(e), this.listeners.delete(e);
|
22009
22009
|
};
|
22010
22010
|
this.createObserver = () => {
|
22011
|
-
this.isSupported() && !this.resizeObserver && (this.resizeObserver = new ResizeObserver(
|
22011
|
+
this.isSupported() && !this.resizeObserver && (this.resizeObserver = new ResizeObserver(ai(this.handleResize, 300)));
|
22012
22012
|
};
|
22013
22013
|
this.handleResize = (e) => {
|
22014
22014
|
var t2;
|
@@ -22087,7 +22087,7 @@ var init_dist = __esm({
|
|
22087
22087
|
if (r2 === 0 || s2 === 0)
|
22088
22088
|
continue;
|
22089
22089
|
let o2 = ws(this.track.getSimulcastDefinitions(), { width: r2, height: s2 });
|
22090
|
-
e ? e =
|
22090
|
+
e ? e = vt[o2] > vt[e] ? o2 : e : e = o2;
|
22091
22091
|
}
|
22092
22092
|
e && (d2.d(this.TAG, `selecting max layer ${e} for the track`, `${this.track}`), yield this.track.setPreferredLayer(e));
|
22093
22093
|
});
|
@@ -22095,7 +22095,7 @@ var init_dist = __esm({
|
|
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
|
+
Mt = class {
|
22099
22099
|
constructor() {
|
22100
22100
|
this.total = 0;
|
22101
22101
|
this.count = 0;
|
@@ -22114,10 +22114,10 @@ var init_dist = __esm({
|
|
22114
22114
|
constructor(e) {
|
22115
22115
|
this.eventBus = e;
|
22116
22116
|
this.TAG = "[VideoPluginsAnalytics]";
|
22117
|
-
this.initTime = {}, this.preProcessingAvgs = new
|
22117
|
+
this.initTime = {}, this.preProcessingAvgs = new Mt(), this.addedTimestamps = {}, this.processingAvgs = {}, this.pluginAdded = {}, this.pluginInputFrameRate = {}, this.pluginFrameRate = {};
|
22118
22118
|
}
|
22119
22119
|
added(e, t2, i2) {
|
22120
|
-
this.pluginAdded[e] = true, this.addedTimestamps[e] = Date.now(), this.initTime[e] = 0, this.processingAvgs[e] = new
|
22120
|
+
this.pluginAdded[e] = true, this.addedTimestamps[e] = Date.now(), this.initTime[e] = 0, this.processingAvgs[e] = new Mt(), t2 && (this.pluginInputFrameRate[e] = t2, this.pluginFrameRate[e] = i2 || t2), this.eventBus.analytics.publish(ne.added(e, this.addedTimestamps[e]));
|
22121
22121
|
}
|
22122
22122
|
removed(e) {
|
22123
22123
|
var t2;
|
@@ -22177,7 +22177,7 @@ var init_dist = __esm({
|
|
22177
22177
|
Os = 24;
|
22178
22178
|
vo = 320;
|
22179
22179
|
Mo = 240;
|
22180
|
-
|
22180
|
+
yt = class {
|
22181
22181
|
constructor(e, t2) {
|
22182
22182
|
this.TAG = "[VideoPluginsManager]";
|
22183
22183
|
this.pluginsLoopRunning = false;
|
@@ -22400,7 +22400,7 @@ var init_dist = __esm({
|
|
22400
22400
|
return this.pluginNumFramesSkipped[e] < this.pluginNumFramesToSkip[e] ? (this.pluginNumFramesSkipped[e]++, t2 = true) : (t2 = false, this.pluginNumFramesSkipped[e] = 0), t2;
|
22401
22401
|
}
|
22402
22402
|
};
|
22403
|
-
|
22403
|
+
ni = class {
|
22404
22404
|
constructor(e, t2) {
|
22405
22405
|
this.TAG = "[MediaStreamPluginsManager]";
|
22406
22406
|
this.plugins = /* @__PURE__ */ new Set(), this.analytics = new Ze(e), this.room = t2;
|
@@ -22445,7 +22445,7 @@ var init_dist = __esm({
|
|
22445
22445
|
}
|
22446
22446
|
};
|
22447
22447
|
yo = ["init_response_time", "ws_connect_time", "on_policy_change_time", "local_audio_track_time", "local_video_track_time", "peer_list_time", "room_state_time", "join_response_time"];
|
22448
|
-
|
22448
|
+
ci = class {
|
22449
22449
|
constructor() {
|
22450
22450
|
this.eventPerformanceMeasures = {};
|
22451
22451
|
}
|
@@ -22551,7 +22551,7 @@ var init_dist = __esm({
|
|
22551
22551
|
let f2 = Ae(g2, "screen");
|
22552
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 Ge(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);
|
@@ -22590,7 +22590,7 @@ var init_dist = __esm({
|
|
22590
22590
|
static getEmptyVideoTrack(e) {
|
22591
22591
|
var n2, l2, u2;
|
22592
22592
|
let t2 = ((n2 = e == null ? void 0 : e.getSettings()) == null ? void 0 : n2.width) || 320, i2 = ((l2 = e == null ? void 0 : e.getSettings()) == null ? void 0 : l2.height) || 240, r2 = 1;
|
22593
|
-
pe || (pe = document.createElement("canvas"), pe.width = t2, pe.height = i2, (u2 = pe.getContext("2d")) == null || u2.fillRect(0, 0, t2, i2)),
|
22593
|
+
pe || (pe = document.createElement("canvas"), pe.width = t2, pe.height = i2, (u2 = pe.getContext("2d")) == null || u2.fillRect(0, 0, t2, i2)), di || (di = setInterval(() => {
|
22594
22594
|
let p2 = pe == null ? void 0 : pe.getContext("2d");
|
22595
22595
|
p2 && p2.fillRect(0, 0, 1, 1);
|
22596
22596
|
}, 1e3 / r2));
|
@@ -22604,7 +22604,7 @@ var init_dist = __esm({
|
|
22604
22604
|
return r2.enabled = false, r2;
|
22605
22605
|
}
|
22606
22606
|
static cleanup() {
|
22607
|
-
clearInterval(
|
22607
|
+
clearInterval(di), di = void 0, pe = void 0;
|
22608
22608
|
}
|
22609
22609
|
getAVTracks(e) {
|
22610
22610
|
return c2(this, null, function* () {
|
@@ -22635,7 +22635,7 @@ var init_dist = __esm({
|
|
22635
22635
|
this.observer.onFailure(e);
|
22636
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 De().video(new
|
22638
|
+
let l2 = new De().video(new Fe()).audio(new Ve()).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);
|
@@ -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 Ge(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());
|
@@ -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 Fe(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);
|
@@ -22765,7 +22765,7 @@ var init_dist = __esm({
|
|
22765
22765
|
this.handleVisibilityChange = () => c2(this, null, function* () {
|
22766
22766
|
document.visibilityState === "hidden" && this.source === "regular" ? (this.enabledStateBeforeBackground = this.enabled, this.nativeTrack.enabled = false, this.replaceSenderTrack(this.nativeTrack)) : (this.nativeTrack.enabled = this.enabledStateBeforeBackground, this.replaceSenderTrack(this.processedTrack || this.nativeTrack)), this.eventBus.localVideoEnabled.publish({ enabled: this.nativeTrack.enabled, track: this });
|
22767
22767
|
});
|
22768
|
-
t2.tracks.push(this), this.setVideoHandler(new Xe(this)), this.settings = o2, o2.deviceId !== i2.getSettings().deviceId && i2.enabled && (this.settings = this.buildNewSettings({ deviceId: i2.getSettings().deviceId })), this.pluginsManager = new
|
22768
|
+
t2.tracks.push(this), this.setVideoHandler(new Xe(this)), this.settings = o2, o2.deviceId !== i2.getSettings().deviceId && i2.enabled && (this.settings = this.buildNewSettings({ deviceId: i2.getSettings().deviceId })), this.pluginsManager = new yt(this, s2), this.mediaStreamPluginsManager = new ni(s2, n2), this.setFirstTrackId(this.trackId), O2 && Te() && document.addEventListener("visibilitychange", this.handleVisibilityChange);
|
22769
22769
|
}
|
22770
22770
|
setSimulcastDefinitons(t2) {
|
22771
22771
|
this._layerDefinitions = t2;
|
@@ -22921,11 +22921,11 @@ var init_dist = __esm({
|
|
22921
22921
|
}
|
22922
22922
|
};
|
22923
22923
|
et = "renegotiation-callback-id";
|
22924
|
-
|
22924
|
+
li = "ion-sfu";
|
22925
22925
|
tt = "SUBSCRIBE_ICE_CONNECTION_CALLBACK_ID";
|
22926
22926
|
Us = "https://event.100ms.live/v2/client/report";
|
22927
22927
|
Bs = "https://event-nonprod.100ms.live/v2/client/report";
|
22928
|
-
|
22928
|
+
kt = Math.pow(2, 31) - 1;
|
22929
22929
|
G2 = { DEVICE_CHANGE: "device-change", LOCAL_AUDIO_ENABLED: "local-audio-enabled", LOCAL_VIDEO_ENABLED: "local-video-enabled", STATS_UPDATE: "stats-update", RTC_STATS_UPDATE: "rtc-stats-update", TRACK_DEGRADED: "track-degraded", TRACK_RESTORED: "track-restored", TRACK_AUDIO_LEVEL_UPDATE: "track-audio-level-update", LOCAL_AUDIO_SILENCE: "local-audio-silence", ANALYTICS: "analytics", AUDIO_PLUGIN_FAILED: "audio-plugin-failed", POLICY_CHANGE: "policy-change", LOCAL_ROLE_UPDATE: "local-role-update", AUDIO_TRACK_UPDATE: "audio-track-update", AUDIO_TRACK_ADDED: "audio-track-added", AUDIO_TRACK_REMOVED: "audio-track-removed", AUTOPLAY_ERROR: "autoplay-error", LEAVE: "leave" };
|
22930
22930
|
Vs = "2.5";
|
22931
22931
|
Fs = "20240521";
|
@@ -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
|
+
Ge = class extends Je {
|
23066
23066
|
constructor() {
|
23067
23067
|
super(...arguments);
|
23068
23068
|
this.TAG = "[HMSLocalStream]";
|
@@ -23108,7 +23108,7 @@ 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 && !Ue && (s2.maxBitrate = t2.settings.maxBitrate), r2.push(s2);
|
23112
23112
|
}
|
23113
23113
|
return r2;
|
23114
23114
|
}
|
@@ -23176,7 +23176,7 @@ var init_dist = __esm({
|
|
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
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:
|
23179
|
+
s2[p2] = M2(m({}, f2), { bitrate: Pt("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);
|
@@ -23192,7 +23192,7 @@ var init_dist = __esm({
|
|
23192
23192
|
} catch (u2) {
|
23193
23193
|
a11.analytics.publish(y2.rtcStatsFailed(S2.WebrtcErrors.StatsFailed("TRACK", `Error getting remote track stats ${e.trackId} - ${u2.message}`))), d2.w("[HMSWebrtcStats]", "Error in getting remote track stats", e, u2);
|
23194
23194
|
}
|
23195
|
-
let s2 = Eo(r2), o2 =
|
23195
|
+
let s2 = Eo(r2), o2 = Pt("bytesReceived", s2, i2), n2 = Nr("packetsLost", s2, i2);
|
23196
23196
|
return s2 != null && s2.remote && Object.assign(s2.remote, { packetsLostRate: Nr("packetsLost", s2.remote, i2 == null ? void 0 : i2.remote) }), s2 && M2(m({}, s2), { bitrate: o2, packetsLostRate: n2, peerID: e.peerId, enabled: e.enabled, peerName: t2, codec: s2.codec });
|
23197
23197
|
});
|
23198
23198
|
Eo = (a11) => {
|
@@ -23219,7 +23219,7 @@ var init_dist = __esm({
|
|
23219
23219
|
return r2 && (s2 = r2.substring(r2.indexOf("/") + 1)), e && Object.assign(e, { remote: t2, codec: s2 });
|
23220
23220
|
};
|
23221
23221
|
Or = (a11, e, t2) => {
|
23222
|
-
let i2 = bo(e), r2 =
|
23222
|
+
let i2 = bo(e), r2 = Pt(a11 === "publish" ? "bytesSent" : "bytesReceived", i2, t2 && t2[a11]);
|
23223
23223
|
return i2 && Object.assign(i2, { bitrate: r2 });
|
23224
23224
|
};
|
23225
23225
|
bo = (a11) => {
|
@@ -23237,13 +23237,13 @@ var init_dist = __esm({
|
|
23237
23237
|
}), e;
|
23238
23238
|
};
|
23239
23239
|
js = (a11, e) => Array.from(new Set(a11.concat(e)));
|
23240
|
-
|
23240
|
+
Pt = (a11, e, t2) => Nr(a11, e, t2) * 8;
|
23241
23241
|
Nr = (a11, e, t2) => {
|
23242
23242
|
let i2 = e && e[a11], r2 = t2 ? t2[a11] : null;
|
23243
23243
|
return [e, t2, oe(i2), oe(r2)].every((o2) => !!o2) ? xr(i2, r2, e == null ? void 0 : e.timestamp, t2 == null ? void 0 : t2.timestamp) * 1e3 : 0;
|
23244
23244
|
};
|
23245
23245
|
xr = (a11, e, t2, i2) => oe(a11) && oe(e) && t2 && i2 ? (a11 - e) / (t2 - i2) : 0;
|
23246
|
-
|
23246
|
+
ui = class {
|
23247
23247
|
constructor(e, t2, i2) {
|
23248
23248
|
this.getStats = e;
|
23249
23249
|
this.store = t2;
|
@@ -23303,7 +23303,7 @@ var init_dist = __esm({
|
|
23303
23303
|
this.localPeerID = (r2 = this.store.getLocalPeer()) == null ? void 0 : r2.peerId;
|
23304
23304
|
}
|
23305
23305
|
};
|
23306
|
-
|
23306
|
+
pi = class {
|
23307
23307
|
constructor(e, t2, i2, r2) {
|
23308
23308
|
this.store = e;
|
23309
23309
|
this.eventBus = t2;
|
@@ -23333,7 +23333,7 @@ var init_dist = __esm({
|
|
23333
23333
|
}
|
23334
23334
|
setPeerConnections({ publish: e, subscribe: t2 }) {
|
23335
23335
|
var i2, r2;
|
23336
|
-
this.publishConnection = e, this.subscribeConnection = t2, this.hmsStats = new
|
23336
|
+
this.publishConnection = e, this.subscribeConnection = t2, this.hmsStats = new ui({ publish: (i2 = this.publishConnection) == null ? void 0 : i2.getStats.bind(this.publishConnection), subscribe: (r2 = this.subscribeConnection) == null ? void 0 : r2.getStats.bind(this.subscribeConnection) }, this.store, this.eventBus);
|
23337
23337
|
}
|
23338
23338
|
start() {
|
23339
23339
|
return c2(this, null, function* () {
|
@@ -23401,7 +23401,7 @@ var init_dist = __esm({
|
|
23401
23401
|
rt = class {
|
23402
23402
|
};
|
23403
23403
|
rt.makePeerId = () => (0, import_uuid7.v4)();
|
23404
|
-
|
23404
|
+
We = class extends it {
|
23405
23405
|
constructor(t2) {
|
23406
23406
|
super(M2(m({}, t2), { peerId: rt.makePeerId(), isLocal: true }));
|
23407
23407
|
this.isLocal = true;
|
@@ -23424,7 +23424,7 @@ var init_dist = __esm({
|
|
23424
23424
|
}`;
|
23425
23425
|
}
|
23426
23426
|
};
|
23427
|
-
|
23427
|
+
Et = class extends it {
|
23428
23428
|
constructor(t2) {
|
23429
23429
|
super(M2(m({}, t2), { isLocal: false }));
|
23430
23430
|
this.isLocal = false;
|
@@ -23433,8 +23433,8 @@ var init_dist = __esm({
|
|
23433
23433
|
this.fromRoomState = !!t2.fromRoomState;
|
23434
23434
|
}
|
23435
23435
|
};
|
23436
|
-
he = (a11, e) => new
|
23437
|
-
|
23436
|
+
he = (a11, e) => new Et({ peerId: a11.peer_id, name: a11.info.name, role: e.getPolicyForRole(a11.role), customerUserId: a11.info.user_id, metadata: a11.info.data, groups: a11.groups, type: a11.info.type });
|
23437
|
+
hi = class {
|
23438
23438
|
constructor(e, t2, i2) {
|
23439
23439
|
this.transport = e;
|
23440
23440
|
this.store = t2;
|
@@ -23514,7 +23514,7 @@ var init_dist = __esm({
|
|
23514
23514
|
return super.listeners(e);
|
23515
23515
|
}
|
23516
23516
|
};
|
23517
|
-
|
23517
|
+
mi = 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
|
-
|
23569
|
+
Si = class extends we {
|
23570
23570
|
constructor() {
|
23571
23571
|
super(...arguments);
|
23572
23572
|
this.TAG = "[PlaylistVideoManager]";
|
@@ -23640,13 +23640,13 @@ var init_dist = __esm({
|
|
23640
23640
|
this.canvas || (this.canvas = document.createElement("canvas"), this.canvasContext = this.canvas.getContext("2d"));
|
23641
23641
|
}
|
23642
23642
|
};
|
23643
|
-
|
23644
|
-
|
23643
|
+
gi = { audio: { list: [], currentIndex: -1, isAutoplayOn: true }, video: { list: [], currentIndex: -1, isAutoplayOn: true } };
|
23644
|
+
bt = class extends we {
|
23645
23645
|
constructor(t2, i2) {
|
23646
23646
|
super();
|
23647
23647
|
this.sdk = t2;
|
23648
23648
|
this.eventBus = i2;
|
23649
|
-
this.state = { audio: m({},
|
23649
|
+
this.state = { audio: m({}, gi.audio), video: m({}, gi.video) };
|
23650
23650
|
this.TAG = "[PlaylistManager]";
|
23651
23651
|
this.handlePausePlaylist = (r2) => c2(this, [r2], function* ({ enabled: t3, track: i3 }) {
|
23652
23652
|
var o2;
|
@@ -23656,12 +23656,12 @@ var init_dist = __esm({
|
|
23656
23656
|
i3.source === "audioplaylist" && (s2 = "audio"), i3.source === "videoplaylist" && (s2 = "video"), s2 && ((o2 = this.getElement(s2)) == null || o2.pause());
|
23657
23657
|
});
|
23658
23658
|
this.addTrack = (t3, i3) => c2(this, null, function* () {
|
23659
|
-
yield this.sdk.addTrack(t3, i3), d2.d(this.TAG, "Playlist track added",
|
23659
|
+
yield this.sdk.addTrack(t3, i3), d2.d(this.TAG, "Playlist track added", ri(t3));
|
23660
23660
|
});
|
23661
23661
|
this.removeTrack = (t3) => c2(this, null, function* () {
|
23662
23662
|
yield this.sdk.removeTrack(t3, true), d2.d(this.TAG, "Playlist track removed", t3);
|
23663
23663
|
});
|
23664
|
-
this.audioManager = new
|
23664
|
+
this.audioManager = new mi(), this.videoManager = new Si(), this.addListeners();
|
23665
23665
|
}
|
23666
23666
|
getList(t2 = "audio") {
|
23667
23667
|
return this.state[t2].list;
|
@@ -23784,7 +23784,7 @@ var init_dist = __esm({
|
|
23784
23784
|
});
|
23785
23785
|
}
|
23786
23786
|
cleanup() {
|
23787
|
-
this.state = { audio: m({},
|
23787
|
+
this.state = { audio: m({}, gi.audio), video: m({}, gi.video) }, this.eventBus.localAudioEnabled.unsubscribe(this.handlePausePlaylist), this.eventBus.localVideoEnabled.unsubscribe(this.handlePausePlaylist), this.audioManager.stop(), this.videoManager.stop();
|
23788
23788
|
}
|
23789
23789
|
onProgress(t2) {
|
23790
23790
|
this.videoManager.on("progress", () => {
|
@@ -23866,7 +23866,7 @@ var init_dist = __esm({
|
|
23866
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
|
+
Ti = (a11) => a11.messages.byID;
|
23870
23870
|
Js = (a11) => a11.messages.allIDs;
|
23871
23871
|
N2 = (a11) => a11.tracks;
|
23872
23872
|
Qs = (a11) => a11.settings;
|
@@ -23911,13 +23911,13 @@ var init_dist = __esm({
|
|
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 } = xe(e, a11);
|
23915
23915
|
return !!(t2 || i2);
|
23916
23916
|
});
|
23917
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 } = xe(e, r2);
|
23921
23921
|
if (s2)
|
23922
23922
|
return r2;
|
23923
23923
|
o2 && !t2 && (t2 = r2);
|
@@ -23927,7 +23927,7 @@ var init_dist = __esm({
|
|
23927
23927
|
Zh = createSelector(wo, (a11) => !!a11);
|
23928
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 } = xe(e, i2);
|
23931
23931
|
if (!s2 && r2)
|
23932
23932
|
return i2;
|
23933
23933
|
}
|
@@ -23935,7 +23935,7 @@ var init_dist = __esm({
|
|
23935
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 } = xe(e, s2);
|
23939
23939
|
o2 ? t2.push(s2) : n2 && i2.push(s2);
|
23940
23940
|
}
|
23941
23941
|
return t2.concat(i2);
|
@@ -23943,27 +23943,27 @@ var init_dist = __esm({
|
|
23943
23943
|
im = createSelector(K, N2, (a11, e) => {
|
23944
23944
|
for (let t2 in e) {
|
23945
23945
|
let i2 = e[t2];
|
23946
|
-
if (
|
23946
|
+
if (ht(i2) && pt(i2) && i2.peerId)
|
23947
23947
|
return a11[i2.peerId];
|
23948
23948
|
}
|
23949
23949
|
});
|
23950
23950
|
rm = createSelector(K, N2, (a11, e) => {
|
23951
23951
|
for (let t2 in e) {
|
23952
23952
|
let i2 = e[t2];
|
23953
|
-
if (
|
23953
|
+
if (ii(i2) && i2.peerId)
|
23954
23954
|
return a11[i2.peerId];
|
23955
23955
|
}
|
23956
23956
|
});
|
23957
23957
|
sm = createSelector(Lo, (a11) => a11.filter(os));
|
23958
23958
|
am = createSelector(Js, (a11) => a11.length);
|
23959
|
-
om = createSelector(
|
23960
|
-
|
23959
|
+
om = createSelector(Ti, (a11) => Object.values(a11).filter((e) => !e.read).length);
|
23960
|
+
Rt = createSelector(Js, Ti, (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(Rt, (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
|
+
It = "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(It, ...t2);
|
24045
24045
|
break;
|
24046
24046
|
}
|
24047
24047
|
case 1: {
|
24048
|
-
console.debug(
|
24048
|
+
console.debug(It, ...t2);
|
24049
24049
|
break;
|
24050
24050
|
}
|
24051
24051
|
case 2: {
|
24052
|
-
console.info(
|
24052
|
+
console.info(It, ...t2);
|
24053
24053
|
break;
|
24054
24054
|
}
|
24055
24055
|
case 3: {
|
24056
|
-
console.warn(
|
24056
|
+
console.warn(It, ...t2);
|
24057
24057
|
break;
|
24058
24058
|
}
|
24059
24059
|
case 6: {
|
24060
|
-
console.error(
|
24060
|
+
console.error(It, ...t2);
|
24061
24061
|
break;
|
24062
24062
|
}
|
24063
24063
|
case 4: {
|
@@ -24079,31 +24079,31 @@ var init_dist = __esm({
|
|
24079
24079
|
};
|
24080
24080
|
b2.level = 0;
|
24081
24081
|
Gr = (a11, e) => e;
|
24082
|
-
|
24082
|
+
At = (a11, e) => e;
|
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
|
-
Wr = createSelector([N2,
|
24088
|
-
Bo = createSelector([N2,
|
24087
|
+
Wr = createSelector([N2, At], (a11, e) => e ? a11[e] : null);
|
24088
|
+
Bo = createSelector([N2, At], (a11, e) => {
|
24089
24089
|
if (!e)
|
24090
24090
|
return null;
|
24091
24091
|
let t2 = a11[e];
|
24092
24092
|
return (t2 == null ? void 0 : t2.type) === "video" ? t2 : null;
|
24093
24093
|
});
|
24094
|
-
Vo = createSelector([N2,
|
24094
|
+
Vo = createSelector([N2, At], (a11, e) => {
|
24095
24095
|
if (!e)
|
24096
24096
|
return null;
|
24097
24097
|
let t2 = a11[e];
|
24098
24098
|
return (t2 == null ? void 0 : t2.type) === "audio" ? t2 : null;
|
24099
24099
|
});
|
24100
|
-
Fo = createSelector([N2,
|
24100
|
+
Fo = createSelector([N2, At], (a11, e) => {
|
24101
24101
|
if (!e)
|
24102
24102
|
return null;
|
24103
24103
|
let t2 = a11[e];
|
24104
24104
|
return (t2 == null ? void 0 : t2.type) === "audio" && (t2 == null ? void 0 : t2.source) === "screen" ? t2 : null;
|
24105
24105
|
});
|
24106
|
-
Go = createSelector([N2,
|
24106
|
+
Go = createSelector([N2, At], (a11, e) => {
|
24107
24107
|
if (!e)
|
24108
24108
|
return null;
|
24109
24109
|
let t2 = a11[e];
|
@@ -24117,7 +24117,7 @@ var init_dist = __esm({
|
|
24117
24117
|
}));
|
24118
24118
|
Bm = A2(createSelector(q2, (a11) => a11 == null ? void 0 : a11.name));
|
24119
24119
|
Vm = A2(createSelector(q2, (a11) => a11 == null ? void 0 : a11.type));
|
24120
|
-
|
24120
|
+
fi = A2(Wr);
|
24121
24121
|
ha = A2(Bo);
|
24122
24122
|
Fm = A2(Vo);
|
24123
24123
|
Gm = A2(Fo);
|
@@ -24150,32 +24150,32 @@ var init_dist = __esm({
|
|
24150
24150
|
Qm = A2((a11, e) => {
|
24151
24151
|
let t2 = q2(a11, e);
|
24152
24152
|
if (t2) {
|
24153
|
-
let i2 = t2 == null ? void 0 : t2.auxiliaryTracks.find((r2) =>
|
24153
|
+
let i2 = t2 == null ? void 0 : t2.auxiliaryTracks.find((r2) => ut(a11.tracks[r2]));
|
24154
24154
|
return i2 ? a11.tracks[i2] : void 0;
|
24155
24155
|
}
|
24156
24156
|
});
|
24157
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
|
-
return
|
24160
|
+
return ht(r2) && pt(r2);
|
24161
24161
|
});
|
24162
24162
|
return t2 ? a11[t2] : void 0;
|
24163
24163
|
}));
|
24164
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
|
-
return
|
24167
|
+
return ht(r2) && ut(r2);
|
24168
24168
|
});
|
24169
24169
|
return t2 ? a11[t2] : void 0;
|
24170
24170
|
}));
|
24171
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
|
-
return
|
24174
|
+
return ii(r2) && ut(r2);
|
24175
24175
|
});
|
24176
24176
|
return t2 ? a11[t2] : void 0;
|
24177
24177
|
}));
|
24178
|
-
Sa = A2(createSelector(N2, q2, (a11, e) =>
|
24178
|
+
Sa = A2(createSelector(N2, q2, (a11, e) => xe(a11, e)));
|
24179
24179
|
ga = (a11) => createSelector(Sa(a11), (e) => e.audio);
|
24180
24180
|
eS = A2((a11, e) => {
|
24181
24181
|
let t2 = q2(a11, e);
|
@@ -24225,21 +24225,21 @@ var init_dist = __esm({
|
|
24225
24225
|
return t2.layer;
|
24226
24226
|
}
|
24227
24227
|
});
|
24228
|
-
va = createSelector([
|
24228
|
+
va = createSelector([Rt, 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([Rt, 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(Rt, (a11) => a11.filter((e) => {
|
24243
24243
|
var t2;
|
24244
24244
|
return !e.recipientPeer && !((t2 = e.recipientRoles) != null && t2.length);
|
24245
24245
|
}));
|
@@ -24257,8 +24257,8 @@ var init_dist = __esm({
|
|
24257
24257
|
}));
|
24258
24258
|
zo = (a11) => a11.roleChangeRequests[0] || null;
|
24259
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
|
-
bS = createSelector([at], (a11) =>
|
24261
|
-
RS = createSelector([Zs], (a11) =>
|
24260
|
+
bS = createSelector([at], (a11) => mt(a11));
|
24261
|
+
RS = createSelector([Zs], (a11) => mt(a11));
|
24262
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) || [];
|
@@ -24267,12 +24267,12 @@ var init_dist = __esm({
|
|
24267
24267
|
let t2 = null;
|
24268
24268
|
return a11 && (t2 = e[a11]), (t2 == null ? void 0 : t2.plugins) || [];
|
24269
24269
|
});
|
24270
|
-
|
24271
|
-
|
24272
|
-
|
24270
|
+
Mi = { 0: "PEER_JOINED", 1: "PEER_LEFT", 8: "ROLE_UPDATED", 10: "NAME_UPDATED", 11: "METADATA_UPDATED", 12: "HAND_RAISE_CHANGED" };
|
24271
|
+
Ht = { 0: "TRACK_ADDED", 1: "TRACK_REMOVED", 2: "TRACK_MUTED", 3: "TRACK_UNMUTED", 5: "TRACK_DEGRADED", 6: "TRACK_RESTORED", 4: "TRACK_DESCRIPTION_CHANGED" };
|
24272
|
+
yi = { 0: "POLL_CREATED", 1: "POLL_STARTED", 2: "POLL_STOPPED", 4: "POLL_VOTES_UPDATED", 3: "POLLS_LIST" };
|
24273
24273
|
ka = { TRANSCRIPTION_STATE_UPDATED: "TRANSCRIPTION_STATE_UPDATED" };
|
24274
24274
|
$r = "hmsNotification";
|
24275
|
-
|
24275
|
+
ki = class {
|
24276
24276
|
constructor(e) {
|
24277
24277
|
this.id = 0;
|
24278
24278
|
this.onNotification = (e2, t2) => {
|
@@ -24311,14 +24311,14 @@ var init_dist = __esm({
|
|
24311
24311
|
this.emitEvent(t2);
|
24312
24312
|
}
|
24313
24313
|
sendPeerUpdate(e, t2) {
|
24314
|
-
let i2 = this.store.getState(X2(t2 == null ? void 0 : t2.id)) || t2, r2 =
|
24314
|
+
let i2 = this.store.getState(X2(t2 == null ? void 0 : t2.id)) || t2, r2 = Mi[e];
|
24315
24315
|
if (r2 && i2) {
|
24316
24316
|
let s2 = this.createNotification(r2, i2, "info");
|
24317
24317
|
this.emitEvent(s2);
|
24318
24318
|
}
|
24319
24319
|
}
|
24320
24320
|
sendTrackUpdate(e, t2) {
|
24321
|
-
let i2 = this.store.getState(
|
24321
|
+
let i2 = this.store.getState(fi(t2)), r2 = Ht[e];
|
24322
24322
|
if (r2) {
|
24323
24323
|
let s2 = this.createNotification(r2, i2, "info");
|
24324
24324
|
this.emitEvent(s2);
|
@@ -24349,7 +24349,7 @@ var init_dist = __esm({
|
|
24349
24349
|
this.emitEvent(t2);
|
24350
24350
|
}
|
24351
24351
|
sendPollUpdate(e, t2) {
|
24352
|
-
let i2 =
|
24352
|
+
let i2 = yi[e], r2 = this.store.getState(ya(t2));
|
24353
24353
|
if (i2) {
|
24354
24354
|
let s2 = this.createNotification(i2, r2, "info");
|
24355
24355
|
this.emitEvent(s2);
|
@@ -24366,7 +24366,7 @@ var init_dist = __esm({
|
|
24366
24366
|
return this.id++, { id: this.id, type: e, message: r2, data: t2, severity: i2 };
|
24367
24367
|
}
|
24368
24368
|
};
|
24369
|
-
|
24369
|
+
Pi = class {
|
24370
24370
|
constructor(e) {
|
24371
24371
|
this.queuedUpdates = {};
|
24372
24372
|
this.timers = {};
|
@@ -24394,35 +24394,35 @@ var init_dist = __esm({
|
|
24394
24394
|
}
|
24395
24395
|
};
|
24396
24396
|
Ea = (a11, e) => {
|
24397
|
-
let t2 =
|
24397
|
+
let t2 = Ct(Object.keys(a11), Object.keys(e));
|
24398
24398
|
for (let i2 of t2) {
|
24399
24399
|
let r2 = a11[i2], s2 = e[i2];
|
24400
|
-
|
24400
|
+
$e(r2, s2) ? (re(r2.auxiliaryTracks, s2.auxiliaryTracks) && (s2.auxiliaryTracks = r2.auxiliaryTracks), r2.groups && re(r2.groups, s2.groups) && (s2.groups = r2.groups), Object.assign(r2, s2)) : jr(r2, s2) ? delete a11[i2] : Ei(r2, s2) && (a11[i2] = s2);
|
24401
24401
|
}
|
24402
24402
|
};
|
24403
24403
|
ba = (a11, e) => {
|
24404
|
-
let t2 =
|
24404
|
+
let t2 = Ct(Object.keys(a11), Object.keys(e));
|
24405
24405
|
for (let i2 of t2) {
|
24406
24406
|
let r2 = a11[i2], s2 = e[i2];
|
24407
|
-
|
24407
|
+
$e(r2, s2) ? (qr(r2, s2), Object.assign(r2, s2)) : jr(r2, s2) ? delete a11[i2] : Ei(r2, s2) && (a11[i2] = s2);
|
24408
24408
|
}
|
24409
24409
|
};
|
24410
24410
|
Ra = (a11, e) => {
|
24411
|
-
let t2 =
|
24411
|
+
let t2 = Ct(Object.keys(a11), Object.keys(e));
|
24412
24412
|
for (let i2 of t2) {
|
24413
24413
|
let r2 = a11[i2], s2 = e[i2];
|
24414
|
-
|
24414
|
+
$e(r2, s2) ? (r2.questions && re(r2.questions, s2.questions) && (s2.questions = r2.questions), Object.assign(r2, s2)) : Ei(r2, s2) && (a11[i2] = s2);
|
24415
24415
|
}
|
24416
24416
|
};
|
24417
24417
|
Kr = (a11, e) => {
|
24418
|
-
let t2 =
|
24418
|
+
let t2 = Ct(Object.keys(a11), Object.keys(e));
|
24419
24419
|
for (let i2 of t2) {
|
24420
24420
|
let r2 = a11[i2], s2 = e[i2];
|
24421
|
-
|
24421
|
+
$e(r2, s2) ? Object.assign(r2, s2) : jr(r2, s2) ? delete a11[i2] : Ei(r2, s2) && (a11[i2] = s2);
|
24422
24422
|
}
|
24423
24423
|
};
|
24424
24424
|
Ia = (a11, e, t2) => {
|
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 =
|
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 = Ct(Object.keys(a11), Object.keys(i2));
|
24426
24426
|
for (let s2 of r2) {
|
24427
24427
|
if (!i2[s2]) {
|
24428
24428
|
delete a11[s2];
|
@@ -24434,9 +24434,9 @@ 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
|
+
$e = (a11, e) => a11 && e;
|
24438
24438
|
jr = (a11, e) => a11 && !e;
|
24439
|
-
|
24439
|
+
Ei = (a11, e) => !a11 && e;
|
24440
24440
|
re = (a11, e) => {
|
24441
24441
|
if (a11 === e || a11.length === 0 && (e == null ? void 0 : e.length) === 0)
|
24442
24442
|
return true;
|
@@ -24447,7 +24447,7 @@ var init_dist = __esm({
|
|
24447
24447
|
return false;
|
24448
24448
|
return true;
|
24449
24449
|
};
|
24450
|
-
|
24450
|
+
Ct = (a11, e) => {
|
24451
24451
|
let t2 = /* @__PURE__ */ new Set();
|
24452
24452
|
for (let i2 of a11)
|
24453
24453
|
t2.add(i2);
|
@@ -24532,7 +24532,7 @@ var init_dist = __esm({
|
|
24532
24532
|
return { recording: { browser: m({ running: false }, e == null ? void 0 : e.browser), server: m({ running: false }, e == null ? void 0 : e.server), hls: m({ running: false }, e == null ? void 0 : e.hls) }, rtmp: m({ running: false }, t2), hls: { variants: ((s2 = i2 == null ? void 0 : i2.variants) == null ? void 0 : s2.map((o2) => o2)) || [], running: !!(i2 != null && i2.running), error: i2 == null ? void 0 : i2.error }, transcriptions: r2 || [] };
|
24533
24533
|
}
|
24534
24534
|
};
|
24535
|
-
|
24535
|
+
Lt = class {
|
24536
24536
|
constructor(e, t2, i2, r2) {
|
24537
24537
|
this.playlistManager = e;
|
24538
24538
|
this.syncPlaylistState = i2;
|
@@ -24603,7 +24603,7 @@ var init_dist = __esm({
|
|
24603
24603
|
});
|
24604
24604
|
}
|
24605
24605
|
};
|
24606
|
-
|
24606
|
+
bi = class {
|
24607
24607
|
constructor(e, t2) {
|
24608
24608
|
this.sdk = e;
|
24609
24609
|
this.setLocally = t2;
|
@@ -24630,7 +24630,7 @@ var init_dist = __esm({
|
|
24630
24630
|
});
|
24631
24631
|
}
|
24632
24632
|
};
|
24633
|
-
|
24633
|
+
Ri = 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
|
}
|
@@ -24710,7 +24710,7 @@ var init_dist = __esm({
|
|
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
|
+
Ii = class {
|
24714
24714
|
constructor() {
|
24715
24715
|
this.networkScores = [];
|
24716
24716
|
this.lastPushedAt = 0;
|
@@ -24736,7 +24736,7 @@ var init_dist = __esm({
|
|
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
|
};
|
24739
|
-
|
24739
|
+
Ai = class {
|
24740
24740
|
constructor(e) {
|
24741
24741
|
this.sdk = e;
|
24742
24742
|
this.peerStatsList = [];
|
@@ -24755,14 +24755,14 @@ var init_dist = __esm({
|
|
24755
24755
|
let o2 = yield (f2 = (g2 = this.sdk.getWebrtcInternals()) == null ? void 0 : g2.getSubscribePeerConnection()) == null ? void 0 : f2.getStats();
|
24756
24756
|
o2 == null || o2.forEach((P8) => {
|
24757
24757
|
if (P8.type === "inbound-rtp") {
|
24758
|
-
let k2 = P8.kind === "audio" ? this.remoteAudioTrackStatsList : this.remoteVideoTrackStatsList, w2 =
|
24758
|
+
let k2 = P8.kind === "audio" ? this.remoteAudioTrackStatsList : this.remoteVideoTrackStatsList, w2 = Pt("bytesReceived", P8, de(k2));
|
24759
24759
|
k2.push(M2(m({}, P8), { bitrate: w2 }));
|
24760
24760
|
}
|
24761
24761
|
});
|
24762
24762
|
});
|
24763
24763
|
}
|
24764
24764
|
buildReport() {
|
24765
|
-
var T, g2, f2, P8, k2, w2,
|
24765
|
+
var T, g2, f2, P8, k2, w2, Oe, Xt;
|
24766
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
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 $;
|
@@ -24770,11 +24770,11 @@ var init_dist = __esm({
|
|
24770
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: 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: ((
|
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: ((Oe = de(this.remoteVideoTrackStatsList)) == null ? void 0 : Oe.packetsLost) || 0, bytesReceived: ((Xt = de(this.remoteVideoTrackStatsList)) == null ? void 0 : Xt.bytesReceived) || 0, packetsReceived: n2, bitrateSent: Ne(u2, (x2) => x2), bitrateReceived: Ne(this.remoteVideoTrackStatsList, (x2) => x2.bitrate), bytesSent: h2 ? Object.values(h2).reduce((x2, $) => x2 + ($.bytesSent || 0), 0) : 0 } };
|
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 || {});
|
24777
|
-
|
24777
|
+
Hi = class {
|
24778
24778
|
constructor(e, t2, i2, r2) {
|
24779
24779
|
this.sdk = e;
|
24780
24780
|
this.sdkListener = t2;
|
@@ -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 Ii();
|
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);
|
@@ -24815,7 +24815,7 @@ var init_dist = __esm({
|
|
24815
24815
|
});
|
24816
24816
|
this.cqsCalculator.pushScore(t3 == null ? void 0 : t3.downlinkQuality);
|
24817
24817
|
};
|
24818
|
-
this.statsCollector = new
|
24818
|
+
this.statsCollector = new Ai(e), this.state = 0;
|
24819
24819
|
}
|
24820
24820
|
get state() {
|
24821
24821
|
return this._state;
|
@@ -24881,7 +24881,7 @@ var init_dist = __esm({
|
|
24881
24881
|
}
|
24882
24882
|
cleanupAndReport() {
|
24883
24883
|
var e;
|
24884
|
-
clearTimeout(this.cleanupTimer), this.cleanupTimer = void 0, this.state === 5 &&
|
24884
|
+
clearTimeout(this.cleanupTimer), this.cleanupTimer = void 0, this.state === 5 && (this.state = 6), (e = this.completionCallback) == null || e.call(this, this.buildReport()), this.sdk.leave();
|
24885
24885
|
}
|
24886
24886
|
buildReport() {
|
24887
24887
|
this.cqsCalculator.addPendingCQSTillNow();
|
@@ -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
|
+
Ke = class {
|
24893
24893
|
constructor(e) {
|
24894
24894
|
this.recording = { server: { running: false }, browser: { running: false }, hls: { running: false } };
|
24895
24895
|
this.rtmp = { running: false };
|
@@ -24898,7 +24898,7 @@ var init_dist = __esm({
|
|
24898
24898
|
this.id = e;
|
24899
24899
|
}
|
24900
24900
|
};
|
24901
|
-
|
24901
|
+
Ci = (a11, e, t2) => c2(void 0, null, function* () {
|
24902
24902
|
let r2 = Error("something went wrong during fetch");
|
24903
24903
|
for (let s2 = 0; s2 < 4; s2++)
|
24904
24904
|
try {
|
@@ -24911,19 +24911,19 @@ var init_dist = __esm({
|
|
24911
24911
|
}
|
24912
24912
|
throw ["Failed to fetch", "NetworkError"].some((s2) => r2.message.includes(s2)) ? S2.APIErrors.EndpointUnreachable("GET_TOKEN", r2.message) : r2;
|
24913
24913
|
});
|
24914
|
-
|
24914
|
+
Dt = class {
|
24915
24915
|
constructor(e, t2) {
|
24916
24916
|
this.sdk = e;
|
24917
24917
|
this.sdkListener = t2;
|
24918
24918
|
this.recordedAudio = Ca;
|
24919
|
-
this.initSdkWithLocalPeer();
|
24919
|
+
this.sdk.setIsDiagnostics(true), this.initSdkWithLocalPeer();
|
24920
24920
|
}
|
24921
24921
|
get localPeer() {
|
24922
24922
|
var e;
|
24923
24923
|
return (e = this.sdk) == null ? void 0 : e.store.getLocalPeer();
|
24924
24924
|
}
|
24925
24925
|
checkBrowserSupport() {
|
24926
|
-
|
24926
|
+
gt(), St();
|
24927
24927
|
}
|
24928
24928
|
requestPermission(e) {
|
24929
24929
|
return c2(this, null, function* () {
|
@@ -24988,14 +24988,13 @@ var init_dist = __esm({
|
|
24988
24988
|
}
|
24989
24989
|
startConnectivityCheck(e, t2, i2) {
|
24990
24990
|
return c2(this, null, function* () {
|
24991
|
-
var o2;
|
24992
24991
|
if (!this.sdk)
|
24993
24992
|
throw new Error("SDK not found");
|
24994
|
-
this.connectivityCheck = new
|
24995
|
-
let r2 = yield this.getAuthToken(i2)
|
24996
|
-
yield this.sdk.leave(),
|
24997
|
-
var
|
24998
|
-
(
|
24993
|
+
this.connectivityCheck = new Hi(this.sdk, this.sdkListener, e, t2);
|
24994
|
+
let r2 = yield this.getAuthToken(i2);
|
24995
|
+
yield this.sdk.leave(), yield this.sdk.join({ authToken: r2, userName: "diagnostics-test" }, this.connectivityCheck), this.sdk.addConnectionQualityListener({ onConnectionQualityUpdate: (s2) => {
|
24996
|
+
var o2;
|
24997
|
+
(o2 = this.connectivityCheck) == null || o2.handleConnectionQualityUpdate(s2);
|
24999
24998
|
} });
|
25000
24999
|
});
|
25001
25000
|
}
|
@@ -25010,16 +25009,16 @@ var init_dist = __esm({
|
|
25010
25009
|
this.sdkListener && ((r2 = this.sdk) == null || r2.initStoreAndManagers(M2(m({}, this.sdkListener), { onError: (n2) => {
|
25011
25010
|
e == null || e(n2), this.sdkListener.onError(n2);
|
25012
25011
|
} })));
|
25013
|
-
let t2 = new
|
25012
|
+
let t2 = new We({ name: "diagnostics-peer", role: ot, type: "regular" });
|
25014
25013
|
(s2 = this.sdk) == null || s2.store.addPeer(t2);
|
25015
|
-
let i2 = new
|
25014
|
+
let i2 = new Ke("diagnostics-room");
|
25016
25015
|
this.sdk.store.setRoom(i2), this.sdkListener.onRoomUpdate("ROOM_PEER_COUNT_UPDATED", i2), (o2 = this.sdk) == null || o2.deviceManager.init(true);
|
25017
25016
|
}
|
25018
25017
|
getAuthToken(e) {
|
25019
25018
|
return c2(this, null, function* () {
|
25020
|
-
let t2 = new URL("https://api
|
25019
|
+
let t2 = new URL("https://api.100ms.live/v2/diagnostics/token");
|
25021
25020
|
e && t2.searchParams.append("region", e);
|
25022
|
-
let i2 = yield
|
25021
|
+
let i2 = yield Ci(t2.toString(), { method: "GET" }, [429, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511]), r2 = yield i2.json();
|
25023
25022
|
if (!i2.ok)
|
25024
25023
|
throw S2.APIErrors.ServerErrors(r2.code, "GET_TOKEN", r2.message, false);
|
25025
25024
|
let { token: s2 } = r2;
|
@@ -25039,7 +25038,7 @@ var init_dist = __esm({
|
|
25039
25038
|
});
|
25040
25039
|
}
|
25041
25040
|
};
|
25042
|
-
|
25041
|
+
Li = class {
|
25043
25042
|
constructor(e, t2, i2) {
|
25044
25043
|
this.isRoomJoinCalled = false;
|
25045
25044
|
this.ignoredMessageTypes = [];
|
@@ -25054,7 +25053,7 @@ var init_dist = __esm({
|
|
25054
25053
|
}, e2);
|
25055
25054
|
};
|
25056
25055
|
this.sendPeerUpdateNotification = (e2, t3) => {
|
25057
|
-
let i3 = this.store.getState(X2(t3.peerId)), r2 =
|
25056
|
+
let i3 = this.store.getState(X2(t3.peerId)), r2 = Mi[e2] || "peerUpdate";
|
25058
25057
|
if (e2 === 8)
|
25059
25058
|
this.syncRoomState(r2), this.updateMidCallPreviewRoomState(e2, t3);
|
25060
25059
|
else if ([0, 1].includes(e2))
|
@@ -25065,14 +25064,14 @@ var init_dist = __esm({
|
|
25065
25064
|
let s2 = _2.convertPeer(t3);
|
25066
25065
|
this.setState((o2) => {
|
25067
25066
|
let n2 = o2.peers[s2.id];
|
25068
|
-
|
25067
|
+
$e(n2, s2) && (re(n2.auxiliaryTracks, s2.auxiliaryTracks) && (n2.auxiliaryTracks = s2.auxiliaryTracks), Object.assign(n2, s2)), i3 = s2;
|
25069
25068
|
}, r2);
|
25070
25069
|
}
|
25071
25070
|
this.hmsNotifications.sendPeerUpdate(e2, i3);
|
25072
25071
|
};
|
25073
25072
|
this.getSDKHMSPeer = (e2) => this.sdk.getPeerMap()[e2];
|
25074
25073
|
this.setState = (e2, t3) => this.store.namedSetState(e2, t3);
|
25075
|
-
this.store = e, this.sdk = t2, this.hmsNotifications = i2, this.sessionStore = new
|
25074
|
+
this.store = e, this.sdk = t2, this.hmsNotifications = i2, this.sessionStore = new bi(this.sdk, this.setSessionStoreValueLocally.bind(this)), this.actionBatcher = new Pi(e);
|
25076
25075
|
}
|
25077
25076
|
getLocalTrack(e) {
|
25078
25077
|
return this.sdk.store.getLocalPeerTracks().find((t2) => t2.trackId === e);
|
@@ -25576,16 +25575,16 @@ var init_dist = __esm({
|
|
25576
25575
|
}
|
25577
25576
|
enableBeamSpeakerLabelsLogging() {
|
25578
25577
|
return c2(this, null, function* () {
|
25579
|
-
this.beamSpeakerLabelsLogger || (b2.i("enabling beam speaker labels logging"), this.beamSpeakerLabelsLogger = new
|
25578
|
+
this.beamSpeakerLabelsLogger || (b2.i("enabling beam speaker labels logging"), this.beamSpeakerLabelsLogger = new Ri(this.store, this), yield this.beamSpeakerLabelsLogger.start());
|
25580
25579
|
});
|
25581
25580
|
}
|
25582
25581
|
initDiagnostics() {
|
25583
|
-
let e = new
|
25582
|
+
let e = new Dt(this.sdk, { onJoin: this.onJoin.bind(this), onPreview: this.onPreview.bind(this), onRoomUpdate: this.onRoomUpdate.bind(this), onPeerUpdate: this.onPeerUpdate.bind(this), onTrackUpdate: this.onTrackUpdate.bind(this), onMessageReceived: this.onMessageReceived.bind(this), onError: this.onError.bind(this), onReconnected: this.onReconnected.bind(this), onReconnecting: this.onReconnecting.bind(this), onRoleChangeRequest: this.onRoleChangeRequest.bind(this), onRoleUpdate: this.onRoleUpdate.bind(this), onDeviceChange: this.onDeviceChange.bind(this), onChangeTrackStateRequest: this.onChangeTrackStateRequest.bind(this), onChangeMultiTrackStateRequest: this.onChangeMultiTrackStateRequest.bind(this), onRemovedFromRoom: this.onRemovedFromRoom.bind(this), onNetworkQuality: this.onNetworkQuality.bind(this), onSessionStoreUpdate: this.onSessionStoreUpdate.bind(this), onPollsUpdate: this.onPollsUpdate.bind(this), onWhiteboardUpdate: this.onWhiteboardUpdate.bind(this) });
|
25584
25583
|
return this.sdk.addAudioListener({ onAudioLevelUpdate: this.onAudioLevelUpdate.bind(this) }), this.sdk.addConnectionQualityListener({ onConnectionQualityUpdate: this.onConnectionQualityUpdate.bind(this) }), e;
|
25585
25584
|
}
|
25586
25585
|
resetState(e = "resetState") {
|
25587
25586
|
this.isRoomJoinCalled = false, b2.cleanup(), this.setState((t2) => {
|
25588
|
-
Object.assign(t2,
|
25587
|
+
Object.assign(t2, ei());
|
25589
25588
|
}, e);
|
25590
25589
|
}
|
25591
25590
|
sdkJoinWithListeners(e) {
|
@@ -25630,7 +25629,7 @@ var init_dist = __esm({
|
|
25630
25629
|
this.setSessionStoreValueLocally(e, "sessionStoreUpdate");
|
25631
25630
|
}
|
25632
25631
|
onPollsUpdate(e, t2) {
|
25633
|
-
let i2 =
|
25632
|
+
let i2 = yi[e];
|
25634
25633
|
this.setState((r2) => {
|
25635
25634
|
let s2 = t2.reduce((o2, n2) => {
|
25636
25635
|
var l2;
|
@@ -25697,7 +25696,7 @@ var init_dist = __esm({
|
|
25697
25696
|
}
|
25698
25697
|
onJoin(e) {
|
25699
25698
|
let t2 = this.sdk.getPlaylistManager();
|
25700
|
-
this.audioPlaylist = new
|
25699
|
+
this.audioPlaylist = new Lt(t2, "audio", this.syncPlaylistState.bind(this), this.store), this.videoPlaylist = new Lt(t2, "video", this.syncRoomState.bind(this), this.store), this.syncRoomState("joinSync"), this.setState((i2) => {
|
25701
25700
|
var r2;
|
25702
25701
|
Object.assign(i2.room, _2.convertRoom(e, (r2 = this.sdk.getLocalPeer()) == null ? void 0 : r2.peerId)), i2.room.isConnected = true, i2.room.roomState = "Connected";
|
25703
25702
|
}, "joined"), t2.onProgress(this.setProgress), t2.onNewTrackStart((i2) => {
|
@@ -25739,13 +25738,13 @@ var init_dist = __esm({
|
|
25739
25738
|
if (e === 1)
|
25740
25739
|
this.hmsNotifications.sendTrackUpdate(e, t2.trackId), this.handleTrackRemove(t2, i2);
|
25741
25740
|
else if ([0, 1].includes(e)) {
|
25742
|
-
let r2 =
|
25741
|
+
let r2 = Ht[e];
|
25743
25742
|
this.syncRoomState(r2), this.hmsNotifications.sendTrackUpdate(e, t2.trackId);
|
25744
25743
|
} else {
|
25745
|
-
let r2 =
|
25744
|
+
let r2 = Ht[e] || "trackUpdate", s2 = _2.convertTrack(t2);
|
25746
25745
|
this.setState((o2) => {
|
25747
25746
|
let n2 = o2.tracks[s2.id];
|
25748
|
-
|
25747
|
+
$e(n2, s2) && (qr(n2, s2), Object.assign(n2, s2));
|
25749
25748
|
}, r2), this.hmsNotifications.sendTrackUpdate(e, t2.trackId);
|
25750
25749
|
}
|
25751
25750
|
}
|
@@ -25782,7 +25781,7 @@ var init_dist = __esm({
|
|
25782
25781
|
}
|
25783
25782
|
onChangeTrackStateRequest(e) {
|
25784
25783
|
var s2;
|
25785
|
-
let t2 = this.store.getState(X2((s2 = e.requestedBy) == null ? void 0 : s2.peerId)), i2 = this.getStoreLocalTrackIDfromSDKTrack(e.track), r2 = this.store.getState(
|
25784
|
+
let t2 = this.store.getState(X2((s2 = e.requestedBy) == null ? void 0 : s2.peerId)), i2 = this.getStoreLocalTrackIDfromSDKTrack(e.track), r2 = this.store.getState(fi(i2));
|
25786
25785
|
if (!r2)
|
25787
25786
|
return this.logPossibleInconsistency(`Not found track for which track state change was requested, ${e.track}`);
|
25788
25787
|
e.enabled || this.syncRoomState("changeTrackStateRequest"), this.hmsNotifications.sendChangeTrackStateRequest({ requestedBy: t2 || void 0, track: r2, enabled: e.enabled });
|
@@ -25954,8 +25953,8 @@ var init_dist = __esm({
|
|
25954
25953
|
}, t2);
|
25955
25954
|
}
|
25956
25955
|
};
|
25957
|
-
|
25958
|
-
|
25956
|
+
Di = (a11) => O2 ? `${a11} ${document.title}` : a11;
|
25957
|
+
wi = class {
|
25959
25958
|
constructor(e, t2) {
|
25960
25959
|
this.eventBus = e;
|
25961
25960
|
this.listener = t2;
|
@@ -26010,7 +26009,7 @@ var init_dist = __esm({
|
|
26010
26009
|
e !== this.score && (this.score = e, (i2 = (t2 = this.listener) == null ? void 0 : t2.onNetworkQuality) == null || i2.call(t2, e));
|
26011
26010
|
}
|
26012
26011
|
};
|
26013
|
-
|
26012
|
+
wt = class {
|
26014
26013
|
constructor(e, t2, i2, r2, s2, o2) {
|
26015
26014
|
this.store = e;
|
26016
26015
|
this.transport = t2;
|
@@ -26024,8 +26023,8 @@ var init_dist = __esm({
|
|
26024
26023
|
r3 && (yield this.diffRolesAndPublishTracks({ oldRole: e2, newRole: t3 }), (s3 = this.listener) == null || s3.onPeerUpdate(8, r3));
|
26025
26024
|
});
|
26026
26025
|
this.diffRolesAndPublishTracks = (i3) => c2(this, [i3], function* ({ oldRole: e2, newRole: t3 }) {
|
26027
|
-
var g2, f2, P8, k2, w2,
|
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 = (
|
26026
|
+
var g2, f2, P8, k2, w2, Oe;
|
26027
|
+
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 = (Oe = (w2 = this.store.getLocalPeer()) == null ? void 0 : w2.videoTrack) == null ? void 0 : Oe.enabled;
|
26029
26028
|
yield this.removeAudioTrack(n2), yield this.removeVideoTracks(o3 || u2), yield this.removeScreenTracks(l2 || p2);
|
26030
26029
|
let T = this.getSettings();
|
26031
26030
|
u2 && (T.isVideoMuted = !h2), yield this.publish(T), yield this.syncDevices(T, t3);
|
@@ -26132,12 +26131,12 @@ var init_dist = __esm({
|
|
26132
26131
|
}
|
26133
26132
|
};
|
26134
26133
|
Pe = new Jr();
|
26135
|
-
|
26134
|
+
_t = class {
|
26136
26135
|
constructor(e) {
|
26137
26136
|
this.type = e.type, this.source = e.source || "regular", this.description = "", e instanceof Re ? (this.mute = !e.enabled, this.track_id = e.publishedTrackId, this.stream_id = e.stream.id) : (this.mute = e.mute, this.track_id = e.track_id, this.stream_id = e.stream_id);
|
26138
26137
|
}
|
26139
26138
|
};
|
26140
|
-
|
26139
|
+
Nt = class {
|
26141
26140
|
constructor() {
|
26142
26141
|
this.TAG = "[Store]:";
|
26143
26142
|
this.knownRoles = {};
|
@@ -26148,7 +26147,7 @@ var init_dist = __esm({
|
|
26148
26147
|
this.roleDetailsArrived = false;
|
26149
26148
|
this.env = "prod";
|
26150
26149
|
this.simulcastEnabled = false;
|
26151
|
-
this.userAgent =
|
26150
|
+
this.userAgent = Tt(this.env);
|
26152
26151
|
this.polls = /* @__PURE__ */ new Map();
|
26153
26152
|
this.whiteboards = /* @__PURE__ */ new Map();
|
26154
26153
|
this.addPermissionToRole = (e, t2, i2, r2) => {
|
@@ -26268,7 +26267,7 @@ var init_dist = __esm({
|
|
26268
26267
|
return this.userAgent;
|
26269
26268
|
}
|
26270
26269
|
createAndSetUserAgent(e) {
|
26271
|
-
this.userAgent =
|
26270
|
+
this.userAgent = Tt(this.env, e);
|
26272
26271
|
}
|
26273
26272
|
setRoom(e) {
|
26274
26273
|
this.room = e;
|
@@ -26340,7 +26339,7 @@ var init_dist = __esm({
|
|
26340
26339
|
return [];
|
26341
26340
|
let i2 = this.getPolicyForRole(e.role.name).publishParams, r2, s2, o2;
|
26342
26341
|
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) => {
|
26343
|
-
let h2 =
|
26342
|
+
let h2 = Be[p2.rid], T = { width: Math.floor(s2 / p2.scaleResolutionDownBy), height: Math.floor(o2 / p2.scaleResolutionDownBy) };
|
26344
26343
|
return { layer: h2, resolution: T };
|
26345
26344
|
})) || [];
|
26346
26345
|
}
|
@@ -26408,7 +26407,7 @@ var init_dist = __esm({
|
|
26408
26407
|
t2.startsWith("prod") ? i2 = "prod" : t2.startsWith("qa") ? i2 = "qa" : t2.startsWith("dev") && (i2 = "dev"), this.env = i2, Pe.setEnv(i2);
|
26409
26408
|
}
|
26410
26409
|
};
|
26411
|
-
|
26410
|
+
_i = class {
|
26412
26411
|
constructor() {
|
26413
26412
|
this.TAG = "[WakeLockManager]";
|
26414
26413
|
this.wakeLock = null;
|
@@ -26442,7 +26441,7 @@ var init_dist = __esm({
|
|
26442
26441
|
});
|
26443
26442
|
}
|
26444
26443
|
};
|
26445
|
-
|
26444
|
+
Ni = class {
|
26446
26445
|
constructor(e) {
|
26447
26446
|
this.store = e;
|
26448
26447
|
this.bufferSize = 100;
|
@@ -26485,7 +26484,7 @@ var init_dist = __esm({
|
|
26485
26484
|
}
|
26486
26485
|
};
|
26487
26486
|
wa = { autoplayFailed: void 0, initialized: false, autoplayCheckPromise: void 0 };
|
26488
|
-
|
26487
|
+
Ot = class {
|
26489
26488
|
constructor(e, t2, i2) {
|
26490
26489
|
this.store = e;
|
26491
26490
|
this.deviceManager = t2;
|
@@ -26623,7 +26622,7 @@ var init_dist = __esm({
|
|
26623
26622
|
});
|
26624
26623
|
}
|
26625
26624
|
};
|
26626
|
-
|
26625
|
+
Oi = class {
|
26627
26626
|
constructor(e) {
|
26628
26627
|
this.eventBus = e;
|
26629
26628
|
this.pluginUsage = /* @__PURE__ */ new Map();
|
@@ -26662,7 +26661,7 @@ var init_dist = __esm({
|
|
26662
26661
|
this.eventBus.analytics.subscribe((t2) => this.updatePluginUsageData(t2));
|
26663
26662
|
}
|
26664
26663
|
};
|
26665
|
-
|
26664
|
+
xt = class {
|
26666
26665
|
constructor(e, t2) {
|
26667
26666
|
this.store = e;
|
26668
26667
|
this.eventBus = t2;
|
@@ -26700,7 +26699,7 @@ var init_dist = __esm({
|
|
26700
26699
|
let e2 = this.store.getLocalPeer();
|
26701
26700
|
!((s2 = (r2 = this.store.getConfig()) == null ? void 0 : r2.settings) == null ? void 0 : s2.videoDeviceId) && (e2 != null && e2.videoTrack) && (yield e2.videoTrack.setSettings({ deviceId: (o2 = this.videoInput[0]) == null ? void 0 : o2.deviceId }, true)), !((l2 = (n2 = this.store.getConfig()) == null ? void 0 : n2.settings) == null ? void 0 : l2.audioInputDeviceId) && (e2 != null && e2.audioTrack) && (yield e2.audioTrack.setSettings({ deviceId: (u2 = this.audioInput[0]) == null ? void 0 : u2.deviceId }, true));
|
26702
26701
|
});
|
26703
|
-
this.handleDeviceChange =
|
26702
|
+
this.handleDeviceChange = ai(() => c2(this, null, function* () {
|
26704
26703
|
yield this.enumerateDevices(), this.logDevices("After Device Change");
|
26705
26704
|
let e2 = this.store.getLocalPeer();
|
26706
26705
|
yield this.setOutputDevice(true), yield this.handleAudioInputDeviceChange(e2 == null ? void 0 : e2.audioTrack), yield this.handleVideoInputDeviceChange(e2 == null ? void 0 : e2.videoTrack), this.eventBus.analytics.publish(y2.deviceChange({ selection: this.getCurrentSelection(), type: "change", devices: this.getDevices() }));
|
@@ -26806,7 +26805,7 @@ var init_dist = __esm({
|
|
26806
26805
|
d2.d(this.TAG, e, JSON.stringify({ videoInput: [...this.videoInput], audioInput: [...this.audioInput], audioOutput: [...this.audioOutput], selected: this.getCurrentSelection() }, null, 4));
|
26807
26806
|
}
|
26808
26807
|
};
|
26809
|
-
|
26808
|
+
xi = class {
|
26810
26809
|
constructor(e, t2) {
|
26811
26810
|
this.deviceManager = e;
|
26812
26811
|
this.audioSinkManager = t2;
|
@@ -26853,7 +26852,7 @@ var init_dist = __esm({
|
|
26853
26852
|
};
|
26854
26853
|
}
|
26855
26854
|
};
|
26856
|
-
|
26855
|
+
Ut = class {
|
26857
26856
|
constructor() {
|
26858
26857
|
this.eventEmitter = new import_eventemitter23.EventEmitter2();
|
26859
26858
|
this.analytics = new V(G2.ANALYTICS, this.eventEmitter);
|
@@ -26875,7 +26874,7 @@ var init_dist = __esm({
|
|
26875
26874
|
this.leave = new V(G2.LEAVE, this.eventEmitter);
|
26876
26875
|
}
|
26877
26876
|
};
|
26878
|
-
|
26877
|
+
Ui = class {
|
26879
26878
|
constructor(e, t2, i2) {
|
26880
26879
|
this.store = e;
|
26881
26880
|
this.listener = t2;
|
@@ -26893,7 +26892,7 @@ var init_dist = __esm({
|
|
26893
26892
|
(n2 = this.listener) == null || n2.onPeerUpdate(5, null);
|
26894
26893
|
}
|
26895
26894
|
};
|
26896
|
-
|
26895
|
+
Bi = class {
|
26897
26896
|
constructor(e) {
|
26898
26897
|
this.listener = e;
|
26899
26898
|
this.TAG = "[BroadcastManager]";
|
@@ -26906,7 +26905,7 @@ var init_dist = __esm({
|
|
26906
26905
|
d2.d(this.TAG, `Received Message from sender=${(t2 = e == null ? void 0 : e.peer) == null ? void 0 : t2.peer_id}: ${e}`), (i2 = this.listener) == null || i2.onMessageReceived(e);
|
26907
26906
|
}
|
26908
26907
|
};
|
26909
|
-
|
26908
|
+
Vi = class {
|
26910
26909
|
constructor(e, t2) {
|
26911
26910
|
this.store = e;
|
26912
26911
|
this.listener = t2;
|
@@ -26920,7 +26919,7 @@ var init_dist = __esm({
|
|
26920
26919
|
(r2 = this.listener) == null || r2.onConnectionQualityUpdate(i2);
|
26921
26920
|
}
|
26922
26921
|
};
|
26923
|
-
|
26922
|
+
nt = class {
|
26924
26923
|
constructor(e, t2, i2) {
|
26925
26924
|
this.store = e;
|
26926
26925
|
this.eventBus = t2;
|
@@ -27052,7 +27051,7 @@ var init_dist = __esm({
|
|
27052
27051
|
return t2.mute !== i2.mute ? (r2 = i2.mute ? 2 : 3, e.type === "audio" && this.eventBus.audioTrackUpdate.publish({ track: e, enabled: !i2.mute })) : t2.description !== i2.description && (r2 = 4), r2;
|
27053
27052
|
}
|
27054
27053
|
};
|
27055
|
-
|
27054
|
+
Fi = class extends nt {
|
27056
27055
|
constructor(t2, i2, r2, s2) {
|
27057
27056
|
super(t2, i2, s2);
|
27058
27057
|
this.transport = r2;
|
@@ -27092,7 +27091,7 @@ var init_dist = __esm({
|
|
27092
27091
|
return r2 && ((l2 = (o2 = (s2 = i2 == null ? void 0 : i2.role) == null ? void 0 : s2.subscribeParams) == null ? void 0 : o2.subscribeToRoles) == null ? void 0 : l2.includes((n2 = r2.role) == null ? void 0 : n2.name));
|
27093
27092
|
}
|
27094
27093
|
};
|
27095
|
-
|
27094
|
+
Gi = class {
|
27096
27095
|
constructor(e, t2, i2, r2) {
|
27097
27096
|
this.store = e;
|
27098
27097
|
this.peerManager = t2;
|
@@ -27159,7 +27158,7 @@ var init_dist = __esm({
|
|
27159
27158
|
}
|
27160
27159
|
};
|
27161
27160
|
C = (a11) => a11 ? new Date(a11) : void 0;
|
27162
|
-
|
27161
|
+
Wi = class {
|
27163
27162
|
constructor(e, t2, i2) {
|
27164
27163
|
this.store = e;
|
27165
27164
|
this.trackManager = t2;
|
@@ -27258,7 +27257,7 @@ var init_dist = __esm({
|
|
27258
27257
|
});
|
27259
27258
|
}
|
27260
27259
|
};
|
27261
|
-
|
27260
|
+
$i = class {
|
27262
27261
|
constructor(e, t2) {
|
27263
27262
|
this.store = e;
|
27264
27263
|
this.eventBus = t2;
|
@@ -27282,11 +27281,11 @@ var init_dist = __esm({
|
|
27282
27281
|
}
|
27283
27282
|
}
|
27284
27283
|
};
|
27285
|
-
|
27284
|
+
Bt = (a11, e, t2) => {
|
27286
27285
|
let i2 = t2 === "qa" ? Ws : Gs, r2 = new URL(i2);
|
27287
27286
|
return r2.searchParams.set("endpoint", `https://${e}`), r2.searchParams.set("token", a11), r2.toString();
|
27288
27287
|
};
|
27289
|
-
|
27288
|
+
Ki = class {
|
27290
27289
|
constructor(e, t2, i2) {
|
27291
27290
|
this.transport = e;
|
27292
27291
|
this.store = t2;
|
@@ -27304,7 +27303,7 @@ var init_dist = __esm({
|
|
27304
27303
|
let t2 = this.store.getWhiteboard(e == null ? void 0 : e.id), i2 = t2 == null ? void 0 : t2.id;
|
27305
27304
|
if (t2 || (i2 = (yield this.transport.signal.createWhiteboard(this.getCreateOptionsWithDefaults(e))).id), !i2)
|
27306
27305
|
throw new Error(`Whiteboard ID: ${i2} not found`);
|
27307
|
-
let r2 = yield this.transport.signal.getWhiteboard({ id: i2 }), s2 = M2(m({}, t2), { title: e == null ? void 0 : e.title, attributes: e == null ? void 0 : e.attributes, id: r2.id, url:
|
27306
|
+
let r2 = yield this.transport.signal.getWhiteboard({ id: i2 }), s2 = M2(m({}, t2), { title: e == null ? void 0 : e.title, attributes: e == null ? void 0 : e.attributes, id: r2.id, url: Bt(r2.token, r2.addr, this.store.getEnv()), token: r2.token, addr: r2.addr, owner: r2.owner, permissions: r2.permissions || [], open: true });
|
27308
27307
|
this.store.setWhiteboard(s2), (o2 = this.listener) == null || o2.onWhiteboardUpdate(s2);
|
27309
27308
|
});
|
27310
27309
|
}
|
@@ -27329,7 +27328,7 @@ var init_dist = __esm({
|
|
27329
27328
|
let e = this.store.getWhiteboards();
|
27330
27329
|
for (let s2 of e.values())
|
27331
27330
|
if (s2.url) {
|
27332
|
-
let o2 = yield this.transport.signal.getWhiteboard({ id: s2.id }), n2 = this.store.getLocalPeer(), u2 = (n2 == null ? void 0 : n2.customerUserId) === o2.owner ? (i2 = (t2 = n2.role) == null ? void 0 : t2.permissions.whiteboard) == null ? void 0 : i2.includes("admin") : o2.permissions.length > 0, p2 = M2(m({}, s2), { id: o2.id, url:
|
27331
|
+
let o2 = yield this.transport.signal.getWhiteboard({ id: s2.id }), n2 = this.store.getLocalPeer(), u2 = (n2 == null ? void 0 : n2.customerUserId) === o2.owner ? (i2 = (t2 = n2.role) == null ? void 0 : t2.permissions.whiteboard) == null ? void 0 : i2.includes("admin") : o2.permissions.length > 0, p2 = M2(m({}, s2), { id: o2.id, url: Bt(o2.token, o2.addr, this.store.getEnv()), token: o2.token, addr: o2.addr, owner: o2.owner, permissions: o2.permissions, open: u2 });
|
27333
27332
|
this.store.setWhiteboard(p2), (r2 = this.listener) == null || r2.onWhiteboardUpdate(p2);
|
27334
27333
|
}
|
27335
27334
|
});
|
@@ -27343,12 +27342,12 @@ var init_dist = __esm({
|
|
27343
27342
|
}), { title: (e == null ? void 0 : e.title) || `${(o2 = this.store.getRoom()) == null ? void 0 : o2.id} Whiteboard`, reader: (e == null ? void 0 : e.reader) || i2, writer: (e == null ? void 0 : e.writer) || r2, admin: (e == null ? void 0 : e.admin) || s2 };
|
27344
27343
|
}
|
27345
27344
|
};
|
27346
|
-
|
27345
|
+
Vt = class {
|
27347
27346
|
constructor(e, t2, i2) {
|
27348
27347
|
this.transport = e;
|
27349
27348
|
this.store = t2;
|
27350
27349
|
this.listener = i2;
|
27351
|
-
this.whiteboard = new
|
27350
|
+
this.whiteboard = new Ki(e, t2, i2);
|
27352
27351
|
}
|
27353
27352
|
setListener(e) {
|
27354
27353
|
this.listener = e, this.whiteboard.setListener(e);
|
@@ -27358,7 +27357,7 @@ var init_dist = __esm({
|
|
27358
27357
|
var o2, n2;
|
27359
27358
|
let t2 = { customerID: "userid", peerID: "peerid", userName: "username" }, { poll_id: i2 } = yield this.transport.signal.setPollInfo(M2(m({}, e), { mode: e.mode ? t2[e.mode] : void 0, poll_id: e.id, vote: e.rolesThatCanVote, responses: e.rolesThatCanViewResponses }));
|
27360
27359
|
e.id || (e.id = i2), Array.isArray(e.questions) && (yield this.addQuestionsToPoll(e.id, e.questions));
|
27361
|
-
let r2 = yield this.transport.signal.getPollQuestions({ poll_id: e.id, index: 0, count: 50 }), s2 =
|
27360
|
+
let r2 = yield this.transport.signal.getPollQuestions({ poll_id: e.id, index: 0, count: 50 }), s2 = qi(M2(m({}, e), { poll_id: e.id, state: "created", created_by: (o2 = this.store.getLocalPeer()) == null ? void 0 : o2.peerId }));
|
27362
27361
|
s2.questions = r2.questions.map(({ question: l2, options: u2, answer: p2 }) => M2(m({}, l2), { options: u2, answer: p2 })), (n2 = this.listener) == null || n2.onPollsUpdate(0, [s2]);
|
27363
27362
|
});
|
27364
27363
|
}
|
@@ -27426,7 +27425,7 @@ var init_dist = __esm({
|
|
27426
27425
|
r2 = [...l2.polls, ...r2, ...u2.polls];
|
27427
27426
|
}
|
27428
27427
|
for (let l2 of r2) {
|
27429
|
-
let u2 = yield this.transport.signal.getPollQuestions({ poll_id: l2.poll_id, index: 0, count: 50 }), p2 =
|
27428
|
+
let u2 = yield this.transport.signal.getPollQuestions({ poll_id: l2.poll_id, index: 0, count: 50 }), p2 = qi(l2), h2 = this.store.getPoll(l2.poll_id);
|
27430
27429
|
p2.questions = u2.questions.map(({ question: T, options: g2, answer: f2 }, P8) => {
|
27431
27430
|
var k2, w2;
|
27432
27431
|
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 });
|
@@ -27452,11 +27451,11 @@ var init_dist = __esm({
|
|
27452
27451
|
return i2;
|
27453
27452
|
}
|
27454
27453
|
};
|
27455
|
-
|
27454
|
+
qi = (a11) => {
|
27456
27455
|
let e = { userid: "customerID", peerid: "peerID", username: "userName" };
|
27457
27456
|
return { id: a11.poll_id, title: a11.title, startedBy: a11.started_by, createdBy: a11.created_by, anonymous: a11.anonymous, type: a11.type, duration: a11.duration, locked: a11.locked, mode: a11.mode ? e[a11.mode] : void 0, visibility: a11.visibility, rolesThatCanVote: a11.vote || [], rolesThatCanViewResponses: a11.responses || [], state: a11.state, stoppedBy: a11.stopped_by, startedAt: C(a11.started_at), stoppedAt: C(a11.stopped_at), createdAt: C(a11.created_at) };
|
27458
27457
|
};
|
27459
|
-
|
27458
|
+
ji = class {
|
27460
27459
|
constructor(e, t2, i2) {
|
27461
27460
|
this.store = e;
|
27462
27461
|
this.transport = t2;
|
@@ -27489,7 +27488,7 @@ var init_dist = __esm({
|
|
27489
27488
|
(i2 = this.listener) == null || i2.onPollsUpdate(1, [o2]);
|
27490
27489
|
return;
|
27491
27490
|
}
|
27492
|
-
let n2 = yield this.transport.signal.getPollQuestions({ poll_id: s2.poll_id, index: 0, count: 50 }), l2 =
|
27491
|
+
let n2 = yield this.transport.signal.getPollQuestions({ poll_id: s2.poll_id, index: 0, count: 50 }), l2 = qi(s2);
|
27493
27492
|
l2.questions = n2.questions.map(({ question: u2, options: p2, answer: h2 }) => M2(m({}, u2), { options: p2, answer: h2 })), yield this.updatePollResponses(l2, true), t2.push(l2), this.store.setPoll(l2);
|
27494
27493
|
}
|
27495
27494
|
(r2 = this.listener) == null || r2.onPollsUpdate(1, t2);
|
@@ -27549,7 +27548,7 @@ var init_dist = __esm({
|
|
27549
27548
|
});
|
27550
27549
|
}
|
27551
27550
|
};
|
27552
|
-
|
27551
|
+
Ji = class {
|
27553
27552
|
constructor(e, t2) {
|
27554
27553
|
this.store = e;
|
27555
27554
|
this.listener = t2;
|
@@ -27610,7 +27609,7 @@ var init_dist = __esm({
|
|
27610
27609
|
return e && (s2 = s2.filter((o2) => o2.type === e)), t2 && (s2 = s2.filter((o2) => o2.source === t2)), s2.filter((o2) => o2.enabled !== i2);
|
27611
27610
|
}
|
27612
27611
|
};
|
27613
|
-
|
27612
|
+
Qi = class {
|
27614
27613
|
constructor(e, t2) {
|
27615
27614
|
this.store = e;
|
27616
27615
|
this.listener = t2;
|
@@ -27767,7 +27766,7 @@ var init_dist = __esm({
|
|
27767
27766
|
return d2.e(this.TAG, "error in streaming/recording", i2), i2;
|
27768
27767
|
}
|
27769
27768
|
};
|
27770
|
-
|
27769
|
+
zi = class {
|
27771
27770
|
constructor(e, t2) {
|
27772
27771
|
this.store = e;
|
27773
27772
|
this.listener = t2;
|
@@ -27781,7 +27780,7 @@ var init_dist = __esm({
|
|
27781
27780
|
(i2 = this.listener) == null || i2.onSessionStoreUpdate(t2);
|
27782
27781
|
}
|
27783
27782
|
};
|
27784
|
-
|
27783
|
+
Yi = class {
|
27785
27784
|
constructor(e, t2, i2) {
|
27786
27785
|
this.store = e;
|
27787
27786
|
this.transport = t2;
|
@@ -27806,13 +27805,13 @@ var init_dist = __esm({
|
|
27806
27805
|
o2.url = i2 == null ? void 0 : i2.url, o2.token = i2 == null ? void 0 : i2.token, o2.addr = i2 == null ? void 0 : i2.addr, o2.permissions = i2 == null ? void 0 : i2.permissions;
|
27807
27806
|
else {
|
27808
27807
|
let l2 = yield this.transport.signal.getWhiteboard({ id: e.id });
|
27809
|
-
o2.url =
|
27808
|
+
o2.url = Bt(l2.token, l2.addr, this.store.getEnv()), o2.token = l2.token, o2.addr = l2.addr, o2.permissions = l2.permissions, o2.open = l2.permissions.length > 0;
|
27810
27809
|
}
|
27811
27810
|
this.store.setWhiteboard(o2), (n2 = this.listener) == null || n2.onWhiteboardUpdate(o2);
|
27812
27811
|
});
|
27813
27812
|
}
|
27814
27813
|
};
|
27815
|
-
|
27814
|
+
Xi = class {
|
27816
27815
|
constructor(e, t2, i2, r2, s2, o2) {
|
27817
27816
|
this.store = e;
|
27818
27817
|
this.transport = i2;
|
@@ -27839,7 +27838,7 @@ var init_dist = __esm({
|
|
27839
27838
|
this.peerManager.handlePeerInfoUpdate({ peer: i3, name: e2, data: t3 });
|
27840
27839
|
};
|
27841
27840
|
let n2 = this.transport.isFlagEnabled("onDemandTracks");
|
27842
|
-
this.trackManager = n2 ? new
|
27841
|
+
this.trackManager = n2 ? new Fi(this.store, t2, this.transport, this.listener) : new nt(this.store, t2, this.listener), this.peerManager = new Wi(this.store, this.trackManager, this.listener), this.peerListManager = new Gi(this.store, this.peerManager, this.trackManager, this.listener), this.broadcastManager = new Bi(this.listener), this.policyChangeManager = new $i(this.store, t2), this.requestManager = new Ji(this.store, this.listener), this.activeSpeakerManager = new Ui(this.store, this.listener, this.audioListener), this.connectionQualityManager = new Vi(this.store, this.connectionQualityListener), this.roomUpdateManager = new Qi(this.store, this.listener), this.sessionMetadataManager = new zi(this.store, this.listener), this.pollsManager = new ji(this.store, this.transport, this.listener), this.whiteboardManager = new Yi(this.store, this.transport, this.listener);
|
27843
27842
|
}
|
27844
27843
|
setListener(e) {
|
27845
27844
|
this.listener = e, this.trackManager.listener = e, this.peerManager.listener = e, this.peerListManager.listener = e, this.broadcastManager.listener = e, this.requestManager.listener = e, this.activeSpeakerManager.listener = e, this.roomUpdateManager.listener = e, this.sessionMetadataManager.listener = e, this.pollsManager.listener = e, this.whiteboardManager.listener = e;
|
@@ -27891,7 +27890,7 @@ var init_dist = __esm({
|
|
27891
27890
|
}
|
27892
27891
|
}
|
27893
27892
|
};
|
27894
|
-
|
27893
|
+
Zi = class {
|
27895
27894
|
constructor(e) {
|
27896
27895
|
this.transport = e;
|
27897
27896
|
this.observedKeys = /* @__PURE__ */ new Set();
|
@@ -27931,7 +27930,7 @@ var init_dist = __esm({
|
|
27931
27930
|
});
|
27932
27931
|
}
|
27933
27932
|
};
|
27934
|
-
|
27933
|
+
er = class {
|
27935
27934
|
constructor(e, t2, i2 = "", r2 = "", s2 = "https://prod-init.100ms.live/init", o2 = false, n2) {
|
27936
27935
|
this.authToken = e;
|
27937
27936
|
this.peerId = t2;
|
@@ -27944,15 +27943,15 @@ var init_dist = __esm({
|
|
27944
27943
|
};
|
27945
27944
|
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 || {});
|
27946
27945
|
_a7 = { 0: [], 1: [], 2: [1], 3: [1], 4: [1] };
|
27947
|
-
|
27948
|
-
|
27946
|
+
tr = ((n2) => (n2.Disconnected = "Disconnected", n2.Connecting = "Connecting", n2.Joined = "Joined", n2.Preview = "Preview", n2.Failed = "Failed", n2.Reconnecting = "Reconnecting", n2.Leaving = "Leaving", n2))(tr || {});
|
27947
|
+
ir = class {
|
27949
27948
|
constructor(e) {
|
27950
27949
|
this.promise = new Promise((t2, i2) => {
|
27951
27950
|
this.resolve = t2, this.reject = i2, e(t2, i2);
|
27952
27951
|
});
|
27953
27952
|
}
|
27954
27953
|
};
|
27955
|
-
|
27954
|
+
rr = class {
|
27956
27955
|
constructor(e, t2) {
|
27957
27956
|
this.onStateChange = e;
|
27958
27957
|
this.sendEvent = t2;
|
@@ -27979,7 +27978,7 @@ var init_dist = __esm({
|
|
27979
27978
|
d2.d(this.TAG, `schedule: Already a task for ${j2[e]} scheduled, waiting for its completion`), yield g2.promise;
|
27980
27979
|
return;
|
27981
27980
|
}
|
27982
|
-
let f2 = new
|
27981
|
+
let f2 = new ir((P8, k2) => {
|
27983
27982
|
});
|
27984
27983
|
this.inProgress.set(e, f2), this.sendEvent(t2, e);
|
27985
27984
|
}
|
@@ -28040,7 +28039,7 @@ var init_dist = __esm({
|
|
28040
28039
|
});
|
28041
28040
|
}
|
28042
28041
|
};
|
28043
|
-
|
28042
|
+
sr = class extends Ce {
|
28044
28043
|
constructor() {
|
28045
28044
|
super(100);
|
28046
28045
|
this.localStorage = new le("hms-analytics");
|
@@ -28061,7 +28060,7 @@ var init_dist = __esm({
|
|
28061
28060
|
});
|
28062
28061
|
}
|
28063
28062
|
};
|
28064
|
-
|
28063
|
+
ar = class {
|
28065
28064
|
constructor() {
|
28066
28065
|
this.TAG = "[AnalyticsTransport]";
|
28067
28066
|
}
|
@@ -28091,14 +28090,14 @@ var init_dist = __esm({
|
|
28091
28090
|
}
|
28092
28091
|
}
|
28093
28092
|
};
|
28094
|
-
|
28093
|
+
or = class extends ar {
|
28095
28094
|
constructor(t2) {
|
28096
28095
|
super();
|
28097
28096
|
this.transportProvider = t2;
|
28098
|
-
this.failedEvents = new
|
28097
|
+
this.failedEvents = new sr();
|
28099
28098
|
}
|
28100
28099
|
};
|
28101
|
-
|
28100
|
+
ct = class {
|
28102
28101
|
constructor(e, t2, i2, r2) {
|
28103
28102
|
this.store = e;
|
28104
28103
|
this.eventBus = t2;
|
@@ -28133,7 +28132,7 @@ var init_dist = __esm({
|
|
28133
28132
|
});
|
28134
28133
|
}
|
28135
28134
|
};
|
28136
|
-
|
28135
|
+
dt = class {
|
28137
28136
|
constructor({ track: e, ssrc: t2, rid: i2, kind: r2, sampleWindowSize: s2 }) {
|
28138
28137
|
this.samples = [];
|
28139
28138
|
this.tempStats = [];
|
@@ -28176,10 +28175,10 @@ var init_dist = __esm({
|
|
28176
28175
|
return this.tempStats.reduce((r2, s2) => r2 + ((s2[e] || 0) > t2 ? 1 : 0), 0);
|
28177
28176
|
}
|
28178
28177
|
};
|
28179
|
-
|
28180
|
-
|
28181
|
-
|
28182
|
-
|
28178
|
+
nr = (a11, e) => a11 && e && (a11.frameWidth !== e.frameWidth || a11.frameHeight !== e.frameHeight);
|
28179
|
+
cr = (a11, e) => a11 && e && a11.enabled !== e.enabled;
|
28180
|
+
Ft = (a11) => Object.entries(a11).filter(([, e]) => e !== void 0).reduce((e, [t2, i2]) => (e[t2] = i2, e), {});
|
28181
|
+
Gt = class extends ct {
|
28183
28182
|
constructor() {
|
28184
28183
|
super(...arguments);
|
28185
28184
|
this.trackAnalytics = /* @__PURE__ */ new Map();
|
@@ -28219,22 +28218,22 @@ var init_dist = __esm({
|
|
28219
28218
|
return i2.rid ? `${t2}:${i2.rid}` : t2;
|
28220
28219
|
}
|
28221
28220
|
};
|
28222
|
-
zr = class extends
|
28221
|
+
zr = class extends dt {
|
28223
28222
|
constructor() {
|
28224
28223
|
super(...arguments);
|
28225
28224
|
this.samples = [];
|
28226
28225
|
this.collateSample = () => {
|
28227
28226
|
let t2 = this.getLatestStat(), i2 = t2.qualityLimitationDurations, r2 = i2 && { bandwidth_sec: i2.bandwidth, cpu_sec: i2.cpu, other_sec: i2.other }, s2 = t2.frameHeight ? { height_px: this.getLatestStat().frameHeight, width_px: this.getLatestStat().frameWidth } : void 0, o2 = this.calculateAverage("jitter", false), n2 = o2 ? Math.round(o2 * 1e3) : void 0, l2 = this.calculateAverage("roundTripTime", false), u2 = l2 ? Math.round(l2 * 1e3) : void 0;
|
28228
|
-
return
|
28227
|
+
return Ft({ timestamp: Date.now(), avg_available_outgoing_bitrate_bps: this.calculateAverage("availableOutgoingBitrate"), avg_bitrate_bps: this.calculateAverage("bitrate"), avg_fps: this.calculateAverage("framesPerSecond"), total_packets_lost: this.getLatestStat().packetsLost, total_packets_sent: this.getLatestStat().packetsSent, total_packet_sent_delay_sec: parseFloat(this.calculateDifferenceForSample("totalPacketSendDelay").toFixed(4)), total_fir_count: this.calculateDifferenceForSample("firCount"), total_pli_count: this.calculateDifferenceForSample("pliCount"), total_nack_count: this.calculateDifferenceForSample("nackCount"), avg_jitter_ms: n2, avg_round_trip_time_ms: u2, total_quality_limitation: r2, resolution: s2 });
|
28229
28228
|
};
|
28230
28229
|
this.shouldCreateSample = () => {
|
28231
28230
|
let t2 = this.tempStats.length, i2 = this.tempStats[t2 - 1], r2 = this.tempStats[t2 - 2];
|
28232
|
-
return t2 === 30 ||
|
28231
|
+
return t2 === 30 || cr(i2, r2) || i2.kind === "video" && nr(i2, r2);
|
28233
28232
|
};
|
28234
28233
|
this.toAnalytics = () => ({ track_id: this.track_id, ssrc: this.ssrc, source: this.source, rid: this.rid, samples: this.samples });
|
28235
28234
|
}
|
28236
28235
|
};
|
28237
|
-
|
28236
|
+
Wt = class extends ct {
|
28238
28237
|
constructor() {
|
28239
28238
|
super(...arguments);
|
28240
28239
|
this.trackAnalytics = /* @__PURE__ */ new Map();
|
@@ -28254,7 +28253,7 @@ var init_dist = __esm({
|
|
28254
28253
|
Object.keys(i2).forEach((s2) => {
|
28255
28254
|
var f2, P8;
|
28256
28255
|
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
|
28256
|
+
let Oe = (w2 == null ? void 0 : w2.jitterBufferDelay) || 0, Xt = (w2 == null ? void 0 : w2.jitterBufferEmittedCount) || 0, x2 = ((k2 == null ? void 0 : k2.jitterBufferDelay) || 0) - Oe, $ = ((k2 == null ? void 0 : k2.jitterBufferEmittedCount) || 0) - Xt;
|
28258
28257
|
return $ > 0 ? x2 * 1e3 / $ : (w2 == null ? void 0 : w2.calculatedJitterBufferDelay) || 0;
|
28259
28258
|
})(n2, l2), h2 = this.calculateAvSyncForStat(n2, t2), T = M2(m({}, n2), { calculatedJitterBufferDelay: p2, avSync: h2 });
|
28260
28259
|
if (n2.kind === "video") {
|
@@ -28276,39 +28275,39 @@ var init_dist = __esm({
|
|
28276
28275
|
return;
|
28277
28276
|
let r2 = this.store.getPeerById(t2.peerID), s2 = r2 == null ? void 0 : r2.audioTrack, o2 = r2 == null ? void 0 : r2.videoTrack;
|
28278
28277
|
if (!(s2 && o2 && s2.enabled && o2.enabled))
|
28279
|
-
return
|
28278
|
+
return kt;
|
28280
28279
|
let l2 = i2.getRemoteTrackStats(s2.trackId);
|
28281
28280
|
if (!l2)
|
28282
|
-
return
|
28281
|
+
return kt;
|
28283
28282
|
if (l2.estimatedPlayoutTimestamp)
|
28284
28283
|
return l2.estimatedPlayoutTimestamp - t2.estimatedPlayoutTimestamp;
|
28285
28284
|
}
|
28286
28285
|
};
|
28287
|
-
Xr = class extends
|
28286
|
+
Xr = class extends dt {
|
28288
28287
|
constructor() {
|
28289
28288
|
super(...arguments);
|
28290
28289
|
this.samples = [];
|
28291
28290
|
this.collateSample = () => {
|
28292
28291
|
let t2 = this.getLatestStat(), i2 = this.getFirstStat(), r2 = { timestamp: Date.now(), total_pli_count: this.calculateDifferenceForSample("pliCount"), total_nack_count: this.calculateDifferenceForSample("nackCount"), avg_jitter_buffer_delay: this.calculateAverage("calculatedJitterBufferDelay", false) };
|
28293
28292
|
if (t2.kind === "video")
|
28294
|
-
return
|
28293
|
+
return Ft(M2(m({}, r2), { avg_av_sync_ms: this.calculateAvgAvSyncForSample(), avg_frames_received_per_sec: this.calculateDifferenceAverage("framesReceived"), avg_frames_dropped_per_sec: this.calculateDifferenceAverage("framesDropped"), avg_frames_decoded_per_sec: this.calculateDifferenceAverage("framesDecoded"), frame_width: this.calculateAverage("frameWidth"), frame_height: this.calculateAverage("frameHeight"), expected_frame_width: this.calculateAverage("expectedFrameWidth"), expected_frame_height: this.calculateAverage("expectedFrameHeight"), pause_count: this.calculateDifferenceForSample("pauseCount"), pause_duration_seconds: this.calculateDifferenceForSample("totalPausesDuration"), freeze_count: this.calculateDifferenceForSample("freezeCount"), freeze_duration_seconds: this.calculateDifferenceForSample("totalFreezesDuration") }));
|
28295
28294
|
{
|
28296
28295
|
let s2 = (t2.concealedSamples || 0) - (t2.silentConcealedSamples || 0) - ((i2.concealedSamples || 0) - (i2.silentConcealedSamples || 0));
|
28297
|
-
return
|
28296
|
+
return Ft(M2(m({}, r2), { audio_level: this.calculateInstancesOfHigh("audioLevel", 0.05), audio_concealed_samples: s2, audio_total_samples_received: this.calculateDifferenceForSample("totalSamplesReceived"), audio_concealment_events: this.calculateDifferenceForSample("concealmentEvents"), fec_packets_discarded: this.calculateDifferenceForSample("fecPacketsDiscarded"), fec_packets_received: this.calculateDifferenceForSample("fecPacketsReceived"), total_samples_duration: this.calculateDifferenceForSample("totalSamplesDuration"), total_packets_received: this.calculateDifferenceForSample("packetsReceived"), total_packets_lost: this.calculateDifferenceForSample("packetsLost") }));
|
28298
28297
|
}
|
28299
28298
|
};
|
28300
28299
|
this.shouldCreateSample = () => {
|
28301
28300
|
let t2 = this.tempStats.length, i2 = this.tempStats[t2 - 1], r2 = this.tempStats[t2 - 2];
|
28302
|
-
return t2 === 10 ||
|
28301
|
+
return t2 === 10 || cr(i2, r2) || i2.kind === "video" && nr(i2, r2);
|
28303
28302
|
};
|
28304
28303
|
this.toAnalytics = () => ({ track_id: this.track_id, ssrc: this.ssrc, source: this.source, rid: this.rid, samples: this.samples });
|
28305
28304
|
}
|
28306
28305
|
calculateAvgAvSyncForSample() {
|
28307
|
-
let i2 = this.tempStats.map((r2) => r2.avSync).filter((r2) => r2 !== void 0 && r2 !==
|
28308
|
-
return i2.length === 0 ?
|
28306
|
+
let i2 = this.tempStats.map((r2) => r2.avSync).filter((r2) => r2 !== void 0 && r2 !== kt);
|
28307
|
+
return i2.length === 0 ? kt : i2.reduce((r2, s2) => r2 + s2, 0) / i2.length;
|
28309
28308
|
}
|
28310
28309
|
};
|
28311
|
-
|
28310
|
+
lr = ((t2) => (t2[t2.Publish = 0] = "Publish", t2[t2.Subscribe = 1] = "Subscribe", t2))(lr || {});
|
28312
28311
|
Ee = "[HMSConnection]";
|
28313
28312
|
qe = class {
|
28314
28313
|
constructor(e, t2) {
|
@@ -28387,13 +28386,13 @@ var init_dist = __esm({
|
|
28387
28386
|
let i2 = (r2 = t2.track) == null ? void 0 : r2.kind;
|
28388
28387
|
if (t2.transport) {
|
28389
28388
|
let s2 = t2.transport.iceTransport, o2 = () => {
|
28390
|
-
typeof s2.getSelectedCandidatePair == "function" && (this.selectedCandidatePair = s2.getSelectedCandidatePair(), this.selectedCandidatePair && (this.observer.onSelectedCandidatePairChange(this.selectedCandidatePair), d2.d(Ee, `${
|
28389
|
+
typeof s2.getSelectedCandidatePair == "function" && (this.selectedCandidatePair = s2.getSelectedCandidatePair(), this.selectedCandidatePair && (this.observer.onSelectedCandidatePairChange(this.selectedCandidatePair), d2.d(Ee, `${lr[this.role]} connection`, `selected ${i2 || "unknown"} candidate pair`, JSON.stringify(this.selectedCandidatePair, null, 2))));
|
28391
28390
|
};
|
28392
28391
|
typeof s2.onselectedcandidatepairchange == "function" && (s2.onselectedcandidatepairchange = o2), o2();
|
28393
28392
|
}
|
28394
28393
|
});
|
28395
28394
|
} catch (e) {
|
28396
|
-
d2.w(Ee, `Error in logging selected ice candidate pair for ${
|
28395
|
+
d2.w(Ee, `Error in logging selected ice candidate pair for ${lr[this.role]} connection`, e);
|
28397
28396
|
}
|
28398
28397
|
}
|
28399
28398
|
removeTrack(e) {
|
@@ -28426,11 +28425,11 @@ var init_dist = __esm({
|
|
28426
28425
|
return this.nativeConnection.getReceivers();
|
28427
28426
|
}
|
28428
28427
|
};
|
28429
|
-
|
28428
|
+
Kt = class extends qe {
|
28430
28429
|
constructor(t2, i2, r2) {
|
28431
28430
|
super(0, t2);
|
28432
28431
|
this.TAG = "[HMSPublishConnection]";
|
28433
|
-
this.observer = r2, this.nativeConnection = new RTCPeerConnection(i2), this.channel = this.nativeConnection.createDataChannel(
|
28432
|
+
this.observer = r2, this.nativeConnection = new RTCPeerConnection(i2), this.channel = this.nativeConnection.createDataChannel(li, { protocol: "SCTP" }), this.channel.onerror = (s2) => d2.e(this.TAG, `publish data channel onerror ${s2}`, s2), this.nativeConnection.onicecandidate = ({ candidate: s2 }) => {
|
28434
28433
|
s2 && (this.observer.onIceCandidate(s2), t2.trickle(this.role, s2));
|
28435
28434
|
}, this.nativeConnection.oniceconnectionstatechange = () => {
|
28436
28435
|
this.observer.onIceConnectionChange(this.nativeConnection.iceConnectionState);
|
@@ -28450,7 +28449,7 @@ var init_dist = __esm({
|
|
28450
28449
|
});
|
28451
28450
|
}
|
28452
28451
|
};
|
28453
|
-
|
28452
|
+
qt = class {
|
28454
28453
|
constructor(e, t2, i2 = "") {
|
28455
28454
|
this.TAG = "[HMSDataChannel]";
|
28456
28455
|
this.nativeChannel = e, this.observer = t2, this.metadata = i2, e.onmessage = (r2) => {
|
@@ -28473,7 +28472,7 @@ var init_dist = __esm({
|
|
28473
28472
|
this.nativeChannel.close();
|
28474
28473
|
}
|
28475
28474
|
};
|
28476
|
-
|
28475
|
+
jt = class a9 extends qe {
|
28477
28476
|
constructor(t2, i2, r2, s2) {
|
28478
28477
|
super(1, t2);
|
28479
28478
|
this.isFlagEnabled = r2;
|
@@ -28520,7 +28519,7 @@ var init_dist = __esm({
|
|
28520
28519
|
}, this.nativeConnection.onconnectionstatechange = () => {
|
28521
28520
|
this.observer.onConnectionStateChange(this.nativeConnection.connectionState);
|
28522
28521
|
}, this.nativeConnection.ondatachannel = (t2) => {
|
28523
|
-
t2.channel.label ===
|
28522
|
+
t2.channel.label === li && (this.apiChannel = new qt(t2.channel, { onMessage: (i2) => {
|
28524
28523
|
this.eventEmitter.emit("message", i2), this.observer.onApiChannelMessage(i2);
|
28525
28524
|
} }, `role=${this.role}`), t2.channel.onopen = this.handlePendingApiMessages);
|
28526
28525
|
}, this.nativeConnection.onicecandidate = (t2) => {
|
@@ -28570,8 +28569,8 @@ var init_dist = __esm({
|
|
28570
28569
|
}
|
28571
28570
|
};
|
28572
28571
|
Ua = (a11, e) => !e || e.length === 0 ? a11 : e.map((i2) => ({ urls: i2.urls, credentialType: "password", credential: i2.password, username: i2.userName }));
|
28573
|
-
|
28574
|
-
|
28572
|
+
ur = "[InitService]";
|
28573
|
+
Jt = class {
|
28575
28574
|
static handleError(e, t2) {
|
28576
28575
|
switch (e.status) {
|
28577
28576
|
case 404:
|
@@ -28584,16 +28583,16 @@ var init_dist = __esm({
|
|
28584
28583
|
}
|
28585
28584
|
static fetchInitConfig(n2) {
|
28586
28585
|
return c2(this, arguments, function* ({ token: e, peerId: t2, userAgent: i2, initEndpoint: r2 = "https://prod-init.100ms.live", region: s2 = "", iceServers: o2 }) {
|
28587
|
-
d2.d(
|
28586
|
+
d2.d(ur, `fetchInitConfig: initEndpoint=${r2} token=${e} peerId=${t2} region=${s2} `);
|
28588
28587
|
let l2 = ln2(r2, t2, i2, s2);
|
28589
28588
|
try {
|
28590
28589
|
let u2 = yield fetch(l2, { headers: { Authorization: `Bearer ${e}` } });
|
28591
28590
|
try {
|
28592
28591
|
let p2 = yield u2.clone().json();
|
28593
|
-
return this.handleError(u2, p2), d2.d(
|
28592
|
+
return this.handleError(u2, p2), d2.d(ur, `config is ${JSON.stringify(p2, null, 2)}`), un2(p2, o2);
|
28594
28593
|
} catch (p2) {
|
28595
28594
|
let h2 = yield u2.text();
|
28596
|
-
throw d2.e(
|
28595
|
+
throw d2.e(ur, "json error", p2.message, h2), p2 instanceof v2 ? p2 : S2.APIErrors.ServerErrors(u2.status, "INIT", p2.message);
|
28597
28596
|
}
|
28598
28597
|
} catch (u2) {
|
28599
28598
|
let p2 = u2;
|
@@ -28602,7 +28601,7 @@ var init_dist = __esm({
|
|
28602
28601
|
});
|
28603
28602
|
}
|
28604
28603
|
};
|
28605
|
-
|
28604
|
+
Qt = class {
|
28606
28605
|
constructor(e) {
|
28607
28606
|
this.TAG = "[SIGNAL]: ";
|
28608
28607
|
this.pongResponseTimes = new Ce(5);
|
@@ -28974,7 +28973,7 @@ var init_dist = __esm({
|
|
28974
28973
|
return { downlink: a11.downlink, downlinkMax: a11.downlinkMax, effectiveType: a11.effectiveType, rtt: a11.rtt, saveData: a11.saveData, type: a11.type };
|
28975
28974
|
};
|
28976
28975
|
I2 = "[HMSTransport]:";
|
28977
|
-
|
28976
|
+
zt = class {
|
28978
28977
|
constructor(e, t2, i2, r2, s2, o2, n2) {
|
28979
28978
|
this.observer = e;
|
28980
28979
|
this.deviceManager = t2;
|
@@ -29013,7 +29012,7 @@ var init_dist = __esm({
|
|
29013
29012
|
}), onFailure: (e2) => {
|
29014
29013
|
this.joinParameters && this.retryScheduler.schedule({ category: 1, error: e2, task: this.retrySignalDisconnectTask, originalState: this.state });
|
29015
29014
|
}, onOffline: (e2) => c2(this, null, function* () {
|
29016
|
-
d2.d(I2, "socket offline",
|
29015
|
+
d2.d(I2, "socket offline", tr[this.state]);
|
29017
29016
|
try {
|
29018
29017
|
this.state !== "Leaving" && this.joinParameters && this.retryScheduler.schedule({ category: 1, error: S2.WebSocketConnectionErrors.WebSocketConnectionLost("RECONNECT_SIGNAL", e2), task: this.retrySignalDisconnectTask, originalState: this.state });
|
29019
29018
|
} catch (t3) {
|
@@ -29021,12 +29020,12 @@ var init_dist = __esm({
|
|
29021
29020
|
}
|
29022
29021
|
}), onOnline: () => {
|
29023
29022
|
var e2;
|
29024
|
-
d2.d(I2, "socket online",
|
29023
|
+
d2.d(I2, "socket online", tr[this.state]), this.analyticsSignalTransport.flushFailedEvents((e2 = this.store.getLocalPeer()) == null ? void 0 : e2.peerId);
|
29025
29024
|
}, onNetworkOnline: () => {
|
29026
29025
|
this.analyticsEventsService.flushFailedClientEvents();
|
29027
29026
|
} };
|
29028
|
-
this.signal = new
|
29029
|
-
this.analyticsSignalTransport = new
|
29027
|
+
this.signal = new Qt(this.signalObserver);
|
29028
|
+
this.analyticsSignalTransport = new or(this.signal);
|
29030
29029
|
this.publishDtlsStateTimer = 0;
|
29031
29030
|
this.lastPublishDtlsState = "new";
|
29032
29031
|
this.publishConnectionObserver = { onRenegotiationNeeded: () => c2(this, null, function* () {
|
@@ -29116,11 +29115,11 @@ var init_dist = __esm({
|
|
29116
29115
|
return this.signal.trackUpdate(this.trackStates), e2;
|
29117
29116
|
});
|
29118
29117
|
var u2, p2;
|
29119
|
-
this.webrtcInternals = new
|
29118
|
+
this.webrtcInternals = new pi(this.store, this.eventBus, (u2 = this.publishConnection) == null ? void 0 : u2.nativeConnection, (p2 = this.subscribeConnection) == null ? void 0 : p2.nativeConnection);
|
29120
29119
|
let l2 = (h2, T) => c2(this, null, function* () {
|
29121
29120
|
h2 !== this.state && (this.state = h2, yield this.observer.onStateChange(this.state, T));
|
29122
29121
|
});
|
29123
|
-
this.retryScheduler = new
|
29122
|
+
this.retryScheduler = new rr(l2, this.sendErrorAnalyticsEvent.bind(this)), this.eventBus.statsUpdate.subscribe((h2) => {
|
29124
29123
|
var g2, f2;
|
29125
29124
|
let T = ((f2 = (g2 = h2.getLocalPeerStats()) == null ? void 0 : g2.subscribe) == null ? void 0 : f2.bitrate) || 0;
|
29126
29125
|
this.maxSubscribeBitrate = Math.max(this.maxSubscribeBitrate, T);
|
@@ -29158,7 +29157,7 @@ var init_dist = __esm({
|
|
29158
29157
|
}
|
29159
29158
|
connect(e, t2, i2, r2, s2 = false, o2) {
|
29160
29159
|
return c2(this, null, function* () {
|
29161
|
-
this.setTransportStateForConnect(), this.joinParameters = new
|
29160
|
+
this.setTransportStateForConnect(), this.joinParameters = new er(e, i2, r2.name, r2.metaData, t2, s2, o2);
|
29162
29161
|
try {
|
29163
29162
|
return yield this.internalConnect(e, t2, i2, o2);
|
29164
29163
|
} catch (n2) {
|
@@ -29212,13 +29211,13 @@ var init_dist = __esm({
|
|
29212
29211
|
trackUpdate(e) {
|
29213
29212
|
let i2 = Array.from(this.trackStates.values()).find((r2) => e.type === r2.type && e.source === r2.source);
|
29214
29213
|
if (i2) {
|
29215
|
-
let r2 = new
|
29214
|
+
let r2 = new _t(M2(m({}, i2), { mute: !e.enabled }));
|
29216
29215
|
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]]));
|
29217
29216
|
}
|
29218
29217
|
}
|
29219
29218
|
publishTrack(e) {
|
29220
29219
|
return c2(this, null, function* () {
|
29221
|
-
e.publishedTrackId = e.getTrackIDBeingSent(), d2.d(I2, `\u23F3 publishTrack: trackId=${e.trackId}, toPublishTrackId=${e.publishedTrackId}`, `${e}`), this.trackStates.set(e.publishedTrackId, new
|
29220
|
+
e.publishedTrackId = e.getTrackIDBeingSent(), d2.d(I2, `\u23F3 publishTrack: trackId=${e.trackId}, toPublishTrackId=${e.publishedTrackId}`, `${e}`), this.trackStates.set(e.publishedTrackId, new _t(e));
|
29222
29221
|
let t2 = new Promise((s2, o2) => {
|
29223
29222
|
this.callbacks.set(et, { promise: { resolve: s2, reject: o2 }, action: "PUBLISH", extra: {} });
|
29224
29223
|
}), i2 = e.stream;
|
@@ -29256,7 +29255,7 @@ var init_dist = __esm({
|
|
29256
29255
|
});
|
29257
29256
|
}
|
29258
29257
|
createPeerConnections() {
|
29259
|
-
this.initConfig && (this.publishConnection || (this.publishConnection = new
|
29258
|
+
this.initConfig && (this.publishConnection || (this.publishConnection = new Kt(this.signal, this.initConfig.rtcConfiguration, this.publishConnectionObserver)), this.subscribeConnection || (this.subscribeConnection = new jt(this.signal, this.initConfig.rtcConfiguration, this.isFlagEnabled.bind(this), this.subscribeConnectionObserver)));
|
29260
29259
|
}
|
29261
29260
|
negotiateJoinWithRetry(s2) {
|
29262
29261
|
return c2(this, arguments, function* ({ name: e, data: t2, autoSubscribeVideo: i2, isWebRTC: r2 = true }) {
|
@@ -29346,7 +29345,7 @@ var init_dist = __esm({
|
|
29346
29345
|
d2.d(I2, "connect: started \u23F0");
|
29347
29346
|
let s2 = /* @__PURE__ */ new Date();
|
29348
29347
|
try {
|
29349
|
-
this.analyticsTimer.start("init_response_time"), this.initConfig = yield
|
29348
|
+
this.analyticsTimer.start("init_response_time"), this.initConfig = yield Jt.fetchInitConfig({ token: e, peerId: i2, userAgent: this.store.getUserAgent(), initEndpoint: t2, iceServers: r2 }), (o2 = this.connectivityListener) == null || o2.onInitSuccess(this.initConfig.endpoint);
|
29350
29349
|
let u2 = this.store.getRoom();
|
29351
29350
|
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;
|
29352
29351
|
} catch (u2) {
|
@@ -29375,7 +29374,7 @@ var init_dist = __esm({
|
|
29375
29374
|
}
|
29376
29375
|
initStatsAnalytics() {
|
29377
29376
|
var e, t2;
|
29378
|
-
this.isFlagEnabled("publishStats") && (this.publishStatsAnalytics = new
|
29377
|
+
this.isFlagEnabled("publishStats") && (this.publishStatsAnalytics = new Gt(this.store, this.eventBus, this.getValueFromInitConfig("publishStats", "maxSampleWindowSize", 30), this.getValueFromInitConfig("publishStats", "maxSamplePushInterval", 300)), (e = this.getWebrtcInternals()) == null || e.start()), this.isFlagEnabled("subscribeStats") && (this.subscribeStatsAnalytics = new Wt(this.store, this.eventBus, this.getValueFromInitConfig("subscribeStats", "maxSampleWindowSize", 10), this.getValueFromInitConfig("subscribeStats", "maxSamplePushInterval", 60)), (t2 = this.getWebrtcInternals()) == null || t2.start());
|
29379
29378
|
}
|
29380
29379
|
getValueFromInitConfig(e, t2, i2) {
|
29381
29380
|
var r2, s2;
|
@@ -29439,8 +29438,9 @@ var init_dist = __esm({
|
|
29439
29438
|
constructor() {
|
29440
29439
|
this.TAG = "[HMSSdk]:";
|
29441
29440
|
this.transportState = "Disconnected";
|
29442
|
-
this.analyticsTimer = new
|
29441
|
+
this.analyticsTimer = new ci();
|
29443
29442
|
this.sdkState = m({}, Fa);
|
29443
|
+
this.isDiagnostics = false;
|
29444
29444
|
this.playlistSettings = { video: { bitrate: Dr }, audio: { bitrate: wr } };
|
29445
29445
|
this.handleAutoplayError = (e) => {
|
29446
29446
|
var t2, i2;
|
@@ -29524,7 +29524,7 @@ var init_dist = __esm({
|
|
29524
29524
|
this.sendAudioPresenceFailed = () => {
|
29525
29525
|
var t2;
|
29526
29526
|
let e = S2.TracksErrors.NoAudioDetected("PREVIEW");
|
29527
|
-
d2.w(this.TAG, "Audio Presence Failure", this.transportState, e), (t2 = this.listener) == null || t2.onError(e);
|
29527
|
+
d2.w(this.TAG, "Audio Presence Failure", this.transportState, e), this.isDiagnostics && ((t2 = this.listener) == null || t2.onError(e));
|
29528
29528
|
};
|
29529
29529
|
this.sendJoinAnalyticsEvent = (e = false, t2) => {
|
29530
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 })));
|
@@ -29533,11 +29533,11 @@ var init_dist = __esm({
|
|
29533
29533
|
this.eventBus.analytics.publish(y2.preview(M2(m({ error: e }, this.analyticsTimer.getTimes()), { time: this.analyticsTimer.getTimeTaken("preview_time") })));
|
29534
29534
|
};
|
29535
29535
|
this.sendAnalyticsEvent = (e) => {
|
29536
|
-
this.
|
29536
|
+
this.isDiagnostics || this.analyticsEventsService.queue(e).flush();
|
29537
29537
|
};
|
29538
29538
|
}
|
29539
29539
|
initNotificationManager() {
|
29540
|
-
this.notificationManager || (this.notificationManager = new
|
29540
|
+
this.notificationManager || (this.notificationManager = new Xi(this.store, this.eventBus, this.transport, this.listener, this.audioListener));
|
29541
29541
|
}
|
29542
29542
|
initStoreAndManagers(e) {
|
29543
29543
|
var t2, i2;
|
@@ -29545,7 +29545,7 @@ var init_dist = __esm({
|
|
29545
29545
|
(i2 = this.notificationManager) == null || i2.setListener(this.listener), this.audioSinkManager.setListener(this.listener), this.interactivityCenter.setListener(this.listener);
|
29546
29546
|
return;
|
29547
29547
|
}
|
29548
|
-
this.sdkState.isInitialised = true, this.store = new
|
29548
|
+
this.sdkState.isInitialised = true, this.store = new Nt(), this.eventBus = new Ut(), this.pluginUsageTracker = new Oi(this.eventBus), this.wakeLockManager = new _i(), this.networkTestManager = new wi(this.eventBus, this.listener), this.playlistManager = new bt(this, this.eventBus), this.deviceManager = new xt(this.store, this.eventBus), this.audioSinkManager = new Ot(this.store, this.deviceManager, this.eventBus), this.audioOutput = new xi(this.deviceManager, this.audioSinkManager), this.audioSinkManager.setListener(this.listener), this.eventBus.autoplayError.subscribe(this.handleAutoplayError), this.localTrackManager = new ve(this.store, this.observer, this.deviceManager, this.eventBus, this.analyticsTimer), this.analyticsEventsService = new Ni(this.store), this.transport = new zt(this.observer, this.deviceManager, this.store, this.eventBus, this.analyticsEventsService, this.analyticsTimer, this.pluginUsageTracker), e.onInitSuccess && this.transport.setConnectivityListener(e), this.sessionStore = new Zi(this.transport), this.interactivityCenter = new Vt(this.transport, this.store, this.listener), this.eventBus.analytics.subscribe(this.sendAnalyticsEvent), this.eventBus.deviceChange.subscribe(this.handleDeviceChange), this.eventBus.audioPluginFailed.subscribe(this.handleAudioPluginError);
|
29549
29549
|
}
|
29550
29550
|
validateJoined(e) {
|
29551
29551
|
if (!this.localPeer)
|
@@ -29592,7 +29592,7 @@ var init_dist = __esm({
|
|
29592
29592
|
return this.interactivityCenter;
|
29593
29593
|
}
|
29594
29594
|
getPeerListIterator(e) {
|
29595
|
-
return new
|
29595
|
+
return new hi(this.transport, this.store, e);
|
29596
29596
|
}
|
29597
29597
|
updatePlaylistSettings(e) {
|
29598
29598
|
e.video && Object.assign(this.playlistSettings.video, e.video), e.audio && Object.assign(this.playlistSettings.audio, e.audio);
|
@@ -29603,7 +29603,7 @@ var init_dist = __esm({
|
|
29603
29603
|
}
|
29604
29604
|
preview(e, t2) {
|
29605
29605
|
return c2(this, null, function* () {
|
29606
|
-
if (
|
29606
|
+
if (gt(), St(), this.sdkState.isPreviewInProgress)
|
29607
29607
|
return Promise.reject(S2.GenericErrors.PreviewAlreadyInProgress("PREVIEW", "Preview already called"));
|
29608
29608
|
if (["Joined", "Reconnecting"].includes(this.transportState))
|
29609
29609
|
return this.midCallPreview(e.asRole, e.settings);
|
@@ -29663,13 +29663,13 @@ var init_dist = __esm({
|
|
29663
29663
|
join(e, t2) {
|
29664
29664
|
return c2(this, null, function* () {
|
29665
29665
|
var l2, u2, p2, h2, T, g2;
|
29666
|
-
if (
|
29666
|
+
if (gt(), St(), this.sdkState.isPreviewInProgress)
|
29667
29667
|
throw S2.GenericErrors.NotReady("JOIN", "Preview is in progress, can't join");
|
29668
29668
|
this.analyticsTimer.start("join_time"), this.sdkState.isJoinInProgress = true;
|
29669
|
-
let { roomId: i2, userId: r2, role: s2 } =
|
29669
|
+
let { roomId: i2, userId: r2, role: s2 } = pr(e.authToken), o2 = ((u2 = (l2 = this.localPeer) == null ? void 0 : l2.asRole) == null ? void 0 : u2.name) || ((h2 = (p2 = this.localPeer) == null ? void 0 : p2.role) == null ? void 0 : h2.name);
|
29670
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();
|
29671
29671
|
let n2 = this.store.getConfig();
|
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
|
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 wt(this.store, this.transport, this.deviceManager, this.getAndPublishTracks.bind(this), this.removeTrack.bind(this), this.listener), this.eventBus.localRoleUpdate.subscribe(this.handleLocalRoleUpdate), d2.d(this.TAG, `\u23F3 Joining room ${i2}`), d2.time(`join-room-${i2}`);
|
29673
29673
|
try {
|
29674
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);
|
29675
29675
|
} catch (f2) {
|
@@ -29706,7 +29706,7 @@ var init_dist = __esm({
|
|
29706
29706
|
return c2(this, null, function* () {
|
29707
29707
|
let i2 = (t2 || {}).endpoint || "https://auth.100ms.live/v2/token";
|
29708
29708
|
this.analyticsTimer.start("GET_TOKEN");
|
29709
|
-
let r2 = yield
|
29709
|
+
let r2 = yield Ci(i2, { method: "POST", body: JSON.stringify({ code: e.roomCode, user_id: e.userId }) }, [429, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511]), s2 = yield r2.json();
|
29710
29710
|
if (this.analyticsTimer.end("GET_TOKEN"), !r2.ok)
|
29711
29711
|
throw S2.APIErrors.ServerErrors(s2.code, "GET_TOKEN", s2.message, false);
|
29712
29712
|
let { token: o2 } = s2;
|
@@ -29833,7 +29833,7 @@ var init_dist = __esm({
|
|
29833
29833
|
throw S2.GenericErrors.NotConnected("VALIDATION", "No local peer present, cannot addTrack");
|
29834
29834
|
if (this.localPeer.auxiliaryTracks.find((g2) => g2.trackId === e.id))
|
29835
29835
|
return;
|
29836
|
-
let r2 = e.kind, s2 = new MediaStream([e]), o2 = new
|
29836
|
+
let r2 = e.kind, s2 = new MediaStream([e]), o2 = new Ge(s2), n2 = r2 === "audio" ? ce : F, l2 = new n2(o2, e, t2, this.eventBus);
|
29837
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);
|
29838
29838
|
});
|
29839
29839
|
}
|
@@ -29864,6 +29864,9 @@ var init_dist = __esm({
|
|
29864
29864
|
var t2;
|
29865
29865
|
(t2 = this.notificationManager) == null || t2.setConnectionQualityListener(e);
|
29866
29866
|
}
|
29867
|
+
setIsDiagnostics(e) {
|
29868
|
+
this.isDiagnostics = e;
|
29869
|
+
}
|
29867
29870
|
changeRole(e, t2, i2 = false) {
|
29868
29871
|
return c2(this, null, function* () {
|
29869
29872
|
var r2;
|
@@ -30076,7 +30079,7 @@ var init_dist = __esm({
|
|
30076
30079
|
publish(e, t2) {
|
30077
30080
|
return c2(this, null, function* () {
|
30078
30081
|
var i2, r2, s2;
|
30079
|
-
if ([this.store.getPublishParams(), !this.sdkState.published, !
|
30082
|
+
if ([this.store.getPublishParams(), !this.sdkState.published, !Ue].every((o2) => !!o2)) {
|
30080
30083
|
let o2 = t2 && t2 !== ((r2 = (i2 = this.localPeer) == null ? void 0 : i2.role) == null ? void 0 : r2.name) ? () => {
|
30081
30084
|
var n2;
|
30082
30085
|
return (n2 = this.roleChangeManager) == null ? void 0 : n2.diffRolesAndPublishTracks({ oldRole: this.store.getPolicyForRole(t2), newRole: this.localPeer.role });
|
@@ -30154,7 +30157,7 @@ var init_dist = __esm({
|
|
30154
30157
|
}
|
30155
30158
|
setUpPreview(e, t2) {
|
30156
30159
|
this.sdkState.isPreviewCalled = true, this.sdkState.isPreviewInProgress = true;
|
30157
|
-
let { roomId: i2, userId: r2, role: s2 } =
|
30160
|
+
let { roomId: i2, userId: r2, role: s2 } = pr(e.authToken);
|
30158
30161
|
this.commonSetup(e, i2, t2), this.store.setConfig(e), this.store.createAndSetUserAgent(this.frameworkInfo), this.createAndAddLocalPeerToStore(e, s2, r2, e.asRole);
|
30159
30162
|
}
|
30160
30163
|
setPlaylistSettings(r2) {
|
@@ -30175,11 +30178,11 @@ var init_dist = __esm({
|
|
30175
30178
|
});
|
30176
30179
|
}
|
30177
30180
|
createAndAddLocalPeerToStore(e, t2, i2, r2) {
|
30178
|
-
let s2 = this.store.getPolicyForRole(t2), o2 = r2 ? this.store.getPolicyForRole(r2) : void 0, n2 = new
|
30181
|
+
let s2 = this.store.getPolicyForRole(t2), o2 = r2 ? this.store.getPolicyForRole(r2) : void 0, n2 = new We({ name: e.userName || "", customerUserId: i2, metadata: e.metaData || "", role: s2, asRole: o2 || s2, type: "regular" });
|
30179
30182
|
this.store.addPeer(n2);
|
30180
30183
|
}
|
30181
30184
|
commonSetup(e, t2, i2) {
|
30182
|
-
this.stringifyMetadata(e), e.initEndpoint || (e.initEndpoint = "https://prod-init.100ms.live"), this.initStoreAndManagers(i2), this.store.getRoom() || this.store.setRoom(new
|
30185
|
+
this.stringifyMetadata(e), e.initEndpoint || (e.initEndpoint = "https://prod-init.100ms.live"), this.initStoreAndManagers(i2), this.store.getRoom() || this.store.setRoom(new Ke(t2));
|
30183
30186
|
}
|
30184
30187
|
removeDevicesFromConfig(e) {
|
30185
30188
|
this.store.getConfig() && e.settings && (delete e.settings.audioOutputDeviceId, delete e.settings.videoDeviceId, delete e.settings.audioInputDeviceId);
|
@@ -30202,11 +30205,11 @@ var init_dist = __esm({
|
|
30202
30205
|
e.source === "audioplaylist" ? this.playlistManager.stop("audio") : e.source === "videoplaylist" && this.playlistManager.stop("video");
|
30203
30206
|
}
|
30204
30207
|
};
|
30205
|
-
|
30208
|
+
lt = class a10 {
|
30206
30209
|
constructor(e, t2, i2) {
|
30207
|
-
this.getStats = () => (this.stats || (this.stats = new
|
30210
|
+
this.getStats = () => (this.stats || (this.stats = new Yt(this.store, this.sdk)), this.stats);
|
30208
30211
|
this.getDiagnosticsSDK = () => (this.diagnostics || (this.diagnostics = this.actions.initDiagnostics()), this.diagnostics);
|
30209
|
-
e ? this.store = e : this.store = a10.createNewHMSStore(
|
30212
|
+
e ? this.store = e : this.store = a10.createNewHMSStore(Di("HMSStore"), ei), i2 ? this.notifications = i2 : this.notifications = new ki(this.store), t2 ? this.actions = t2 : (this.sdk = new hr(), this.actions = new Li(this.store, this.sdk, this.notifications)), this.actions.setFrameworkInfo({ type: "js", sdkVersion: Mr().version }), this.initialTriggerOnSubscribe = false, O2 && (window.__hms = this);
|
30210
30213
|
}
|
30211
30214
|
triggerOnSubscribe() {
|
30212
30215
|
this.initialTriggerOnSubscribe || (a10.makeStoreTriggerOnSubscribe(this.store), this.initialTriggerOnSubscribe = true);
|
@@ -30337,14 +30340,14 @@ var init_dist = __esm({
|
|
30337
30340
|
};
|
30338
30341
|
yn = (a11, e = "resetState") => {
|
30339
30342
|
a11.namedSetState((t2) => {
|
30340
|
-
Object.assign(t2,
|
30343
|
+
Object.assign(t2, ti());
|
30341
30344
|
}, e);
|
30342
30345
|
};
|
30343
|
-
|
30346
|
+
Yt = class {
|
30344
30347
|
constructor(e, t2) {
|
30345
30348
|
this.hmsStore = e;
|
30346
30349
|
this.sdk = t2;
|
30347
|
-
this.store =
|
30350
|
+
this.store = lt.createNewHMSStore(Di("HMSStatsStore"), ti), this.getState = this.store.getState, this.subscribe = this.store.subscribe, this.getPublishPeerConnection = () => new Promise((i2) => {
|
30348
30351
|
var r2, s2;
|
30349
30352
|
this.hmsStore.getState(ie) === "Connected" ? i2((s2 = (r2 = this.sdk) == null ? void 0 : r2.getWebrtcInternals()) == null ? void 0 : s2.getPublishPeerConnection()) : this.hmsStore.subscribe((o2) => {
|
30350
30353
|
var n2, l2;
|
@@ -40120,9 +40123,9 @@ var init_ScreenshareLayout = __esm({
|
|
40120
40123
|
}
|
40121
40124
|
});
|
40122
40125
|
|
40123
|
-
// ../../../../../../../tmp/tmp-
|
40124
|
-
var
|
40125
|
-
"../../../../../../../tmp/tmp-
|
40126
|
+
// ../../../../../../../tmp/tmp-2791-2VpWUhe2QfhV/190499bfe9e1/index.css
|
40127
|
+
var init_bfe9e1 = __esm({
|
40128
|
+
"../../../../../../../tmp/tmp-2791-2VpWUhe2QfhV/190499bfe9e1/index.css"() {
|
40126
40129
|
}
|
40127
40130
|
});
|
40128
40131
|
|
@@ -40144,7 +40147,7 @@ var init_WhiteboardLayout = __esm({
|
|
40144
40147
|
init_ProminenceLayout();
|
40145
40148
|
init_useUISettings();
|
40146
40149
|
init_constants();
|
40147
|
-
|
40150
|
+
init_bfe9e1();
|
40148
40151
|
WhiteboardEmbed = () => {
|
40149
40152
|
const isMobile = (0, import_react_use42.useMedia)(config.media.md);
|
40150
40153
|
const { token, endpoint, zoomToContent } = (0, import_react_sdk93.useWhiteboard)(isMobile);
|
@@ -45322,7 +45325,7 @@ var init_hms = __esm({
|
|
45322
45325
|
"use strict";
|
45323
45326
|
init_define_process_env();
|
45324
45327
|
init_dist();
|
45325
|
-
hms = new
|
45328
|
+
hms = new lt();
|
45326
45329
|
hmsStore = hms.getStore();
|
45327
45330
|
hmsActions = hms.getActions();
|
45328
45331
|
hmsNotifications = hms.getNotifications();
|
@@ -46817,7 +46820,7 @@ var init_ConnectivityTest = __esm({
|
|
46817
46820
|
return /* @__PURE__ */ import_react243.default.createElement(import_react243.default.Fragment, null, /* @__PURE__ */ import_react243.default.createElement(TestContainer, null, /* @__PURE__ */ import_react243.default.createElement(Text, { css: { c: "$on_primary_medium" } }, "Connectivity test has been completed."), /* @__PURE__ */ import_react243.default.createElement(SignallingResult, { result: result == null ? void 0 : result.signallingReport }), /* @__PURE__ */ import_react243.default.createElement(MediaServerResult, { result: result == null ? void 0 : result.mediaServerReport }), /* @__PURE__ */ import_react243.default.createElement(AudioStats, { stats: (_b7 = (_a8 = result == null ? void 0 : result.mediaServerReport) == null ? void 0 : _a8.stats) == null ? void 0 : _b7.audio }), /* @__PURE__ */ import_react243.default.createElement(VideoStats, { stats: (_d = (_c = result == null ? void 0 : result.mediaServerReport) == null ? void 0 : _c.stats) == null ? void 0 : _d.video })), /* @__PURE__ */ import_react243.default.createElement(Footer3, { result, restart: startTest, error }));
|
46818
46821
|
}
|
46819
46822
|
if (progress !== void 0) {
|
46820
|
-
return /* @__PURE__ */ import_react243.default.createElement(TestContainer, { css: { textAlign: "center" } }, /* @__PURE__ */ import_react243.default.createElement(Text, { css: { c: "$primary_bright" } }, /* @__PURE__ */ import_react243.default.createElement(Loading, { size: "3.5rem", color: "currentColor" })), /* @__PURE__ */ import_react243.default.createElement(Text, { variant: "h6", css: { mt: "$8" } }, "Checking your connection..."), /* @__PURE__ */ import_react243.default.createElement(
|
46823
|
+
return /* @__PURE__ */ import_react243.default.createElement(TestContainer, { css: { textAlign: "center" } }, /* @__PURE__ */ import_react243.default.createElement(Text, { css: { c: "$primary_bright", textAlign: "center" } }, /* @__PURE__ */ import_react243.default.createElement(Loading, { size: "3.5rem", color: "currentColor" })), /* @__PURE__ */ import_react243.default.createElement(Text, { variant: "h6", css: { mt: "$8" } }, "Checking your connection..."), /* @__PURE__ */ import_react243.default.createElement(
|
46821
46824
|
Text,
|
46822
46825
|
{
|
46823
46826
|
variant: "body2",
|