Skip to content

Commit

Permalink
Pass all the relevant saved settings to aperture.js
Browse files Browse the repository at this point in the history
  • Loading branch information
matheuss committed Dec 12, 2016
1 parent 219128c commit e1f18fe
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions app/src/renderer/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,28 @@ document.addEventListener('DOMContentLoaded', () => {
cropperBounds.width -= 2;
cropperBounds.height -= 2;

aperture.startRecording({
// we need the most recent settings
const {
fps,
showCursor,
highlightClicks,
recordAudio,
audioInputDeviceId
} = app.kap.settings.getAll();

const apertureOpts = {
fps,
cropArea: cropperBounds,
showCursor,
highlightClicks,
displayId: display.id
})
};

if (recordAudio === true) {
apertureOpts.audioSourceId = audioInputDeviceId;
}

aperture.startRecording(apertureOpts)
.then(filePath => {
recordBtn.attributes['data-state'].value = 'ready-to-stop';
recordBtn.children[0].classList.add('hidden'); // crop btn
Expand Down

0 comments on commit e1f18fe

Please sign in to comment.