w3c / mediacapture-screen-share-extensions

Other
1 stars 0 forks source link

Capability Delegation for getDisplayMedia() #3

Open eladalon1983 opened 1 year ago

eladalon1983 commented 1 year ago

Imagine you have a moderately successful Web application, which has its own distinct look and feel; maybe GitHub or Wikipedia. Now let's say that you want to incorporate a video-conferencing application into your app and you turn to a third party solution that can be embedded in a cross-origin iframe. There's a lot of logic behind the scenes, but UX-wise, maybe you work out a scheme where it's mostly the video which is user-facing in the video-conferencing iframe, and the user-facing controls - mute, leave, share-screen - are all part of your app, and receive its UX styling. When those buttons are pressed, some messages are exchanged between your application and the embedded VC solution.

image

Now imagine you press the Share button, which is inside your app. You want to send a message to the VC app, but when the VC app gets that message, it can't actually call getDisplayMedia(), because it's missing the transient activation. Darn.

Well, luckily, there's such a thing as Capability Delegation, and that'd solve the problem.

Question 1: Do we agree that this would be a Good Thing? (If not, let's stop and debate it. If yes, proceed.)

Question 2: Shall monkey-patch that draft report, or can we reference it from this spec, despite it being a draft report? (Possibly we could make a vague reference to some means to delegate capability that might be added in the future.)

jan-ivar commented 1 year ago

I'll try to push on https://github.com/mozilla/standards-positions/issues/565 internally to get a position.

bradisbell commented 1 year ago

As a web developer, I am in favor of this proposal. Iframes can be useful tools for embedding hosted components from various service providers. They're easy to use for developers of any experience. However, the security around media APIs can be limiting.

Any proposal that opens up Web APIs in more contexts, ultimately making for better user experiences, has my vote.