-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should we add slide presentation specific actions? #274
Comments
Thanks for raising this question @youennf FYI Chrome is going to experiment with Document Picture-in-Picture to allow websites to open an always-on-top window that can be populated with arbitrary HTMLElements (not just HTMLVideoElements). See explainer and Intent to prototype |
capture handle actions also mention first and last.
Thanks for the links. |
@steimelchrome will know more about use cases for Document PiP |
From discussion in the 23 May 2022 Media WG / WebRTC joint meeting, could the use cases for Document PiP motivate adding next slide / previous slide actions to MediaSession? Or are there other developer requests for such actions in MediaSession that mean we should consider adding them? |
steimelchrome@ and I had a discussion after yesterday's media wg meeting about how we would have built MediaSession if these use cases had been known in advance. We concluded that we might well have created a registry of actions that have well-defined semantics on the browser context, e.g., an A site would register action callbacks like 'play' or 'pause' in this registry instead of via That's the world we might have built. However, we can still move towards that today, just having If we do adopt that model, then it might help out capture actions. Specifically:
Sorry for the long post, but stemelchrome@ and I wanted to see if this is a direction that might be helpful for the capture use case. |
Yesterday I learned Chrome is sending some PiP actions to the right place at its own discretion. This makes sense, and suggests perhaps a more lax model than I got just from reading the spec. Actions can have different routing and different defaults. In such a model, it seems OK to add navigator.mediaSession.setActionHandler("previousslide", () => updateMyDoc(--mySlideNumber));
navigator.mediaSession.setActionHandler("nextslide", () => updateMyDoc(++mySlideNumber)); We specify that sources for these two actions MAY include:
I suggest we punt on |
I think we're saying very similar things. The only bit i'd add is that those new actions don't have much to do with MediaSession, so it might be a good time to move the registry of actions somewhere else. |
I think they're related. The WebRTC WG has been asking the Media WG to get more involved with media capture.
The more I think about it, I don't think we should solve "actions that are not specific to media". That's venturing into semantic web territory, and seems out of scope both for this WG and WebRTC. I don't think we need discovery, and we have #228 on feature detection. I'd rather not have a low bar, and think success in this space requires pushing back on some of the grander ideas. |
We're looking at things of the form "page can do The existing That said, I prefer having it all under mediasession than having a separate, mostly parallel, system to register "actions that could be triggered by capture". Keeping action registration all in one place seems much better to me, even if we all don't quite yet share the same view of how "media" those actions are. There are some changes to the MediaSession API that could go along with that, to keep things neater. Haven't thought too much about this yet. Please note that, unlike my comment above, this post isn't a summary of a discussion with steimelchrome@; I'm speaking just for myself now. |
@youennf, @jan-ivar, @eric-carlson, @steimelchrome, @liberato-at-chromium and I met today to continue this discussion. We looked at two approaches: (1) adding next/previous slide actions to Media Session, and (2) introducing a new, more general purpose, action registry API that could be used by both Media Session and Capture Handle Actions. Although option (2) is a more generic and flexible design, there was concern expressed about designing for the future, whereas option (1) would be enough to allow for the current use cases. We also considered that the next/previous slide actions are media-related enough to be included in Media Session. We concluded that we should:
|
For the record, Chrome shipped Capture Handle Identity in Chrome 102, not Capture Handle Actions. Capture Handle Actions have not shipped yet in any browser. |
FYI I've just sent #284 to start adding presenting slides actions to the spec. |
I filed #285 to cover this. |
Closing as fixed by #284 |
Presenting slides through a website is becoming popular.
As such, providing MediaSession actions targeted at that, like nextslide/previousslide might be useful.
This might be useful when the web page is in PiP mode.
This might also be useful when combined with capture handle actions (https://w3c.github.io/mediacapture-handle/actions/index.html).
cc @jan-ivar
The text was updated successfully, but these errors were encountered: