feat: add webContents.getMediaSourceId() method (#31204)

* feat: add webContents.getMediaSourceId() method

* fix: account for null frame_hosts in webContents.getMediaSourceId()

* fix: move webContents.getMediaSourceId definition to be more organised

* fix: move webContents.getMediaSourceId implementation

* fix: move webContents.getMediaSourceId docs
This commit is contained in:
Mitchell McCaffrey 2021-10-26 11:03:59 +11:00 committed by GitHub
parent 63eed52626
commit 23cdf65c53
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 47 additions and 0 deletions

View file

@ -838,6 +838,14 @@ describe('webContents module', () => {
});
});
describe('getMediaSourceId()', () => {
afterEach(closeAllWindows);
it('returns a valid stream id', () => {
const w = new BrowserWindow({ show: false });
expect(w.webContents.getMediaSourceId(w.webContents)).to.be.a('string').that.is.not.empty();
});
});
describe('userAgent APIs', () => {
it('can set the user agent (functions)', () => {
const w = new BrowserWindow({ show: false });