{"_id":"@capawesome/capacitor-volume","_rev":"5-ea65faa73111fd6b7bdd909da31dc150","name":"@capawesome/capacitor-volume","dist-tags":{"latest":"0.1.3"},"versions":{"0.0.1":{"name":"@capawesome/capacitor-volume","version":"0.0.1","keywords":["capacitor","plugin","native"],"author":{"name":"Robin Genz","email":"mail@robingenz.dev"},"license":"MIT","_id":"@capawesome/capacitor-volume@0.0.1","maintainers":[{"name":"robingenz","email":"mail@robingenz.dev"}],"homepage":"https://capawesome.io/docs/plugins/volume/","bugs":{"url":"https://github.com/capawesome-team/capacitor-plugins/issues"},"dist":{"shasum":"a17955a43f9ac8b777b81b168ff1080fdd0f2e4b","tarball":"https://registry.npmjs.org/@capawesome/capacitor-volume/-/capacitor-volume-0.0.1.tgz","fileCount":49,"integrity":"sha512-i4v8hFuCmWRuitprM1xrGWvCA+EYQA6wVGb8Pl5QnNpcBrjGjih8cYKaEhrq/Y735NyKM/ALt+lDuzzP5RmlQA==","signatures":[{"sig":"MEYCIQDMBetzDfEjxQpV9fAa1TnVKihvEoVPJPJlGlErWxxlyQIhALD9C5FblczbbUSnPJrB9o6lqdVWROo8GmU30T6we+0M","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":102339},"main":"dist/plugin.cjs.js","types":"dist/esm/index.d.ts","unpkg":"dist/plugin.js","module":"dist/esm/index.js","funding":[{"url":"https://github.com/sponsors/capawesome-team/","type":"github"},{"url":"https://opencollective.com/capawesome","type":"opencollective"}],"gitHead":"8dd31ce5d3f16f94fb71d033f47512e99908f4e4","scripts":{"fmt":"npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format","lint":"npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint","build":"npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs","clean":"rimraf ./dist","watch":"tsc --watch","docgen":"docgen --api VolumePlugin --output-readme README.md --output-json dist/docs.json","eslint":"eslint . --ext ts","verify":"npm run verify:ios && npm run verify:android && npm run verify:web","prettier":"prettier \"**/*.{css,html,ts,js,java}\"","swiftlint":"node-swiftlint","verify:ios":"cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin -destination generic/platform=iOS && cd ..","verify:web":"npm run build","prepublishOnly":"npm run build","verify:android":"cd android && ./gradlew clean build test && cd ..","ios:pod:install":"cd ios && pod install --repo-update && cd ..","ios:spm:install":"cd ios && swift package resolve && cd .."},"_npmUser":{"name":"robingenz","email":"mail@robingenz.dev"},"capacitor":{"ios":{"src":"ios"},"android":{"src":"android"}},"repository":{"url":"git+https://github.com/capawesome-team/capacitor-plugins.git","type":"git"},"_npmVersion":"11.13.0","description":"Capacitor plugin to control the volume and observe hardware volume button presses.","directories":{},"_nodeVersion":"24.16.0","eslintConfig":{"extends":"@ionic/eslint-config/recommended"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"8.57.0","rimraf":"6.1.2","rollup":"4.53.3","swiftlint":"2.0.0","typescript":"5.9.3","@capacitor/cli":"8.0.0","@capacitor/ios":"8.0.0","@capacitor/core":"8.0.0","@capacitor/docgen":"0.3.1","@capacitor/android":"8.0.0","@ionic/eslint-config":"0.4.0","prettier-plugin-java":"2.6.7"},"peerDependencies":{"@capacitor/core":">=8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/capacitor-volume_0.0.1_1783405352873_0.10977368092302231","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@capawesome/capacitor-volume","version":"0.1.0","keywords":["capacitor","plugin","native","capacitor-plugin","volume","volume control","volume buttons","hardware buttons","audio stream","media volume"],"author":{"name":"Robin Genz","email":"mail@robingenz.dev"},"license":"MIT","_id":"@capawesome/capacitor-volume@0.1.0","maintainers":[{"name":"robingenz","email":"mail@robingenz.dev"}],"homepage":"https://capawesome.io/docs/sdks/capacitor/volume/","bugs":{"url":"https://github.com/capawesome-team/capacitor-plugins/issues"},"dist":{"shasum":"9a60d7533377f19a588c5390a0541e1297d04185","tarball":"https://registry.npmjs.org/@capawesome/capacitor-volume/-/capacitor-volume-0.1.0.tgz","fileCount":49,"integrity":"sha512-Ez2vJmN5Ho7bvTORUXtmZZ6t1EISAPLCYviKWVFiXivBYhcWeg9i3NUBzxFijT79LlN2IOYdYPhoDTyeAY80tw==","signatures":[{"sig":"MEUCIQDZfeK7aWd+dotRfJ8zmMrS2NXOTIudcoN3+iWUPRBjHwIgIMp7XVmgoAwLoGSa1mroNy20+j25xSoxbtnoGtezvnQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@capawesome%2fcapacitor-volume@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":107556},"main":"dist/plugin.cjs.js","types":"dist/esm/index.d.ts","unpkg":"dist/plugin.js","module":"dist/esm/index.js","funding":[{"url":"https://github.com/sponsors/capawesome-team/","type":"github"},{"url":"https://opencollective.com/capawesome","type":"opencollective"}],"gitHead":"1ce17b1fd14c43b2f1d5d3c2da82221e1d1dca37","scripts":{"fmt":"npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format","lint":"npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint","build":"npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs","clean":"rimraf ./dist","watch":"tsc --watch","docgen":"docgen --api VolumePlugin --output-readme README.md --output-json dist/docs.json","eslint":"eslint . --ext ts","verify":"npm run verify:ios && npm run verify:android && npm run verify:web","prettier":"prettier \"**/*.{css,html,ts,js,java}\"","swiftlint":"node-swiftlint","verify:ios":"cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin -destination generic/platform=iOS && cd ..","verify:web":"npm run build","prepublishOnly":"npm run build","verify:android":"cd android && ./gradlew clean build test && cd ..","ios:pod:install":"cd ios && pod install --repo-update && cd ..","ios:spm:install":"cd ios && swift package resolve && cd .."},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:f7125de9-a241-48dd-a9a3-8d1c920476c3"}},"capacitor":{"ios":{"src":"ios"},"android":{"src":"android"}},"repository":{"url":"git+https://github.com/capawesome-team/capacitor-plugins.git","type":"git"},"_npmVersion":"11.16.0","description":"Capacitor plugin to control the volume and observe hardware volume button presses on Android and iOS.","directories":{},"_nodeVersion":"24.18.0","eslintConfig":{"extends":"@ionic/eslint-config/recommended"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"8.57.0","rimraf":"6.1.2","rollup":"4.53.3","swiftlint":"2.0.0","typescript":"5.9.3","@capacitor/cli":"8.0.0","@capacitor/ios":"8.0.0","@capacitor/core":"8.0.0","@capacitor/docgen":"0.3.1","@capacitor/android":"8.0.0","@ionic/eslint-config":"0.4.0","prettier-plugin-java":"2.6.7"},"peerDependencies":{"@capacitor/core":">=8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/capacitor-volume_0.1.0_1784015618675_0.07774033673924263","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@capawesome/capacitor-volume","version":"0.1.1","keywords":["capacitor","plugin","native","capacitor-plugin","volume","volume control","volume buttons","hardware buttons","audio stream","media volume"],"author":{"name":"Robin Genz","email":"mail@robingenz.dev"},"license":"MIT","_id":"@capawesome/capacitor-volume@0.1.1","maintainers":[{"name":"robingenz","email":"mail@robingenz.dev"}],"homepage":"https://capawesome.io/docs/sdks/capacitor/volume/","bugs":{"url":"https://github.com/capawesome-team/capacitor-plugins/issues"},"dist":{"shasum":"981e9842a5384885d33470eec23db4c408ba6240","tarball":"https://registry.npmjs.org/@capawesome/capacitor-volume/-/capacitor-volume-0.1.1.tgz","fileCount":49,"integrity":"sha512-9/6UIYeLkRl4UZuEgoxM4AXKCuVIPYCLZQ1yYU0H6xaensNRDfyclvdm8As6IuVvyT7mbODEBn+aI3EM7Nw36Q==","signatures":[{"sig":"MEUCIQCGofI0/3tSaLYLWeLJ3T35DQZcJ4ISYcDVBwBqdAapeAIgHxjI9m8UaBCDEKMdq7GefgjV0Mr4nhusOvR5hPIktPo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@capawesome%2fcapacitor-volume@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":107565},"main":"dist/plugin.cjs.js","types":"dist/esm/index.d.ts","unpkg":"dist/plugin.js","module":"dist/esm/index.js","funding":[{"url":"https://github.com/sponsors/capawesome-team/","type":"github"},{"url":"https://opencollective.com/capawesome","type":"opencollective"}],"gitHead":"3e61f4b412f9f3f512c21169bb135bbb23a67e6d","scripts":{"fmt":"npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format","lint":"npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint","build":"npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs","clean":"rimraf ./dist","watch":"tsc --watch","docgen":"docgen --api VolumePlugin --output-readme README.md --output-json dist/docs.json","eslint":"eslint . --ext ts","verify":"npm run verify:ios && npm run verify:android && npm run verify:web","prettier":"prettier \"**/*.{css,html,ts,js,java}\"","swiftlint":"node-swiftlint","verify:ios":"cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin -destination generic/platform=iOS && cd ..","verify:web":"npm run build","prepublishOnly":"npm run build","verify:android":"cd android && ./gradlew clean build test && cd ..","ios:pod:install":"cd ios && pod install --repo-update && cd ..","ios:spm:install":"cd ios && swift package resolve && cd .."},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:f7125de9-a241-48dd-a9a3-8d1c920476c3"}},"capacitor":{"ios":{"src":"ios"},"android":{"src":"android"}},"repository":{"url":"git+https://github.com/capawesome-team/capacitor-plugins.git","type":"git"},"_npmVersion":"11.16.0","description":"Capacitor plugin to control the volume and observe hardware volume button presses on Android and iOS.","directories":{},"_nodeVersion":"24.18.0","eslintConfig":{"extends":"@ionic/eslint-config/recommended"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"8.57.0","rimraf":"6.1.2","rollup":"4.53.3","swiftlint":"2.0.0","typescript":"5.9.3","@capacitor/cli":"8.0.0","@capacitor/ios":"8.0.0","@capacitor/core":"8.0.0","@capacitor/docgen":"0.3.1","@capacitor/android":"8.0.0","@ionic/eslint-config":"0.4.0","prettier-plugin-java":"2.6.7"},"peerDependencies":{"@capacitor/core":">=8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/capacitor-volume_0.1.1_1784103070920_0.997660433580609","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@capawesome/capacitor-volume","version":"0.1.2","keywords":["capacitor","plugin","native","capacitor-plugin","volume","volume control","volume buttons","hardware buttons","audio stream","media volume"],"author":{"name":"Robin Genz","email":"mail@robingenz.dev"},"license":"MIT","_id":"@capawesome/capacitor-volume@0.1.2","maintainers":[{"name":"robingenz","email":"mail@robingenz.dev"}],"homepage":"https://capawesome.io/docs/sdks/capacitor/volume/","bugs":{"url":"https://github.com/capawesome-team/capacitor-plugins/issues"},"dist":{"shasum":"9f893b365ccfc1a029b9679525944505b30325ec","tarball":"https://registry.npmjs.org/@capawesome/capacitor-volume/-/capacitor-volume-0.1.2.tgz","fileCount":50,"integrity":"sha512-WMlSiaWCQrrAKklWZowUm30dw86LlmTka5Y9IDzwIVBuIU/4/vyuTo1hn31zSDF6aOWRUCZlXu4A3ZJaJlKM9A==","signatures":[{"sig":"MEYCIQDeDwDtezX1CSxQFXibfKinSXszQQKOxkMKQqFNbZ/jtwIhALsSZw8dzyHHDyhXpyHQvtPmGuDqQv8LprZsPoXJHGqe","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@capawesome%2fcapacitor-volume@0.1.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":113320},"main":"dist/plugin.cjs.js","types":"dist/esm/index.d.ts","unpkg":"dist/plugin.js","module":"dist/esm/index.js","funding":[{"url":"https://github.com/sponsors/capawesome-team/","type":"github"},{"url":"https://opencollective.com/capawesome","type":"opencollective"}],"gitHead":"3137a5ad250f2d4bd42501de410fea3b0451e12a","scripts":{"fmt":"npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format","lint":"npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint","build":"npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs","clean":"rimraf ./dist","watch":"tsc --watch","docgen":"docgen --api VolumePlugin --output-readme README.md --output-json dist/docs.json","eslint":"eslint . --ext ts","verify":"npm run verify:ios && npm run verify:android && npm run verify:web","prettier":"prettier \"**/*.{css,html,ts,js,java}\"","swiftlint":"node-swiftlint","verify:ios":"cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin -destination generic/platform=iOS && cd ..","verify:web":"npm run build","prepublishOnly":"npm run build","verify:android":"cd android && ./gradlew clean build test && cd ..","ios:pod:install":"cd ios && pod install --repo-update && cd ..","ios:spm:install":"cd ios && swift package resolve && cd .."},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:f7125de9-a241-48dd-a9a3-8d1c920476c3"}},"capacitor":{"ios":{"src":"ios"},"android":{"src":"android"}},"repository":{"url":"git+https://github.com/capawesome-team/capacitor-plugins.git","type":"git"},"_npmVersion":"11.16.0","description":"Capacitor plugin to control the volume and observe hardware volume button presses on Android and iOS.","directories":{},"_nodeVersion":"24.18.0","eslintConfig":{"extends":"@ionic/eslint-config/recommended"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"8.57.0","rimraf":"6.1.2","rollup":"4.53.3","swiftlint":"2.0.0","typescript":"5.9.3","@capacitor/cli":"8.0.0","@capacitor/ios":"8.0.0","@capacitor/core":"8.0.0","@capacitor/docgen":"0.3.1","@capacitor/android":"8.0.0","@ionic/eslint-config":"0.4.0","prettier-plugin-java":"2.6.7"},"peerDependencies":{"@capacitor/core":">=8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/capacitor-volume_0.1.2_1784544448364_0.4813197353874126","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@capawesome/capacitor-volume","version":"0.1.3","description":"Capacitor plugin to control the volume and observe hardware volume button presses on Android and iOS.","main":"dist/plugin.cjs.js","module":"dist/esm/index.js","types":"dist/esm/index.d.ts","unpkg":"dist/plugin.js","author":{"name":"Robin Genz","email":"mail@robingenz.dev"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/capawesome-team/capacitor-plugins.git"},"bugs":{"url":"https://github.com/capawesome-team/capacitor-plugins/issues"},"funding":[{"type":"github","url":"https://github.com/sponsors/capawesome-team/"},{"type":"opencollective","url":"https://opencollective.com/capawesome"}],"homepage":"https://capawesome.io/docs/sdks/capacitor/volume/","keywords":["capacitor","plugin","native","capacitor-plugin","volume","volume control","volume buttons","hardware buttons","audio stream","media volume"],"scripts":{"verify":"npm run verify:ios && npm run verify:android && npm run verify:web","verify:ios":"cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin -destination generic/platform=iOS && cd ..","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}\"","swiftlint":"node-swiftlint","docgen":"docgen --api VolumePlugin --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","ios:pod:install":"cd ios && pod install --repo-update && cd ..","ios:spm:install":"cd ios && swift package resolve && cd ..","prepublishOnly":"npm run build"},"devDependencies":{"@capacitor/android":"8.0.0","@capacitor/cli":"8.4.2","@capacitor/core":"8.0.0","@capacitor/docgen":"0.3.1","@capacitor/ios":"8.0.0","@ionic/eslint-config":"0.4.0","eslint":"8.57.0","prettier-plugin-java":"2.9.7","rimraf":"6.1.2","rollup":"4.62.3","swiftlint":"2.0.0","typescript":"5.9.3"},"peerDependencies":{"@capacitor/core":">=8.0.0"},"eslintConfig":{"extends":"@ionic/eslint-config/recommended"},"capacitor":{"ios":{"src":"ios"},"android":{"src":"android"}},"publishConfig":{"access":"public"},"gitHead":"7c1937ed10b7de86ca2c1cdc3539a2735fd69a00","_id":"@capawesome/capacitor-volume@0.1.3","_nodeVersion":"24.19.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-gS+NZkTp59kdte+c6vr1816mEwGdFrUAnq29ZVQrXoK8M7CMDg0i4r7Y5F2Bali0eWob3jQpWhzwEr6BDZTuYw==","shasum":"664785a99e278bcec35aebfbb222bbd1b0160a03","tarball":"https://registry.npmjs.org/@capawesome/capacitor-volume/-/capacitor-volume-0.1.3.tgz","fileCount":50,"unpackedSize":113086,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@capawesome%2fcapacitor-volume@0.1.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHW4AsDnPCZ5rUtDxYAY9w3ZmQ76iwmfow5QRu/D8GDcAiEAp0aNKcmwlQhTvHjqPO6VL1I1K6+ukTFRwPt8VJTjQsY="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:f7125de9-a241-48dd-a9a3-8d1c920476c3"}},"directories":{},"maintainers":[{"name":"robingenz","email":"mail@robingenz.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/capacitor-volume_0.1.3_1788337432358_0.5953322941398682"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-07T06:22:32.685Z","modified":"2026-09-02T08:23:53.385Z","0.0.1":"2026-07-07T06:22:33.011Z","0.1.0":"2026-07-14T07:53:38.831Z","0.1.1":"2026-07-15T08:11:11.056Z","0.1.2":"2026-07-20T10:47:28.486Z","0.1.3":"2026-09-02T08:23:52.514Z"},"bugs":{"url":"https://github.com/capawesome-team/capacitor-plugins/issues"},"author":{"name":"Robin Genz","email":"mail@robingenz.dev"},"license":"MIT","homepage":"https://capawesome.io/docs/sdks/capacitor/volume/","keywords":["capacitor","plugin","native","capacitor-plugin","volume","volume control","volume buttons","hardware buttons","audio stream","media volume"],"repository":{"type":"git","url":"git+https://github.com/capawesome-team/capacitor-plugins.git"},"description":"Capacitor plugin to control the volume and observe hardware volume button presses on Android and iOS.","maintainers":[{"name":"robingenz","email":"mail@robingenz.dev"}],"readme":"# Capacitor Volume Plugin\n\nCapacitor plugin to control the volume and observe hardware volume button presses.\n\n<div class=\"capawesome-z29o10a\">\n  <a href=\"https://cloud.capawesome.io/\" target=\"_blank\">\n    <img alt=\"Deliver Live Updates to your Capacitor app with Capawesome Cloud\" src=\"https://cloud.capawesome.io/assets/banners/cloud-build-and-deploy-capacitor-apps.png?t=1\" />\n  </a>\n</div>\n\n## Features\n\n- 🔊 **Volume control**: Get and set the volume level.\n- 🎚️ **Audio streams**: Control individual audio streams (music, ring, alarm and more) on Android.\n- 🔘 **Volume buttons**: Listen for hardware volume button presses.\n- 🤫 **Suppression**: Keep the volume unchanged and hide the system volume indicator while watching.\n- 👂 **Change events**: Listen for changes to the volume level.\n- 🤝 **Compatibility**: Works alongside the [Audio Session](https://capawesome.io/docs/sdks/capacitor/audio-session/), [Media Session](https://capawesome.io/docs/sdks/capacitor/media-session/) and [Silent Mode](https://capawesome.io/docs/sdks/capacitor/silent-mode/) plugins.\n- 📦 **CocoaPods & SPM**: Supports CocoaPods and Swift Package Manager for iOS.\n- 🔁 **Up-to-date**: Always supports the latest Capacitor version.\n\nMissing a feature? Just [open an issue](https://github.com/capawesome-team/capacitor-plugins/issues) and we'll take a look!\n\n## Use Cases\n\nThe Volume plugin is typically used whenever an app needs to control the volume or react to the hardware volume buttons, for example:\n\n- **Media apps**: Read and adjust the media volume from your own player UI.\n- **Camera apps**: Use the hardware volume buttons as a shutter trigger while keeping the volume unchanged.\n- **Remote control apps**: Map the volume buttons to custom actions, for example to control external devices.\n- **Audio guidance**: Warn users when the volume is too low to hear important audio cues.\n\n## Compatibility\n\n| Plugin Version | Capacitor Version | Status         |\n| -------------- | ----------------- | -------------- |\n| 0.x.x          | >=8.x.x           | Active support |\n\n## Installation\n\nYou can use our **AI-Assisted Setup** to install the plugin.\nAdd the [Capawesome Skills](https://github.com/capawesome-team/skills) to your AI tool using the following command:\n\n```bash\nnpx skills add capawesome-team/skills --skill capacitor-plugins\n```\n\nThen use the following prompt:\n\n```\n Use the `capacitor-plugins` skill from `capawesome-team/skills` to install the `@capawesome/capacitor-volume` plugin in my project.\n```\n\nIf you prefer **Manual Setup**, install the plugin by running the following commands and follow the platform-specific instructions below:\n\n```bash\nnpm install @capawesome/capacitor-volume\nnpx cap sync\n```\n\nThis plugin is only available on **Android** and **iOS**. On the Web, all methods reject as unimplemented.\n\n## Configuration\n\nNo configuration required for this plugin.\n\n## Usage\n\nThe following examples show how to get and set the current volume, watch the hardware volume buttons, listen for volume button presses and volume changes, and remove all listeners.\n\n### Get the current volume\n\nRead the current volume level as a value between `0` and `1`. On Android, you can select the audio stream (for example the ring stream) with the `stream` option. On iOS, this always returns the media volume:\n\n```typescript\nimport { Volume, VolumeStream } from '@capawesome/capacitor-volume';\n\nconst getVolume = async () => {\n  const { volume } = await Volume.getVolume();\n  return volume;\n};\n\nconst getRingVolume = async () => {\n  const { volume } = await Volume.getVolume({ stream: VolumeStream.Ring });\n  return volume;\n};\n```\n\n### Set the volume\n\nSet the volume level as a value between `0` and `1`. On Android, you can select the audio stream with the `stream` option. On iOS, this always sets the media volume:\n\n```typescript\nimport { Volume } from '@capawesome/capacitor-volume';\n\nconst setVolume = async () => {\n  await Volume.setVolume({ volume: 0.5 });\n};\n```\n\n### Watch the hardware volume buttons\n\nStart watching the hardware volume buttons to receive the `volumeButtonPressed` and `volumeChange` events. With the `suppressVolumeChange` option enabled, the volume level is kept unchanged and the system volume indicator is hidden while watching:\n\n```typescript\nimport { Volume } from '@capawesome/capacitor-volume';\n\nconst startWatching = async () => {\n  await Volume.startWatching({ suppressVolumeChange: true });\n};\n\nconst stopWatching = async () => {\n  await Volume.stopWatching();\n};\n\nconst isWatching = async () => {\n  const { watching } = await Volume.isWatching();\n  return watching;\n};\n```\n\n### Listen for volume button presses\n\nGet notified when a hardware volume button is pressed. The event is only emitted while watching (see above):\n\n```typescript\nimport { Volume } from '@capawesome/capacitor-volume';\n\nconst addVolumeButtonPressedListener = async () => {\n  await Volume.addListener('volumeButtonPressed', event => {\n    console.log('Volume button pressed:', event.direction);\n  });\n};\n```\n\n### Listen for volume changes\n\nGet notified when the volume level changes. The event is only emitted while watching (see above):\n\n```typescript\nimport { Volume } from '@capawesome/capacitor-volume';\n\nconst addVolumeChangeListener = async () => {\n  await Volume.addListener('volumeChange', event => {\n    console.log('Volume changed:', event.volume);\n  });\n};\n```\n\n### Remove all listeners\n\nRemove all listeners for this plugin when they are no longer needed:\n\n```typescript\nimport { Volume } from '@capawesome/capacitor-volume';\n\nconst removeAllListeners = async () => {\n  await Volume.removeAllListeners();\n};\n```\n\n## API\n\n<docgen-index>\n\n* [`getVolume(...)`](#getvolume)\n* [`isWatching()`](#iswatching)\n* [`setVolume(...)`](#setvolume)\n* [`startWatching(...)`](#startwatching)\n* [`stopWatching()`](#stopwatching)\n* [`addListener('volumeButtonPressed', ...)`](#addlistenervolumebuttonpressed-)\n* [`addListener('volumeButtonReleased', ...)`](#addlistenervolumebuttonreleased-)\n* [`addListener('volumeChange', ...)`](#addlistenervolumechange-)\n* [`removeAllListeners()`](#removealllisteners)\n* [Interfaces](#interfaces)\n* [Type Aliases](#type-aliases)\n* [Enums](#enums)\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### getVolume(...)\n\n```typescript\ngetVolume(options?: GetVolumeOptions | undefined) => Promise<GetVolumeResult>\n```\n\nGet the current volume level.\n\nOn iOS, this always returns the media volume.\n\nOnly available on Android and iOS.\n\n| Param         | Type                                                          |\n| ------------- | ------------------------------------------------------------- |\n| **`options`** | <code><a href=\"#getvolumeoptions\">GetVolumeOptions</a></code> |\n\n**Returns:** <code>Promise&lt;<a href=\"#getvolumeresult\">GetVolumeResult</a>&gt;</code>\n\n**Since:** 0.1.0\n\n--------------------\n\n\n### isWatching()\n\n```typescript\nisWatching() => Promise<IsWatchingResult>\n```\n\nCheck whether the hardware volume buttons are currently being watched.\n\nOnly available on Android and iOS.\n\n**Returns:** <code>Promise&lt;<a href=\"#iswatchingresult\">IsWatchingResult</a>&gt;</code>\n\n**Since:** 0.1.0\n\n--------------------\n\n\n### setVolume(...)\n\n```typescript\nsetVolume(options: SetVolumeOptions) => Promise<void>\n```\n\nSet the volume level.\n\nOn iOS, this always sets the media volume.\n\nOnly available on Android and iOS.\n\n| Param         | Type                                                          |\n| ------------- | ------------------------------------------------------------- |\n| **`options`** | <code><a href=\"#setvolumeoptions\">SetVolumeOptions</a></code> |\n\n**Since:** 0.1.0\n\n--------------------\n\n\n### startWatching(...)\n\n```typescript\nstartWatching(options?: StartWatchingOptions | undefined) => Promise<void>\n```\n\nStart watching the hardware volume buttons.\n\nThe `volumeButtonPressed`, `volumeButtonReleased` and `volumeChange`\nevents are only emitted while watching.\n\nIf the volume buttons are already being watched, this call has\nno effect. Call `stopWatching()` first to change the options.\n\nOnly available on Android and iOS.\n\n| Param         | Type                                                                  |\n| ------------- | --------------------------------------------------------------------- |\n| **`options`** | <code><a href=\"#startwatchingoptions\">StartWatchingOptions</a></code> |\n\n**Since:** 0.1.0\n\n--------------------\n\n\n### stopWatching()\n\n```typescript\nstopWatching() => Promise<void>\n```\n\nStop watching the hardware volume buttons.\n\nOn iOS, this also restores the volume level that was set when\nwatching started if the `suppressVolumeChange` option was enabled.\n\nOnly available on Android and iOS.\n\n**Since:** 0.1.0\n\n--------------------\n\n\n### addListener('volumeButtonPressed', ...)\n\n```typescript\naddListener(eventName: 'volumeButtonPressed', listenerFunc: (event: VolumeButtonPressedEvent) => void) => Promise<PluginListenerHandle>\n```\n\nCalled when a hardware volume button is pressed while watching.\n\nOnly available on Android and iOS.\n\n| Param              | Type                                                                                              |\n| ------------------ | ------------------------------------------------------------------------------------------------- |\n| **`eventName`**    | <code>'volumeButtonPressed'</code>                                                                |\n| **`listenerFunc`** | <code>(event: <a href=\"#volumebuttonpressedevent\">VolumeButtonPressedEvent</a>) =&gt; void</code> |\n\n**Returns:** <code>Promise&lt;<a href=\"#pluginlistenerhandle\">PluginListenerHandle</a>&gt;</code>\n\n**Since:** 0.1.0\n\n--------------------\n\n\n### addListener('volumeButtonReleased', ...)\n\n```typescript\naddListener(eventName: 'volumeButtonReleased', listenerFunc: (event: VolumeButtonReleasedEvent) => void) => Promise<PluginListenerHandle>\n```\n\nCalled when a hardware volume button is released while watching.\n\nOnly available on Android.\n\n| Param              | Type                                                                                                |\n| ------------------ | --------------------------------------------------------------------------------------------------- |\n| **`eventName`**    | <code>'volumeButtonReleased'</code>                                                                 |\n| **`listenerFunc`** | <code>(event: <a href=\"#volumebuttonreleasedevent\">VolumeButtonReleasedEvent</a>) =&gt; void</code> |\n\n**Returns:** <code>Promise&lt;<a href=\"#pluginlistenerhandle\">PluginListenerHandle</a>&gt;</code>\n\n**Since:** 0.2.0\n\n--------------------\n\n\n### addListener('volumeChange', ...)\n\n```typescript\naddListener(eventName: 'volumeChange', listenerFunc: (event: VolumeChangeEvent) => void) => Promise<PluginListenerHandle>\n```\n\nCalled when the volume level changes while watching.\n\nOn Android, this is called for changes to the music stream.\nOn iOS, this is called for changes to the media volume and is\nnot called while the `suppressVolumeChange` option is enabled.\n\nOnly available on Android and iOS.\n\n| Param              | Type                                                                                |\n| ------------------ | ----------------------------------------------------------------------------------- |\n| **`eventName`**    | <code>'volumeChange'</code>                                                         |\n| **`listenerFunc`** | <code>(event: <a href=\"#volumechangeevent\">VolumeChangeEvent</a>) =&gt; void</code> |\n\n**Returns:** <code>Promise&lt;<a href=\"#pluginlistenerhandle\">PluginListenerHandle</a>&gt;</code>\n\n**Since:** 0.1.0\n\n--------------------\n\n\n### removeAllListeners()\n\n```typescript\nremoveAllListeners() => Promise<void>\n```\n\nRemove all listeners for this plugin.\n\n**Since:** 0.1.0\n\n--------------------\n\n\n### Interfaces\n\n\n#### GetVolumeResult\n\n| Prop         | Type                | Description                                              | Since |\n| ------------ | ------------------- | -------------------------------------------------------- | ----- |\n| **`volume`** | <code>number</code> | The current volume level as a value between `0` and `1`. | 0.1.0 |\n\n\n#### GetVolumeOptions\n\n| Prop         | Type                                                  | Description                                                        | Default                         | Since |\n| ------------ | ----------------------------------------------------- | ------------------------------------------------------------------ | ------------------------------- | ----- |\n| **`stream`** | <code><a href=\"#volumestream\">VolumeStream</a></code> | The audio stream to get the volume for. Only available on Android. | <code>VolumeStream.Music</code> | 0.1.0 |\n\n\n#### IsWatchingResult\n\n| Prop           | Type                 | Description                                                      | Since |\n| -------------- | -------------------- | ---------------------------------------------------------------- | ----- |\n| **`watching`** | <code>boolean</code> | Whether the hardware volume buttons are currently being watched. | 0.1.0 |\n\n\n#### SetVolumeOptions\n\n| Prop         | Type                                                  | Description                                                        | Default                         | Since |\n| ------------ | ----------------------------------------------------- | ------------------------------------------------------------------ | ------------------------------- | ----- |\n| **`stream`** | <code><a href=\"#volumestream\">VolumeStream</a></code> | The audio stream to set the volume for. Only available on Android. | <code>VolumeStream.Music</code> | 0.1.0 |\n| **`volume`** | <code>number</code>                                   | The volume level to set as a value between `0` and `1`.            |                                 | 0.1.0 |\n\n\n#### StartWatchingOptions\n\n| Prop                       | Type                 | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | Default            | Since |\n| -------------------------- | -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | ----- |\n| **`suppressVolumeChange`** | <code>boolean</code> | Whether to keep the volume level unchanged when a hardware volume button is pressed while watching. On Android, the volume key events are consumed so that the system does not apply the volume change or display the volume panel. On iOS, the volume level is reset immediately after each button press and the system volume indicator is hidden. If the volume level is close to the minimum or maximum, it is nudged to a value from which both buttons can still be detected. The original volume level is restored when watching stops. | <code>false</code> | 0.1.0 |\n\n\n#### PluginListenerHandle\n\n| Prop         | Type                                      |\n| ------------ | ----------------------------------------- |\n| **`remove`** | <code>() =&gt; Promise&lt;void&gt;</code> |\n\n\n#### VolumeButtonPressedEvent\n\n| Prop            | Type                                            | Description                                          | Since |\n| --------------- | ----------------------------------------------- | ---------------------------------------------------- | ----- |\n| **`direction`** | <code><a href=\"#direction\">Direction</a></code> | The direction of the pressed hardware volume button. | 0.1.0 |\n\n\n#### VolumeButtonReleasedEvent\n\n| Prop            | Type                                            | Description                                           | Since |\n| --------------- | ----------------------------------------------- | ----------------------------------------------------- | ----- |\n| **`direction`** | <code><a href=\"#direction\">Direction</a></code> | The direction of the released hardware volume button. | 0.2.0 |\n\n\n#### VolumeChangeEvent\n\n| Prop         | Type                | Description                                          | Since |\n| ------------ | ------------------- | ---------------------------------------------------- | ----- |\n| **`volume`** | <code>number</code> | The new volume level as a value between `0` and `1`. | 0.1.0 |\n\n\n### Type Aliases\n\n\n#### Direction\n\nThe direction of a hardware volume button.\n\n- `up`: The volume up button.\n- `down`: The volume down button.\n\n<code>'down' | 'up'</code>\n\n\n### Enums\n\n\n#### VolumeStream\n\n| Members            | Value                       | Description                                    | Since |\n| ------------------ | --------------------------- | ---------------------------------------------- | ----- |\n| **`Alarm`**        | <code>'ALARM'</code>        | The audio stream for alarms.                   | 0.1.0 |\n| **`Music`**        | <code>'MUSIC'</code>        | The audio stream for music and media playback. | 0.1.0 |\n| **`Notification`** | <code>'NOTIFICATION'</code> | The audio stream for notifications.            | 0.1.0 |\n| **`Ring`**         | <code>'RING'</code>         | The audio stream for the phone ring.           | 0.1.0 |\n| **`System`**       | <code>'SYSTEM'</code>       | The audio stream for system sounds.            | 0.1.0 |\n| **`VoiceCall`**    | <code>'VOICE_CALL'</code>   | The audio stream for phone calls.              | 0.1.0 |\n\n</docgen-api>\n\n## Volume Control\n\nKeep the following platform differences in mind when getting and setting the volume:\n\n- **Android**: The volume can be read and set per audio stream (see the `stream` option). If Do Not Disturb is active, changing the volume of the ring, notification or system stream requires Do Not Disturb access. Without this access, the call is rejected with the `DO_NOT_DISTURB_ACCESS_REQUIRED` error code. You can direct the user to the corresponding settings screen using the [`ACTION_NOTIFICATION_POLICY_ACCESS_SETTINGS`](https://developer.android.com/reference/android/provider/Settings#ACTION_NOTIFICATION_POLICY_ACCESS_SETTINGS) intent, for example with the [App Launcher](https://capacitorjs.com/docs/apis/app-launcher) plugin.\n- **iOS**: There is no public API to set the system volume directly. The plugin therefore uses a hidden system volume view to change the media volume, which is the only volume that can be read and set. The `stream` option is ignored.\n\n## Volume Button Watching\n\nKeep the following platform differences in mind when watching the hardware volume buttons:\n\n- **Android**: The volume key events are intercepted by the web view, so button presses are only detected while the app is in the foreground. With the `suppressVolumeChange` option enabled, the key events are consumed, which keeps the volume unchanged and prevents the system volume panel from appearing.\n- **iOS**: Button presses are derived from changes to the media volume, so button presses are only detected while the app is in the foreground. Without the `suppressVolumeChange` option, presses can not be detected once the volume has reached its minimum or maximum. With the option enabled, the volume is reset immediately after each press (nudged away from the edges if needed), the system volume indicator is hidden, and the original volume is restored when watching stops. Note that volume changes from other sources (for example Control Center) are also reported while watching.\n\n## FAQ\n\n### How is this plugin different from other similar plugins?\n\nIt combines volume control and hardware button events in one unified API — a natural fit on iOS, where both rely on the same underlying system machinery. It adds per-stream control on Android and handles iOS volume-indicator suppression, all through a fully typed, actively maintained package, so a single dependency covers the whole volume story.\n\n### Which platforms are supported by this plugin?\n\nThe plugin is available on Android and iOS. On the Web, all methods reject as unimplemented.\n\n### Why is the `stream` option ignored on iOS?\n\nOn iOS, there is no public API to set the system volume directly. The plugin therefore uses a hidden system volume view to change the media volume, which is the only volume that can be read and set on iOS. The `stream` option is only supported on Android, see [Volume Control](#volume-control) for details.\n\n### Why is `setVolume` rejected with the `DO_NOT_DISTURB_ACCESS_REQUIRED` error code?\n\nOn Android, changing the volume of the ring, notification or system stream while Do Not Disturb is active requires Do Not Disturb access. You can direct the user to the corresponding settings screen using the `ACTION_NOTIFICATION_POLICY_ACCESS_SETTINGS` intent, for example with the App Launcher plugin, see [Volume Control](#volume-control) for details.\n\n### Why are volume button presses not detected?\n\nThe `volumeButtonPressed` event is only emitted while watching, so make sure you have called `startWatching(...)` first. On both platforms, button presses are only detected while the app is in the foreground. On iOS, presses can also not be detected once the volume has reached its minimum or maximum unless the `suppressVolumeChange` option is enabled, see [Volume Button Watching](#volume-button-watching) for details.\n\n### What does the `suppressVolumeChange` option do?\n\nWith this option enabled, pressing a hardware volume button while watching does not change the volume and the system volume indicator stays hidden. On Android, the volume key events are consumed. On iOS, the volume level is reset immediately after each button press and the original volume level is restored when watching stops.\n\n### Can I use this plugin with Ionic, React, Vue or Angular?\n\nYes, the plugin is framework-agnostic. It works in any Capacitor app regardless of the web framework, including Ionic with Angular, React, or Vue, as well as plain JavaScript projects.\n\n## Related Plugins\n\n- [Audio Session](https://capawesome.io/docs/sdks/capacitor/audio-session/): Configure and observe the iOS audio session.\n- [Media Session](https://capawesome.io/docs/sdks/capacitor/media-session/): Interact with media controllers, volume keys and media buttons.\n- [Silent Mode](https://capawesome.io/docs/sdks/capacitor/silent-mode/): Detect whether the device is in silent mode.\n\n## Newsletter\n\nStay up to date with the latest news and updates about the Capawesome, Capacitor, and Ionic ecosystem by subscribing to our [Capawesome Newsletter](https://cloud.capawesome.io/newsletter/).\n\n## Changelog\n\nSee [CHANGELOG.md](https://github.com/capawesome-team/capacitor-plugins/blob/main/packages/volume/CHANGELOG.md).\n\n## License\n\nSee [LICENSE](https://github.com/capawesome-team/capacitor-plugins/blob/main/packages/volume/LICENSE).\n","readmeFilename":"README.md"}