peerjs | Simple peer-to-peer with WebRTC

 by   peers TypeScript Version: 2.0.0-beta.3 License: MIT

kandi X-RAY | peerjs Summary

kandi X-RAY | peerjs Summary

peerjs is a TypeScript library typically used in Networking applications. peerjs has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. You can download it from GitHub.

Simple peer-to-peer with WebRTC
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              peerjs has a medium active ecosystem.
              It has 11254 star(s) with 1390 fork(s). There are 248 watchers for this library.
              There were 2 major release(s) in the last 6 months.
              There are 179 open issues and 672 have been closed. On average issues are closed in 354 days. There are 16 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of peerjs is 2.0.0-beta.3

            kandi-Quality Quality

              peerjs has 0 bugs and 0 code smells.

            kandi-Security Security

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

            kandi-License License

              peerjs 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

              peerjs releases are available to install and integrate.
              Installation instructions, examples and code snippets are available.
              It has 1255 lines of code, 0 functions and 25 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of peerjs
            Get all kandi verified functions for this library.

            peerjs Key Features

            No Key Features are available at this moment for peerjs.

            peerjs Examples and Code Snippets

            No Code Snippets are available at this moment for peerjs.

            Community Discussions

            QUESTION

            socket.io connections failing after integrating peer server in my code
            Asked 2022-Apr-02 at 12:11

            hi as you know public server is down so i tried to host my on peer server i already had a nodejs/express server up for chat ... so i tried to integrate peer server on my chat server

            here is simplified version of my code

            ...

            ANSWER

            Answered 2022-Apr-02 at 12:11

            According to this issue, it's not possible to run socket.io and a PeerJS server on the same Express(/http(s) server) instance.

            You should be able to start a separate PeerJS server from the same code file, as explained here:

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

            QUESTION

            How to remove dependency on peerJs server when using with Twilio turn/stun servers
            Asked 2022-Mar-28 at 09:44

            I am using twilio from peerjs in my application. I had assumed that this removed dependencies on the peerjs server; the peerjs server has gone away at present which highlighted a dependency. Is it possible / how to remove this dependency?

            My code is:

            peer = new Peer(myId, { secure: true, config: iceServers: [twilio servers] }

            results in:-

            peerjs.min.js:52 WebSocket connection to 'wss://0.peerjs.com/peerjs?key=peerjs'.... failed:

            I see that the 'host' parameter for the new Peer() call defaults to 0.peerjs.com, is there a Twilio replacement for this?

            ...

            ANSWER

            Answered 2022-Mar-28 at 09:44

            You are using Twilio for STUN and TURN but that is not a drop-in replacement for the signaling server required by any WebRTC application. Hence peerjs will still attempt to connect to the "default" signaling server which is down per https://github.com/peers/peerjs/issues/937

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

            QUESTION

            How to end peer connection in react-native
            Asked 2022-Feb-09 at 03:34

            how can i end peer connection when using react-native-peerjs..The connection is successful& the call works. but at the point of ending the call, i haven't found a disconnect function, so the call still goes on in background till i restart the app.

            my connection is like this

            ...

            ANSWER

            Answered 2022-Feb-09 at 03:34

            Here I use native peerConnection but maybe you can try this way.

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

            QUESTION

            How to use peerJS with twilio STUN/TURN servers
            Asked 2022-Jan-24 at 00:11

            I have a webRTC application that works fine with the default peerJS settings for a STUN server. I now want to switch to STUN/TURN servers from twilio. I have obtained the iceServers structure from twilio (updated daily). Typically, the iceServer stucture looks like:-

            ...

            ANSWER

            Answered 2022-Jan-24 at 00:11

            Twilio developer evangelist here.

            I think you have everything right here, except perhaps the capitalisation in the iceArray. WebRTC expects the ICE servers config to have lowercase keys.

            Twilio does actually return the ICE servers in lower case format (see the example here) but some of the Twilio helper libraries transform API results into idiomatic formats based on the language, sometimes capitalising keys. If you are getting that result from the API request you made with a Twilio helper library, you might want to look into turning the keys lowercase again, or getting the raw result from the library.

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

            QUESTION

            Why does audio automatically play after a peer accepts the call?
            Asked 2021-Dec-13 at 06:02

            When I have two peers that call each other using peerjs, once a peer accepts the call, audio from the peer that initiated the call, starts playing even though I do not explicitly set autoplay or call play(). This problem occurs in the chrome browser.

            ...

            ANSWER

            Answered 2021-Dec-13 at 06:02

            This is a Chrome bug, I opened https://crbug.com/1279299.
            The gist of the bug is that adding an audio track on a MediaSource set to the srcObject of an HTMLAudioElement will force autoplay that MediaStream, even if the element never actually told it to...

            So a smaller repro can be done like so:

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

            QUESTION

            Error while integrating peerjs with nuxtjs (vue.js)
            Asked 2021-Oct-18 at 15:53

            installing:

            npm i peerjs

            /plugins/peerjs.js

            ...

            ANSWER

            Answered 2021-Oct-18 at 15:53

            Setting { src: '~/plugins/peerjs.js' , mode: 'server'} fixed the issue.

            Strange since it should either be mode: 'client' as shown in the documentation but I guess that PeerJS relies in fact on Node and not on client's window.

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

            QUESTION

            android webRTC voice call
            Asked 2021-Oct-01 at 05:57

            I want to develop a voice call app for android. As the native android webRTC project is not maintained and lacks good documentation, I ended up using the peerjs library with webView. And it's working. But the problem is that webView doesn't provide any function to change the audio output stream. Audio is always played on the loudspeaker. I want it to be played on the earpiece. How can I achieve this?

            ...

            ANSWER

            Answered 2021-Oct-01 at 05:57

            I figured it out myself

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

            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

            Screen sharing issue in WebRTC/nodejs with socket.io
            Asked 2021-Sep-06 at 19:47

            im working on a vidoe conferencing application and I cant seem to get the screen sharing working getting an error "mediaTypeError: Cannot read properties of undefined (reading 'getSender')". The screensharing is able to start but nothing is being shared

            This is my server file.

            ...

            ANSWER

            Answered 2021-Sep-06 at 19:47

            I'm assuming that currentPeer is an RTCPeerConnection as documented here: https://peerjs.com/docs.html#dataconnection-peerconnection. In that case it's a simple typo. The method is called getSenders() and not getSender(). Adding the missing "s" should make the error go away.

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

            QUESTION

            Failed to load resource: the server responded with a status of 404 (Not Found) on routing
            Asked 2021-Jun-28 at 07:27

            I am trying to route in my project. I want that on clicking connect button the rooms page should get rendered. Home page is working fine but as soon I as click connect it shows Cannot GET /rooms/0b2636b5-c254-47f4-ade8-9e6b745a96d1.The code works fine when instead of routing to rooms it is on root url. I am new to web development and I tried reading other questions on similar problem but couldn't understand.
            Server side(Server.js):

            ...

            ANSWER

            Answered 2021-Jun-28 at 07:27

            You're really close to it, just 1 mistake in this block:

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

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

            Vulnerabilities

            No vulnerabilities reported

            Install peerjs

            with npm: npm install peerjs. with yarn: yarn add peerjs.

            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
          • npm

            npm i peerjs

          • CLONE
          • HTTPS

            https://github.com/peers/peerjs.git

          • CLI

            gh repo clone peers/peerjs

          • sshUrl

            git@github.com:peers/peerjs.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

            Explore Related Topics

            Reuse Pre-built Kits with peerjs

            Consider Popular TypeScript Libraries

            developer-roadmap

            by kamranahmedse

            vscode

            by microsoft

            angular

            by angular

            TypeScript

            by microsoft

            ant-design

            by ant-design

            Try Top Libraries by peers

            peerjs-server

            by peersTypeScript

            bower-peerjs

            by peersJavaScript

            peerjs-test

            by peersJavaScript

            peerjs.com

            by peersHTML

            documentation

            by peersJavaScript