renderer: fix desktop capture api not responding different subsequest calls

This commit is contained in:
deepak1556 2016-04-28 02:02:14 +05:30
parent 68192785e7
commit d64e3784f4
2 changed files with 12 additions and 1 deletions

View file

@ -89,7 +89,6 @@ void DesktopCapturer::OnSourceThumbnailChanged(int index) {
bool DesktopCapturer::OnRefreshFinished() {
Emit("finished", media_list_->GetSources());
media_list_.reset();
return false;
}

View file

@ -24,4 +24,16 @@ describe('desktopCapturer', function () {
desktopCapturer.getSources({types: ['window', 'screen']}, callback)
desktopCapturer.getSources({types: ['window', 'screen']}, callback)
})
it('responds to subsequest calls of different options', function (done) {
var callCount = 0
var callback = function (error, sources) {
callCount++
assert.equal(error, null)
if (callCount === 2) done()
}
desktopCapturer.getSources({types: ['window']}, callback)
desktopCapturer.getSources({types: ['screen']}, callback)
})
})