【文件属性】:
文件名称:osx-vol:在OS X系统中获取和设置音量
文件大小:3KB
文件格式:ZIP
更新时间:2021-05-02 03:28:27
JavaScript
osx-vol
在OS X系统中获取并设置音量。
安装
$ npm install --save osx-vol
用法
const osxVol = require ( 'osx-vol' ) ;
osxVol . get ( ) . then ( level => {
console . log ( level ) ;
//=> 0.45
} ) ;
osxVol . set ( 0.65 ) . then ( ( ) => {
console . log ( 'Changed volume level to 65%' ) ;
} ) ;
原料药
。得到()
返回解析为当前音量级别的promise。
.set(级别)
返回一个无法解决任何问题的承诺。
等级
必需的类型: number
0到1之间的数字。
命令行界面
请参见 CLI。
执照
麻省理工学院:copyright:
【文件预览】:
osx-vol-master
----.gitignore(13B)
----package.json(840B)
----index.js(912B)
----test.js(286B)
----license(1KB)
----readme.md(647B)
----.gitattributes(12B)
----.editorconfig(231B)