From 8b14f9f26021ef638ee0d00030ed581de0ec63ff Mon Sep 17 00:00:00 2001 From: Manuel Beck Date: Thu, 26 Mar 2026 10:29:09 +0100 Subject: [PATCH] doc(readme): add note about using native browser features (#940) - Make clear, that it is not necessary to use this plugin for selecting images or using the camera. Native browser features can be used, like ``. - Add links to MDN documentation for ``, attribute `accept` and `capture` - Suggested by @erisu --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index 80c9b36..2601553 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,21 @@ description: Take pictures with the device camera. [![GitHub - Lint](https://github.com/apache/cordova-plugin-camera/actions/workflows/lint.yml/badge.svg?branch=master)](https://github.com/apache/cordova-plugin-camera/actions/workflows/lint.yml?query=branch%3Amaster) [![GitHub - Release Audit Workflow](https://github.com/apache/cordova-plugin-camera/actions/workflows/release-audit.yml/badge.svg?branch=master)](https://github.com/apache/cordova-plugin-camera/actions/workflows/release-audit.yml?query=branch%3Amaster) +> [!NOTE] +> Depending on your use case, this plugin may be unnecessary. +> +> We strongly recommend using the WebView's native `` element before opting for this plugin. +> +> The example above demonstrates how to capture an image. If you only need to select an existing image, simply remove the `capture` attribute. +> +> For more information: +> +> - [MDN – HTML element: ``](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input/file) +> - [MDN – HTML attribute: `accept`](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/accept) +> - [MDN – HTML attribute: `capture`](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/capture) +> +> For advanced use cases, this plugin may be appropriate. + This plugin defines a global `navigator.camera` object, which provides an API for taking pictures and choosing images from the device's image library. Although the object is attached to the global `navigator` object, it is not available until after the `deviceready` event.