Skip to content

Commit d1c92f0

Browse files
committed
Add NowPlayingIcon to the docs
1 parent 7102d5f commit d1c92f0

File tree

2 files changed

+16
-10
lines changed

2 files changed

+16
-10
lines changed

README.md

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,13 @@ This can be done in XCode or by editing `Info.plist` directly.
7979
</dict>
8080
```
8181

82-
## API
82+
## Add Now Playing Icon (optional)
83+
84+
If you would like a now playing icon to show in the iOS notification, add an image with the name `NowPlayingIcon` to your Asset catalog. See [Managing assets with asset catalogs](https://developer.apple.com/documentation/xcode/managing-assets-with-asset-catalogs) on how to add a new asset.
85+
86+
A PNG is recommended with the size of 1024 x 1024px. The same image can be used for the three different Asset wells (1x, 2x, 3x).
87+
88+
# API
8389

8490
<docgen-index>
8591

@@ -457,14 +463,14 @@ This should be used to update the UI when the notification controls are used to
457463

458464
#### AudioPlayerPrepareParams
459465

460-
| Prop | Type | Description | Since |
461-
| ------------------------ | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- |
462-
| **`audioSource`** | <code>string</code> | A URI for the audio file to play | 1.0.0 |
463-
| **`friendlyTitle`** | <code>string</code> | The title/name of the audio file to be used on the notification | 1.0.0 |
464-
| **`useForNotification`** | <code>boolean</code> | Whether to use this audio file for the notification. This is considered the primary audio to play. It must be created first and you may only have one at a time. | 1.0.0 |
465-
| **`artworkSource`** | <code>string</code> | A URI for the album art image to display on the Android notification. Has no affect on iOS. Can also be an in-app source. Pulls from `android/app/src/assets/public`. If using [Vite](https://vitejs.dev/guide/assets.html#the-public-directory), you would put the image in your `public` folder and the build process will copy to `dist` which in turn will be copied to the Android assets by Capacitor. A PNG is the best option with square dimensions. 1200px x 1200px is a good option. | 1.0.0 |
466-
| **`isBackgroundMusic`** | <code>boolean</code> | Is this audio for background music/audio. Should not be `true` when `useForNotification = true`. | 1.0.0 |
467-
| **`loop`** | <code>boolean</code> | Whether or not to loop other audio like background music while the primary audio (`useForNotification = true`) is playing. | 1.0.0 |
466+
| Prop | Type | Description | Since |
467+
| ------------------------ | -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- |
468+
| **`audioSource`** | <code>string</code> | A URI for the audio file to play | 1.0.0 |
469+
| **`friendlyTitle`** | <code>string</code> | The title/name of the audio file to be used on the notification | 1.0.0 |
470+
| **`useForNotification`** | <code>boolean</code> | Whether to use this audio file for the notification. This is considered the primary audio to play. It must be created first and you may only have one at a time. | 1.0.0 |
471+
| **`artworkSource`** | <code>string</code> | A URI for the album art image to display on the Android notification. Has no affect on iOS. Can also be an in-app source. Pulls from `android/app/src/assets/public`. If using [Vite](https://vitejs.dev/guide/assets.html#the-public-directory), you would put the image in your `public` folder and the build process will copy to `dist` which in turn will be copied to the Android assets by Capacitor. A PNG is the best option with square dimensions. 1200 x 1200px is a good option. | 1.0.0 |
472+
| **`isBackgroundMusic`** | <code>boolean</code> | Is this audio for background music/audio. Should not be `true` when `useForNotification = true`. | 1.0.0 |
473+
| **`loop`** | <code>boolean</code> | Whether or not to loop other audio like background music while the primary audio (`useForNotification = true`) is playing. | 1.0.0 |
468474

469475

470476
#### AudioPlayerDefaultParams

src/definitions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export interface AudioPlayerPrepareParams extends AudioPlayerDefaultParams {
4141
* you would put the image in your `public` folder and the build process will copy to `dist`
4242
* which in turn will be copied to the Android assets by Capacitor.
4343
*
44-
* A PNG is the best option with square dimensions. 1200px x 1200px is a good option.
44+
* A PNG is the best option with square dimensions. 1200 x 1200px is a good option.
4545
*
4646
* @example A public web source: https://example.com/artwork.png
4747
* @example An in-app source: images/artwork.png

0 commit comments

Comments
 (0)