react-peer-chat 0.1.1 → 0.1.3
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/build/icons.js +2 -2
- package/build/index.d.ts +1 -1
- package/build/index.js +1 -1
- package/package.json +2 -1
package/build/icons.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
export function BsFillMicFill(props) {
|
|
3
3
|
return React.createElement("span", Object.assign({}, props),
|
|
4
|
-
React.createElement("svg", { fill: "currentColor",
|
|
4
|
+
React.createElement("svg", { fill: "currentColor", width: '16px', height: '16px' },
|
|
5
5
|
React.createElement("path", { d: "M5 3a3 3 0 0 1 6 0v5a3 3 0 0 1-6 0V3z" }),
|
|
6
6
|
React.createElement("path", { d: "M3.5 6.5A.5.5 0 0 1 4 7v1a4 4 0 0 0 8 0V7a.5.5 0 0 1 1 0v1a5 5 0 0 1-4.5 4.975V15h3a.5.5 0 0 1 0 1h-7a.5.5 0 0 1 0-1h3v-2.025A5 5 0 0 1 3 8V7a.5.5 0 0 1 .5-.5z" })));
|
|
7
7
|
}
|
|
8
8
|
export function BsFillMicMuteFill(props) {
|
|
9
9
|
return React.createElement("span", Object.assign({}, props),
|
|
10
|
-
React.createElement("svg", { fill: "currentColor",
|
|
10
|
+
React.createElement("svg", { fill: "currentColor", width: '16px', height: '16px' },
|
|
11
11
|
React.createElement("path", { d: "M13 8c0 .564-.094 1.107-.266 1.613l-.814-.814A4.02 4.02 0 0 0 12 8V7a.5.5 0 0 1 1 0v1zm-5 4c.818 0 1.578-.245 2.212-.667l.718.719a4.973 4.973 0 0 1-2.43.923V15h3a.5.5 0 0 1 0 1h-7a.5.5 0 0 1 0-1h3v-2.025A5 5 0 0 1 3 8V7a.5.5 0 0 1 1 0v1a4 4 0 0 0 4 4zm3-9v4.879L5.158 2.037A3.001 3.001 0 0 1 11 3z" }),
|
|
12
12
|
React.createElement("path", { d: "M9.486 10.607 5 6.12V8a3 3 0 0 0 4.486 2.607zm-7.84-9.253 12 12 .708-.708-12-12-.708.708z" })));
|
|
13
13
|
}
|
package/build/index.d.ts
CHANGED
package/build/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React, { useEffect, useRef } from 'react';
|
|
2
|
-
import Peer from 'peerjs';
|
|
3
2
|
import useStorage from './useStorage';
|
|
4
3
|
import { BsFillMicFill, BsFillMicMuteFill } from './icons';
|
|
5
4
|
export default function Chat({ peerId, remotePeerId, peerOptions, onError = () => console.error("Can not access microphone!") }) {
|
|
@@ -10,6 +9,7 @@ export default function Chat({ peerId, remotePeerId, peerOptions, onError = () =
|
|
|
10
9
|
useEffect(() => {
|
|
11
10
|
if (!audio)
|
|
12
11
|
return;
|
|
12
|
+
const Peer = require('peerjs').default;
|
|
13
13
|
const peer = new Peer(`rpc-${peerId}`, peerOptions);
|
|
14
14
|
let call;
|
|
15
15
|
peer.on('open', () => {
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-peer-chat",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "An easy to use react component for impleting peer-to-peer chatting.",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
|
+
"module": "./build/index.js",
|
|
6
7
|
"scripts": {
|
|
7
8
|
"build": "npm i && tsc"
|
|
8
9
|
},
|