{"_id":"@akiroz/pulsemixer","name":"@akiroz/pulsemixer","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.3":{"name":"@akiroz/pulsemixer","version":"1.0.3","description":"Nodejs wrapper for pulsemixer","main":"index.js","scripts":{"test":"node test.js"},"author":{"name":"Alex Michailidis"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/noemission/node-pulsemixer.git"},"keywords":["pulsemixer","pulseaudio","audio","system","volume","linux"],"bugs":{"url":"https://github.com/noemission/node-pulsemixer/issues"},"homepage":"https://github.com/noemission/node-pulsemixer#readme","licenseText":"MIT License\n\nCopyright (c) 2019 Alex Michailidis\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@akiroz/pulsemixer@1.0.3","dist":{"shasum":"bd1740f81ac0ece6b360ac8f406519b85d1409fc","integrity":"sha512-6rHtjO7I26p26O4/J1Ym6nnesKXfQKQQtYKxiDz/SIj287PxCJoeshkyj5nLOorDKHZrQoPrM8gSj5Iq8OIKkQ==","tarball":"https://registry.npmjs.org/@akiroz/pulsemixer/-/pulsemixer-1.0.3.tgz","fileCount":7,"unpackedSize":89825,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGuR4b9HYPNlc3HTlFnovBNBwc35kye3eStLt15Ho0LfAiAzl+4GSGPq/PvCuN9OuTSId4/LH5wrr6XwahPkJxHXWg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJipun/ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqt2Q/9H9KEr06qmGR/z0K//U39nMx0NNQanIFbJ6x/gFAhFJBehN2V\r\nbqRqExqln+Oo1jRSKIiDCy5HPi5HSE53PKO3/FzNaBlCkkm+en/DKz6IW7HP\r\n7L3oFA+CoMz18shcJp+NbBYGLax9GIfe/PWBc+KMy3KsZvWP5VMH22ewOoyO\r\ngdlAw7uQygKhaVrW+9TO2c3Gy8csp8v5HY6v2b63TtyN96UEk0aGYvMgySSk\r\nNKJoqsv7QMeFrdgHbgBw4QHFF+JFgxk/5JfLBPQwDhTi0qX0B2+jjyd7nxZi\r\nfO7nGQxbtQBYoLDNYnWeoSfQOjTMD9WcZVU+G0i4p3c3BF9ZfnADiFAWt/d/\r\n5ME3EYitlvsYp0qSjl6W45j+yMH67mAKQxUmrwxjcelOwMMpDh6Zd9S4C+5/\r\nr9eOyzn48FpvZfreoJaxylF3ABobutxq48Yrm74ZtnRlVRiir2+LyXSZLe+v\r\nkr48PmbsaAGHqq2Zvs+JmTqVQEQOAOkgAvCDexOa5KvZad9RtV5+dTYHKN4m\r\n3PDZcb6NkKTC/KYox1RCBGbsrPG+OJH1Xzu5S+UnN2dI7n9MjmrsFL6NJIpH\r\nLHrqO8PUP031LX2JjUM0+ypXKSTnU7SX5p/2Jwz+TcYTM3f2brpHQQloCmLP\r\nG2x9alOsvnYDML6ShNwL4+RpPxPcprwRzp8=\r\n=/sl4\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"akiroz","email":"akiroz.vectis@gmail.com"},"directories":{},"maintainers":[{"name":"akiroz","email":"akiroz.vectis@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pulsemixer_1.0.3_1655106047392_0.2133459876163344"},"_hasShrinkwrap":false}},"time":{"created":"2022-06-13T07:40:47.310Z","1.0.3":"2022-06-13T07:40:47.551Z","modified":"2022-06-13T07:40:47.916Z"},"maintainers":[{"name":"akiroz","email":"akiroz.vectis@gmail.com"}],"description":"Nodejs wrapper for pulsemixer","homepage":"https://github.com/noemission/node-pulsemixer#readme","keywords":["pulsemixer","pulseaudio","audio","system","volume","linux"],"repository":{"type":"git","url":"git+https://github.com/noemission/node-pulsemixer.git"},"author":{"name":"Alex Michailidis"},"bugs":{"url":"https://github.com/noemission/node-pulsemixer/issues"},"license":"MIT","readme":"# node-pulsemixer\nNodejs wrapper for [pulsemixer](https://github.com/GeorgeFilipkin/pulsemixer).\nControl system's audio through nodeJS.\n\n### Requirements (for pulsemixer)\n- `Python` >= 3\n- `PulseAudio` >= 1.0\n\n## Instalation\n`npm i pulsemixer`\n\n## Basic Usage\n```javascript\nconst Pulsemixer = require('pulsemixer');\n\n(async function () {\n    const pulsemixer = new Pulsemixer(); \n\n    await pulsemixer.mute()\n    await pulsemixer.unmute()\n    const volume = await pulsemixer.getVolume();\n    await pulsemixer.setVolume(25);\n})();\n```\n## API\n### Constructor\n```javascript\nconst pulsemixer = new Pulsemixer();\n```\n`pulsemixer` will be an interface for the default sink. In other words it will create an interface for the default audio card that is currently running.\n\n```javascript\nconst pulsemixer = new Pulsemixer(a_sink_id);\n```\nYou can also pass a sink id to control a specific sound card or sound interface.\n\n### Instance methods\n|Method|Parameters|Returns|Description|\n|:--:|:--:|:-----:|:----------|\n|**`mute`**|`-`|`Promise:Void`|Mutes system volume|\n|**`unmute`**|`-`|`Promise:Void`|Unmutes system volume|\n|**`toggleMute`**|`-`|`Promise:Void`|Toggle mute|\n|**`getMute`**|`-`|`Promise:Boolean`|Gets current mute status|\n|**`setVolume`**|`{Number}`|`Promise:Void`|Sets system volume|\n|**`getVolume`**|`-`|`Promise:Number`|Get current system volume|\n|**`changeVolume`**|`{Number}`|`Promise:Void`|Increase or decrease system volume by a number|\n\n### Static methods\nMethod|Parameters|Returns|Description|\n|:--:|:--:|:-----:|:----------|\n|**`getSinks`**|`-`|`Promise:Array`|Returns system's available sinks|\n```javascript\nconst Pulsemixer = require('pulsemixer');\nPulsemixer.getSinks()\n    .then(sinks => {\n        /*\n            An array of the available sound cards (sinks)\n            Each sink has an `id` and `name`\n            id can be used to instantiate a new Pulsemixer\n        */\n    })\n    .catch(err => console.error('ERROR...', err));\n```","readmeFilename":"README.md"}