podcast-player icon indicating copy to clipboard operation
podcast-player copied to clipboard

Implement the Media Session API

Open idorenyinudoh opened this issue 4 years ago • 1 comments

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

idorenyinudoh avatar Feb 18 '21 04:02 idorenyinudoh

@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.

davatron5000 avatar Feb 24 '21 04:02 davatron5000