Browse Source

:memo:Update use of deprecated getUserMedia[ci skip]

Daniel Pereira 8 years ago
parent
commit
e38e294be3
1 changed files with 4 additions and 4 deletions
  1. 4 4
      docs/api/desktop-capturer.md

+ 4 - 4
docs/api/desktop-capturer.md

@@ -16,7 +16,7 @@ desktopCapturer.getSources({types: ['window', 'screen']}, (error, sources) => {
   if (error) throw error
   for (let i = 0; i < sources.length; ++i) {
     if (sources[i].name === 'Electron') {
-      navigator.webkitGetUserMedia({
+      navigator.mediaDevices.getUserMedia({
         audio: false,
         video: {
           mandatory: {
@@ -44,11 +44,11 @@ function handleError (e) {
 ```
 
 To capture video from a source provided by `desktopCapturer` the constraints
-passed to [`navigator.webkitGetUserMedia`] must include
+passed to [`navigator.mediaDevices.getUserMedia`] must include
 `chromeMediaSource: 'desktop'`, and `audio: false`.
 
 To capture both audio and video from the entire desktop the constraints passed
-to [`navigator.webkitGetUserMedia`] must include `chromeMediaSource: 'screen'`,
+to [`navigator.mediaDevices.getUserMedia`] must include `chromeMediaSource: 'screen'`,
 and `audio: true`, but should not include a `chromeMediaSourceId` constraint.
 
 ## Methods
@@ -73,4 +73,4 @@ and calls `callback(error, sources)` when finished.
 objects, each `DesktopCapturerSource` represents a screen or an individual window that can be
 captured.
 
-[`navigator.webkitGetUserMedia`]: https://developer.mozilla.org/en/docs/Web/API/Navigator/getUserMedia
+[`navigator.mediaDevices.getUserMedia`]: https://developer.mozilla.org/en/docs/Web/API/MediaDevices/getUserMedia