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

feat: add enableLocalEcho flag to setDisplayMediaRequestHandler() callback #37315

Merged
merged 3 commits into from Mar 1, 2023
Merged

feat: add enableLocalEcho flag to setDisplayMediaRequestHandler() callback #37315

merged 3 commits into from Mar 1, 2023

Conversation

theogravity
Copy link
Contributor

@theogravity theogravity commented Feb 16, 2023

Description of Change

This adds a boolean option called enableLocalEcho to the callback handler for setDisplayMediaRequestHandler() which prevents input from being echoed in the local output stream (e.g., speaker). It can only be used if the audio property is set to a WebFrameMain. Closes #37293.

Checklist

Release Notes

Notes: Added the enableLocalEcho flag to the session handler ses.setDisplayMediaRequestHandler() callback for allowing remote audio input to be echoed in the local output stream when audio is a WebFrameMain.

@welcome
Copy link

welcome bot commented Feb 16, 2023

💖 Thanks for opening this pull request! 💖

We use semantic commit messages to streamline the release process. Before your pull request can be merged, you should update your pull request title to start with a semantic prefix.

Examples of commit messages with semantic prefixes:

  • fix: don't overwrite prevent_default if default wasn't prevented
  • feat: add app.isPackaged() method
  • docs: app.isDefaultProtocolClient is now available on Linux

Things that will help get your PR across the finish line:

  • Follow the JavaScript, C++, and Python coding style.
  • Run npm run lint locally to catch formatting errors earlier.
  • Document any user-facing changes you've made following the documentation styleguide.
  • Include tests when adding/changing behavior.
  • Include screenshots and animated GIFs whenever possible.

We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can.

@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Feb 16, 2023
@theogravity
Copy link
Contributor Author

theogravity commented Feb 16, 2023

FYI, I have zero C++ experience and did my best to kind of figure things out as a JS dev and read through the Contributing section of the Electron docs as a guide. I do have a colleague who is versed in C++ and will take over should any revisions required get pretty complicated.

I'm not too keen on having a property that relies on another property being set with a specific type to activate, but not sure how to go about it overall.

Also the naming of the flag itself feels odd to have it as disable vs enable, but I left it as disable since the default behavior was true to begin with and the comment around it said disable_local_echo.

I couldn't figure out how to update the typescript definition for the callback. I am aware that @electron/typescript-definitions exists, but there does not seem to be any documentation on when this is involved during the development cycle.

@theogravity
Copy link
Contributor Author

I don't have any further edits to the PR - it should be ready for review.

@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Feb 23, 2023
@theogravity
Copy link
Contributor Author

@VerteDinde is there anything about this PR that prevents it from getting a review? Or just need to schedule it for review within your sprint process?

@nornagon
Copy link
Member

@theogravity there's nothing more you need to do, this is already in our queue.

@nornagon nornagon added the semver/minor backwards-compatible functionality label Feb 27, 2023
spec/api-media-handler-spec.ts Outdated Show resolved Hide resolved
shell/browser/electron_browser_context.cc Show resolved Hide resolved
docs/api/session.md Outdated Show resolved Hide resolved
@theogravity theogravity changed the title feat: add disableLocalEcho flag to setDisplayMediaRequestHandler() callback feat: add enableLocalEcho flag to setDisplayMediaRequestHandler() callback Feb 28, 2023
@theogravity
Copy link
Contributor Author

@nornagon Thanks for your time with the feedback. I've updated the PR with what we've discussed.

docs/api/session.md Outdated Show resolved Hide resolved
Copy link
Member

@nornagon nornagon left a comment

Choose a reason for hiding this comment

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

API LGTM, but needs a bit of documentation work.

@nornagon
Copy link
Member

(JFYI, our process requires 2 members of @electron/wg-api to approve API changes, so we need one more review for this.)

Copy link
Member

@codebytere codebytere left a comment

Choose a reason for hiding this comment

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

API LGTM

Copy link
Member

@zcbenz zcbenz left a comment

Choose a reason for hiding this comment

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

API LGTM

@codebytere codebytere merged commit 49df192 into electron:main Mar 1, 2023
@welcome
Copy link

welcome bot commented Mar 1, 2023

Congrats on merging your first pull request! 🎉🎉🎉

@release-clerk
Copy link

release-clerk bot commented Mar 1, 2023

Release Notes Persisted

Added the enableLocalEcho flag to the session handler ses.setDisplayMediaRequestHandler() callback for allowing remote audio input to be echoed in the local output stream when audio is a WebFrameMain.

@theogravity theogravity deleted the disable-local-echo branch March 1, 2023 18:50
@theogravity
Copy link
Contributor Author

@nornagon Could this be part of the 23 or 24 release, or is it too late for that train?

@VerteDinde
Copy link
Member

/trop run backport-to 24-x-y

@trop
Copy link
Contributor

trop bot commented Mar 7, 2023

The backport process for this PR has been manually initiated - sending your PR to 24-x-y!

@VerteDinde
Copy link
Member

/trop run backport-to 23-x-y

@trop
Copy link
Contributor

trop bot commented Mar 7, 2023

I have automatically backported this PR to "24-x-y", please check out #37528

@trop trop bot added the in-flight/24-x-y label Mar 7, 2023
@trop
Copy link
Contributor

trop bot commented Mar 7, 2023

The backport process for this PR has been manually initiated - sending your PR to 23-x-y!

@trop
Copy link
Contributor

trop bot commented Mar 7, 2023

I have automatically backported this PR to "23-x-y", please check out #37529

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-review/approved ✅ merged/23-x-y PR was merged to the "23-x-y" branch. merged/24-x-y PR was merged to the "24-x-y" branch semver/minor backwards-compatible functionality
Projects
None yet
5 participants