Skip to content

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