@capawesome/capacitor-screenshot¶
Capacitor plugin for taking screenshots.
Features¶
We are proud to offer one of the most complete and feature-rich Capacitor plugins for capturing screenshots. Here are some of the key features:
- 🖥️ Cross-platform: Supports Android, iOS, and Web.
- 📸 Easy screenshots: Simple one-method API for taking screenshots.
- 🌐 Web support: Uses html2canvas for web platform screenshot capture.
- 📱 Native capture: High-quality native screenshot capture on mobile.
- 🔁 Up-to-date: Always supports the latest Capacitor version.
Missing a feature? Just open an issue and we'll take a look!
Newsletter¶
Stay up to date with the latest news and updates about the Capawesome, Capacitor, and Ionic ecosystem by subscribing to our Capawesome Newsletter.
Installation¶
Install the plugin:
If you are using the Web platform, you must also install the html2canvas
package:
Usage¶
import { Screenshot } from '@capawesome/capacitor-screenshot';
const take = async () => {
const { uri } = await Screenshot.take();
console.log('Screenshot saved at:', uri);
};
API¶
take()¶
Take a screenshot.
Returns: Promise<TakeResult>
Since: 6.0.0
Interfaces¶
TakeResult¶
Prop | Type | Description | Since |
---|---|---|---|
uri |
string |
The file path (Android and iOS) or data URI (Web) of the screenshot. | 6.0.0 |
Changelog¶
See CHANGELOG.md.
License¶
See LICENSE.