@huddle01/react
Advanced tools
Comparing version 0.0.9 to 0.0.10
@@ -7,3 +7,3 @@ declare const usePeer: (peerId: string) => { | ||
peerId: string; | ||
role: import("@huddle01/web-core/dist/declarations/src/client/HuddleWebClientTypes").IRoleEnum; | ||
role: any; | ||
mic: MediaStreamTrack; | ||
@@ -10,0 +10,0 @@ cam: MediaStreamTrack; |
{ | ||
"name": "@huddle01/react", | ||
"version": "0.0.9", | ||
"version": "0.0.10", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/huddle01-react.cjs.js", |
132
README.md
@@ -23,3 +23,3 @@ # Huddle01 React SDK | ||
Before using the Huddle01 Vanilla JS SDK, you must have Node.js installed on your machine. You can install Node.js using one of the following methods: | ||
Before using the React SDK, you must have Node.js installed on your machine. You can install Node.js using one of the following methods: | ||
@@ -30,3 +30,3 @@ - Install Node.js with NVM by following the instructions on this **[GitHub page](https://github.com/nvm-sh/nvm)** | ||
> **_Pro Tip :_** Use NVM or FVM to install Node.js as they help in version management | ||
> **_Pro Tip :_** Use NVM or FNM to install Node.js as they help in version management | ||
> and easy updation | ||
@@ -62,12 +62,128 @@ | ||
## Initializing the App | ||
## Summary of Hooks: | ||
1. INIT | ||
<hr /> | ||
```jsx | ||
send('INIT'); | ||
``` | ||
### useHuddle01() โ | ||
initializes and sets up the app state required by the library. This method should be invoked first at all times. | ||
- `initialize()` | ||
- isInitialized | ||
<hr /> | ||
<table border="0" width="100%"> | ||
<tr> | ||
<td> | ||
### useLobby() โ | ||
- `joinLobby(roomId: string)` | ||
- **_if_** isInitialized | ||
- `leaveLobby()` | ||
- **_if_** isLobbyJoined | ||
- isLoading | ||
- isLobbyJoined | ||
- error | ||
</td> | ||
<td> | ||
### useRoom() โ | ||
- `joinRoom()` | ||
- **\*if** isLobbyJoined\* | ||
- `leaveRoom()` | ||
- **\*if** isRoomJoined\* | ||
- isLoading | ||
- isRoomJoined | ||
- error | ||
</td> | ||
</tr> | ||
</table> | ||
<hr /> | ||
<table border="0" width="100%"> | ||
<tr> | ||
<td> | ||
### useAudio() โ | ||
- `fetchAudioStream()` | ||
- if isLobbyJoined | ||
- `produceAudio(stream)` | ||
- if isRoomJoined | ||
- `stopProducingAudio()` โ if isProducing | ||
- `stopAudioStream()` | ||
- isLoading | ||
- isProducing | ||
- stream | ||
- error | ||
</td> | ||
<td> | ||
### useVideo() โ | ||
- `fetchVideoStream()` | ||
- if isLobbyJoined | ||
- `produceVideo(stream)` | ||
- if isRoomJoined | ||
- `stopProducingVideo()` โ if isProducing | ||
- `stopVideoStream()` | ||
- isLoading | ||
- isProducing | ||
- stream | ||
- error | ||
</td> | ||
<td> | ||
### usePeers() โ | ||
- peerIds[] | ||
- peers | ||
- error | ||
</td> | ||
</tr> | ||
</table> | ||
<hr /> | ||
<table border="0" width="100%"> | ||
<tr> | ||
<td> | ||
### useRecording() โ | ||
- `startRecording()` | ||
- **_if_** isRoomJoined & **_not_** inProgress | ||
- `stopRecording()` | ||
- **_if_** isRoomJoined & inProgress | ||
- isStarting | ||
- inProgress | ||
- isStopping | ||
- data | ||
- error | ||
</td> | ||
<td> | ||
### useLivestreaming() โ | ||
- `startLivestream()` | ||
- **_if_** isRoomJoined & **_not_** inProgress | ||
- `stopLivestream()` | ||
- **_if_** isRoomJoined & inProgress | ||
- isStarting | ||
- inProgress | ||
- isStopping | ||
- data | ||
- error | ||
</td> | ||
</tr> | ||
</table> | ||
<hr /> | ||
๐ก For more information head to https://huddle01.com/docs | ||
@@ -74,0 +190,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
144067
190