MCPcopy Index your code
hub / github.com/100mslive/web-sdks

github.com/100mslive/web-sdks @31Mar2023-0.10.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release 31Mar2023-0.10.0 ↗ · + Follow
3,268 symbols 7,960 edges 927 files 268 documented · 8%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Web sdks

This monorepo will contain all packages related to core sdk and store.

Before doing any code change please take time to go through the guidelines line by line.

Local Setup

To setup locally, install lerna globally

npm install -g lerna

Clone the repo locally and run yarn install

git clone https://github.com/100mslive/web-sdks.git
cd web-sdks
yarn install

Test

yarn test 

Running playwright tests

Navigate to playwright directory before running below commands.

Install packages

yarn install

Run for say qa-in

 yarn qa-in

Lint

yarn lint

Running dev server

Run whatever things you're changing in below in different terminal instances. For other packages you can navigate to the folder directly and run yarn start.

# for webapp
> yarn app

# for hms-video-web
> yarn sdk

# for hms-video-store
> yarn store

# for react-sdk
> yarn reactsdk

# for react-ui
> yarn reactui

Note: run yarn start in sdk first and then in store

Custom App in Dev

This is useful when you want to see changes from 100ms-web app being reflected in custom app in dev. Run yarn dev in 100ms-web & yarn start in custom-app

Update a packages version

Run this to update all versions.

Updating single ones

Go to the path of the package ex: cd packages/hms-video-web and run the following command npm version prerelease --preid=alpha --git-tag-version=false

To update the same in dependent packages run lerna add @100mslive/hms-video --scope=@100mslive/hms-video-store --exact

Publishing Alpha/Experimental versions

To publish an alpha/experimental from your experimental branch, run the 'Create Release PR' action on the experimental branch. This bumps the version of all the packages and creates a PR against your experimental branch.

Merge this PR into your experimental branch and run the 'Publish Packages' on your branch to publish the packages.

Syncing with webapp

check the existing remotes with git remote -v; if there is only one remote, add webapp as a new remote. git remote add -f webapp https://github.com/100mslive/100ms-web.git

push to webapp

git subtree push --prefix=apps/100ms-web webapp sync-webapp

pull from webapp

git subtree pull --prefix=apps/100ms-web webapp main

Adding a new repo into the monorepo

To add an existing repo

git clone <repourl>

  • if commit history is not need directly copy the files. cd repo rm -rf .git git rm -r --cached cp -r repo path-to-web-sdks/packages
  • if commit history is needed lerna import path-to-repo --flatten --preserve-commit (to be run at root level)

To Create a new repo

Follow the documentation here

Note: Don't forget to update mapping in scripts/constants.js. Also updatelernaCommands in versioning.js depending on the new repo's dependencies and dependents

Setup Cypress

  • Create a .env file to the root folder and add the following variables.
CYPRESS_TOKEN_ENDPOINT=https://qa-in2.100ms.live/hmsapi/ravi.qa-app.100ms.live/api/token
CYPRESS_ROOM_ID=60f26ab342a997a1ff49c5c2
CYPRESS_ROLE=student
CYPRESS_API_ENV=qa
CYPRESS_INIT_ENDPOINT=https://qa-init.100ms.live/init
  • Run yarn cypress:open at the root level to open the cypress app.

Tips and Tricks

  • window.toggleUiTheme() in console to switch between dark and light themes
  • Set directJoin to true in PreviewScreen.jsx to not have to click on join after page reload.

Extension points exported contracts — how you extend this code

HMSAudioPlugin (Interface)
(no doc) [4 implementers]
packages/hms-video-web/src/plugins/audio/HMSAudioPlugin.ts
IHMSPlaylistActions (Interface)
(no doc) [3 implementers]
packages/hms-video-store/src/core/schema/playlist.ts
IHMSHLSPlayerEventEmitter (Interface)
(no doc) [3 implementers]
packages/hls-player/src/interfaces/events.ts
IHlsStats (Interface)
(no doc) [1 implementers]
packages/hls-stats/src/interfaces/IHlsStats.ts
ChunkElements (Interface)
(no doc)
packages/react-sdk/src/utils/layout.ts
MenuTileType (Interface)
(no doc)
packages/react-ui/src/TileMenu/StyledMenuTile.tsx
Chainable (Interface)
(no doc)
cypress/global.d.ts
ProcessEnv (Interface)
(no doc)
playwright/src/environment.d.ts

Core symbols most depended-on inside this repo

useHMSStore
called by 217
packages/react-sdk/src/primitives/store.ts
d
called by 132
packages/hms-video-web/src/utils/logger.ts
push
called by 125
packages/hms-video-web/src/media/tracks/HMSRemoteVideoTrack.ts
getState
called by 111
packages/hls-stats/src/interfaces/IHlsStats.ts
click
called by 108
playwright/src/app/PageWrapper.ts
get
called by 85
packages/hms-video-web/src/utils/local-storage.ts
log
called by 67
packages/react-sdk/src/utils/logger.ts
useHMSActions
called by 62
packages/react-sdk/src/primitives/HmsRoomProvider.ts

Shape

Method 1,442
Function 1,285
Class 255
Interface 247
Enum 39

Languages

TypeScript99%
Python1%

Modules by API surface

packages/hms-noise-suppression/src/models/Noise.js117 symbols
packages/hms-video-store/src/core/hmsSDKStore/HMSSDKActions.ts98 symbols
packages/hms-video-web/src/sdk/index.ts75 symbols
packages/hms-video-web/src/transport/index.ts56 symbols
packages/hms-virtual-background/src/tflite/tflite.js54 symbols
packages/hms-virtual-background/src/tflite/tflite-simd.js54 symbols
packages/hms-video-store/src/core/IHMSActions.ts52 symbols
packages/hms-video-web/src/error/ErrorFactory.ts50 symbols
packages/hms-video-web/src/sdk/store/Store.ts47 symbols
packages/hms-video-web/src/sdk/store/IStore.ts44 symbols
packages/hms-video-web/src/interfaces/hms.ts43 symbols
packages/hms-video-web/src/signal/jsonrpc/index.ts42 symbols

For agents

$ claude mcp add web-sdks \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page