TypeScript Version: Version 3.7.0-dev.20190904, also 3.6.2
Search Terms: web api, media devices, display media, screen capture, navigator, types
Code
const opts = { audio: false, video: true }
navigator.mediaDevices.getDisplayMedia(opts) // TS2339: Property 'getDisplayMedia' does not exist on type 'MediaDevices'.
per lib.dom.d.ts, MediaDevices has getUserMedia but not getDisplayMedia. also: https://github.com/Microsoft/TypeScript/blob/master/src/lib/dom.generated.d.ts#L10201
Expected behavior:
getDisplayMedia should be present on MediaDevices, according to w3c/mediacapture-screen-share#86
Actual behavior:
getDisplayMedia is missing on MediaDevices
Playground Link:
https://www.typescriptlang.org/play/#code/MYewdgzgLgBCAOUIwLwwN4wIYFcAmAliAFwwBmWANhAKYA0MAbgXjSTFAE440wC+AKDBZmAcyxQQnAHQBbGoSwARGs2A0I00TShKCEeJSwBPALIKCWABQIkASiA
Related Issues:
TypeScript Version: Version 3.7.0-dev.20190904, also 3.6.2
Search Terms: web api, media devices, display media, screen capture, navigator, types
Code
per
lib.dom.d.ts,MediaDeviceshasgetUserMediabut notgetDisplayMedia. also: https://github.com/Microsoft/TypeScript/blob/master/src/lib/dom.generated.d.ts#L10201Expected behavior:
getDisplayMediashould be present onMediaDevices, according to w3c/mediacapture-screen-share#86Actual behavior:
getDisplayMediais missing onMediaDevicesPlayground Link:
https://www.typescriptlang.org/play/#code/MYewdgzgLgBCAOUIwLwwN4wIYFcAmAliAFwwBmWANhAKYA0MAbgXjSTFAE440wC+AKDBZmAcyxQQnAHQBbGoSwARGs2A0I00TShKCEeJSwBPALIKCWABQIkASiA
Related Issues: