GoogleChrome / samples

A repo containing samples tied to new functionality in each release of Google Chrome.
https://www.chromestatus.com/samples
Apache License 2.0
5.77k stars 2.39k forks source link

No next/previous slide controls on Android for Media Session API #796

Open d-tayl opened 1 year ago

d-tayl commented 1 year ago

https://googlechrome.github.io/samples/media-session/slides.html

On Chrome 111.0.5563.58 on Android I can see the PIP window when trying this sample but there doesn't seem to be any controls for triggering the nextslide/previousslide actions. This works fine in Windows Chrome on version 111.

I'm having the same issue when implementing the functionality myself, where it'll work fine on Windows but display no controls on Android.

Operating system as listed in Chrome: Android 13;SM-G781B Build/TP1A.220624.014

Had a colleague try it on his phone (Samsung Galaxy S22 Ultra this time) and had the same thing.

Is this awaiting an OS update or something else external for the controls to show in Android? The try/catch method for checking support of these features isn't failing at this point on either phone.

beaufortfrancois commented 1 year ago

Chrome on Android supports the slides media session actions but doesn't show icons in the Picture-in-Picture window yet. It is working only on desktop for now.

I've started https://chromium-review.googlesource.com/c/chromium/src/+/4350267 to address this issue. Hopefully, you'll be able to use them soon.

Spoiler: image

d-tayl commented 1 year ago

Chrome on Android supports the slides media session actions but doesn't show icons in the Picture-in-Picture window yet. It is working only on desktop for now.

I've started https://chromium-review.googlesource.com/c/chromium/src/+/4350267 to address this issue. Hopefully, you'll be able to use them soon.

Spoiler: image

Thank you for the update. They look beautiful and I can't wait!

beaufortfrancois commented 1 year ago

Out of curiosity, are you going to use it in your web app?

d-tayl commented 1 year ago

Sure. We have a remote slide presentation tool that works across a few platforms/presentation tools with a web interface. This'll mean users can bring up their notes app/a live stream of their event/whatever they like without losing sight of the current slide or control of it. Is working perfectly on Windows Chrome so far.

IMG-20230313-WA0009(1)

beaufortfrancois commented 1 year ago

Oh nice! Can I try it?

d-tayl commented 1 year ago

Not yet, I'm afraid. It's currently in our testing environment and not publicly available. Releases are out of my hands so I'm sure when it'll be live either, sorry.

beaufortfrancois commented 1 year ago

@d-tayl https://chromium-review.googlesource.com/c/chromium/src/+/4350267 has landed in latest update of Chrome Canary for Android if you want to try it. Let me know if that works fine for your use case.

d-tayl commented 1 year ago

@d-tayl https://chromium-review.googlesource.com/c/chromium/src/+/4350267 has landed in latest update of Chrome Canary for Android if you want to try it. Let me know if that works fine for your use case.

Just tried it and it's working perfectly. Thank you very much for looking into this and getting back to me!

Screenshot_20230321_102505_Samsung Notes

One thing that's outside of this issue but I figure I should flag: I didn't previously have Canary and the PiP window would close when the browser was in the background. It worked after I closed the app and toggled PiP permissions on and off (I'm not sure which part helped). My colleague had a similar experience with the BETA Chrome app when we first looked at this so I'm guessing it's to do with the default permissions maybe? (PiP seems to be allowed by default)

Thanks again, Daniel

beaufortfrancois commented 1 year ago

One thing that's outside of this issue but I figure I should flag: I didn't previously have Canary and the PiP window would close when the browser was in the background. It worked after I closed the app and toggled PiP permissions on and off (I'm not sure which part helped). My colleague had a similar experience with the BETA Chrome app when we first looked at this so I'm guessing it's to do with the default permissions maybe? (PiP seems to be allowed by default)

I'd suggest you file a Chromium bug at https://crbug.com/new so that the Chrome team can have a look at it.