Chrome getdisplaymedia constraints - getUserMedia () MediaStream promise MediaStreamConstraints .

 
const constraints audio channelCount 1, sampleRate 16000, sampleSize 16, volume 1 , navigator. . Chrome getdisplaymedia constraints

That option should be provided for getDisplayMedia() in the form of constraints where specific coordinates can be passed; e. A constraints dictionary is passed into applyConstraints () to allow a script to establish a set of exact (required) values or ranges andor preferred values or ranges of values for the track, and the most recently-requested set of custom constraints can be retrieved by calling getConstraints (). This is shown below Shared tab Tab used to share Random Tab How do I hide this bar. To use the new constraint, pass systemAudio as a constraint. Streams and tracks. Mar 8, 2023 Support tables for HTML5, CSS3, etc Feature MediaDevices API getDisplayMedia () MediaDevices API getDisplayMedia () Usage of Global 36. Chrome (72), Firefox (66), Safari (12. Chrome can extend it to other values, should there be a need. Hello I would like to transmit video streams of desktops, but unfortunately on systems with multiple monitors JS-function navigator. getDisplayMedia(video true, audio true, systemAudio "exclude" or "include"); This feature is only supported on desktop. Mar 12, 2023 To start capturing video from the screen, you call getDisplayMedia () on navigator. The window is cropped by about 7 pixels on the left and bottom side in the captured stream. When getDisplayMedia() is called, the browser offers the user a choice of display surfaces tabs, windows, or monitors. Web APIMediaDevices. If the user accepts, the current tab will be captured. Secure your code as it's written. I thought the solution was to set the displaySurface browser value navigator. If needed, you can determine whether or not this constraint is supported by checking the value of. A constraint falls into one of three groups, depending on its place in the constraints structure. Disable Media Overlays on Chrome and Edge browsers. const supports navigator. getDisplayMedia (video mediaSource "screen", audio true, cursor "motion", displaySurface "browser", ,); However, I am still being presented with the three options instead. 31 audio audiovideo video true, audio true getDisplayMedia() . Whats next for Screen Capture. The three media streams are connected to three different sinks a < element (A), another > element (B), and a peer connection (C). Download Modify Publish desktopCapture extension yourselves. getUserMedia () . getDisplayMedia (opts) TS2339 Property &39;getDisplayMedia&39; does not exist on type &39;MediaDevices&39;. getUserMedia (constraints). getDisplayMedia (video true) console. Screen Capture W3C Working Draft12 January 2023 More details about this document This version httpswww. getDisplayMedia() doesnt take any media constraints but in Chrome the user gets to choose whether to capture their entire screen, an app or just a Chrome window Once you get access to the screen. The Screen Capture API is relatively simple to use. 22 de fev. It calls navigator. getDisplayMedia (constraints); Parameters constraints Optional An optional MediaStreamConstraints object specifying requirements for the returned MediaStream. You can obtain a MediaStream object either by using the constructor or by calling functions such as MediaDevices. match ('Linux')) maxver 35 ; "known" crash in chrome 34 and 35 on linux if (chromever > 26 && chromever 33 requires some awkward chromeflags manipulation constraints . This ensures that web applications can&39;t force the user to share specific content by restricting the source list until only one item is left. For example, Chrome lets you share between a single tabwindowdesktop, Firefox shares the whole window. 31 de ago. getDisplayMedia (video mediaSource "screen", audio true, cursor "motion", displaySurface "browser", ,); However, I am still being presented with the three options instead. Its fast, secure, and simple to use. label . Inconsistent constraint checks. Note that we dont offer the option to pre-select a specific window or screen. 3 video frameRate1. var constraints audio false, video width min 1024, ideal 1280, max 1920 , height min. video cursor 'always' 'motion' 'never', displaySurface. The MediaDevices interface's getDisplayMedia () method prompts the user to select and grant permission to capture the contents of a display or portion thereof (such as a. Many thought HTML Media Capture was too limiting, so a new spec emerged that supported any type of (future) device. The web application will communicate with this extension to capture the screen. 7 audio channelCount. chrome112getDisplayMedia . Inconsistent constraint checks. It doesn&39;t need, and indeed rejects, elaborate constraints. If you use macOS or Windows you need to make sure the browser shell also has getUserMedia compatibility (e. getDisplayMedia () The MediaDevices interface&39;s getDisplayMedia () method prompts the user to select and grant permission to capture the contents of a display or portion thereof (such as a window) as a MediaStream. I was able to get audio and video working. To explore how this all fits together, lets build the same example application that we built for Chrome and Firefox, capturing the screen and then showing it in a <video> element. Screen resolution can not be set with getDisplayMedia on current adapter. I think it&39;s because getDisplayMedia is W3C Working Draft, but that feature common used and supported by three leading browsers (Firefox, Chrome, Safari), according to Mozilla MDN. getUserMedia err)). getDisplayMedia(video true, audio true, systemAudio "exclude" or "include"); This feature is only supported on desktop. const stream await navigator. Jump to The MediaStreamConstraints dictionary is used when calling getUserMedia () to specify what kinds of tracks should be included in the returned MediaStream, and, optionally, to establish constraints for those tracks&39; settings. Its introduction in Chrome 70 has been announced back in August and further confirmed in October on the discuss-webrtc Google group. This is different to the standard Screen Capture API as if you simply run. They are typically influenced by busines. getDisplayMedia(); Check if the video track is exposing information. The getSupportedConstraints () method of the MediaDevices interface returns an object based on the MediaTrackSupportedConstraints dictionary, whose member fields each specify one of the constrainable properties the user agent understands. mediaDevices captureStream await navigator. Note Unlike most uses of constraints in media APIs, here it&39;s solely used to define the stream configuration, and not to filter the available choices. Some systems have multiple display surfacemonitor s, which can be identified separately. Instead, they must be applied after the user chooses a source, in order to generate output that matches the constraints. 0; iOS6 Safari and Chrome (partial support) Round 2 device element. Share full screen with one or more users in HD format Share screen from chrome and view over all WebRTC compatible browsersplugins. webrtc · webapi. And the fact that you can see them with getSettings() doesnt make sense. First Step, download and modify desktopCapture extension. The MDN docs explain that it is for security. To fix this, which also disables overlays in Edge and Chrome browser, you need to disable a coupe of flags. To optimize encoding in screen capture scenarios, the degradationPreference encoding parameter is used. This can be used to capture the screen directly from the web app. 0) Description. 2 track1. constraints) on the returned media stream. On the remote client there are two media streams with tracks that use the peer connection as a source. de 2022. Iterate over the tracks using the getTracks method and call stop () on each of them stream. webm Format WebM Format version Version 4 Version 2 File size 2. I have searched the issue tracker for an issue that matches the one I want to file, without success. getUserMedia(constraints) Parameters constraints An object specifying the types of media to request, along with any requirements for each type. getDisplayMedia(controller); const track stream. To use the new constraint, pass systemAudio as a constraint. Syntax getDisplayMedia(constraints) Parameters constraints Optional An optional object specifying requirements for the returned MediaStream. Is Google Chrome your browser of choice If so, youll love these tips for getting the most out of the browser From customizing your keyboard shortcuts to using extensions, these tips will help you make the best use of your time using Chro. Chrome requires an extension for screen-sharing, and the screenwindow picker is triggered from the extension. If the user accepts, the current tab will be captured. Collectively, these are referred to as , of which this document defines the following types represents a physical display. 1 stream1. getDisplayMedia() Web MediaDevices. 16) Firefox Mobile 10. The video and audio objects passed into the options object can also hold additional constraints particular to those media tracks. Chrome 72, Firefox 66 and Safari 12. They do not aid discovery, instead they are applied only after user-selection. User selects one, you get the sourceId. Using the displaySurface constraint, the web app may now hint to the browser if it prefers one of the surface types to be offered more. getAudioTracks () if (audioTracks. aspectRatio frameRate resolutions cursor displaySurface logicalSurface Test getDisplayMedia API. Many thought HTML Media Capture was too limiting, so a new spec emerged that supported any type of (future) device. getVideoTracks(); const displaySurface track. The resulting stream can then be recorded using the MediaStream Recording API or transmitted as part of a WebRTC session. mediaDevices until Safari ships getDisplayMedia, as well as to handle older versions of Microsoft Edge that do not support getDisplayMedia. The exception is an object of type OverconstrainedError, and has a constraint property whose value is a constraint which was impossible to meet, and a message property containing a human-readable string explaining the problem. then (stream > const audioTracks stream. But what i really need is to send this stream to the other caller so he can see my screen sharing. mediaDevices captureStream await navigator. getVideoTracks(); const displaySurface track. then (stream > console. navigator and &39;getDisplayMedia&39; in window. Since getDisplayMedia () requires a video track, the returned stream will have one even if no video track is expressly requested by the constraints object. Google Chrome is one of the most popular web browsers in the world, and its no surprise why. var promise navigator. To allow higher resolutions, set the maxWidth and maxHeight getUserMedia constraints. When passing in constraints to getDisplayMedia containing widthheight properties, those properties get ignored. If your app . The MediaTrackConstraints dictionary&39;s frameRate property is a ConstrainDouble describing the requested or mandatory constraints placed upon the value of the frameRate constrainable property. getDisplayMedia (video true) console. In all other ways, getCurrentBrowsingContextMedia() will be identical to getDisplayMedia(). However, I would like to limit the options to just which Chrome Tab. Navigating the web requires the use of an Internet browser. getUserMedia is available for the browser use navigator. Mar 12, 2023 Options and constraints The options object passed into getDisplayMedia () is used to set options for the resulting stream. Many thought HTML Media Capture was too limiting, so a new spec emerged that supported any type of (future) device. Devices will also, if possible, be configured according to the constraints. All examples I can find always ask which tabapplicationscreen you want to share then have a live stream of your chosen page. See How constraints are defined in Capabilities, constraints, and settings for an explanation of how to define constraints. Only Chrome and Edge support audio capture, so browser support for display plus audio capture is also poor. 8 hours ago chrome112getDisplayMedia . This provides the user with the ability to select which tab, window or screen they wish to share and provides a clear indication that recording is taking place. Firefox 38 does support a subset of constraints with getUserMedia (), but not the outdated syntax that Chrome and Opera are using. In that case, we could gate it by standard user activation, and we could say that getDisplayMedia prompt selection (if successful) is a user activation. The constraints object passed into getDisplayMedia () is a DisplayMediaStreamConstraints object which is used to configuring the resulting stream. Instead, they must be applied after the user chooses a source, in order to generate output that matches the constraints. There&39;s no device discovery in getDisplayMedia, just downscaling, so min and exact constraints aren&39;t needed. version; var maxver 33 ; if (window. getDisplayMedia(constraints); MediaDevices getDisplayMedia . getSharedScreenChrome function(constraints) var chromever webrtc. forEach (track > track. You can obtain a MediaStream object either by using the constructor or by calling functions such as MediaDevices. Region capture allows web apps to crop a track and remove content from it, typically before sharing it remotely. The resulting stream can then be recorded using the MediaStream Recording API or transmitted as part of a WebRTC session. getDisplayMedia () MediaDevices getDisplayMedia () MediaStream . 8 hours ago chrome112getDisplayMedia . To share your screen in a Room, use getDisplayMedia() to get the screen&39;s MediaStreamTrack and create a LocalVideoTrack. You can use getSupportedConstraints () to find out what is supported in the browser where your code is running. getSettings (). Jump to The MediaStreamConstraints dictionary is used when calling getUserMedia () to specify what kinds of tracks should be included in the returned MediaStream, and, optionally, to establish constraints for those tracks&39; settings. getDisplayMedia to capture screen. Citing MDN regarding the use of ideal An ideal value, when used, has gravity, which means that the browser will try to find the setting. 4 getSupportedConstraints1. video displaySurface "window" ,); The "Window" pane is pre-selected in the media picker. But system audio includes participants&39; own audio, and may not be appropriate to share back. getDisplayMedia() Web MediaDevices. const constraints audio channelCount 1, sampleRate 16000, sampleSize 16, volume 1 , navigator. Media Capture and Streams API The API this interface is part of. Some of them can only be used in the right context. Media devices. The CaptureController interface provides methods that can be used to further manipulate a capture session separate from its initiation via MediaDevices. Chrome . ChromeEdgeFirefox MediaStream navigator. The MediaDevices interface&39;s getDisplayMedia () method prompts the user to select and grant permission to capture the contents of a display or portion thereof (such as a window) as a MediaStream. Citing MDN regarding the use of ideal An ideal value, when used, has gravity, which means that the browser will try to find the setting. The function returns a Promise fullfiled with a MediaStream. Nov 25, 2018 Note that you are mixing old constraints (which were required to get desktop sharing from navigator. I&39;ve used navigator. I was able to get audio and video working. Note Unlike most uses of constraints in media APIs, here it&39;s solely used to define the stream configuration, and not to filter the available choices. It calls navigator. Published on Thursday, December 1, 2022. getDisplayMedia() . getUserMedia(constraints); Parameters constraints. For previous versions of Chrome, you'll need to create an extension. getDisplayMedia() Screen Capture API Chrome . Chrome 69. Inconsistent constraint checks. 1 stream1. That option should be provided for getDisplayMedia() in the form of constraints where specific coordinates can be passed; e. The go-ahead permission to use getDisplayMedia() cannot be persisted for reuse. It also covers display media, which is how an application can do screen capturing. Chrome 72, Firefox 66 and Safari 12. version; var maxver 33 ; if (window. 4 getSupportedConstraints1. But could see errors in the command line like Property &39;getDisplayMedia&39; does not exist on type &39;MediaDevices&39;. version; var maxver 33 ; if (window. iPad i was testing this on was unable to find. We have built end-to-end broadcast solutions for events and entertainment clients, telehealth solutions for multiple clients, live support tools, as well as communication tools for a variety of other applications. This can be used to capture the screen directly from the web app. However, this feature is under active discussion in the WebRTC WG. These constraints apply to the video property of the object passed into getDisplayMedia() to obtain a stream for screen sharing. See How constraints are defined in Capabilities, constraints, and settings for an explanation of how to define constraints. getDisplayMedia(Pre-select the "Window" pane in the media picker. API getDisplayMedia . However, user agents may allow the capture of audio along with the video content. answered Feb 26, 2022 at 1528. Prompt the user to capture their display (screen, window, tab). Its introduction in Chrome 70 has been announced back in August and further confirmed in October on the discuss-webrtc Google group. The device ID is an origin-unique string identifying the source of the track; this is usually a GUID. then (function (stream) permissiongiven 1;); this is the sample code which prompt me for. Only Chrome and Edge support audio capture, so browser support for display plus audio capture is also poor. js release. getDisplayMedia (opts) TS2339 Property &39;getDisplayMedia&39; does not exist on type &39;MediaDevices&39;. 31 audio audiovideo video true, audio true getDisplayMedia() . 9 de dez. getAudioTracks () if (audioTracks. Select Disabled for the following flags and relaunch the browser. Devices will also, if possible, be configured according to the constraints. The promise returned by getDisplayMedia() resolves to a MediaStream that contains at least one video stream that contains the screen or screen area, and which is adjusted or filtered based upon the constraints specified when getDisplayMedia() was called. Mar 12, 2023 To start capturing video from the screen, you call getDisplayMedia () on navigator. else const constraints width min 640, ideal 1920, max 1920, height min 400, ideal 1080. version; var maxver 33 ; if (window. Focus the captured tab or window when capture starts. The peer connection is streaming the source video to a remote client. The MediaDevices interface's getDisplayMedia() method prompts the user to select and grant permission to capture the contents of a display or portion thereof (such as a window) as a MediaStream. Chromes implementation of getDisplayMedia() includes a media picker through which users may choose to share any tab, window, or screen. Only Chrome and Edge support audio capture, so browser support for display plus audio capture is also poor. Jul 30, 2020 It is recommended that applications that use the getUserMedia () API first check the existing devices and then specifies a constraint that matches the exact device using the deviceId constraint. de 2020. getAudioTracks () if (audioTracks. getSharedScreenChrome function(constraints) var chromever webrtc. 3 16. The options for getDisplayMedia () work in the same as the constraints for the MediaDevices. Whats next for Screen Capture. Ideally I don&39;t want the user to do anything other than click the capture button and it to capture a single image (data url) of the page that the user. js release. Mar 12, 2023 To start capturing video from the screen, you call getDisplayMedia () on navigator. I&39;ve included the javascript of getusermedia. The MediaDevices interface's getDisplayMedia() method prompts the user to select and grant permission to capture the contents of a display or portion thereof (such as a window) as a MediaStream. A string indicating the current value. constraints. The options object passed into getDisplayMedia () is used to set options for the resulting stream. This can be used to capture the screen directly from the web app. getDisplayMedia() doesnt take any media constraints but in Chrome the user gets to choose whether to capture their entire screen, an app or just a Chrome window Once you get access to the screen stream you can just display it locally, share it with others in a WebRTC peer 2 peer call or you record it locally through the MediaStream Recorder. As much as I think the "Share this tab instead" button in Chrome&39;s getDisplayMedia is a nice feature, this API to turn it off seems like a workaround for e. These constraints apply to the video property of the object passed into getDisplayMedia() to obtain a stream for screen sharing. Mar 12, 2023 To start capturing video from the screen, you call getDisplayMedia () on navigator. 1k 2 23 30 Ok,thanks for your help. Chrome . nutech remanufactured engines, phillies game today score playoffs

The window is cropped by about 7 pixels on the left and bottom side in the captured stream. . Chrome getdisplaymedia constraints

Google Chrome is one of the most popular web browsers in the world, and its no surprise why. . Chrome getdisplaymedia constraints bodyrub manhattan

The process works like this (using MediaStreamTrack as an example) If needed, call MediaDevices. Either or both must be specified. If you use the Internet browser Chrome, you have the option of customizing your browser to fit your needs. (constraints) (capabilities) 2 AV . 9 de dez. Chrome 69. mediainfo audioinpaudiofile. 2 video width & height1. Using the displaySurface constraint, the web app may now hint to the browser if it prefers one of the surface types to be offered more. navigator and &39;getDisplayMedia&39; in window. 3 video frameRate1. I try to use react-native-webrtc to my project. For previous versions of Chrome, you&39;ll need to create an extension. This can only be done if the user shared a tab or a window. Upgrading your Chrome OS device can be a great way to get the latest features, security updates, and performance improvements. displaySurface A. 16) Firefox Mobile 10. surya shubham. If your app . mediaDevices captureStream await navigator. Download Modify Publish desktopCapture extension yourselves. getSharedScreenChrome function(constraints) var chromever webrtc. I thought the solution was to set the displaySurface browser value navigator. getDisplayMedia (Showing top 5 results out of 315) builtins (MDN) MediaDevices getDisplayMedia. To learn more about how constraints work, see Capabilities, constraints, and settings. applyConstraints presumably. 2 0. 1 13 - 16. ChromeEdgeFirefox MediaStream navigator. This is shown below Shared tab Tab used to share Random Tab How do I hide this bar. optional basic constraints are the remaining non-advanced constraints. The following example shows how to read the capture handle information from a video track. const stream await navigator. Web APIMediaDevices. getDisplayMedia Prompts the user for permission to live-capture their display. const constraints audio channelCount 1, sampleRate 16000, sampleSize 16, volume 1 , navigator. resizeMode none; already downscaled. See How constraints are defined in Capabilities, constraints, and settings for an explanation of how to define constraints. const supports navigator. In Google Meet, if you click "Present Now" then "A Chrome Tab", it brings up a window that lets you share from another tab. getSettings (). You can use getSupportedConstraints () to find out what is supported in the browser where your code is running. This ensures that web applications can&39;t force the user to share specific content by restricting the source list until only one item is left. On a laptop, choose the internal speakers or a speaker connected by Bluetooth. I want to let the user share his screen, I use getDisplayMedia() to let the user start sharing and it let him choose entire screen or chrome etc. CameraCaptureJS HTML video capture and playback using MediaDevices and the MediaStream Recording API. Jump to The MediaStreamConstraints dictionary is used when calling getUserMedia () to specify what kinds of tracks should be included in the returned MediaStream, and, optionally, to establish constraints for those tracks&39; settings. 2 support the getDisplayMedia API. PC . import adapter from 'webrtc-adapter' ; import Webcom from 'webcomwebcom' ; The current browser's infos typedef Object Browser property string name - current browser's name property number version. The promise returned by getDisplayMedia() resolves to a MediaStream that contains at least one video stream that contains the screen or screen area, and which is adjusted or filtered based upon the constraints specified when getDisplayMedia() was called. 1 enumerateDevices1. Google Chrome is one of the most popular web browsers in the world, and its no surprise why. getAudioTracks () if (audioTracks. getDisplayMedia(constraints); Parameters constraints Optional An optional MediaStreamConstraints object specifying requirements for the returned MediaStream. The list of possible option properties for getDisplayMedia () is as follows. mediainfo audioinpaudiofile. 8 hours ago chrome112getDisplayMedia . It adds the displaySurface constraint (requesting that only fullscreen sharing be allowed) only if it is known to be supported by the browser. getDisplayMedia to capture screen. getSharedScreenChrome function(constraints) var chromever webrtc. getSupportedConstraints (); if (supports "width" supports "height" supports "frameRate" supports "facingMode") We&39;re missing needed properties, so handle that error. Share Improve this answer Follow answered Nov 25, 2018 at 724 Philipp Hancke 15. The MediaDevices interface&39;s getDisplayMedia () method prompts the user to select and grant permission to capture the contents of a display or portion thereof (such as a window) as a MediaStream. Web apps are already able to capture video in a tab using getDisplayMedia(). Feb 21, 2021 Audio capture with getDisplayMedia is only fully supported with Chrome for Windows. I think essentially zero users will go through this hassle to do me a favor of submitting a bug report. A MediaStreamConstraints object specifying the types of media to request, along with any requirements for each type. constraints) on the returned media stream. This provides the user with the ability to select which tab, window or screen they wish to share and provides a clear indication. The peer connection is streaming the source video to a remote client. The video and audio objects passed into the options object can also hold additional constraints particular to those media tracks. The MediaDevices interface's getDisplayMedia () method prompts the user to select and grant permission to capture the contents of a display or portion thereof (such as a. Yet the API says it can be changed to "motion", "always" or "never". Yet the API says it can be changed to "motion", "always" or "never". Instantiate a CaptureController and pass it to getDisplayMedia (). setFocusBehavior("focus-captured-surface"); Prompt the user to share their screen. It calls navigator. Our constraints do not filter the selection list at all. applyConstraints presumably. However I was unable to get it to run on iOS or Android devices. Other platforms have a number of limitations there is no support for audio capture at all under Firefox or Safari; on ChromeChromium for Linux and Mac OS, only the audio of a ChromeChromium tab can be captured, not the audio of a non-browser application window. 1 deviceId & groupId1. 3 16. getUserMedia (audiotrue). Chrome 69. By calling setFocusBehavior () immediately after the getDiplayMedia () returned promise resolves, you can control whether the captured tab or window will be focused or not. We consider this a useful feature, since desktops tend to be of extremely large resolution, and their high frame-rates are overkill for most WebRTC use. The MDN docs explain that it is for security. Chrome M71 -enable-featuresRTCUnifiedPlanByDefault enable-blink-featuresRTCUnifiedPlanByDefault. getDisplayMedia(video true, audio true, systemAudio "exclude" or "include"); This feature is only supported on desktop. video true  . Permission dialog in Chrome. chrome112getDisplayMedia . The resulting stream can then be recorded using the MediaStream Recording API or transmitted as part of a WebRTC session. I have tried the surfaceSwitching property on the mediaStream constraints but that just gets rid of this button that is initially there if you don&39;t specify it (see below). I was able to get audio and video working. Chrome has a different non-standard API using chromeMediaSource available as a plug-in, using an older constraints syntax, but it (rightly) does not appear in the new getSupportedConstraints. Screen recording For screen recording, call getDisplayMedia(), which triggers the dialog box shown below. It has some quirks. 2 0. For example, Chrome lets you share between a single tabwindowdesktop, Firefox shares the whole window. getDisplayMedia (). const stream await navigator. It requires HTTPS connection if it is not local. It&39;s also possible to use screen capture as a MediaStream source in Chrome using the experimental chromeMediaSource constraint. getUserMedia () MediaStream promise MediaStreamConstraints . Whats next for Screen Capture. displaySurface; if (displaySurface "browser") Focus the captured tab. const stream await navigator. getUserMedia(audio true, video facingMode exact "environment" , ,); Another non-number constraint is the deviceId constraint. Note Unlike most uses of constraints in media APIs, here it's solely used to define the stream configuration, and not to filter the available choices. getUserMedia err)). Its the most popular web browser in the world, and for good reason. Note The getSupportedConstraints API returns all constraints supported by browsers for the getUserMedia API and for the getDisplayMedia API. I&39;ve included the javascript of getusermedia. length 1) throw new Error. The MediaDevices interface's getDisplayMedia () method prompts the user to select and grant permission to capture the contents of a display or portion thereof (such as a window) as a MediaStream. API getDisplayMedia . . build guardian gw2