-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[1.x] Question about mvideoroom demo javascript code #2929
Comments
It's meant to avoid we create the handle more than once. In that demo, we use a single handle/PeerConnection to receive all other participants, and so the first time we have to create it, for other participants joining/leaving it just needs to be updated. |
Thank you for reply, but I understand that intention. I didn't express myself clearly.
|
Because the |
Yes, exactly, but in If the intent is to wait until attached, then either the conditions should be reversed - |
Ah ok, I think I understand your point now. You mean we should simply invert the checks, since |
Yeah I should have phrased it this way in the first message :D Thank for confirming the intent, I'm currently implementing the JS client in our project and I'll do it the same way (waiting for 'attached') |
This commit should address it: I also modified the comments a bit to make the whole process easier to understand. Hopefully it should be less confusing now (for you and me both 😄 ). Thanks for spotting this! |
Hello,
I have a question about this line:
janus-gateway/html/mvideoroomtest.js
Line 594 in 03db74a
remoteFeed
variable is set insuccess
callback.creatingFeed
variable is set inattached
event handlerSince 1. always comes before 2. the line
if(creatingFeed)
doesn't seem to me like it serves it's intended purpose. When the handle is created butattached
event has not arrived yet the code will send anothersubscribe
anyway.Which undesirable scenario is this code preventing?
Thank you
The text was updated successfully, but these errors were encountered: