0

Chrome 111 introduced "nextslide" and "previousslide" as action handlers in the Media Session API. Their example (at https://googlechrome.github.io/samples/media-session/slides.html) shows try/catch blocks in Javascript for determining if the browser supports them like this:

try {
  navigator.mediaSession.setActionHandler("nextslide", () => {
    log('> User clicked "Next Slide" icon.');
    slideNumber++;
    updateSlide();
  });
} catch (error) {
  log('Warning! The "nextslide" media session action is not supported.');
}

Their example works fine on Windows and shows previous/next slide buttons in the PIP window - but when I try it in Chrome 111 on Android I get the picture-in-picture window but no controls for previous/next slide. My phone (Galaxy S20 FE 5G) has it's latest OS update and the latest Google Play service update.

When implementing it myself I only show a toggle button when the action handlers are supported in the browser using the try/catch and I can see the button (suggesting Android Chrome 111 supports the actions), but again I don't get see any way to trigger the actions in the PIP window. The same code works in Windows and shows the next/previous slide buttons which then work according to my handlers.

I can't find any indication this feature is or isn't working for anyone on Android and don't know if it's working pending a future Android update or something. Has anyone else tried this on Android yet and had any joy? Or the same issue?

Daniel
  • 1

0 Answers0