Skip to content

PeerJS Stream Call not working #1319

Answered by gherman-cs
Interstellar717 asked this question in Q&A
Discussion options

You must be logged in to vote

Hey cool to see you building stuff!

PeerJS has 3 main types, Peers, DataConnections, MediaConnections. peer.call creates mediaConnections, peer.connect creates dataConnections.

As per peerjs docs, it's not peer.on('stream its mediaconnection.on('stream'

I updated your example, added some more listeners and clarified prints outs and variables a bit, probably have some copy paste wrong messages, but pretty close. see below.

This example on peerjs docs is sorta similar to yours https://github.com/jmcker/Peer-to-Peer-Cue-System/tree/main is pretty good to help understand the event listening and such. For media stuff this is an example I have seen as well https://github.com/oxedom/parker (I am…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Interstellar717
Comment options

Answer selected by Interstellar717
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants