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

fix: MediaMetadata not working properly #31492

Merged
merged 1 commit into from Oct 21, 2021
Merged

fix: MediaMetadata not working properly #31492

merged 1 commit into from Oct 21, 2021

Conversation

codebytere
Copy link
Member

@codebytere codebytere commented Oct 20, 2021

Description of Change

Closes #31448.
Closes #30860.

Fixes an issue where MediaMetadata would not show up properly, and also ensures that this works properly in conjuction with globalShortcut handling for media keys. As of this PR: if a video element is played and no global shortcuts are registered, all media key handling works as it should be default. If a global shortcut is registered for a media key, then that takes precedence.

Tested with https://gist.github.com/5ba749964fcd7576b677a3ca93093edd.

Running gist before:
Screen Shot 2021-10-20 at 4 05 10 PM

Running gist after:
Screen Shot 2021-10-20 at 4 04 55 PM

The global shortcut behavior around media keys can also be verified by adding:

  globalShortcut.register('MediaPlayPause', () => {
    console.log('The global shortkey MediaPlayPause was pressed!')
  })

to the above provided gist and observing that the string is logged to console.

Checklist

Release Notes

Notes: Fixed an issue where MediaMetadata did not work properly.

@codebytere codebytere added semver/patch backwards-compatible bug fixes target/13-x-y labels Oct 20, 2021
@codebytere codebytere requested a review from a team as a code owner October 20, 2021 14:24
@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Oct 20, 2021
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Oct 21, 2021
@jkleinsc jkleinsc merged commit 40a8e4f into main Oct 21, 2021
@jkleinsc jkleinsc deleted the fix-mediametadata branch October 21, 2021 19:39
@release-clerk
Copy link

release-clerk bot commented Oct 21, 2021

Release Notes Persisted

Fixed an issue where MediaMetadata did not work properly.

@trop
Copy link
Contributor

trop bot commented Oct 21, 2021

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

@trop
Copy link
Contributor

trop bot commented Oct 21, 2021

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

@trop trop bot removed the target/13-x-y label Oct 21, 2021
@trop
Copy link
Contributor

trop bot commented Oct 21, 2021

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

@trop
Copy link
Contributor

trop bot commented Oct 21, 2021

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

t57ser pushed a commit to t57ser/electron that referenced this pull request Oct 27, 2021
t57ser pushed a commit to t57ser/electron that referenced this pull request Oct 27, 2021
t57ser pushed a commit to t57ser/electron that referenced this pull request Oct 29, 2021
t57ser pushed a commit to t57ser/electron that referenced this pull request Oct 29, 2021
t57ser pushed a commit to t57ser/electron that referenced this pull request Oct 29, 2021
t57ser pushed a commit to t57ser/electron that referenced this pull request Oct 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver/patch backwards-compatible bug fixes
Projects
None yet
4 participants