Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion camera/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,8 @@ Request camera and photo album permissions
| **`promptLabelCancel`** | <code>string</code> | Text value to use when displaying the prompt. iOS only: The label of the 'cancel' button. | <code>: 'Cancel'</code> | 1.0.0 |
| **`promptLabelPhoto`** | <code>string</code> | Text value to use when displaying the prompt. The label of the button to select a saved image. | <code>: 'From Photos'</code> | 1.0.0 |
| **`promptLabelPicture`** | <code>string</code> | Text value to use when displaying the prompt. The label of the button to open the camera. | <code>: 'Take Picture'</code> | 1.0.0 |

| **`pwaNoDevicesText`** | <code>string</code> | Text value to use when displaying PWA Camera tip: No Devices | <code>: 'No Camera Found'</code> | |
| **`pwaNoDevicesButtonText`** | <code>string</code> | Text value to use when displaying PWA Camera tip: Fallback to Choose image | <code>: 'Choose image'</code> | |

#### GalleryPhotos

Expand Down
10 changes: 10 additions & 0 deletions camera/src/definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 2 additions & 0 deletions camera/src/web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down