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: expose audio-state-changed on webContents #37366

Merged
merged 1 commit into from Mar 6, 2023

Conversation

codebytere
Copy link
Member

Description of Change

Closes #37352.

Exposes and documents the audio-state-changed event on webContents. We previously emitted it, but it was a private and undocumented event. This documents and removes the - prefix.

Checklist

Release Notes

Notes: Exposes the audio-state-changed event on webContents.

@codebytere codebytere added semver/minor backwards-compatible functionality target/24-x-y PR should also be added to the "24-x-y" branch. labels Feb 21, 2023
@electron-cation electron-cation bot added api-review/requested 🗳 new-pr 🌱 PR opened in the last 24 hours labels Feb 21, 2023
docs/api/web-contents.md Outdated Show resolved Hide resolved
docs/api/web-contents.md Outdated Show resolved Hide resolved
* `event` Event
* `audible` boolean - Whether audio is currently playing.

Emitted when media becomes audible or inaudible.
Copy link
Member

Choose a reason for hiding this comment

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

Again a little imprecise for the same reason, but ... revising this in a way that still scans well is not obvious to me. For example this would be more correct but feels awkward:

Suggested change
Emitted when media becomes audible or inaudible.
Emitted when the first frame or child content starts playing, or when the last stops playing.

If you have a third idea then let's consider that; otherwise, maybe OK as-is

Copy link
Member Author

Choose a reason for hiding this comment

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

I updated the property description but i think this is probably more understandable as-is 🤔

@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Feb 28, 2023
@codebytere codebytere force-pushed the expose-audio-state-changed branch 3 times, most recently from 0475e00 to b1125ed Compare March 2, 2023 12:02
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

Copy link
Contributor

@jkleinsc jkleinsc 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 512e56b into main Mar 6, 2023
@codebytere codebytere deleted the expose-audio-state-changed branch March 6, 2023 16:00
@release-clerk
Copy link

release-clerk bot commented Mar 6, 2023

Release Notes Persisted

Exposes the audio-state-changed event on webContents.

@trop
Copy link
Contributor

trop bot commented Mar 6, 2023

I was unable to backport this PR to "24-x-y" cleanly;
you will need to perform this backport manually.

@trop trop bot added needs-manual-bp/24-x-y and removed target/24-x-y PR should also be added to the "24-x-y" branch. labels Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-review/approved ✅ semver/minor backwards-compatible functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request]: Add event to WebContents to react to changes of isCurrentlyAudible
5 participants