Web APIs

Media Session API

Checking compatibility...

Customize media notifications and control media playback from system UI. Perfect for media players and audio/video applications.

Basic Metadata

Show song information in system notifications and media centers. This example displays the title, artist, album, and artwork for the currently playing audio, making it easy to identify what's playing.

=
=
=
=
=
=

Output

Click Run to see output...

Action Handlers

Respond to media controls from your device. This example lets you control playback using hardware buttons on keyboards or headphones, and software controls in notifications or lock screens.

=
=
=
=
=
=

Output

Click Run to see output...

Position State

Show playback progress in system media controls. This example updates the duration, current position, and playback speed information so users can see their progress in the system media interface.

=
=
=
=
=
=

Output

Click Run to see output...