{"id":13509298,"url":"https://github.com/mgechev/jscapture","last_synced_at":"2025-04-04T20:13:41.456Z","repository":{"id":17258507,"uuid":"20028061","full_name":"mgechev/jscapture","owner":"mgechev","description":"Screen recording and capturing with pure client-side JavaScript.","archived":false,"fork":false,"pushed_at":"2017-05-14T20:07:35.000Z","size":746,"stargazers_count":799,"open_issues_count":0,"forks_count":78,"subscribers_count":33,"default_branch":"master","last_synced_at":"2025-03-28T19:09:32.515Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://mgechev.github.io/jscapture/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mgechev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-21T16:15:58.000Z","updated_at":"2025-03-04T10:55:54.000Z","dependencies_parsed_at":"2022-08-31T00:00:15.357Z","dependency_job_id":null,"html_url":"https://github.com/mgechev/jscapture","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgechev%2Fjscapture","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgechev%2Fjscapture/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgechev%2Fjscapture/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgechev%2Fjscapture/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mgechev","download_url":"https://codeload.github.com/mgechev/jscapture/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247242680,"owners_count":20907134,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T02:01:05.864Z","updated_at":"2025-04-04T20:13:41.439Z","avatar_url":"https://github.com/mgechev.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Warning!\n\n**JSCapture won't work in Chrome 37+** due to removal of the experimental desktop sharing API.\n\n# JSCapture\n\nJSCapture is screen capturing library implemented with pure JavaScript and HTML5.\n\nIt allows you to make screenshots and record a video of your desktop from your browser.\n\n## How to use\n\nJSCapture uses `getUserMedia` for screen capturing. Currently the API for screen capturing is supported only by Google Chrome, Canary and Chromium by enabling an experimental flag.\n\nIn order to enable the flag:\n\n* Go to chrome://flags/#enable-usermedia-screen-capture\n* Enable - \"Enable screen capture support in getUserMedia()\"\n* Restart your browser.\n\nNote that you MUST use `https` in order to be allowed to do screen recording. Since there are some **very expensive** operations happening when each frame is being captured the video won't be useful when you're capturing a high resolution. In order to handle this issue use the `scale` property.\n\n## API\n\n* `JSCapture.capture(config)` - Captures a new screenshot.\n  * `config.x` - (Number) default value `0`. Specifies the left offset.\n  * `config.y` - (Number) default value `0`. Specifies the top offset.\n  * `config.width` - (Number) default value the screen width. Specifies the width of the screenshot.\n  * `config.height` - (Number) default value the screen height. Specifies the height of the screenshot.\n  * `config.process` - (Function|Array) default value an empty array. A list of filters, which are going to process the image.\n  * `config.done` - (Function) default value is `undefined`. Callback, which is being called with the captured image.\n  * `config.fail` - (Function) default value is `undefined`. A callback, which is being executed on unsuccessful screen capturing (for example if the user does not allow screen capturing).\n  * `config.delay` - (Number) default value `0`. Specifies the delay after each the screenshot will be captured.\n* `JSCapture.record(config)` - Capture a video.\n  * `config.x` - (Number) default value `0`. Specifies the left offset.\n  * `config.y` - (Number) default value `0`. Specifies the top offset.\n  * `config.width` - (Number) default value the screen width. Specifies the width of the video.\n  * `config.height` - (Number) default value the screen height. Specifies the height of the video.\n  * `config.process` - (Function|Array) default value an empty array. A list of filters, which are going to process the individual frames.\n  * `config.done` - (Function) default value is `undefined`. Callback, which is being called with the captured video.\n  * `config.delay` - (Number) default value `0`. Specifies the delay after each the video will be captured.\n  * `config.frameRate` - (Number) default value `60` frames per second. Specifies the number of frames per second.\n  * `config.done` - (Function) default value is `undefined`. A callback, which accepts the video (as a Blob), result of the screen recording, as an argument\n  * `config.fail` - (Function) default value is `undefined`. A callback, which is being executed on unsuccessful screen recording (for example if the user does not allow screen capturing).\n  * `config.duration` - (Number) default is `Infinity`. A number which indicates the length of the video.\n* `JSCapture.stopRecording(fn)` - Stops the video recording.\n  * `fn` - (Function) default value is `undefined`. A callback, which accepts the video (as a Blob), result of the screen recording, as an argument. Note that the callback provided in `config.done` won't be invoked if `JSCapture.stopRecording(fn)` is called.\n* `JSCapture.isRecording()` - (Boolean) Returns whether the screen recording have been started.\n\n## Demo\n\n[Here](https://mgechev.github.io/jscapture/)\n\n## Contributors\n\n[![mgechev](http://www.gravatar.com/avatar/82bafb0432ce4ccc9dcc26f94d5fe5bc?s=117)](https://github.com/mgechev) |[![jbrooksuk](http://www.gravatar.com/avatar/13616b6551a3854378f9e6fea964e519?s=117)](https://github.com/jbrooksuk) |[![themgt](http://www.gravatar.com/avatar/8ad9f63b9bd8e84da55eb083d25344db?s=117)](https://github.com/themgt) |[![hemanth](http://www.gravatar.com/avatar/d32a6bf2b43bf62a7212f0c793d76319?s=117)](https://github.com/hemanth) |\n:---: |:---: |:---: |:---: |\n[mgechev](https://github.com/mgechev) |[jbrooksuk](https://github.com/jbrooksuk) |[themgt](https://github.com/themgt) |[hemanth](https://github.com/hemanth) |\n\n\n## License\n\nThis software is distributed under the terms of the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgechev%2Fjscapture","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmgechev%2Fjscapture","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgechev%2Fjscapture/lists"}