Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The Media Session API lets a web app provide playback metadata and respond to media controls exposed by a browser or operating system. With it, users may be able to see a podcast’s title and artwork in a media interface and control playback from places such as a keyboard, headset, notification, or lock screen. The browser and device decide which surfaces and controls to show; the API does not guarantee the same interface everywhere.

What the Media Session API does

The API connects a page’s media player to browser- and platform-level media experiences. Your app supplies information about the current item and registers handlers for actions it can perform. A browser may then surface that information and route supported controls back to the page.

The W3C Media Working Group’s 5 June 2026 Working Draft describes the goal as showing customized metadata, customizing available platform controls, and accessing media keys such as keyboard, headset, notification-area, and mobile lock-screen controls. It is a draft, not a promise that every browser exposes each feature.

Possible surfaces include a desktop media hub, notification, lock screen, wearable, or picture-in-picture interface. Which surfaces appear—and whether they show artwork, chapters, or playback position—depends on the browser, operating system, device, and their conventions.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Mars Fox BT Multimedia Music Player Remote Control for Play Pause Next Prevtrack Volume Up/Down Mute Fit for iOS iPhone ipad Android System Smartphone Tablet Devices Sony FiiO Player ect
  • You don’t need to change the Music with your fingers. This bluetooth remote control can scroll the pause/play Music APP. Next Prevtrack,Volume yp or down,mute etc. Of course, it is a good helper for you to take selfie or videos.
  • capture stunning photos&video remotely with easy - Say goodbye to blurry photos. Eliminate camera shake for razor crisp photos every time. Snap photos and Start/Stop video recording with the click of a button.
  • 【!!!You must read it if your device is Iphone or Ipad etc. IOS system devices】!!! TThe" Home "button not fit for Ios System like iphone ipad itouch.
  • It is follow ergonomic. Comfortable hand feeling. Pleasant sound of silicone keypad built-in light strength pot piece .High grade acrylic panel. Standby time more than one year
  • There is a call answer and end button

Check availability before using it

The page-level entry point is navigator.mediaSession. Check for it before setting metadata or handlers:

if ("mediaSession" in navigator) {
  // Configure metadata and supported action handlers here.
}

MDN labels the Navigator.mediaSession property Baseline and widely available since September 2021. That does not mean every method, action, or platform presentation works consistently: MDN’s broader Media Session API overview marks the API as limited availability and not Baseline. Test the browser and device combinations your users rely on.

Rank #2
Satechi Bluetooth Media Button, Steering Wheel Mount
  • Wireless Music Control – Take control of your music without reaching for your phone. The Satechi wireless media button let you play/pause, skip tracks, and adjust volume from up to 40ft (12m) away. Whether commuting, biking, or working, enjoy seamless playback control that fits into your routine. Our Bluetooth music controller is compatible with iOS, Android, MacOS, and iPadOS. Not recommended for Mac devices released before 2012 due to older Bluetooth versions
  • Distraction Free-Operation – Designed with a simple tactile layout, the coin-shaped button allows for instant access to media controls — no screen unlocking, swiping, or app switching required. A compact form factor ensures easy one-handed use, even while on the move
  • Versatile Mounting Options – Easily mount the Bluetooth Media Button on your steering wheel, bike handlebars, or desk with the included clip. Designed for portability and daily use, the compact build stays securely in place without getting in the way
  • Extended Battery Life – Powered by a replaceable CR2016 coin cell battery, the Media Button is built for long-term use with minimal upkeep. Auto-sleep functionality helps conserve power, providing up to two years of use before replacement is needed. Battery included
  • What You Get – With your purchase you will receive a universal mount, a keychain, a 3M sticker, pre-installed battery, and a user manual for your convenience. Satechi products are covered by a 2-year limited warranty against defects in materials and workmanship under normal use

Set metadata for the currently playing item

When playback starts, set navigator.mediaSession.metadata to a MediaMetadata object. Update it whenever the current track, episode, or other media item changes. Common fields are title, artist, album, and artwork; chapter details are also documented. The browser or platform may choose to display some or all of this information.

if ("mediaSession" in navigator) {
  navigator.mediaSession.metadata = new MediaMetadata({
    title: "Episode title",
    artist: "Podcast name",
    album: "Season or series",
    artwork: [
      { src: "/artwork-96.png", sizes: "96x96", type: "image/png" },
      { src: "/artwork-512.png", sizes: "512x512", type: "image/png" }
    ]
  });
}

Supply accurate metadata rather than relying on browser fallback information: fallback behavior is not uniform. Metadata is shared with platform interfaces, so avoid exposing details users would not expect to appear there. The W3C draft specifically calls for care with metadata in incognito mode and recommends making the originating site clear to reduce spoofing risk.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
YuYue Electronic Wireless Bluetooth Media Button Remote Selfie Control Car Motorcycle Steering Wheel Music for iPhone or Android with Mount
  • [Applicable]:Wireless Bluetooth Media Button Remote Selfie Control,Car Motorcycle Steering Wheel Music for IOS or Android
  • [Bluetooth wireless connection]: Compatible with most iOS devices that support Bluetooth 3.0 and higher, Android OS 4.4 or higher.But X and above, unable to activate siri.
  • [Plug and Play]: Just pair the button with the phone via Bluetooth. There are no additional installations or any apps to download. The included CR2025 battery has a long battery life of up to 2 years, and the wireless Bluetooth range can reach 30 feet.
  • [High-quality materials]: YuYue Electronic Wireless Bluetooth Media Button is made of high-quality plastic, smooth touch. And comes with mount, easy to use.
  • [Note]:The first time you connect your device, you need to use your phone or tablet device to search for the remote button on the Bluetooth connection page. If the device is dormant, simply press the button to activate it. If you encounter any problems during use, please contact us.

Connect platform controls to your player

Use setActionHandler(action, handler) to connect actions to the same playback functions your app uses internally. Depending on implementation, actions can include play, pause, previoustrack, nexttrack, seekbackward, seekforward, seekto, and stop. The W3C draft lists additional actions, including picture-in-picture and call-related controls, but their presence in the draft does not mean a browser supports or exposes them.

if ("mediaSession" in navigator) {
  const session = navigator.mediaSession;

  for (const [action, handler] of [
    ["play", () => player.play()],
    ["pause", () => player.pause()],
    ["previoustrack", () => playPrevious()],
    ["nexttrack", () => playNext()]
  ]) {
    try {
      session.setActionHandler(action, handler);
    } catch {
      // This browser does not accept this action.
    }
  }
}

This pattern follows the web.dev implementation guide: guard registration because some actions may be unsupported. Register only actions the player can honor; a registered handler advertises that capability and can influence which controls the browser offers. If an action stops being relevant—for example, there is no next item at the end of a playlist—remove its handler by setting it to null.

Rank #4
Recoil Bluetooth Media Button Steering Wheel Remote Control Car Bike Boat
  • WIRELESS BLUETOOTH - Easily pair the BT Media Button to your Bluetooth-enabled device for convenient access to your media applications, up to 40 feet away
  • MEDIA PLAYBACK - Features volume control, pause/play, forward/backtrack media all at the touch of your fingers
  • WATERPROOF - This IPX7 waterproof media button can be used for car, bike, power sports, jet ski or any tough environment
  • LONG BATTERY LIFE - The built-in lithium battery has an amazingly long battery life of up to 3 years with automatic sleep mode to conserve power. Should any battery-related issues occur within one year of purchase, we offer a free replacement guarantee.
  • MOUNT ATTACHMENT - Use the included mount to easily attach to your steering wheel or onto your bicycle handlebars

Keep the session in sync with real playback. A play or pause request from a headset or keyboard should call the player’s actual play or pause behavior, and changes in playback should be reflected in the app. Media keys may be routed to whichever page the user agent considers the active media session, not necessarily whichever page most recently registered a handler.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Handle seeking and playback position carefully

For seek actions, use the details passed to the handler rather than assuming a fixed interval. A handler can use a supplied seek offset; the web.dev guide gives 10 seconds as an example fallback when an offset is absent, not as a universal requirement.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Bluetooth Media Button Remote Wireless Waterproof Music Controller
  • ⭐ IMPORTANT NOTICE: To replace the battery of your Bluetooth media button remote control, please follow these steps: 1. Rotate the top border counterclockwise by about 30 degrees to separate it from the lower border. 2. Carefully unscrew the four small screws with a precision screwdriver. 3. Gently remove the circuit board - mark its orientation before removal to ensure proper installation during reassembly. 4. Replace with a new CR2032 battery. 5. Reinstall in reverse order to ensure that the printed circuit board is placed in the correct direction.
  • 【Wireless Bluetooth Remote Control】 GLOBELEC wireless music Bluetooth control button, the remote control body is detachable, providing 4 directional adjustments The music Bluetooth remote control button is seamlessly compatible with various Bluetooth enabled devices. Quickly and easily pair with smartphones or mobile devices for instant control
  • 【 Compatible with Remote Control 】 The Bluetooth remote control is compatible with iOS and Android smartphones and can answer calls, adjust volume, switch songs, play/pause, wake up Siri, and take photos. When the Bluetooth remote control stops working, it will automatically enter standby mode. But when you press any button, it will automatically wake up and connect
  • 【 Easy to use 】 The wireless Bluetooth button remote control is very easy to set up, you just need to press and hold the middle button to quickly match your phone. The controller and strap of the wireless media remote control can be rotated and disassembled. Convenient for you to replace the battery. It has four directional control buttons for easy use.
  • 【Waterproof】Bluetooth remote control With IPX67 waterproof performance, it can be used in rainy or harsh environments; The backlight button ensures clear visibility for night operation. you can freely control music, volume, or answer calls while driving, cycling, or working

If the app reports playback position, keep duration, current position, and playback rate valid, and refresh the position state after seeking or changing playback rate. The browser’s interface and support for showing that position remain platform-dependent.

Understand active sessions, tabs, and embedded media

Several tabs or documents can have media sessions, but the page cannot force itself to own system controls. The user agent selects at most one active session for platform presentation and action routing. The W3C draft recommends that browsers consider audio focus and user experience when making that choice.

For embedded media, the web.dev guide says metadata must be set from the embedded context. Treat that as implementation guidance rather than a universal rule: test the specific browser and embedding arrangement your product uses.

Test the experience users will actually get

There is no single support matrix that captures all combinations of property availability, actions, and platform UI. Test on your target browser, operating system, and device, including relevant embedded contexts. Check these separately:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Whether navigator.mediaSession exists.
  • Which action handlers the browser accepts.
  • Which media surfaces the browser and operating system expose.
  • Whether artwork, chapters, or playback position appear as expected.
  • How controls behave with multiple tabs and embedded playback.

Use feature detection, catch rejected action registrations, and provide the normal in-page player as the dependable control path. The Media Session API enhances playback beyond the page; it does not replace the player or guarantee that a particular lock-screen or notification design will appear.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.