-
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
Add reason of track being added/removed in onremotetrack in janus.js #3150
Add reason of track being added/removed in onremotetrack in janus.js #3150
Conversation
Thanks for your contribution, @marekpiechut! Please make sure you sign our CLA, as it's a required step before we can merge this. |
Thanks! Not sure I like |
As a side note, the demos should all have the signature of the callback updated, though. A ton of people won't look at |
Thanks for the review @lminiero. On Monday I'll go through the demos and update signature. |
No problem, take your time! |
1502d9d
to
b1e6c3f
Compare
I've added metadata to all demos For screen-sharing demo I've added code to ignore mute/unmute events with description why it might be useful (just like in my issue with blinking screen-sharing streams). I've also found that in Let me know if something is still missing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I added a few small notes.
@lminiero I think I have fixed all the code style issues. I got too used to auto-formatters :) |
Thanks! Abroad for FOSDEM but I'll have a look as soon as I get back on Monday 💪 |
Thanks, merging! |
Added a metadata object to janus.js
onremotetrack
callbacks with reason why track is being added/removed. Thanks to that users can decide if they want to handle the call or ignore it.It can be used to fix blinking screen-sharing sessions as discussed here: https://groups.google.com/g/meetecho-janus/c/bZaQA4MqJcs
(user is being notified about track removal, when it's only a
mute
call)After the change
onremotetrack
call will lok like this:Change should be backwards compatible, as it's only adding a new parameter to callbacks that will be ignored by current client code.
I have tested demo pages with the change and it looks like everything is fine.
Also updated documentation.