зеркало из https://github.com/electron/electron.git
Merge pull request #5320 from deepak1556/desktopcapture_api_patch
renderer: fix desktop capture api not responding different subsequest calls
This commit is contained in:
Коммит
850bc2d443
|
@ -89,7 +89,6 @@ void DesktopCapturer::OnSourceThumbnailChanged(int index) {
|
|||
|
||||
bool DesktopCapturer::OnRefreshFinished() {
|
||||
Emit("finished", media_list_->GetSources());
|
||||
media_list_.reset();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
})
|
||||
})
|
||||
|
|
Загрузка…
Ссылка в новой задаче