#745: Site-initiated mirroring

Visit on Github.

Opened Jun 6, 2022

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:

  • I have reviewed the TAG's Web Platform Design Principles
  • The group where the incubation/design work on this is being done (or is intended to be done in the future): Second Screen WG/CG
  • The group where standardization of this work is intended to be done ("unknown" if not known): Second Screen WG
  • Existing major pieces of multi-stakeholder review or discussion of this design: https://www.w3.org/2021/10/26-webscreens-minutes.html#t03
  • Major unresolved issues with or opposition to this design: N/A
  • This work is being funded by: The explainer was written by and the Chromium implementation is being worked on by Google employees.

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

Discussions

Discussed Jun 1, 2022 (See Github)

Max: have comments for this, in general user scenario is valid. I have only one technical comment which is maybe related to security and privacy. Wondering whether any mechanism for developer to know whether there is an existing session of this remote mirroring of the screen. Sometimes maybe there is a network problem or the user closes the browser, but not sure if the session will be terminated. Otherwise we will have some security and privacy issues.

Dan: Worth asking.

Discussed Jun 1, 2022 (See Github)

Dan: Max has comments -> plenary

Comment by @maxpassion Jun 30, 2022 (See Github)

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.

Comment by @takumif Jun 30, 2022 (See Github)

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.

Discussed Jul 1, 2022 (See Github)

Max: answer to question I raised looks fine.

Yves: looking if it's outside of the local network - or limit it without prompt to local network access.. Seems OK otherwise if the work goes to a working group.

Sangwhan: Web screens - overlaps between IETF and second screen WG.

Ybes: As long as it goes to second screen working group then it's ok. I think there should be differentiation of inside and outside of local network.

Dan: feed back and set as proposed closed?

Sangwhan: I think this looks fine... generalization of 2nd screen video - raw playback API. Basically "airplay for tabs".

Dan: their s&p self review is in a PR.

Yves: I'll ask them to land that PR.

Discussed Jul 1, 2022 (See Github)

Yves: seems okay as long as it's local network that's fine for me. We can close and let the WG decide.

Comment by @ylafon Jul 12, 2022 (See Github)

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

Comment by @takumif Jul 13, 2022 (See Github)

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 :)

Comment by @maxpassion Jul 19, 2022 (See Github)

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