medooze / whip-whep-js

WHIP and WHEP clients javascript module
MIT License
65 stars 15 forks source link

Should the README whip example be using 'sendonly' tracks? #19

Open cameronelliott opened 11 months ago

cameronelliott commented 11 months ago

The readme example is currently:

//Send all tracks
for (const track of stream.getTracks()) {
    //You could add simulcast too here
    pc.addTrack(track);
}

But maybe it should be:

//Send all tracks
for (const track of stream.getTracks()) {
    //You could add simulcast too here
    pc.addTransceiver(track, { 'direction': 'sendonly' })
}

The RFC draft states 'SHOULD' for having sendonly transcievers.

Let me know if you want a PR

murillo128 commented 11 months ago

yes, that would be great

murillo128 commented 7 months ago

done