Hi. I found a PR #132 related to my issue.
I want to send video+audio+screen.
What do you advice?
Ok, I found a trick https://blog.mozilla.org/webrtc/warm-up-with-replacetrack/
I have one stream with 3 'empty' tracks - audio, video and screen.
Next, I call method 'call' and then have senders:
const [audioSender, videoSender, screenSender]= call.peerConnection.getSenders();
just replace track via audio.replaceTrack(null|audioTrack) to mute/unmute
Any sample code snippet with peerjs will be helpful for newbie webrtc people :)
Thanks in advance !
New news, I'll be releasing a new version of PeerJS next week, completely rewritten, using a much simpler concept, and it will not need a PeerServer. So wait few days.
The new concept is based on rooms, a Room is the only thing that exists, so if you want to call someone, just go into a random ID room that both peers share. If what you want is multiple connections, just enter into a room with more people, that simple.
Here is an early test: https://dist-9yeo4sucs.now.sh/ (just enter the same room name PD: there is no UI feedback)
The getUserMedia is inside the librayr, but I'll take it out probably.
So just wait few days until next week :)
great news .. ! awaiting for new version . Where can i see the updates related to new release
The branch is ready https://github.com/peers/peerjs/tree/v2.0.0
You can join to a Telegram group if you want to discuss or ask for anything related to PeerJS: tg://join?invite=ENhPuhTvhm8WlIxTjQf7Og
Most helpful comment
Ok, I found a trick https://blog.mozilla.org/webrtc/warm-up-with-replacetrack/
I have one stream with 3 'empty' tracks - audio, video and screen.
Next, I call method 'call' and then have senders:
const [audioSender, videoSender, screenSender]= call.peerConnection.getSenders();
just replace track via audio.replaceTrack(null|audioTrack) to mute/unmute