We introduce a new API - navigator.mediaDevices.getCurrentBrowsingContextMedia(). This API allows capturing a MediaStream with the current tab's video (and potentially audio), similar to getDisplayMedia(). Unlike getDisplayMedia(), calling this new function will (eventually) present the user with a simple accept/reject dialog. If the user accepts, the current tab will be captured. In all other ways, getCurrentBrowsingContextMedia() will be identical to getDisplayMedia().
However, this feature is under active discussion in the WebRTC WG. The main point of contention is the security measures necessary to be adopted to unlock a confirmation-only flow. We intend to ship an explicit-selection flow first, which will be the fallback behavior for applications that do not fulfil the security requirements for the confirmation-only flow. Once the security measures of the confirmation-only flow are decided, specified and implemented, we will ship the confirmation-only flow, too.
Gecko: Positive signals for the feature. Initial disagreement over the necessary security measures, but we (Chrome) are coming to see things their way and expect to come to agreement over something similar to their initial security proposal.
Prove usefulness of the feature to early adopters (e.g. Google Workspace).
Receive feedback over changes necessary to the feature.
Pave way to additional features currently planned for development based on this feature. (E.g. region-capture.)
None
As mentioned above at more length, we are currently only experimenting over the explicit-selection flow. The confirmation-only flow will be developed at a later time.
Contact emails
elad...@chromium.org, h...@chromium.org, gui...@chromium.org, hu...@google.com, agp...@chromium.orgExplainer
bit.ly/3nnH9yLSpecification
https://github.com/w3c/mediacapture-screen-share/pull/148However, this feature is under active discussion in the WebRTC WG. The main point of contention is the security measures necessary to be adopted to unlock a confirmation-only flow. We intend to ship an explicit-selection flow first, which will be the fallback behavior for applications that do not fulfil the security requirements for the confirmation-only flow. Once the security measures of the confirmation-only flow are decided, specified and implemented, we will ship the confirmation-only flow, too.Summary
We introduce a new API - navigator.mediaDevices.getCurrentBrowsingContextMedia(). This API allows capturing a MediaStream with the current tab's video (and potentially audio), similar to getDisplayMedia(). Unlike getDisplayMedia(), calling this new function will (eventually) present the user with a simple accept/reject dialog. If the user accepts, the current tab will be captured. In all other ways, getCurrentBrowsingContextMedia() will be identical to getDisplayMedia().
However, this feature is under active discussion in the WebRTC WG. The main point of contention is the security measures necessary to be adopted to unlock a confirmation-only flow. We intend to ship an explicit-selection flow first, which will be the fallback behavior for applications that do not fulfil the security requirements for the confirmation-only flow. Once the security measures of the confirmation-only flow are decided, specified and implemented, we will ship the confirmation-only flow, too.
Blink component
Blink>GetDisplayMediaSearch tags
getDisplayMedia, capture, getCurrentBrowsingContextMedia, share, sharingTAG review
TAG reviewTAG review status
PendingRisks
Interoperability and Compatibility
Gecko: Positive signals for the feature. Initial disagreement over the necessary security measures, but we (Chrome) are coming to see things their way and expect to come to agreement over something similar to their initial security proposal.
WebKit: No signal
Web developers: Positive signals.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CALgRrLkbmjt-oCn3NP9%2Bu-YKZKSDhv%2BHTYj2r87n2q2xhrJ6Ag%40mail.gmail.com.
@Thomas: Sorry for not having answered you yet. I want to respond to the ongoing Github threads, signaling our agreement over things we were blocked on previously, before linking you to those threads. I will do so soon.@Philip:IIUC, the life-time of the capture was a question which was sufficiently answered on the thread. Namely, when an application captures the current-tab, navigation of the current tab unloads the capturing application, thereby terminating the capture - so no issue. (And if we default to getDisplayMedia-like behavior, then lifetime is handled as it is in getDisplayMedia.)
For use-cases to other vendors, here are two possible scenarios:
- A browser-based game can capture footage of itself and transmit it to the back-end of a service like Twitch.
- A product similar to Google Slides could capture itself and transmit its own video to a VC service like Zoom / Microsoft Teams / Google Meet.
"resolving naming questions"Changing the name at a later time would not pose a problem, IMHO. Apps can migrate easily.
"since the new UI isn't implemented"I am not sure about that? We have two UIs, both implemented, but only one on which we'd like to start experimenting.1. The confirmation-only UI will be subject to (a) site-isolation and (b) a new header. We're not starting experimentation on it yet. (The UI itself is implemented, but gated behind a constant set to false.)2. The explicit-selection UI is implemented and gated behind OT (following the CL). We'd like to start experimentation with it.The difference to getDisplayMedia() is that with the explicit-selection UI of getCurrentBrowsingContextMedia(), the browser is allowed to use a different UI than for gDM, so long as that different UI still follows the specification-imposed requirements of gDM. In our case, this means shuffling the order of sources in a way that favors choosing the current tab. (This is spec-compliant and has been approved by Chrome Security, btw.)
Gecko: Positive signals for the feature. Initial disagreement over the necessary security measures, but we (Chrome) are coming to see things their way and expect to come to agreement over something similar to their initial security proposal.
Can you provide links to the discussions that were had?
Web developers: Positive signals.
Intuitively the gained simplicity sounds like something users and developers would welcome. Could you link to evidence (https://goo.gle/developer-signals)?