diff --git a/packages/hms-video-store/README.md b/packages/hms-video-store/README.md index b3f3f333f1..8c37e598cd 100644 --- a/packages/hms-video-store/README.md +++ b/packages/hms-video-store/README.md @@ -34,10 +34,10 @@ you want to do - passed in selector such that whenever the portion changes, the passed in callback is notified. 2. Actions - The actions interface for dispatching actions which in turn may reach out to server and update the store. Check the interface with detailed doc - [here](src/core/IHMSActions.ts). + [here](./src/IHMSActions.ts). We also provide optimized and efficient selectors for most common use cases. These are -available in [this folder](src/core/selectors). +available in [this folder](./src/selectors). Important Note: The data received from either getState or Subscribe is immutable, the object received is frozen, and it is not allowed to mutate it. You'll get an error diff --git a/packages/hms-video-store/src/IHMSActions.ts b/packages/hms-video-store/src/IHMSActions.ts index f53083faf5..d1ab46e0ff 100644 --- a/packages/hms-video-store/src/IHMSActions.ts +++ b/packages/hms-video-store/src/IHMSActions.ts @@ -232,16 +232,16 @@ export interface IHMSActions; /** * Remove video plugins to the local peer video stream. Eg. Virtual Background, Face Filters etc. * Video plugins can be added/removed at any time after the video track is available. - * @param plugin HMSMediaStreamPlugin * @see HMSMediaStreamPlugin + * @param plugins */ removePluginsFromVideoStream(plugins: HMSMediaStreamPlugin[]): Promise; @@ -344,6 +344,7 @@ export interface IHMSActions; diff --git a/packages/hms-video-store/src/media/tracks/HMSRemoteVideoTrack.ts b/packages/hms-video-store/src/media/tracks/HMSRemoteVideoTrack.ts index 841f4fc378..abff98bb41 100644 --- a/packages/hms-video-store/src/media/tracks/HMSRemoteVideoTrack.ts +++ b/packages/hms-video-store/src/media/tracks/HMSRemoteVideoTrack.ts @@ -148,10 +148,7 @@ export class HMSRemoteVideoTrack extends HMSVideoTrack { * @returns {boolean} isDegraded - returns true if degraded * */ setLayerFromServer(layerUpdate: VideoTrackLayerUpdate) { - this._degraded = - this.enabled && - (layerUpdate.publisher_degraded || layerUpdate.subscriber_degraded) && - layerUpdate.current_layer === HMSSimulcastLayer.NONE; + this._degraded = this.getDegradationValue(layerUpdate); this._degradedAt = this._degraded ? new Date() : this._degradedAt; const currentLayer = layerUpdate.current_layer; HMSLogger.d( @@ -171,11 +168,22 @@ export class HMSRemoteVideoTrack extends HMSVideoTrack { return this._degraded; } + private getDegradationValue(layerUpdate: VideoTrackLayerUpdate) { + return ( + this.enabled && + (layerUpdate.publisher_degraded || layerUpdate.subscriber_degraded) && + layerUpdate.current_layer === HMSSimulcastLayer.NONE + ); + } + private async updateLayer(source: string) { - const newLayer = - (this.degraded || !this.enabled || !this.hasSinks()) && !this.disableNoneLayerRequest - ? HMSSimulcastLayer.NONE - : this.preferredLayer; + let newLayer: HMSSimulcastLayer = this.preferredLayer; + if (this.enabled && this.hasSinks()) { + newLayer = this.preferredLayer; + // send none only when the flag is not set + } else if (!this.disableNoneLayerRequest) { + newLayer = HMSSimulcastLayer.NONE; + } if (!this.shouldSendVideoLayer(newLayer, source)) { return; } diff --git a/packages/roomkit-react/README.md b/packages/roomkit-react/README.md index ebf9faad42..92bff98b9c 100644 --- a/packages/roomkit-react/README.md +++ b/packages/roomkit-react/README.md @@ -43,10 +43,10 @@ export default App() { For additional props, refer the [docs](https://www.100ms.live/docs/javascript/v2/quickstart/prebuilt-quickstart#props-for-hmsprebuilt) -## Cutomization +## Customisation While we offer [a no-code way to customize Prebuilt](https://www.100ms.live/docs/get-started/v2/get-started/prebuilt/overview#customize-prebuilt), you can fork your copy of the Prebuilt component and make changes to the code to allow for more fine-tuning. -Prebuilt customisations are available on [100ms dashboard](https://dashboard.100ms.live) +Prebuilt customisations are available on [100ms Dashboard](https://dashboard.100ms.live). ### Understanding the Structure @@ -58,7 +58,7 @@ The `Prebuilt` folder contains the full Prebuilt implementation. | Component | Description | |--|--| -| [RoomLayoutProvider](src/Prebuilt/provider/roomLayoutProvider/index.tsx) | This is a context that contains the configuration from the dashboard [customiser](dashboard.100ms.live). Whatever changes are made in the dashboard customiser are available the next time you join.| +| [RoomLayoutProvider](src/Prebuilt/provider/roomLayoutProvider/index.tsx) | This is a context that contains the configuration from the dashboard [customiser](https://dashboard.100ms.live/). Whatever changes are made in the dashboard customiser are available the next time you join.| |[AppStateContext](src/Prebuilt/AppStateContext.tsx) | Contains the logic to switch between different screens, for example, Preview to Meeting, Meeting to Leave. These transitions are based on the roomState that is available from the reactive store (`useHMSStore(selectHMSRoomState)`). | | [PreviewScreen](src/Prebuilt/components/Preview/PreviewScreen.tsx) | Contains the Preview implementation. Contains the Video tile, video, audio toggles and Virtual background and settings along with the name input.| | [ConferenceScreen](src/Prebuilt/components/ConferenceScreen.tsx) | This contains the screen once you finish Preview and enter the meeting. This contains the header and footer and the main content.| @@ -68,11 +68,11 @@ The `Prebuilt` folder contains the full Prebuilt implementation. ### Customising the Styles -[Base Config](/src/Theme/base.config.ts) has all the variables that you can use. Any changes you want for the theme can be made here. Most likely no additional changes will be required unless you want to introduce new variables. +[Base Config](./src/Theme/base.config.ts) has all the variables that you can use. Any changes you want for the theme can be made here. Most likely no additional changes will be required unless you want to introduce new variables. -When [`HMSThemeProvider`](src/Theme/ThemeProvider.tsx) is used at the top level, all the variables will be available for all the children under this component tree. +When [`HMSThemeProvider`](./src/Theme/ThemeProvider.tsx) is used at the top level, all the variables will be available for all the children under this component tree. -For components created using the base components like `Box`, `Flex`, `Button` etc, css Prop is available to modify the styles. Within the css prop, you can access the variables from the [base config](/src/Theme/base.config.ts). +For components created using the base components like `Box`, `Flex`, `Button` etc, css Prop is available to modify the styles. Within the css prop, you can access the variables from the [base config](./src/Theme/base.config.ts). ## Contributing diff --git a/packages/roomkit-web/README.md b/packages/roomkit-web/README.md index 7390104cbe..1808c515d4 100644 --- a/packages/roomkit-web/README.md +++ b/packages/roomkit-web/README.md @@ -30,7 +30,7 @@ import '@100mslive/roomkit-web'; - An image URL as a string which is displayed in the preview screen and header. `auth-token` (optional) -- This token is room and role specific. It can be copied from the join room modal on the [dashboard](https://dashboard.100ms.live). Read more about it [here](/get-started/v2/get-started/security-and-tokens#auth-token-for-client-sdks). +- This token is room and role specific. It can be copied from the join room modal on the [dashboard](https://dashboard.100ms.live). Read more about it [here](https://www.100ms.live/docs/get-started/v2/get-started/security-and-tokens#auth-token-for-client-sdks). `room-id` (optional unless room-code is not being used) - The room ID of the room you want to join. You can get the room ID from the [dashboard](https://dashboard.100ms.live). It should be specified with the role prop if the room-code is not being provided.