react-peer-chat 0.1.3 → 0.1.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/build/icons.js CHANGED
@@ -1,13 +1,17 @@
1
1
  import React from "react";
2
2
  export function BsFillMicFill(props) {
3
- return React.createElement("span", Object.assign({}, props),
4
- React.createElement("svg", { fill: "currentColor", width: '16px', height: '16px' },
5
- React.createElement("path", { d: "M5 3a3 3 0 0 1 6 0v5a3 3 0 0 1-6 0V3z" }),
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" })));
3
+ return <span {...props}>
4
+ <svg fill="currentColor" width='16px' height='16px'>
5
+ <path d="M5 3a3 3 0 0 1 6 0v5a3 3 0 0 1-6 0V3z"/>
6
+ <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
+ </svg>
8
+ </span>;
7
9
  }
8
10
  export function BsFillMicMuteFill(props) {
9
- return React.createElement("span", Object.assign({}, props),
10
- React.createElement("svg", { fill: "currentColor", width: '16px', height: '16px' },
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
- 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" })));
11
+ return <span {...props}>
12
+ <svg fill="currentColor" width='16px' height='16px'>
13
+ <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"/>
14
+ <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"/>
15
+ </svg>
16
+ </span>;
13
17
  }
package/build/index.js CHANGED
@@ -43,7 +43,10 @@ export default function Chat({ peerId, remotePeerId, peerOptions, onError = () =
43
43
  peer.destroy();
44
44
  };
45
45
  }, [audio]);
46
- return React.createElement("button", { onClick: () => setAudio(audio => !audio) }, audio ? React.createElement(React.Fragment, null,
47
- React.createElement("audio", { ref: streamRef, autoPlay: true, className: 'hidden' }),
48
- React.createElement(BsFillMicFill, { title: "Turn mic off" })) : React.createElement(BsFillMicMuteFill, { title: "Turn mic on" }));
46
+ return <button onClick={() => setAudio(audio => !audio)}>
47
+ {audio ? <>
48
+ <audio ref={streamRef} autoPlay className='hidden'/>
49
+ <BsFillMicFill title="Turn mic off"/>
50
+ </> : <BsFillMicMuteFill title="Turn mic on"/>}
51
+ </button>;
49
52
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-peer-chat",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "An easy to use react component for impleting peer-to-peer chatting.",
5
5
  "main": "./build/index.js",
6
6
  "module": "./build/index.js",