Skip to content
This repository has been archived by the owner on Apr 1, 2020. It is now read-only.

Add ability to record videos & screenshots directly in Oni #416

Closed
bryphe opened this issue Apr 29, 2017 · 7 comments
Closed

Add ability to record videos & screenshots directly in Oni #416

bryphe opened this issue Apr 29, 2017 · 7 comments
Assignees
Milestone

Comments

@bryphe
Copy link
Member

bryphe commented Apr 29, 2017

Based on the Electron desktopCapture APIs, and gif creation libraries, it should be relatively straightforward to add the ability within Oni to capture animated gifs. This would be really nice for bug repros, and to leverage with Spectron/automation to create the demo gifs automatically.

@bryphe bryphe added this to the 0.3 milestone Apr 29, 2017
@bryphe bryphe self-assigned this Apr 29, 2017
@bryphe
Copy link
Member Author

bryphe commented Sep 28, 2017

Gif shot looks like a cool library for this

@bryphe bryphe changed the title Add ability to record animated gifs directly in Oni Add ability to record videos & screenshots directly in Oni Oct 6, 2017
@bryphe
Copy link
Member Author

bryphe commented Oct 6, 2017

Testing using gifshot resulted in poor quality, unfortunately. For now, I'll constrain this to writing video (.webm) and screenshots (.png).

bryphe added a commit that referenced this issue Oct 6, 2017
* Some initial tests

* Bump version of Electron to 1.8.1 to pick up chromium bug fixes around getUserMedia

* Add gifshot dependency

* Clamp gifshot dependency

* Start integrating gifshot

* Add helper script to convert web m to gif

* Latest tweaks for gif recording

* Add isRecording property

* Add unique file names for each recording

* Remove gifshot and minor code tweaks

* Remove gifshot references

* Some cleanup + refactoring

* Get 	akeScreenshot writing out PNG buffer

* Use recorder.outputPath configuration

* Set up copyScreenshotToClipboard setting

* Update to always save, and then copy to clipboard

* Fix set of lint issues

* Fix remaining lint issues
@keforbes
Copy link
Collaborator

keforbes commented Oct 6, 2017

Will you be creating an animated gif demonstrating this behavior for the README/wiki ?

@bryphe
Copy link
Member Author

bryphe commented Oct 6, 2017

Yep, I'll add something in Wiki (in the configuration section). I was thinking of adding a "Tips" or "Recipes" section, and show how to bind a key to take a screenshot.

I'm planning on pushing a new release out Monday as well - so I'll call out it there in the release notes too.

@bryphe
Copy link
Member Author

bryphe commented Oct 6, 2017

I'll also add some documentation around these new APIs:
oni.recorder.startRecording()
oni.recorder.stopRecording()
oni.recorder.takeScreenshot()

And new configuration options:
recorder.outputPath
recorder.copyScreenshotToClipboard

@bryphe
Copy link
Member Author

bryphe commented Oct 10, 2017

Added some API documentation here:
https://github.com/bryphe/oni/wiki/API

And an example of binding a key to use the takeScreenshot method here:
https://github.com/bryphe/oni/wiki/Configuration

@bryphe
Copy link
Member Author

bryphe commented Oct 10, 2017

I'll close this out, but the documentation is still pretty rough (and it would be nice to have some examples or tips/tricks)

@bryphe bryphe closed this as completed Oct 10, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants