Questions tagged [peerjs]

PeerJS is a JavaScript library for peer-to-peer communication using WebRTC.

The PeerJS library

PeerJS simplifies WebRTC peer-to-peer data, video, and audio calls.

PeerJS wraps the browser's WebRTC implementation to provide a complete, configurable, and easy-to-use peer-to-peer connection API. Equipped with nothing but an ID, a peer can create a P2P data or media stream connection to a remote peer.

Website : http://peerjs.com/


Useful Sources

434 questions
16
votes
1 answer

how to stream audio in phonegap app

I'm trying to implement audio calls in the phonegap app that I'm creating. I'm using PeerJS to get the 2 clients to connect. This part is working. But the problem is with the URL created for the media stream. It looks like this:
Wern Ancheta
  • 22,397
  • 38
  • 100
  • 139
15
votes
2 answers

PeerJS/WebRTC connection fails on rapid chunks transmittion

I'm using PeerJS, but thought that this problem can be about WebRTC in general, hope You can help me out: I'm trying to write a simple peer-to-peer file sharing. I'm using serialisation: "none" for PeerJS connection DataChannel, as I'm sending just…
Max Yari
  • 3,617
  • 5
  • 32
  • 56
12
votes
2 answers

Is there an API for the chrome://webrtc-internals/ variables in javascript?

I want to get access to some of the logged variables in the chrome://webrtc-internals/, but I didn't find anything on google - not even a description of the graphs I can see. I am particularly interested in packetsLost, googCurrentDelayMs and…
m3o
  • 3,881
  • 3
  • 35
  • 56
11
votes
2 answers

Broadcast or peer discovery with PeerJS

I am evaluating PeerJS in order to implement a simple two-player online game. It seems that once I transfer the id of one player’s connection to the other, they can open a channel via PeerJS and are good to go. But if two players want to play that…
Joachim Breitner
  • 25,395
  • 6
  • 78
  • 139
9
votes
4 answers

how to create and run my own peerjs server?

I got the following code from the git-hub but I don't know how to use and execute. $> npm install peer --->where i want to install this node_module ? //Run the server: $> peerjs --port 9000 --key peerjs or var PeerServer =…
John
  • 129
  • 2
  • 3
  • 12
8
votes
3 answers

Critical dependency: the request of a dependency is an expression, vue.js

My testing-app is compiling fine, except that I get this warning: " Critical dependency: the request of a dependency is an expression" (base) marco@pc01:~/webMatters/vueMatters/PeerJS-VueJS-Test$ npm run serve > testproject@0.1.0 serve…
user2315094
  • 759
  • 3
  • 16
  • 29
8
votes
3 answers

Deploy PeerJS server on Heroku

I have a problem with PeerJS server. I used "Deploy to Heroku" button from here: https://github.com/peers/peerjs-server I have no idea how can I connect with deployed cloud. I can't find clear documentatnion about PeerJS Server. I don't know what…
Damian
  • 111
  • 1
  • 3
7
votes
2 answers

iceConnectionState is disconnected (when used over the internet)

This question has been asked before, but I have not found an answer yet. I'm basically having the same problem as described here and here. I'm trying to set up a webRTC connection using PeerJS. It works flawlessly in LAN but I can't get it to work…
DinuTheHuman
  • 79
  • 1
  • 3
6
votes
1 answer

How to connect to a host with peerjs?

I'm trying to use peerjs to connect an host with a client. I have two files (one for the host, one for the client). The host will generate a peerId which the client is using to connect to him. It's basically the tutorial from here. host.html const…
Lars Flieger
  • 2,421
  • 1
  • 12
  • 34
6
votes
5 answers

Websocket failed Invalid frame header

I'm using socket.io with peerjs to create a video conference app. Everything works fine on localhost. but when i push/host it on heroku it shows me this error in the console of browser : index.js:83 WebSocket connection to…
Somsubhra Das
  • 166
  • 1
  • 9
6
votes
2 answers

Getting Started With PeerJS

I am trying the simplest example I can, pulled directly from their website. Here is my entire html file, with code taken exactly from https://peerjs.com/index.html: