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

Add support for simulcast #2983

Merged
merged 19 commits into from
Jan 25, 2023
Merged

Conversation

SimonBrandner
Copy link
Contributor

@SimonBrandner SimonBrandner commented Dec 14, 2022

Based on #2423


Here's what your changelog entry will look like:

✨ Features

  • Add support for simulcast (#2983).

Signed-off-by: Šimon Brandner <[email protected]>
@github-actions github-actions bot requested a deployment to PR Documentation Preview January 23, 2023 16:43 In progress
@SimonBrandner SimonBrandner marked this pull request as ready for review January 24, 2023 19:07
@SimonBrandner SimonBrandner requested review from a team as code owners January 24, 2023 19:07
@SimonBrandner SimonBrandner requested review from andybalaam and weeman1337 and removed request for a team January 24, 2023 19:07
Copy link
Member

@dbkr dbkr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally looks good. I don't fully understand the reason for moving from pushRemoteFeed to pushRemoteStream though?

} else {
logger.warn("Didn't find a matching transceiver after adding track!");
const parameters = transceiver.sender.getParameters();
if (isFirefox()) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could do with a comment on why the firefox-specific hackery is needed and what has to change so we can get rid of it, especially as it looks like we're doing the same unconditionally on line 856?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at all of this now, it seems we could probably remove some of the hackery but I am not fully confident yet - have created element-hq/element-call#878 and will look at it ASAP

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, that's good too.

src/webrtc/call.ts Outdated Show resolved Hide resolved
src/webrtc/call.ts Outdated Show resolved Hide resolved
src/webrtc/call.ts Show resolved Hide resolved
src/webrtc/call.ts Outdated Show resolved Hide resolved
src/webrtc/call.ts Show resolved Hide resolved
* @param force - whether or not to force the request to be sent immediately
*/
public subscribeToFocus(force = false): void {
// TODO: Can we throttle this better?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lodash.throttle / debounce are your friends

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't have lodash in the js-sdk atm, I've created an issue for this to figure out what is the ideal solution - element-hq/element-call#876

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, ok - ftr I'd vote for adding it: it will only pull in the bits you use so it's not expensive.

rid: SimulcastResolution.Quarter,
scaleResolutionDownBy: 4.0,
},
];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to note that the bitrates here are probably defined assuming 720p (ie. what we ask for in getUserMedia) but screenshares will be different resolutions, so these figures might not be as sensible for those (plus of course we may not actually get 720p).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I think they are actually not necessary and we should be fine without setting them - let's see 🤞

Signed-off-by: Šimon Brandner <[email protected]>
Signed-off-by: Šimon Brandner <[email protected]>
Signed-off-by: Šimon Brandner <[email protected]>
Signed-off-by: Šimon Brandner <[email protected]>
Signed-off-by: Šimon Brandner <[email protected]>
@SimonBrandner
Copy link
Contributor Author

Generally looks good. I don't fully understand the reason for moving from pushRemoteFeed to pushRemoteStream though?

I liked the name better with the changes made

Signed-off-by: Šimon Brandner <[email protected]>
Copy link
Member

@dbkr dbkr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fast turnaround - lgtm

@SimonBrandner
Copy link
Contributor Author

Thanks for the fast turnaround - lgtm

Thanks to you, too!

@SimonBrandner SimonBrandner merged commit 451ebfd into matthew/sfu Jan 25, 2023
@SimonBrandner SimonBrandner deleted the SimonBrandner/feat/simulcast branch January 25, 2023 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants