TypeScript Version: 3.5.1
https://w3c.github.io/mediacapture-screen-share/#mediadevices-additions
in dom.lib.ts navigator.mediaDevices.getDisplayMedia is not found. it looks like it's defined on navigator whereas it should be in the MediaDevices type.
Broken since 2.9 (or maybe 2.8, hard to tell where the cutoff is). 79e5e79ef77
I'm not sure where this is coming from actually. It's not anywhere in src/lib and a recursive grep of the typescript repo only turns up the one hit for getDisplayMedia (outside tests). I need to look at the code that generates the LKG I guess.
This goes away entirely in https://github.com/microsoft/TypeScript/pull/32578. That explains why I can't find any mention of it in the source.
Closing for now. We can investigate re-adding it under MediaDevices, based on the w3c spec.
Hi @sandersn this is a huge issue for us, can you please tell us what is the status of it or a workaround we can use ?? We don't find the getDisplayMedia anywhere
It's been a while since I looked at this, so this is a bit of a guess:
How about not closing issues until they, you know, actually get fixed? Then, maybe, they won鈥檛 get dropped on the floor like this?
@Spongman you are looking for #33232 I think. This issue tracked getDisplayMedia being in the wrong place.
surely that's a duplicate of this issue?
I finally fix the issue by using Javascript instead of typescript
in vue add interfaces in shims-tsx.d.ts
`import Vue, { VNode } from 'vue'
declare global {
namespace JSX {
// tslint:disable no-empty-interface
interface Element extends VNode { }
// tslint:disable no-empty-interface
interface ElementClass extends Vue { }
interface IntrinsicElements {
[elem: string]: any;
}
}
interface MediaDevices {
getDisplayMedia(constraints?: MediaStreamConstraints): Promise
}
interface MediaTrackConstraintSet {
cursor?: string;
}
}`
this is a temporary solution
Most helpful comment
I finally fix the issue by using Javascript instead of typescript