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

Improve MatrixCall media handling and internally remove CallTypes #1911

Merged
merged 3 commits into from
Sep 14, 2021

Conversation

SimonBrandner
Copy link
Contributor

@SimonBrandner SimonBrandner commented Sep 11, 2021

Type: task
Split out of #1827
Requires matrix-org/matrix-react-sdk#6781


Notes: This PR removes setMatrixCallAudioInput() and setMatrixCallVideoInput() in favour of MediaHandler::setAudioInput() and MediaHandler::setVideoInput(). The MediaHandler can be accessed through the MatrixClient using MatrixClient::getMediaHandler()


This change is marked as an internal change (Task), so will not be included in the changelog.

@github-actions github-actions bot added the T-Task Tasks for the team like planning label Sep 11, 2021
@SimonBrandner SimonBrandner force-pushed the feature/media-handling branch 2 times, most recently from ee97cae to d916d3f Compare September 11, 2021 06:21
Signed-off-by: Šimon Brandner <[email protected]>
Signed-off-by: Šimon Brandner <[email protected]>
Signed-off-by: Šimon Brandner <[email protected]>
@robertlong
Copy link
Contributor

robertlong commented Sep 14, 2021

This looks really good @SimonBrandner! I'll let someone else review the breaking change, but it looks good to me.

One comment, if we wanted to expose changing audio/video devices mid-call, I assume we'd want to expose that here. It'd also need a reference to the active calls to swap out the media streams and renegotiate. That could be a good future PR building on this work.

Copy link
Member

@turt2live turt2live left a comment

Choose a reason for hiding this comment

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

Overall this looks fine, thank you! The breaking change feels like a good quality of life improvement and version numbers are cheap, so I'm okay with this going through.

public async placeCall(audio: boolean, video: boolean): Promise<void> {
logger.debug(`placeCall audio=${audio} video=${video}`);
if (!audio) {
throw new Error("You CANNOT start a call without audio");
Copy link
Member

Choose a reason for hiding this comment

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

hmm.. why would it be a boolean option then?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because this should be possible in the future and I'd like to avoid another breaking change. In general, I feel like this will make things smoother

@turt2live turt2live merged commit df039d3 into matrix-org:develop Sep 14, 2021
@SimonBrandner SimonBrandner deleted the feature/media-handling branch September 15, 2021 04:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Task Tasks for the team like planning X-Breaking-Change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants