From cb31af1afc9ee2b5641a724733d1c4b1a472137b Mon Sep 17 00:00:00 2001 From: wangxue08 Date: Tue, 27 Feb 2024 13:56:07 +0800 Subject: [PATCH] task-2810229177954560:audio-record --- .../components/cw-audio-record/api.yaml | 75 +++++- .../cw-audio-record/docs/examples.md | 52 +++- .../components/cw-audio-record/index.vue | 173 +++++++++++-- .../components/cw-audio-record/utils.js | 41 +++ packages/cw/cw_audio_library/manifest | 6 +- .../cw/cw_audio_library/package-lock.json | 237 ++++++++++++------ packages/cw/cw_audio_library/package.json | 5 +- 7 files changed, 476 insertions(+), 113 deletions(-) create mode 100644 packages/cw/cw_audio_library/components/cw-audio-record/utils.js diff --git a/packages/cw/cw_audio_library/components/cw-audio-record/api.yaml b/packages/cw/cw_audio_library/components/cw-audio-record/api.yaml index def3a060..49ad00de 100644 --- a/packages/cw/cw_audio_library/components/cw-audio-record/api.yaml +++ b/packages/cw/cw_audio_library/components/cw-audio-record/api.yaml @@ -4,7 +4,76 @@ belong: component labels: [Runtime] attrs: - - name: value + - name: waveBgColor + title: 声波背景颜色 + type: color + default: 'rgb(200, 200, 200)' + description: 设定声波背景颜色 + - name: waveColor + title: 声波波形颜色 + type: color + default: 'rgb(0, 0, 0)' + description: 设定波形绘制颜色 + - name: maxFileSize + title: 最大文件大小 + type: number + compType: inputNumber + default: 10 + description: 上传文件的最大大小 + - name: uploadUrl + title: 上传音频地址 type: string - default: 请在这里编写代码 - description: 需要传入的值 + compType: interfaceSelect + default: + description: 上传的地址 + methods: + - name: startRecord + title: 开始录制 + description: 开始录制音频 + - name: stopRecord + title: 停止录制 + description: 停止录制音频 + - name: pauseRecord + title: 暂停录制 + description: 暂停录制音频 + - name: uploadRecord + title: 上传录制 + description: 上传录制的音频 + params: + - name: type + type: string + description: 上传的文件格式(wav,mp3,pcm) + - name: downloadRecord + title: 下载录制 + description: 下载录制的音频 + params: + - name: type + type: string + description: 下载的文件格式(wav,mp3,pcm) + - name: deleteRecord + title: 删除录制 + description: 删除录制的音频 + - name: playRecord + title: 播放录制 + description: 播放录制的音频 + - name: pausePlayRecord + title: 暂停播放 + description: 暂停播放录制的音频 + - name: resumePlayRecord + title: 继续播放 + description: 继续播放录制的音频 + events: + - name: onUploadSuccess + description: 上传音频成功时 + title: 上传成功时 + params: + - name: value + type: string + description: 改变的值 + - name: onUploadError + description: 上传失败时 + title: 上传失败时 + params: + - name: value + type: string + description: 错误原因 diff --git a/packages/cw/cw_audio_library/components/cw-audio-record/docs/examples.md b/packages/cw/cw_audio_library/components/cw-audio-record/docs/examples.md index afa8f2f9..e4bc4fd9 100644 --- a/packages/cw/cw_audio_library/components/cw-audio-record/docs/examples.md +++ b/packages/cw/cw_audio_library/components/cw-audio-record/docs/examples.md @@ -1,5 +1,53 @@ ### 基本用法 -``` html - +``` vue + + + ``` diff --git a/packages/cw/cw_audio_library/components/cw-audio-record/index.vue b/packages/cw/cw_audio_library/components/cw-audio-record/index.vue index 894f7833..8619e314 100644 --- a/packages/cw/cw_audio_library/components/cw-audio-record/index.vue +++ b/packages/cw/cw_audio_library/components/cw-audio-record/index.vue @@ -1,15 +1,13 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/packages/cw/cw_audio_library/components/cw-audio-record/utils.js b/packages/cw/cw_audio_library/components/cw-audio-record/utils.js new file mode 100644 index 00000000..5f9ef00f --- /dev/null +++ b/packages/cw/cw_audio_library/components/cw-audio-record/utils.js @@ -0,0 +1,41 @@ +import { Mp3Encoder, WavHeader } from '@breezystack/lamejs'; + +export function convertToMp3(wavDataView, recorder) { + // 获取wav头信息 + const wav = WavHeader.readHeader(wavDataView); // 此处其实可以不用去读wav头信息,毕竟有对应的config配置 + const { channels, sampleRate } = wav; + const mp3enc = new Mp3Encoder(channels, sampleRate, 128); + // 获取左右通道数据 + const result = recorder.getChannelData() + const buffer = []; + + const leftData = result.left && new Int16Array(result.left.buffer, 0, result.left.byteLength / 2); + const rightData = result.right && new Int16Array(result.right.buffer, 0, result.right.byteLength / 2); + const remaining = leftData.length + (rightData ? rightData.length : 0); + + const maxSamples = 1152; + for (let i = 0; i < remaining; i += maxSamples) { + const left = leftData.subarray(i, i + maxSamples); + let right = null; + let mp3buf = null; + + if (channels === 2) { + right = rightData.subarray(i, i + maxSamples); + mp3buf = mp3enc.encodeBuffer(left, right); + } else { + mp3buf = mp3enc.encodeBuffer(left); + } + + if (mp3buf.length > 0) { + buffer.push(mp3buf); + } + } + + const enc = mp3enc.flush(); + + if (enc.length > 0) { + buffer.push(enc); + } + + return new Blob(buffer, { type: 'audio/mp3' }); +} diff --git a/packages/cw/cw_audio_library/manifest b/packages/cw/cw_audio_library/manifest index 8f1ba868..0cbc5da6 100644 --- a/packages/cw/cw_audio_library/manifest +++ b/packages/cw/cw_audio_library/manifest @@ -1,6 +1,6 @@ Plugin-Version: 1.0.0 Library-Type: Frontend Metadata-File: usage.json -packages/extension/cw_audio_library@1.0.0/dist-theme/demo.html: dist-theme/demo.html -packages/extension/cw_audio_library@1.0.0/dist-theme/index.js: dist-theme/index.js -packages/extension/cw_audio_library@1.0.0/dist-theme/index.js.map: dist-theme/index.js.map \ No newline at end of file +packages/extension/cw_audio_library@1.1.0/dist-theme/demo.html: dist-theme/demo.html +packages/extension/cw_audio_library@1.1.0/dist-theme/index.js: dist-theme/index.js +packages/extension/cw_audio_library@1.1.0/dist-theme/index.js.map: dist-theme/index.js.map \ No newline at end of file diff --git a/packages/cw/cw_audio_library/package-lock.json b/packages/cw/cw_audio_library/package-lock.json index 8671e285..97dfa58c 100644 --- a/packages/cw/cw_audio_library/package-lock.json +++ b/packages/cw/cw_audio_library/package-lock.json @@ -1,17 +1,20 @@ { "name": "cw_audio_library", - "version": "1.0.0", + "version": "1.1.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "cw_audio_library", - "version": "1.0.0", + "version": "1.1.0", "license": "MIT", "dependencies": { "@any-touch/core": "^2.2.0", "@any-touch/pan": "^2.2.0", + "@breezystack/lamejs": "^1.2.7", + "axios": "^1.6.7", "js-audio-recorder": "^1.0.7", + "lamejs": "^1.2.1", "lodash": "^4.17.21" }, "devDependencies": { @@ -2038,6 +2041,11 @@ "node": ">=6.9.0" } }, + "node_modules/@breezystack/lamejs": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@breezystack/lamejs/-/lamejs-1.2.7.tgz", + "integrity": "sha512-6wc7ck65ctA75Hq7FYHTtTvGnYs6msgdxiSUICQ+A01nVOWg6rqouZB8IdyteRlfpYYiFovkf67dIeOgWIUzTA==" + }, "node_modules/@colors/colors": { "version": "1.6.0", "resolved": "https://npm.nie.netease.com/@colors%2fcolors/-/colors-1.6.0.tgz", @@ -4586,7 +4594,6 @@ "version": "0.4.0", "resolved": "https://npm.nie.netease.com/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "dev": true, "license": "MIT" }, "node_modules/at-least-node": { @@ -4666,47 +4673,28 @@ "license": "MIT" }, "node_modules/axios": { - "version": "0.18.1", - "resolved": "https://npm.nie.netease.com/axios/-/axios-0.18.1.tgz", - "integrity": "sha512-0BfJq4NSfQXd+SkFdrvFbG7addhYSBA2mQwISr46pD6E5iqkWg02RAs8vyTT/j0RTnoYmeXauBuSv1qKwR179g==", - "deprecated": "Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410", - "dev": true, - "license": "MIT", - "dependencies": { - "follow-redirects": "1.5.10", - "is-buffer": "^2.0.2" - } - }, - "node_modules/axios/node_modules/debug": { - "version": "3.1.0", - "resolved": "https://npm.nie.netease.com/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "license": "MIT", + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.7.tgz", + "integrity": "sha512-/hDJGff6/c7u0hDkvkGxR/oy6CbCs8ziCsC7SqmhjfozqiJGc8Z11wrv9z9lYfY4K8l+H9TpjcMDX0xOZmx+RA==", "dependencies": { - "ms": "2.0.0" + "follow-redirects": "^1.15.4", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" } }, - "node_modules/axios/node_modules/follow-redirects": { - "version": "1.5.10", - "resolved": "https://npm.nie.netease.com/follow-redirects/-/follow-redirects-1.5.10.tgz", - "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==", - "dev": true, - "license": "MIT", + "node_modules/axios/node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", "dependencies": { - "debug": "=3.1.0" + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" }, "engines": { - "node": ">=4.0" + "node": ">= 6" } }, - "node_modules/axios/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://npm.nie.netease.com/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true, - "license": "MIT" - }, "node_modules/babel-loader": { "version": "8.3.0", "resolved": "https://npm.nie.netease.com/babel-loader/-/babel-loader-8.3.0.tgz", @@ -6459,6 +6447,17 @@ "node": ">=4" } }, + "node_modules/codesandbox/node_modules/axios": { + "version": "0.18.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.18.1.tgz", + "integrity": "sha512-0BfJq4NSfQXd+SkFdrvFbG7addhYSBA2mQwISr46pD6E5iqkWg02RAs8vyTT/j0RTnoYmeXauBuSv1qKwR179g==", + "deprecated": "Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410", + "dev": true, + "dependencies": { + "follow-redirects": "1.5.10", + "is-buffer": "^2.0.2" + } + }, "node_modules/codesandbox/node_modules/chalk": { "version": "2.4.2", "resolved": "https://npm.nie.netease.com/chalk/-/chalk-2.4.2.tgz", @@ -6501,6 +6500,27 @@ "dev": true, "license": "MIT" }, + "node_modules/codesandbox/node_modules/debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/codesandbox/node_modules/follow-redirects": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz", + "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==", + "dev": true, + "dependencies": { + "debug": "=3.1.0" + }, + "engines": { + "node": ">=4.0" + } + }, "node_modules/codesandbox/node_modules/fs-extra": { "version": "3.0.1", "resolved": "https://npm.nie.netease.com/fs-extra/-/fs-extra-3.0.1.tgz", @@ -6533,6 +6553,12 @@ "graceful-fs": "^4.1.6" } }, + "node_modules/codesandbox/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + }, "node_modules/codesandbox/node_modules/ora": { "version": "1.4.0", "resolved": "https://npm.nie.netease.com/ora/-/ora-1.4.0.tgz", @@ -6650,7 +6676,6 @@ "version": "1.0.8", "resolved": "https://npm.nie.netease.com/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dev": true, "license": "MIT", "dependencies": { "delayed-stream": "~1.0.0" @@ -8354,7 +8379,6 @@ "version": "1.0.0", "resolved": "https://npm.nie.netease.com/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "dev": true, "license": "MIT", "engines": { "node": ">=0.4.0" @@ -9781,7 +9805,6 @@ "version": "1.15.4", "resolved": "https://npm.nie.netease.com/follow-redirects/-/follow-redirects-1.15.4.tgz", "integrity": "sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw==", - "dev": true, "funding": [ { "type": "individual", @@ -12226,7 +12249,7 @@ }, "node_modules/is-buffer": { "version": "2.0.5", - "resolved": "https://npm.nie.netease.com/is-buffer/-/is-buffer-2.0.5.tgz", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", "dev": true, "funding": [ @@ -12243,7 +12266,6 @@ "url": "https://feross.org/support" } ], - "license": "MIT", "engines": { "node": ">=4" } @@ -12990,6 +13012,14 @@ "dev": true, "license": "MIT" }, + "node_modules/lamejs": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/lamejs/-/lamejs-1.2.1.tgz", + "integrity": "sha512-s7bxvjvYthw6oPLCm5pFxvA84wUROODB8jEO2+CE1adhKgrIvVOlmMgY8zyugxGrvRaDHNJanOiS21/emty6dQ==", + "dependencies": { + "use-strict": "1.0.1" + } + }, "node_modules/latest-version": { "version": "3.1.0", "resolved": "https://npm.nie.netease.com/latest-version/-/latest-version-3.1.0.tgz", @@ -13923,7 +13953,6 @@ "version": "1.52.0", "resolved": "https://npm.nie.netease.com/mime-db/-/mime-db-1.52.0.tgz", "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.6" @@ -13933,7 +13962,6 @@ "version": "2.1.35", "resolved": "https://npm.nie.netease.com/mime-types/-/mime-types-2.1.35.tgz", "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dev": true, "license": "MIT", "dependencies": { "mime-db": "1.52.0" @@ -17816,6 +17844,11 @@ "node": ">= 0.10" } }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + }, "node_modules/prr": { "version": "1.0.1", "resolved": "https://npm.nie.netease.com/prr/-/prr-1.0.1.tgz", @@ -21900,6 +21933,11 @@ "node": ">=0.10.0" } }, + "node_modules/use-strict": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/use-strict/-/use-strict-1.0.1.tgz", + "integrity": "sha512-IeiWvvEXfW5ltKVMkxq6FvNf2LojMKvB2OCeja6+ct24S1XOmQw2dGr2JyndwACWAGJva9B7yPHwAmeA9QCqAQ==" + }, "node_modules/uslug": { "version": "1.0.4", "resolved": "https://npm.nie.netease.com/uslug/-/uslug-1.0.4.tgz", @@ -26180,6 +26218,11 @@ "to-fast-properties": "^2.0.0" } }, + "@breezystack/lamejs": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@breezystack/lamejs/-/lamejs-1.2.7.tgz", + "integrity": "sha512-6wc7ck65ctA75Hq7FYHTtTvGnYs6msgdxiSUICQ+A01nVOWg6rqouZB8IdyteRlfpYYiFovkf67dIeOgWIUzTA==" + }, "@colors/colors": { "version": "1.6.0", "resolved": "https://npm.nie.netease.com/@colors%2fcolors/-/colors-1.6.0.tgz", @@ -28161,8 +28204,7 @@ "asynckit": { "version": "0.4.0", "resolved": "https://npm.nie.netease.com/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "dev": true + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "at-least-node": { "version": "1.0.0", @@ -28210,38 +28252,24 @@ "dev": true }, "axios": { - "version": "0.18.1", - "resolved": "https://npm.nie.netease.com/axios/-/axios-0.18.1.tgz", - "integrity": "sha512-0BfJq4NSfQXd+SkFdrvFbG7addhYSBA2mQwISr46pD6E5iqkWg02RAs8vyTT/j0RTnoYmeXauBuSv1qKwR179g==", - "dev": true, + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.7.tgz", + "integrity": "sha512-/hDJGff6/c7u0hDkvkGxR/oy6CbCs8ziCsC7SqmhjfozqiJGc8Z11wrv9z9lYfY4K8l+H9TpjcMDX0xOZmx+RA==", "requires": { - "follow-redirects": "1.5.10", - "is-buffer": "^2.0.2" + "follow-redirects": "^1.15.4", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" }, "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://npm.nie.netease.com/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "follow-redirects": { - "version": "1.5.10", - "resolved": "https://npm.nie.netease.com/follow-redirects/-/follow-redirects-1.5.10.tgz", - "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==", - "dev": true, + "form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", "requires": { - "debug": "=3.1.0" + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://npm.nie.netease.com/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true } } }, @@ -29532,6 +29560,16 @@ "color-convert": "^1.9.0" } }, + "axios": { + "version": "0.18.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.18.1.tgz", + "integrity": "sha512-0BfJq4NSfQXd+SkFdrvFbG7addhYSBA2mQwISr46pD6E5iqkWg02RAs8vyTT/j0RTnoYmeXauBuSv1qKwR179g==", + "dev": true, + "requires": { + "follow-redirects": "1.5.10", + "is-buffer": "^2.0.2" + } + }, "chalk": { "version": "2.4.2", "resolved": "https://npm.nie.netease.com/chalk/-/chalk-2.4.2.tgz", @@ -29564,6 +29602,24 @@ "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", "dev": true }, + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "follow-redirects": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz", + "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==", + "dev": true, + "requires": { + "debug": "=3.1.0" + } + }, "fs-extra": { "version": "3.0.1", "resolved": "https://npm.nie.netease.com/fs-extra/-/fs-extra-3.0.1.tgz", @@ -29590,6 +29646,12 @@ "graceful-fs": "^4.1.6" } }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + }, "ora": { "version": "1.4.0", "resolved": "https://npm.nie.netease.com/ora/-/ora-1.4.0.tgz", @@ -29706,7 +29768,6 @@ "version": "1.0.8", "resolved": "https://npm.nie.netease.com/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dev": true, "requires": { "delayed-stream": "~1.0.0" } @@ -30942,8 +31003,7 @@ "delayed-stream": { "version": "1.0.0", "resolved": "https://npm.nie.netease.com/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "dev": true + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==" }, "delegates": { "version": "1.0.0", @@ -32010,8 +32070,7 @@ "follow-redirects": { "version": "1.15.4", "resolved": "https://npm.nie.netease.com/follow-redirects/-/follow-redirects-1.15.4.tgz", - "integrity": "sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw==", - "dev": true + "integrity": "sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw==" }, "for-each": { "version": "0.3.3", @@ -33768,7 +33827,7 @@ }, "is-buffer": { "version": "2.0.5", - "resolved": "https://npm.nie.netease.com/is-buffer/-/is-buffer-2.0.5.tgz", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", "dev": true }, @@ -34280,6 +34339,14 @@ "integrity": "sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==", "dev": true }, + "lamejs": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/lamejs/-/lamejs-1.2.1.tgz", + "integrity": "sha512-s7bxvjvYthw6oPLCm5pFxvA84wUROODB8jEO2+CE1adhKgrIvVOlmMgY8zyugxGrvRaDHNJanOiS21/emty6dQ==", + "requires": { + "use-strict": "1.0.1" + } + }, "latest-version": { "version": "3.1.0", "resolved": "https://npm.nie.netease.com/latest-version/-/latest-version-3.1.0.tgz", @@ -35036,14 +35103,12 @@ "mime-db": { "version": "1.52.0", "resolved": "https://npm.nie.netease.com/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "dev": true + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" }, "mime-types": { "version": "2.1.35", "resolved": "https://npm.nie.netease.com/mime-types/-/mime-types-2.1.35.tgz", "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dev": true, "requires": { "mime-db": "1.52.0" } @@ -38042,6 +38107,11 @@ "ipaddr.js": "1.9.1" } }, + "proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + }, "prr": { "version": "1.0.1", "resolved": "https://npm.nie.netease.com/prr/-/prr-1.0.1.tgz", @@ -41083,6 +41153,11 @@ "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", "dev": true }, + "use-strict": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/use-strict/-/use-strict-1.0.1.tgz", + "integrity": "sha512-IeiWvvEXfW5ltKVMkxq6FvNf2LojMKvB2OCeja6+ct24S1XOmQw2dGr2JyndwACWAGJva9B7yPHwAmeA9QCqAQ==" + }, "uslug": { "version": "1.0.4", "resolved": "https://npm.nie.netease.com/uslug/-/uslug-1.0.4.tgz", diff --git a/packages/cw/cw_audio_library/package.json b/packages/cw/cw_audio_library/package.json index 209a9b9f..fb92e6ac 100644 --- a/packages/cw/cw_audio_library/package.json +++ b/packages/cw/cw_audio_library/package.json @@ -2,7 +2,7 @@ "name": "cw_audio_library", "title": "音频依赖库", "description": "", - "version": "1.0.0", + "version": "1.1.0", "main": "./index.js", "author": "", "repository": "", @@ -51,7 +51,10 @@ "dependencies": { "@any-touch/core": "^2.2.0", "@any-touch/pan": "^2.2.0", + "@breezystack/lamejs": "^1.2.7", + "axios": "^1.6.7", "js-audio-recorder": "^1.0.7", + "lamejs": "^1.2.1", "lodash": "^4.17.21" } }