Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

janus.js: createOffer update, including an external stream, fails #2649

Closed
mgarabedian opened this issue Apr 28, 2021 · 1 comment
Closed

Comments

@mgarabedian
Copy link

While testing an update to createOffer in janus.js, I came across a bug. The following code, called a second time (update), will attempt to add the stream again in 'streamsDone' function.

instance.createOffer({
      stream: myCustomStream,
      media: {
          removeVideo: this.videoMuted,
          removeAudio: this.audioMuted,
          audioSend: this.audioMuted ? false : true,
          videoSend: this.videoMuted ? false : true,
          audioRecv: false,
          videoRecv: false,
      }
  });

I believe ths issue is here, in streamsDone. config.streamExternal is always true and always setting addTracks = true.

// We're now capturing the new stream: check if we're updating or if it's a new thing
var addTracks = false;
if(!config.myStream || !media.update || config.streamExternal) {
  config.myStream = stream;
  addTracks = true;
} else { ...
@lminiero
Copy link
Member

Please check #2604, it's changing things there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants