react-peer-chat 0.5.2 → 0.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@ An easy to use react component for impleting peer-to-peer chatting using [peerjs
|
|
|
9
9
|
- Clear text chat on command
|
|
10
10
|
- Supports voice chat
|
|
11
11
|
- Multiple peer connections. See [multi peer usage](#Multi-Peer-Usage)
|
|
12
|
-
- Fully Customizable. See [usage with
|
|
12
|
+
- Fully Customizable. See [usage with FaC](#Full-Customization)
|
|
13
13
|
## Installation
|
|
14
14
|
To install react-peer-chat
|
|
15
15
|
```bash
|
|
@@ -88,7 +88,7 @@ export default function App() {
|
|
|
88
88
|
}
|
|
89
89
|
```
|
|
90
90
|
#### Full Customization
|
|
91
|
-
Use Function as Children(
|
|
91
|
+
Use Function as Children(FaC) to fully customize the `<Chat>` component.
|
|
92
92
|
```jsx
|
|
93
93
|
import React from 'react'
|
|
94
94
|
import Chat from 'react-peer-chat'
|
|
@@ -125,7 +125,7 @@ Here is the full API for the `<Chat>` component, these properties can be set on
|
|
|
125
125
|
| `onError` | `Function` | No | `() => alert('Browser not supported! Try some other browser.')` | Function to be executed if browser doesn't support `WebRTC` |
|
|
126
126
|
| `onMicError` | `Function` | No | `() => alert('Microphone not accessible!')` | Function to be executed when microphone is not accessible. |
|
|
127
127
|
| `props` | `React.DetailedHTMLProps` | No | - | Props to customize the `<Chat>` component. |
|
|
128
|
-
| `children` | [`Children`](#Children) | No | - | See [usage with
|
|
128
|
+
| `children` | [`Children`](#Children) | No | - | See [usage with FaC](#Full-Customization) |
|
|
129
129
|
### Types
|
|
130
130
|
#### PeerOptions
|
|
131
131
|
```typescript
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-peer-chat",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.4",
|
|
4
4
|
"description": "An easy to use react component for impleting peer-to-peer chatting.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -31,13 +31,13 @@
|
|
|
31
31
|
"react-dom": ">=16.0.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@types/react": "^18.2.
|
|
34
|
+
"@types/react": "^18.2.42"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"peerjs": "^1.5.
|
|
37
|
+
"peerjs": "^1.5.2"
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|
|
40
40
|
"copy": "copy .\\src\\*.css dist",
|
|
41
|
-
"build": "
|
|
41
|
+
"build": "pnpm i && tsc && pnpm run copy"
|
|
42
42
|
}
|
|
43
43
|
}
|