w3ctag / design-reviews

W3C specs and API reviews
Creative Commons Zero v1.0 Universal
326 stars 55 forks source link

Site-initiated mirroring #745

Closed takumif closed 2 years ago

takumif commented 2 years ago

Wotcher TAG!

I'm requesting a TAG review of site-initiated mirroring.

We're proposing an API to allow Web pages to request mirroring themselves to a secondary display. They will be allowed to request customization of the mirroring implementation in certain respects.

Further details:

We'd prefer the TAG provide feedback as (please delete all but the desired option):

🐛 open issues in our GitHub repo for each point of feedback

maxpassion commented 2 years ago

Hello Takumi,

I have one comment: When there is a network problem or the user close the tab accidentally, is there a mechanism to make sure that the ongoing mirroring session be terminated safely? Otherwise there would be a security/privacy problem.

takumif commented 2 years ago

Hi Dapeng,

In those cases, the receiver might keep on showing the last frame it received before it got disconnected -- is that the security/privacy issue you're concerned about?

For network problems, I imagine we'd want to wait some time before we time out and disconnect, just in case the connection is restored quickly and we can resume the mirroring session. Once we time out then the UA can terminate the session and notify the web page via the onterminate event. At that point the UA cannot communicate with the receiver so what the receiver does is up to its implementation, but I expect it to typically also end the session after a timeout.

If the tab is closed, then the UA can terminate the session immediately, and if the web page persists in a non-fully-active state then we can notify it via onterminate.

ylafon commented 2 years ago

Hi, I wonder if there is a need to differentiate between local network usage and wan usage here, it might give different prompts based on leakage possibilities. Perhaps addressing this in the security & privacy questionnaire would be good. Otherwise it looks ok to progress in the Second Screen WG. Thanks

takumif commented 2 years ago

Hi Yves,

Mirroring to a display in the LAN is in scope of the spec but WAN is not. This is also true for the existing Presentation and Remote Playback APIs. I'll add a paragraph to the explainer to clarify this.

Thanks for the reviews Dapeng and Yves :)

maxpassion commented 2 years ago

Hi @takumif , we had a TAG review today and this looks good for us. Thanks for flying TAG.