{"_id":"@capacitor-trancee/native-audio","name":"@capacitor-trancee/native-audio","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@capacitor-trancee/native-audio","version":"0.0.1","description":"A native plugin for native audio engine","main":"dist/plugin.cjs.js","module":"dist/esm/index.js","types":"dist/esm/index.d.ts","unpkg":"dist/plugin.js","author":{"name":"Philipp Grosswiler","email":"philipp.grosswiler@gmail.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/trancee/capacitor-native-audio.git"},"bugs":{"url":"https://github.com/trancee/capacitor-native-audio/issues"},"keywords":["capacitor","plugin","native"],"scripts":{"verify":"npm run verify:ios && npm run verify:android && npm run verify:web","verify:ios":"xcodebuild -scheme CapacitorTranceeNativeAudio -destination generic/platform=iOS","verify:android":"cd android && ./gradlew clean build test && cd ..","verify:web":"npm run build","lint":"npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint","fmt":"npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format","eslint":"eslint . --ext ts","prettier":"prettier \"**/*.{css,html,ts,js,java}\" --plugin=prettier-plugin-java","swiftlint":"node-swiftlint","docgen":"docgen --api NativeAudioPlugin --output-readme README.md --output-json dist/docs.json","build":"npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs","clean":"rimraf ./dist","watch":"tsc --watch","prepublishOnly":"npm run build"},"devDependencies":{"@capacitor/android":"^7.0.0","@capacitor/core":"^7.0.0","@capacitor/docgen":"^0.3.0","@capacitor/ios":"^7.0.0","@ionic/eslint-config":"^0.4.0","@ionic/prettier-config":"^4.0.0","@ionic/swiftlint-config":"^2.0.0","eslint":"^8.57.0","prettier":"^3.4.2","prettier-plugin-java":"^2.6.6","rimraf":"^6.0.1","rollup":"^4.30.1","swiftlint":"^2.0.0","typescript":"~4.1.5"},"peerDependencies":{"@capacitor/core":">=7.0.0"},"prettier":"@ionic/prettier-config","swiftlint":"@ionic/swiftlint-config","eslintConfig":{"extends":"@ionic/eslint-config/recommended"},"capacitor":{"ios":{"src":"ios"},"android":{"src":"android"}},"_id":"@capacitor-trancee/native-audio@0.0.1","gitHead":"6d70d781641ee8ff1cb1c1196aa8956a82e6dfe8","homepage":"https://github.com/trancee/capacitor-native-audio#readme","_nodeVersion":"22.14.0","_npmVersion":"11.1.0","dist":{"integrity":"sha512-h+3tSDXXdhYWj3llW/zYrxWiPaWw2I6/LqEWjp1C7gUGvLfjcoRmYL7ccN+tul5oMMcoSsfasYo6o2UzXqoUfQ==","shasum":"22d181dcc439a9f864efaf631b8f3295576605ea","tarball":"https://registry.npmjs.org/@capacitor-trancee/native-audio/-/native-audio-0.0.1.tgz","fileCount":32,"unpackedSize":108013,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIE/+TgS7ivKH4TfZFLnzZ0Cl/rrk0et2YCpJjuM3bTbqAiEArEusKC/55Gzn8NGSVmGTuFrTSn4unhQhkVyRSIIisUo="}]},"_npmUser":{"name":"trancee","email":"philipp.grosswiler@gmail.com"},"directories":{},"maintainers":[{"name":"trancee","email":"philipp.grosswiler@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/native-audio_0.0.1_1741425994490_0.04026531494268237"},"_hasShrinkwrap":false}},"time":{"created":"2025-03-08T09:26:34.341Z","0.0.1":"2025-03-08T09:26:34.699Z","modified":"2025-03-08T09:26:34.971Z"},"maintainers":[{"name":"trancee","email":"philipp.grosswiler@gmail.com"}],"description":"A native plugin for native audio engine","homepage":"https://github.com/trancee/capacitor-native-audio#readme","keywords":["capacitor","plugin","native"],"repository":{"type":"git","url":"git+https://github.com/trancee/capacitor-native-audio.git"},"author":{"name":"Philipp Grosswiler","email":"philipp.grosswiler@gmail.com"},"bugs":{"url":"https://github.com/trancee/capacitor-native-audio/issues"},"license":"MIT","readme":"# @capacitor-trancee/native-audio\n\nA native plugin for native audio engine\n\n## Install\n\n```bash\nnpm install @capacitor-trancee/native-audio\nnpx cap sync\n```\n\n## API\n\n<docgen-index>\n\n* [`configure(...)`](#configure)\n* [`preload(...)`](#preload)\n* [`play(...)`](#play)\n* [`pause(...)`](#pause)\n* [`resume(...)`](#resume)\n* [`loop(...)`](#loop)\n* [`stop(...)`](#stop)\n* [`unload(...)`](#unload)\n* [`setVolume(...)`](#setvolume)\n* [`getCurrentTime(...)`](#getcurrenttime)\n* [`getDuration(...)`](#getduration)\n* [`isPlaying(...)`](#isplaying)\n* [`addListener('complete', ...)`](#addlistenercomplete-)\n* [Interfaces](#interfaces)\n\n</docgen-index>\n\n<docgen-api>\n<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->\n\n### configure(...)\n\n```typescript\nconfigure(options: ConfigureOptions) => Promise<void>\n```\n\n| Param         | Type                                                          |\n| ------------- | ------------------------------------------------------------- |\n| **`options`** | <code><a href=\"#configureoptions\">ConfigureOptions</a></code> |\n\n--------------------\n\n\n### preload(...)\n\n```typescript\npreload(options: PreloadOptions) => Promise<void>\n```\n\n| Param         | Type                                                      |\n| ------------- | --------------------------------------------------------- |\n| **`options`** | <code><a href=\"#preloadoptions\">PreloadOptions</a></code> |\n\n--------------------\n\n\n### play(...)\n\n```typescript\nplay(options: { assetId: string; time?: number; }) => Promise<void>\n```\n\n| Param         | Type                                             |\n| ------------- | ------------------------------------------------ |\n| **`options`** | <code>{ assetId: string; time?: number; }</code> |\n\n--------------------\n\n\n### pause(...)\n\n```typescript\npause(options: { assetId: string; }) => Promise<void>\n```\n\n| Param         | Type                              |\n| ------------- | --------------------------------- |\n| **`options`** | <code>{ assetId: string; }</code> |\n\n--------------------\n\n\n### resume(...)\n\n```typescript\nresume(options: { assetId: string; }) => Promise<void>\n```\n\n| Param         | Type                              |\n| ------------- | --------------------------------- |\n| **`options`** | <code>{ assetId: string; }</code> |\n\n--------------------\n\n\n### loop(...)\n\n```typescript\nloop(options: { assetId: string; }) => Promise<void>\n```\n\n| Param         | Type                              |\n| ------------- | --------------------------------- |\n| **`options`** | <code>{ assetId: string; }</code> |\n\n--------------------\n\n\n### stop(...)\n\n```typescript\nstop(options: { assetId: string; }) => Promise<void>\n```\n\n| Param         | Type                              |\n| ------------- | --------------------------------- |\n| **`options`** | <code>{ assetId: string; }</code> |\n\n--------------------\n\n\n### unload(...)\n\n```typescript\nunload(options: { assetId: string; }) => Promise<void>\n```\n\n| Param         | Type                              |\n| ------------- | --------------------------------- |\n| **`options`** | <code>{ assetId: string; }</code> |\n\n--------------------\n\n\n### setVolume(...)\n\n```typescript\nsetVolume(options: { assetId: string; volume: number; }) => Promise<void>\n```\n\n| Param         | Type                                              |\n| ------------- | ------------------------------------------------- |\n| **`options`** | <code>{ assetId: string; volume: number; }</code> |\n\n--------------------\n\n\n### getCurrentTime(...)\n\n```typescript\ngetCurrentTime(options: { assetId: string; }) => Promise<{ currentTime: number; }>\n```\n\n| Param         | Type                              |\n| ------------- | --------------------------------- |\n| **`options`** | <code>{ assetId: string; }</code> |\n\n**Returns:** <code>Promise&lt;{ currentTime: number; }&gt;</code>\n\n--------------------\n\n\n### getDuration(...)\n\n```typescript\ngetDuration(options: { assetId: string; }) => Promise<{ duration: number; }>\n```\n\n| Param         | Type                              |\n| ------------- | --------------------------------- |\n| **`options`** | <code>{ assetId: string; }</code> |\n\n**Returns:** <code>Promise&lt;{ duration: number; }&gt;</code>\n\n--------------------\n\n\n### isPlaying(...)\n\n```typescript\nisPlaying(options: { assetId: string; }) => Promise<{ isPlaying: boolean; }>\n```\n\n| Param         | Type                              |\n| ------------- | --------------------------------- |\n| **`options`** | <code>{ assetId: string; }</code> |\n\n**Returns:** <code>Promise&lt;{ isPlaying: boolean; }&gt;</code>\n\n--------------------\n\n\n### addListener('complete', ...)\n\n```typescript\naddListener(eventName: 'complete', listenerFunc: (event: { assetId: string; }) => void) => Promise<PluginListenerHandle>\n```\n\nListen for asset completed playing event\n\n| Param              | Type                                                  |\n| ------------------ | ----------------------------------------------------- |\n| **`eventName`**    | <code>'complete'</code>                               |\n| **`listenerFunc`** | <code>(event: { assetId: string; }) =&gt; void</code> |\n\n**Returns:** <code>Promise&lt;<a href=\"#pluginlistenerhandle\">PluginListenerHandle</a>&gt;</code>\n\n**Since:** 5.0.1\n\n--------------------\n\n\n### Interfaces\n\n\n#### ConfigureOptions\n\n| Prop        | Type                 | Description                                       | Default            |\n| ----------- | -------------------- | ------------------------------------------------- | ------------------ |\n| **`fade`**  | <code>boolean</code> | Indicating whether or not to fade audio.          | <code>false</code> |\n| **`focus`** | <code>boolean</code> | Indicating whether or not to disable mixed audio. | <code>false</code> |\n\n\n#### PreloadOptions\n\n| Prop                  | Type                 |\n| --------------------- | -------------------- |\n| **`assetPath`**       | <code>string</code>  |\n| **`assetId`**         | <code>string</code>  |\n| **`volume`**          | <code>number</code>  |\n| **`audioChannelNum`** | <code>number</code>  |\n| **`isUrl`**           | <code>boolean</code> |\n\n\n#### PluginListenerHandle\n\n| Prop         | Type                                      |\n| ------------ | ----------------------------------------- |\n| **`remove`** | <code>() =&gt; Promise&lt;void&gt;</code> |\n\n</docgen-api>\n","readmeFilename":"README.md","_rev":"1-7bd3c1b805ed1d068e9936d0c946fb1e"}