Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
The CaptureController
interface's setFocusBehavior()
method controls whether the captured tab or window will be focused when an associated MediaDevices.getDisplayMedia()
Promise
fulfills, or whether the focus will remain with the tab containing the capturing app.
You can set this behavior multiple times before the MediaDevices.getDisplayMedia()
call, or once immediately after its Promise
resolves. After that, the focus behavior is said to be finalized, and can't be changed.