simple-peer | 📡 Simple WebRTC video , voice , and data channels | Runtime Evironment library

 by   feross JavaScript Version: 9.11.1 License: MIT

kandi X-RAY | simple-peer Summary

kandi X-RAY | simple-peer Summary

simple-peer is a JavaScript library typically used in Telecommunications, Media, Media, Entertainment, Server, Runtime Evironment, Nodejs applications. simple-peer has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. You can install using 'npm i vite-compatible-simple-peer' or download it from GitHub, npm.

Simple WebRTC video, voice, and data channels
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              simple-peer has a medium active ecosystem.
              It has 6751 star(s) with 971 fork(s). There are 146 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 76 open issues and 515 have been closed. On average issues are closed in 30 days. There are 31 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of simple-peer is 9.11.1

            kandi-Quality Quality

              simple-peer has 0 bugs and 0 code smells.

            kandi-Security Security

              simple-peer has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              simple-peer code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              simple-peer is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              simple-peer releases are not available. You will need to build from source code and install.
              Deployable package is available in npm.
              Installation instructions, examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi has reviewed simple-peer and discovered the below as its top functions. This is intended to give you an instant insight into simple-peer implemented functionality, and help decide if they suit your requirements.
            • Filters a relationship to a string
            • Number of bounds
            • Load a module .
            • shortcut for end
            • private helper functions
            • Create an array of random elements .
            • Formats the string as a string
            • Calculate a D - D string
            • Formats a number
            • dot - > String
            Get all kandi verified functions for this library.

            simple-peer Key Features

            No Key Features are available at this moment for simple-peer.

            simple-peer Examples and Code Snippets

            No Code Snippets are available at this moment for simple-peer.

            Community Discussions

            QUESTION

            Webrtc with multiple peers - It's establishing connection not more than four people
            Asked 2022-Mar-24 at 00:12

            I'm developing a video chat application for multiple users using socket.io ans simple-peer. I'm using react for front end and node js for server. Deployed the server in heroku(Now I'm using free dynos only). I'm also using my own TURN server.

            It is working without any trouble for four devices . One of the existing peer disconnects when the fifth one connects.

            I couldn't find what I'm missing. I'm trying to connect 10 peers in a room.

            Do I need media server for streaming? or I have to change anything in the signalling server or TURN server?

            Any help would be appreciated.

            ...

            ANSWER

            Answered 2022-Mar-24 at 00:12

            The average user's computer cannot maintain a lot of peer connections at the same time. If you use mesh topology in your WebRTC app, the recommended number of users in the chat room is 4. If the number is higher, it begins to load the CPU much more and the p2p connection with each peer becomes unstable. If you want your application to support multiple participants in the room, you should integrate SFU into your app (mediasoup, for example).

            Source https://stackoverflow.com/questions/71487609

            QUESTION

            express server with socket.io does not emit to right recipient
            Asked 2021-Oct-01 at 13:34

            I am trying to create a video chat and using express and socket.io on the backend and react and simple-peer on the frontend.

            This is my server code:

            ...

            ANSWER

            Answered 2021-Oct-01 at 13:34

            It looks like the problem lies on the connection from the client. The connection is happening inside the component, which means a new connection will be created every time the component re-renders. Bad mistake.

            My code on the client looks like this now:

            Source https://stackoverflow.com/questions/69398128

            QUESTION

            Svelte - ReferenceError: buffer is not defined
            Asked 2021-Sep-08 at 16:53

            Trying to setup a WebRtc connection in my new Svelte app, and am hitting this error whenever I try to import a library.

            ReferenceError: buffer is not defined

            Example Code: https://github.com/nickgrealy/svelte-webrtc (link also below)

            Here are the steps to reproduce: install the library, then import it on a *.svelte component.

            e.g. peerjs

            ...

            ANSWER

            Answered 2021-Sep-08 at 16:53

            When using peerjs browserify is not required and change output format to cjs in rollup.config.js.

            If you want to keep iife then you need to disable strict mode in rollup.config.js under output property strict: false because the library has some issue.

            Source https://stackoverflow.com/questions/69051857

            QUESTION

            How to fix signal after peer is destroyed?
            Asked 2020-Oct-11 at 17:09

            I am creating a video chat app, but when second person connected, server return some strange errors. Please help me to solve this error.

            Actual problem comes when I open new tab and paste same URL for testing.

            I am using "simple-peer": "^9.7.2",

            Error: cannot signal after peer is destroyed

            Here is the screenshot too

            Server Code

            ...

            ANSWER

            Answered 2020-Aug-28 at 12:14

            Solution found

            Problem is in this version "simple-peer": "^9.7.2", i changed the version to 9.6.2 and it works like charm. ✨🤩

            Source https://stackoverflow.com/questions/63633133

            QUESTION

            WebRTC error while creating video chat app
            Asked 2020-Aug-29 at 14:49

            I am getting this error on console while refreshing the page.. Everythng else works fine the Chats and everthing.. just the streaming part is not working

            ...

            ANSWER

            Answered 2020-Aug-29 at 14:49

            I got the error.. I was using getUserMedia instead of navigator.getUserMedia

            getUserMedia has been deprecated.

            Source https://stackoverflow.com/questions/63266258

            QUESTION

            ably webrtc group call Not working in Javascript and simple peer
            Asked 2020-Apr-30 at 21:36

            we are working on making a simple group call web app using Ably and simple peer. By following the step by step tutorial, the 1-to-1 call works (that too has issues when using on public ip but that is another day's topic)

            However when same code has been modified to work for group calls, it doesnt seems to work. The members are listed, user is able to join the Group (channel) and the console even shows that signal has been sent/received. but the audio video stream is not working. following is some piece of the js code (modified from ably example)

            ...

            ANSWER

            Answered 2020-Apr-30 at 21:36

            Found the problem. :)

            was initializing the local camera stream inside the Join group function. The problem was resolved by initializing the local video stream at document loading.

            hope this helps others.

            Source https://stackoverflow.com/questions/61459842

            QUESTION

            Error in executing 'send' on 'RTCDataChannel' simple-peer
            Asked 2020-Apr-23 at 04:48

            I am trying out webrtc using the library, simple-peer. I am following this tutorial linked here on opera browser. I am facing this error when sending a small string of 'hello':

            ...

            ANSWER

            Answered 2020-Apr-23 at 04:48

            I got it to work. If useful to anybody: I was using the opera browser, which blocked my IP address from "leaking". Switching to Chrome worked like a charm See if your browser is blocking your IP address using this link: https://diafygi.github.io/webrtc-ips/

            Source https://stackoverflow.com/questions/61336277

            QUESTION

            require function is not working in Asp.netcore javascript
            Asked 2020-Apr-16 at 20:29

            I tried to implement WebRTC simple-peer video chat application using .net core MVC. But when writing javascript implementation that need to make peer connection, they have use require("xxx") function and I am getting error that required is not defined.I know this need node or requirejs. I have tried installing node also but it is not working.

            ...

            ANSWER

            Answered 2020-Apr-16 at 20:29
             var stream;
            
             navigator.mediaDevices.getUserMedia({ video: true, audio: false }, function (stream) {
                    stream = stream;
             });
            
            function InitPeer(type) {
                            var peer = new SimplePeer({
                                initiator: (type == 'init') ? true : false,
                                stream: stream,
                                trickle: false
                            });
            

            Source https://stackoverflow.com/questions/61037769

            QUESTION

            How to keep my users anonymous with webrtc?
            Asked 2020-Jan-27 at 15:46

            I need to implement video call in my application, then I discovered webrtc, and simple-peer for nodejs. I just have one problem, because it's peer to peer, I suppose the users aren't anonymous, they can get their ip each others.

            I know facebook, amazon chime use webrtc, how do they hide those ip ? Do they pass the stream through a server? Use turn server ? Would openvidu hide ip ? Or just can I simply for each video room create peer in nodejs process, and connect to every user and distribute the video ?
            Thanks

            ...

            ANSWER

            Answered 2020-Jan-27 at 15:46

            In peer-to-peer mode, you can ensure the IP addresses of the peers aren't revealed by setting up and forcing the use of TURN server (using the iceTransportPolicy option of relay in the RTCPeerConnection() constructor).

            Alternatively, using an intermediary media server (e.g. an SFU or a MCU) would also achieve the same effect.

            Source https://stackoverflow.com/questions/59911648

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install simple-peer

            This package works in the browser with browserify. If you do not use a bundler, you can use the simplepeer.min.js standalone script directly in a <script> tag. This exports a SimplePeer constructor on window. Wherever you see Peer in the examples below, substitute that with SimplePeer.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
            Maven
            Gradle
            CLONE
          • HTTPS

            https://github.com/feross/simple-peer.git

          • CLI

            gh repo clone feross/simple-peer

          • sshUrl

            git@github.com:feross/simple-peer.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link