Skip to content

Commit c31d292

Browse files
committed
Update README to hint at getDisplayMedia
1 parent e45026e commit c31d292

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

README.md

+20-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,28 @@
1-
## Note
1+
## Notes
2+
3+
### You might not need this anymore!
4+
5+
Recent Chrome versions (70 and up) [introduced
6+
`getDisplayMedia`](https://groups.google.com/forum/?__s=seqnqtrfky2js3hsisxx#!msg/discuss-webrtc/Uf0SrR4uxzk/uO8sLrWuEAAJ)
7+
which essentially nullify this project and the need for an extension. You can
8+
simply acquire a screen stream with something like this:
9+
10+
```js
11+
navigator.mediaDevices.getDisplayMedia({ audio: false, video: true })
12+
.then(stream => video.srcObject = stream)
13+
.catch(handleError);
14+
```
15+
16+
A working demo can be found
17+
[here](https://cdn.rawgit.com/uysalere/js-demos/master/getdisplaymedia.html).
18+
219

320
*This project has been merged into https://github.com/GoogleChrome/webrtc in
421
case something doesn't work have [a look over
522
there.](https://github.com/webrtc/samples/tree/master/src/content/extensions/desktopcapture)*
623

24+
## Introduction
25+
726
*This demo app shows you how to use a Chrome extension to access the
827
`desktopCapture` API in your web-application.*
928

0 commit comments

Comments
 (0)