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

Implement the Media Session API #4

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

idorenyinudoh
Copy link

@idorenyinudoh idorenyinudoh commented Feb 18, 2021

The Media Session API provides an interface to let users perform media actions on playing media - outside the browser tab where it's playing. On mobile, this interface is noticeable in the notification area while on PCs, the interface is available through media hubs or by the OS.

For more information, check this article

Here, I implemented the following media actions:

  • play
  • pause
  • seekbackward
  • seekforward
  • seekto
  • stop

P.S: I noticed a CSS typo and corrected it.

The following screenshots showcase the media hub on Chrome for PC before the media session api implementation and after.

before implementation
after implementation

@davatron5000
Copy link
Owner

@idorenyinudoh, this is awesome! 🙌 I was without power last week and am just now seeing it.

Implementing the Media Session API has been on my TODO list ever since I read your article. I'll try to get this merged in by the end of the week (need to carve out some open source time). I'd like to make sure this gets rolled into #2 on the lit-version branch as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants