Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add screen video recording support #66

Merged
merged 16 commits into from
Mar 13, 2020
Merged

feat: Add screen video recording support #66

merged 16 commits into from
Mar 13, 2020

Conversation

mykola-mokhnach
Copy link

No description provided.

'-t', `${this._timeLimit}`,
'-f', 'gdigrab',
'-framerate', `${this._fps}`,
'-i', 'desktop',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}

async _enforceTermination () {
if (this._process && this.isRunning()) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for this._process.

log.debug(`Starting ${FFMPEG_BINARY}: ${util.quote(fullCmd)}`);
this._process.on('output', (stdout, stderr) => {
if (_.trim(stdout || stderr)) {
log.debug(`[${FFMPEG_BINARY}] ${stdout || stderr}`);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the output has multiple lines, only the first will have the [${FFMPEG_BINARY}] prefix.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say this is fine. There is no need to see this prefix for each log line

forceRestart = true,
} = options;
if (this._screenRecorder) {
if (this._screenRecorder.isRunning()) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These two can just be

if (this._screenRecorder?.isRunning()) {
  // ...
}
this._screenRecorder = null;

The last line isn't needed, really, either, since it is set to the new ScreenRecorder() a couple of lines later.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants