Skip to content

Navigator.MediaDevices.getDisplayMedia() is not present. #992

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
JustAnotherSoftwareDeveloper opened this issue Mar 19, 2021 · 8 comments
Closed

Comments

@JustAnotherSoftwareDeveloper

Hello,

I'm not sure how to edit the types (I can't find reference to navigator anywhere), but your output is incorrect. The navigator.mediaDevices object should have a getDisplayMedia(constraints) method that returns a Promise<MediaStream.

See here: https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getDisplayMedia

This has been an issue in the main typescript library for some time now: microsoft/TypeScript#33232 .

It seems like Typescript's files are generated by this library. This should be an easy fix for someone who knows what they're doing. Alternatively, point me to where the navigator.mediaDevices types are defined and I'll do it myself.

@HolgerJeromin
Copy link
Contributor

HolgerJeromin commented Mar 19, 2021

https://github.com/microsoft/TypeScript-DOM-lib-generator#additions
Says:

We aim for Proposed recommendation, but can accept Candidate recommendation for stable looking proposals.

https://www.w3.org/TR/screen-capture/
Is a W3C Working Draft

@JustAnotherSoftwareDeveloper
Copy link
Author

If that's the case why do you include navigator.mediaDevices.getUserMedia? By admission of the document you linked, that's also a draft.

@HolgerJeromin
Copy link
Contributor

Sorry, I found the wrong URI (edited).

navigator.mediaDevices.getUserMedia is in
https://www.w3.org/TR/mediacapture-streams/
Is a W3C Candidate Recommendation

@JustAnotherSoftwareDeveloper
Copy link
Author

@SgAkErRu
Copy link

SgAkErRu commented Jul 4, 2021

But https://github.com/microsoft/TypeScript-DOM-lib-generator#additions also says:

A feature needs to be supported by more than two major browser engines to be included here, to make sure there is a good consensus among vendors: Gecko (Firefox), Blink (Chrome/Edge), and WebKit (Safari).

And about W3C Working Draft:

If it's at Working draft the additions available in all three of Firefox, Safari and Chromium

But according to Mozilla MDN (https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getDisplayMedia) this feature supported by all of these browsers since end of 2019.

@kim3er
Copy link

kim3er commented Sep 2, 2021

Looks like getDisplayMedia is included in the current build of the main branch.

getdisplaymedia

@saschanaz
Copy link
Contributor

Yeah, #1034.

@github-actions close

@github-actions
Copy link
Contributor

Closing because @saschanaz is one of the code-owners of this repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants