{"id":23338245,"url":"https://github.com/mediagrid/capacitor-native-audio","last_synced_at":"2025-04-09T22:31:06.476Z","repository":{"id":250215075,"uuid":"830651760","full_name":"mediagrid/capacitor-native-audio","owner":"mediagrid","description":"Play audio in a Capacitor app natively from a URL/web source simultaneously with background audio and background play support.","archived":false,"fork":false,"pushed_at":"2025-02-11T15:43:37.000Z","size":3674,"stargazers_count":26,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-24T00:24:33.453Z","etag":null,"topics":["android","audio","audio-player","capacitor","capacitor-android","capacitor-ios","capacitor-plugin","ios"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mediagrid.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-18T17:34:51.000Z","updated_at":"2025-03-14T21:04:59.000Z","dependencies_parsed_at":"2024-08-14T22:12:14.780Z","dependency_job_id":"5c8bb4e6-450f-4b96-a8ee-4f9ed86ae2bf","html_url":"https://github.com/mediagrid/capacitor-native-audio","commit_stats":null,"previous_names":["mediagrid/capacitor-native-audio"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mediagrid%2Fcapacitor-native-audio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mediagrid%2Fcapacitor-native-audio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mediagrid%2Fcapacitor-native-audio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mediagrid%2Fcapacitor-native-audio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mediagrid","download_url":"https://codeload.github.com/mediagrid/capacitor-native-audio/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248123400,"owners_count":21051460,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","audio","audio-player","capacitor","capacitor-android","capacitor-ios","capacitor-plugin","ios"],"created_at":"2024-12-21T03:12:53.950Z","updated_at":"2025-04-09T22:31:06.404Z","avatar_url":"https://github.com/mediagrid.png","language":"Java","readme":"# @mediagrid/capacitor-native-audio\n\n## Description\n\nPlay audio in a Capacitor app natively (Android/iOS) from a URL/web source simultaneously with background audio. Also supports background playing with an OS notification.\n\n## Install\n\n```bash\nnpm install @mediagrid/capacitor-native-audio\nnpx cap sync\n```\n\n## Android\n\n### `AndroidManifest.xml` required changes\n\nLocated at `android/app/src/main/AndroidManifest.xml`\n\n```xml\n\u003capplication\u003e\n    \u003c!-- OTHER STUFF --\u003e\n\n    \u003c!-- Add service to be used for background play --\u003e\n    \u003cservice\n        android:name=\"us.mediagrid.capacitorjs.plugins.nativeaudio.AudioPlayerService\"\n        android:description=\"@string/audio_player_service_description\"\n        android:foregroundServiceType=\"mediaPlayback\"\n        android:exported=\"true\"\u003e\n        \u003cintent-filter\u003e\n            \u003caction android:name=\"androidx.media3.session.MediaSessionService\"/\u003e\n        \u003c/intent-filter\u003e\n    \u003c/service\u003e\n\n    \u003c!-- OTHER STUFF --\u003e\n\u003c/application\u003e\n\n\u003c!-- Add required permissions --\u003e\n\u003cuses-permission android:name=\"android.permission.FOREGROUND_SERVICE\"/\u003e\n\u003cuses-permission android:name=\"android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK\" /\u003e\n\u003cuses-permission android:name=\"android.permission.WAKE_LOCK\" /\u003e\n```\n\n### `strings.xml` required changes\n\nLocated at `android/app/src/main/res/values/strings.xml`\n\n```xml\n\u003cresources\u003e\n    \u003c!-- OTHER STUFF --\u003e\n\n    \u003c!-- Describes the service in your app settings once installed --\u003e\n    \u003cstring name=\"audio_player_service_description\"\u003eAllows for audio to play in the background.\u003c/string\u003e\n\u003c/resources\u003e\n```\n\n# iOS\n\n## Enable Audio Background Mode\n\nThis can be done in XCode or by editing `Info.plist` directly.\n\n```xml\n\u003c!-- ios/App/App/Info.plist --\u003e\n\n\u003cdict\u003e\n    \u003c!-- OTHER STUFF --\u003e\n\n    \u003ckey\u003eUIBackgroundModes\u003c/key\u003e\n    \u003carray\u003e\n        \u003cstring\u003eaudio\u003c/string\u003e\n    \u003c/array\u003e\n\n    \u003c!-- OTHER STUFF --\u003e\n\u003c/dict\u003e\n```\n\n## Add Now Playing Icon (optional) - DEPRECATED\n\n⚠️⚠️ This is DEPRECATED. Use `artworkSource` now. ⚠️⚠️\n\nIf 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.\n\nA 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).\n\n# API\n\n\u003cdocgen-index\u003e\n\n* [`create(...)`](#create)\n* [`initialize(...)`](#initialize)\n* [`changeAudioSource(...)`](#changeaudiosource)\n* [`changeMetadata(...)`](#changemetadata)\n* [`getDuration(...)`](#getduration)\n* [`getCurrentTime(...)`](#getcurrenttime)\n* [`play(...)`](#play)\n* [`pause(...)`](#pause)\n* [`seek(...)`](#seek)\n* [`stop(...)`](#stop)\n* [`setVolume(...)`](#setvolume)\n* [`setRate(...)`](#setrate)\n* [`isPlaying(...)`](#isplaying)\n* [`destroy(...)`](#destroy)\n* [`onAppGainsFocus(...)`](#onappgainsfocus)\n* [`onAppLosesFocus(...)`](#onapplosesfocus)\n* [`onAudioReady(...)`](#onaudioready)\n* [`onAudioEnd(...)`](#onaudioend)\n* [`onPlaybackStatusChange(...)`](#onplaybackstatuschange)\n* [Interfaces](#interfaces)\n\n\u003c/docgen-index\u003e\n\n\u003cdocgen-api\u003e\n\u003c!--Update the source file JSDoc comments and rerun docgen to update the docs below--\u003e\n\n### create(...)\n\n```typescript\ncreate(params: AudioPlayerPrepareParams) =\u003e Promise\u003c{ success: boolean; }\u003e\n```\n\nCreate an audio source to be played.\n\n| Param        | Type                                                                          |\n| ------------ | ----------------------------------------------------------------------------- |\n| **`params`** | \u003ccode\u003e\u003ca href=\"#audioplayerprepareparams\"\u003eAudioPlayerPrepareParams\u003c/a\u003e\u003c/code\u003e |\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;{ success: boolean; }\u0026gt;\u003c/code\u003e\n\n**Since:** 1.0.0\n\n--------------------\n\n\n### initialize(...)\n\n```typescript\ninitialize(params: AudioPlayerDefaultParams) =\u003e Promise\u003c{ success: boolean; }\u003e\n```\n\nInitialize the audio source. Prepares the audio to be played, buffers and such.\n\nShould be called after callbacks are registered (e.g. `onAudioReady`).\n\n| Param        | Type                                                                          |\n| ------------ | ----------------------------------------------------------------------------- |\n| **`params`** | \u003ccode\u003e\u003ca href=\"#audioplayerdefaultparams\"\u003eAudioPlayerDefaultParams\u003c/a\u003e\u003c/code\u003e |\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;{ success: boolean; }\u0026gt;\u003c/code\u003e\n\n**Since:** 1.0.0\n\n--------------------\n\n\n### changeAudioSource(...)\n\n```typescript\nchangeAudioSource(params: AudioPlayerDefaultParams \u0026 { source: string; }) =\u003e Promise\u003cvoid\u003e\n```\n\nChange the audio source on an existing audio source (`audioId`).\n\nThis is useful for changing background music while the primary audio is playing\nor changing the primary audio before it is playing to accommodate different durations\nthat a user can choose from.\n\n| Param        | Type                                                                                                |\n| ------------ | --------------------------------------------------------------------------------------------------- |\n| **`params`** | \u003ccode\u003e\u003ca href=\"#audioplayerdefaultparams\"\u003eAudioPlayerDefaultParams\u003c/a\u003e \u0026 { source: string; }\u003c/code\u003e |\n\n**Since:** 1.0.0\n\n--------------------\n\n\n### changeMetadata(...)\n\n```typescript\nchangeMetadata(params: AudioPlayerDefaultParams \u0026 { friendlyTitle?: string; artworkSource?: string; }) =\u003e Promise\u003cvoid\u003e\n```\n\nChange the associated metadata of an existing audio source\n\n| Param        | Type                                                                                                                                |\n| ------------ | ----------------------------------------------------------------------------------------------------------------------------------- |\n| **`params`** | \u003ccode\u003e\u003ca href=\"#audioplayerdefaultparams\"\u003eAudioPlayerDefaultParams\u003c/a\u003e \u0026 { friendlyTitle?: string; artworkSource?: string; }\u003c/code\u003e |\n\n**Since:** 1.1.0\n\n--------------------\n\n\n### getDuration(...)\n\n```typescript\ngetDuration(params: AudioPlayerDefaultParams) =\u003e Promise\u003c{ duration: number; }\u003e\n```\n\nGet the duration of the audio source.\n\nShould be called once the audio is ready (`onAudioReady`).\n\n| Param        | Type                                                                          |\n| ------------ | ----------------------------------------------------------------------------- |\n| **`params`** | \u003ccode\u003e\u003ca href=\"#audioplayerdefaultparams\"\u003eAudioPlayerDefaultParams\u003c/a\u003e\u003c/code\u003e |\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;{ duration: number; }\u0026gt;\u003c/code\u003e\n\n**Since:** 1.0.0\n\n--------------------\n\n\n### getCurrentTime(...)\n\n```typescript\ngetCurrentTime(params: AudioPlayerDefaultParams) =\u003e Promise\u003c{ currentTime: number; }\u003e\n```\n\nGet the current time of the audio source being played.\n\n| Param        | Type                                                                          |\n| ------------ | ----------------------------------------------------------------------------- |\n| **`params`** | \u003ccode\u003e\u003ca href=\"#audioplayerdefaultparams\"\u003eAudioPlayerDefaultParams\u003c/a\u003e\u003c/code\u003e |\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;{ currentTime: number; }\u0026gt;\u003c/code\u003e\n\n**Since:** 1.0.0\n\n--------------------\n\n\n### play(...)\n\n```typescript\nplay(params: AudioPlayerDefaultParams) =\u003e Promise\u003cvoid\u003e\n```\n\nPlay the audio source.\n\n| Param        | Type                                                                          |\n| ------------ | ----------------------------------------------------------------------------- |\n| **`params`** | \u003ccode\u003e\u003ca href=\"#audioplayerdefaultparams\"\u003eAudioPlayerDefaultParams\u003c/a\u003e\u003c/code\u003e |\n\n**Since:** 1.0.0\n\n--------------------\n\n\n### pause(...)\n\n```typescript\npause(params: AudioPlayerDefaultParams) =\u003e Promise\u003cvoid\u003e\n```\n\nPause the audio source.\n\n| Param        | Type                                                                          |\n| ------------ | ----------------------------------------------------------------------------- |\n| **`params`** | \u003ccode\u003e\u003ca href=\"#audioplayerdefaultparams\"\u003eAudioPlayerDefaultParams\u003c/a\u003e\u003c/code\u003e |\n\n**Since:** 1.0.0\n\n--------------------\n\n\n### seek(...)\n\n```typescript\nseek(params: AudioPlayerDefaultParams \u0026 { timeInSeconds: number; }) =\u003e Promise\u003cvoid\u003e\n```\n\nSeek the audio source to a specific time.\n\n| Param        | Type                                                                                                       |\n| ------------ | ---------------------------------------------------------------------------------------------------------- |\n| **`params`** | \u003ccode\u003e\u003ca href=\"#audioplayerdefaultparams\"\u003eAudioPlayerDefaultParams\u003c/a\u003e \u0026 { timeInSeconds: number; }\u003c/code\u003e |\n\n**Since:** 1.0.0\n\n--------------------\n\n\n### stop(...)\n\n```typescript\nstop(params: AudioPlayerDefaultParams) =\u003e Promise\u003cvoid\u003e\n```\n\nStop playing the audio source and reset the current time to zero.\n\n| Param        | Type                                                                          |\n| ------------ | ----------------------------------------------------------------------------- |\n| **`params`** | \u003ccode\u003e\u003ca href=\"#audioplayerdefaultparams\"\u003eAudioPlayerDefaultParams\u003c/a\u003e\u003c/code\u003e |\n\n**Since:** 1.0.0\n\n--------------------\n\n\n### setVolume(...)\n\n```typescript\nsetVolume(params: AudioPlayerDefaultParams \u0026 { volume: number; }) =\u003e Promise\u003cvoid\u003e\n```\n\nSet the volume of the audio source. Should be a decimal less than or equal to `1.00`.\n\nThis is useful for background music.\n\n| Param        | Type                                                                                                |\n| ------------ | --------------------------------------------------------------------------------------------------- |\n| **`params`** | \u003ccode\u003e\u003ca href=\"#audioplayerdefaultparams\"\u003eAudioPlayerDefaultParams\u003c/a\u003e \u0026 { volume: number; }\u003c/code\u003e |\n\n**Since:** 1.0.0\n\n--------------------\n\n\n### setRate(...)\n\n```typescript\nsetRate(params: AudioPlayerDefaultParams \u0026 { rate: number; }) =\u003e Promise\u003cvoid\u003e\n```\n\nSet the rate for the audio source to be played at.\nShould be a decimal. An example being `1` is normal speed, `0.5` being half the speed and `1.5` being 1.5 times faster.\n\n| Param        | Type                                                                                              |\n| ------------ | ------------------------------------------------------------------------------------------------- |\n| **`params`** | \u003ccode\u003e\u003ca href=\"#audioplayerdefaultparams\"\u003eAudioPlayerDefaultParams\u003c/a\u003e \u0026 { rate: number; }\u003c/code\u003e |\n\n**Since:** 1.0.0\n\n--------------------\n\n\n### isPlaying(...)\n\n```typescript\nisPlaying(params: AudioPlayerDefaultParams) =\u003e Promise\u003c{ isPlaying: boolean; }\u003e\n```\n\nWether or not the audio source is currently playing.\n\n| Param        | Type                                                                          |\n| ------------ | ----------------------------------------------------------------------------- |\n| **`params`** | \u003ccode\u003e\u003ca href=\"#audioplayerdefaultparams\"\u003eAudioPlayerDefaultParams\u003c/a\u003e\u003c/code\u003e |\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;{ isPlaying: boolean; }\u0026gt;\u003c/code\u003e\n\n**Since:** 1.0.0\n\n--------------------\n\n\n### destroy(...)\n\n```typescript\ndestroy(params: AudioPlayerDefaultParams) =\u003e Promise\u003cvoid\u003e\n```\n\nDestroy all resources for the audio source.\nThe audio source with `useForNotification = true` must be destroyed last.\n\n| Param        | Type                                                                          |\n| ------------ | ----------------------------------------------------------------------------- |\n| **`params`** | \u003ccode\u003e\u003ca href=\"#audioplayerdefaultparams\"\u003eAudioPlayerDefaultParams\u003c/a\u003e\u003c/code\u003e |\n\n**Since:** 1.0.0\n\n--------------------\n\n\n### onAppGainsFocus(...)\n\n```typescript\nonAppGainsFocus(params: AudioPlayerListenerParams, callback: () =\u003e void) =\u003e Promise\u003cAudioPlayerListenerResult\u003e\n```\n\nRegister a callback for when the app comes to the foreground.\n\n| Param          | Type                                                                            |\n| -------------- | ------------------------------------------------------------------------------- |\n| **`params`**   | \u003ccode\u003e\u003ca href=\"#audioplayerlistenerparams\"\u003eAudioPlayerListenerParams\u003c/a\u003e\u003c/code\u003e |\n| **`callback`** | \u003ccode\u003e() =\u0026gt; void\u003c/code\u003e                                                      |\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#audioplayerlistenerresult\"\u003eAudioPlayerListenerResult\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n**Since:** 1.0.0\n\n--------------------\n\n\n### onAppLosesFocus(...)\n\n```typescript\nonAppLosesFocus(params: AudioPlayerListenerParams, callback: () =\u003e void) =\u003e Promise\u003cAudioPlayerListenerResult\u003e\n```\n\nRegisters a callback from when the app goes to the background.\n\n| Param          | Type                                                                            |\n| -------------- | ------------------------------------------------------------------------------- |\n| **`params`**   | \u003ccode\u003e\u003ca href=\"#audioplayerlistenerparams\"\u003eAudioPlayerListenerParams\u003c/a\u003e\u003c/code\u003e |\n| **`callback`** | \u003ccode\u003e() =\u0026gt; void\u003c/code\u003e                                                      |\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#audioplayerlistenerresult\"\u003eAudioPlayerListenerResult\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n**Since:** 1.0.0\n\n--------------------\n\n\n### onAudioReady(...)\n\n```typescript\nonAudioReady(params: AudioPlayerListenerParams, callback: () =\u003e void) =\u003e Promise\u003cAudioPlayerListenerResult\u003e\n```\n\nRegisters a callback for when the audio source is ready to be played.\n\n| Param          | Type                                                                            |\n| -------------- | ------------------------------------------------------------------------------- |\n| **`params`**   | \u003ccode\u003e\u003ca href=\"#audioplayerlistenerparams\"\u003eAudioPlayerListenerParams\u003c/a\u003e\u003c/code\u003e |\n| **`callback`** | \u003ccode\u003e() =\u0026gt; void\u003c/code\u003e                                                      |\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#audioplayerlistenerresult\"\u003eAudioPlayerListenerResult\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n**Since:** 1.0.0\n\n--------------------\n\n\n### onAudioEnd(...)\n\n```typescript\nonAudioEnd(params: AudioPlayerListenerParams, callback: () =\u003e void) =\u003e Promise\u003cAudioPlayerListenerResult\u003e\n```\n\nRegisters a callback for when the audio source has ended (reached the end of the audio).\n\n| Param          | Type                                                                            |\n| -------------- | ------------------------------------------------------------------------------- |\n| **`params`**   | \u003ccode\u003e\u003ca href=\"#audioplayerlistenerparams\"\u003eAudioPlayerListenerParams\u003c/a\u003e\u003c/code\u003e |\n| **`callback`** | \u003ccode\u003e() =\u0026gt; void\u003c/code\u003e                                                      |\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#audioplayerlistenerresult\"\u003eAudioPlayerListenerResult\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n**Since:** 1.0.0\n\n--------------------\n\n\n### onPlaybackStatusChange(...)\n\n```typescript\nonPlaybackStatusChange(params: AudioPlayerListenerParams, callback: (result: { status: 'playing' | 'paused' | 'stopped'; }) =\u003e void) =\u003e Promise\u003cAudioPlayerListenerResult\u003e\n```\n\nRegisters a callback for when state of playback for the audio source has changed.\nThis should be used to update the UI when the notification controls are used to control the playback.\n\n| Param          | Type                                                                              |\n| -------------- | --------------------------------------------------------------------------------- |\n| **`params`**   | \u003ccode\u003e\u003ca href=\"#audioplayerlistenerparams\"\u003eAudioPlayerListenerParams\u003c/a\u003e\u003c/code\u003e   |\n| **`callback`** | \u003ccode\u003e(result: { status: 'playing' \\| 'paused' \\| 'stopped'; }) =\u0026gt; void\u003c/code\u003e |\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#audioplayerlistenerresult\"\u003eAudioPlayerListenerResult\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n**Since:** 1.0.0\n\n--------------------\n\n\n### Interfaces\n\n\n#### AudioPlayerPrepareParams\n\n| Prop                     | Type                 | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | Default            | Since |\n| ------------------------ | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | ----- |\n| **`audioSource`**        | \u003ccode\u003estring\u003c/code\u003e  | A URI for the audio file to play                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |                    | 1.0.0 |\n| **`friendlyTitle`**      | \u003ccode\u003estring\u003c/code\u003e  | The title/name of the audio file to be used on the notification                                                                                                                                                                                                                                                                                                                                                                                                                                          |                    | 1.0.0 |\n| **`useForNotification`** | \u003ccode\u003eboolean\u003c/code\u003e | 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.                                                                                                                                                                                                                                                                                                                                         | \u003ccode\u003efalse\u003c/code\u003e | 1.0.0 |\n| **`artworkSource`**      | \u003ccode\u003estring\u003c/code\u003e  | A URI for the album art image to display on the Android/iOS notification. Can also be an in-app source. Pulls from `android/app/src/assets/public` and `ios/App/App/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/iOS assets by Capacitor. A PNG is the best option with square dimensions. 1200 x 1200px is a good option. |                    | 1.0.0 |\n| **`isBackgroundMusic`**  | \u003ccode\u003eboolean\u003c/code\u003e | Is this audio for background music/audio. Should not be `true` when `useForNotification = true`.                                                                                                                                                                                                                                                                                                                                                                                                         | \u003ccode\u003efalse\u003c/code\u003e | 1.0.0 |\n| **`loop`**               | \u003ccode\u003eboolean\u003c/code\u003e | Whether or not to loop other audio like background music while the primary audio (`useForNotification = true`) is playing.                                                                                                                                                                                                                                                                                                                                                                               | \u003ccode\u003efalse\u003c/code\u003e | 1.0.0 |\n| **`showSeekBackward`**   | \u003ccode\u003eboolean\u003c/code\u003e | Whether or not to show the seek backward button on the OS's notification. Only has affect when `useForNotification = true`.                                                                                                                                                                                                                                                                                                                                                                              | \u003ccode\u003etrue\u003c/code\u003e  | 1.2.0 |\n| **`showSeekForward`**    | \u003ccode\u003eboolean\u003c/code\u003e | Whether or not to show the seek forward button on the OS's notification. Only has affect when `useForNotification = true`.                                                                                                                                                                                                                                                                                                                                                                               | \u003ccode\u003etrue\u003c/code\u003e  | 1.2.0 |\n\n\n#### AudioPlayerDefaultParams\n\n| Prop          | Type                | Description                                        | Since |\n| ------------- | ------------------- | -------------------------------------------------- | ----- |\n| **`audioId`** | \u003ccode\u003estring\u003c/code\u003e | Any string to differentiate different audio files. | 1.0.0 |\n\n\n#### AudioPlayerListenerResult\n\n| Prop             | Type                |\n| ---------------- | ------------------- |\n| **`callbackId`** | \u003ccode\u003estring\u003c/code\u003e |\n\n\n#### AudioPlayerListenerParams\n\n| Prop          | Type                | Description                                 | Since |\n| ------------- | ------------------- | ------------------------------------------- | ----- |\n| **`audioId`** | \u003ccode\u003estring\u003c/code\u003e | The `audioId` set when `create` was called. | 1.0.0 |\n\n\u003c/docgen-api\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmediagrid%2Fcapacitor-native-audio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmediagrid%2Fcapacitor-native-audio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmediagrid%2Fcapacitor-native-audio/lists"}