-
-
Notifications
You must be signed in to change notification settings - Fork 35
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
Conversation
'-t', `${this._timeLimit}`, | ||
'-f', 'gdigrab', | ||
'-framerate', `${this._fps}`, | ||
'-i', 'desktop', |
There was a problem hiding this comment.
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()) { |
There was a problem hiding this comment.
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}`); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
lib/commands/record-screen.js
Outdated
forceRestart = true, | ||
} = options; | ||
if (this._screenRecorder) { | ||
if (this._screenRecorder.isRunning()) { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed
No description provided.