Re: [mediacapture-screen-share] ensure that a tab selected by the user is what an app really supposed to share (#143)

Exposing the URL or a reference to a currently shared window/document seems to be sufficient. Or you could expose same origin flag AND a url if the shared tab is on the same origin (or NULL if it belongs to a display surface other than a same origin tab). That seems to be enough.

If the captured tab is navigating to some other URL we would need an event indicating that. That event should then expose the new state of the tab - new values of the same origin flag and the URL. For example.

`    SharingSurfaceChangeEvent.newURL (Read only)` - the new URL to which the window is navigating, or NULL if the new URL does not belong to the same origin as the current document,

`    SharingSurfaceChangeEvent.oldURL (Read only)` - the previous URL from which the window was navigated, or NULL if the previous URL did not belong to the same origin as the current document. 

`    SharingSurfaceChangeEvent.isSameOriginTab (Read only)` - _true_ if the new URL belongs to the same origin as the current document. 

If the user chose a display surface other than a tab, it would be helpful if you could expose a window title of whatever is currently selected for sharing. That would give the website enough details to know if it wants to stop or pause sharing.

-- 
GitHub Notification of comment by ikasantsev
Please view or discuss this issue at https://github.com/w3c/mediacapture-screen-share/issues/143#issuecomment-669867964 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 6 August 2020 11:19:02 UTC