Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ondras/browsershot
Utility library for programmatic screenshots via getDisplayMedia
https://github.com/ondras/browsershot
util
Last synced: about 2 months ago
JSON representation
Utility library for programmatic screenshots via getDisplayMedia
- Host: GitHub
- URL: https://github.com/ondras/browsershot
- Owner: ondras
- Created: 2019-04-10T10:40:11.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-04-16T08:17:12.000Z (over 5 years ago)
- Last Synced: 2024-11-05T03:36:56.357Z (about 2 months ago)
- Topics: util
- Language: JavaScript
- Homepage:
- Size: 1000 Bytes
- Stars: 46
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Browsershot
Taking screenshots programatically, using the [getDisplayMedia](https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getDisplayMedia) API. Useful for debugging, feedback etc.
## Example
```js
let bs = await import("https://unpkg.com/browsershot/index.js");
try {
let canvas = await bs.toCanvas();
document.body.appendChild(canvas);
} catch (e) {
alert(e.message);
}
```