get media source interface (#70)

This commit is contained in:
Lynn
2017-05-05 10:02:35 -07:00
committed by GitHub
parent 59a1915481
commit 66f58e9fa9
3 changed files with 112 additions and 1 deletions

View File

@@ -17,6 +17,7 @@ const throttle = require('../utils/throttle.js');
const apiEnums = require('../enums/api.js');
const apiCmds = apiEnums.cmds;
const apiName = apiEnums.apiName;
const getMediaSources = require('../desktopCapturer/getSources');
// hold ref so doesn't get GC'ed
const local = {
@@ -120,7 +121,15 @@ function createAPI() {
cmd: apiCmds.registerLogger
});
}
}
},
/**
* Implements equivalent of desktopCapturer.getSources - that works in
* a sandboxed renderer process.
* see: https://electron.atom.io/docs/api/desktop-capturer/
* for interface: see documentation in desktopCapturer/getSources.js
*/
getMediaSources: getMediaSources
};
Object.freeze(window.SYM_API);