diff --git a/camera/README.md b/camera/README.md index 861a25f90a..d6443d8fa3 100644 --- a/camera/README.md +++ b/camera/README.md @@ -195,7 +195,8 @@ Request camera and photo album permissions | **`promptLabelCancel`** | string | Text value to use when displaying the prompt. iOS only: The label of the 'cancel' button. | : 'Cancel' | 1.0.0 | | **`promptLabelPhoto`** | string | Text value to use when displaying the prompt. The label of the button to select a saved image. | : 'From Photos' | 1.0.0 | | **`promptLabelPicture`** | string | Text value to use when displaying the prompt. The label of the button to open the camera. | : 'Take Picture' | 1.0.0 | - +| **`pwaNoDevicesText`** | string | Text value to use when displaying PWA Camera tip: No Devices | : 'No Camera Found' | | +| **`pwaNoDevicesButtonText`** | string | Text value to use when displaying PWA Camera tip: Fallback to Choose image | : 'Choose image' | | #### GalleryPhotos diff --git a/camera/src/definitions.ts b/camera/src/definitions.ts index 02b0d3b7ff..fc73c45d1b 100644 --- a/camera/src/definitions.ts +++ b/camera/src/definitions.ts @@ -173,6 +173,16 @@ export interface ImageOptions { * @since 1.0.0 */ promptLabelPicture?: string; + /** + * Text value to use when displaying PWA Camera tip: No Devices + * @default: 'No Camera Found' + */ + pwaNoDevicesText?: string; + /** + * Text value to use when displaying PWA Camera tip: Fallback to Choose image + * @default: 'Choose image' + */ + pwaNoDevicesButtonText?: string; } export interface Photo { diff --git a/camera/src/web.ts b/camera/src/web.ts index 9c6293056f..bfe82ab3aa 100644 --- a/camera/src/web.ts +++ b/camera/src/web.ts @@ -58,6 +58,8 @@ export class CameraWeb extends WebPlugin implements CameraPlugin { const cameraModal: any = document.createElement('pwa-camera-modal'); cameraModal.facingMode = options.direction === CameraDirection.Front ? 'user' : 'environment'; + cameraModal.noDevicesButtonText = options.pwaNoDevicesButtonText; + cameraModal.noDevicesText = options.pwaNoDevicesText; document.body.appendChild(cameraModal); try { await cameraModal.componentOnReady();