@qvac/decoder-audio 0.3.4 → 0.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -19
- package/package.json +10 -4
package/README.md
CHANGED
|
@@ -45,27 +45,12 @@ Ensure that the [`Bare`](#glossary) Runtime is installed globally on your system
|
|
|
45
45
|
npm install -g bare@latest
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
-
Before proceeding with the installation, please generate a **classic GitHub Personal Access Token (PAT)** with the `read:packages` scope. Once generated, add the token to your environment variables using the name `NPM_TOKEN`.
|
|
49
|
-
|
|
50
|
-
```bash
|
|
51
|
-
export NPM_TOKEN=your_personal_access_token
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
Next, create a `.npmrc` file in the root of your project with the following content:
|
|
55
|
-
|
|
56
|
-
```ini
|
|
57
|
-
@tetherto:registry=https://npm.pkg.github.com
|
|
58
|
-
//npm.pkg.github.com/:_authToken=${NPM_TOKEN}
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
This configuration ensures secure access to GitHub Packages when installing scoped packages.
|
|
62
|
-
|
|
63
48
|
### Installing the Package
|
|
64
49
|
|
|
65
50
|
Install the latest version of the decoder addon with the following command:
|
|
66
51
|
|
|
67
52
|
```bash
|
|
68
|
-
npm install @
|
|
53
|
+
npm install @qvac/decoder-audio@latest
|
|
69
54
|
```
|
|
70
55
|
|
|
71
56
|
## Usage
|
|
@@ -77,7 +62,7 @@ This library provides a simple workflow for decoding audio streams.
|
|
|
77
62
|
To get started, import the decoder and create an instance:
|
|
78
63
|
|
|
79
64
|
```javascript
|
|
80
|
-
const { FFmpegDecoder } = require('@
|
|
65
|
+
const { FFmpegDecoder } = require('@qvac/decoder-audio')
|
|
81
66
|
|
|
82
67
|
const decoder = new FFmpegDecoder({
|
|
83
68
|
config: {
|
|
@@ -165,7 +150,7 @@ npm init -y
|
|
|
165
150
|
### 2. Install the required dependencies:
|
|
166
151
|
|
|
167
152
|
```bash
|
|
168
|
-
npm install bare-fs @
|
|
153
|
+
npm install bare-fs @qvac/decoder-audio
|
|
169
154
|
```
|
|
170
155
|
|
|
171
156
|
### 3. Create a file named `example.js` and paste the following code:
|
|
@@ -174,7 +159,7 @@ npm install bare-fs @tetherto/qvac-lib-decoder-audio
|
|
|
174
159
|
'use strict'
|
|
175
160
|
|
|
176
161
|
const fs = require('bare-fs')
|
|
177
|
-
const { FFmpegDecoder } = require('@
|
|
162
|
+
const { FFmpegDecoder } = require('@qvac/decoder-audio')
|
|
178
163
|
|
|
179
164
|
const audioFilePath = './path/to/audio/file.ogg'
|
|
180
165
|
const outputFilePath = './path/to/output/file.raw'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qvac/decoder-audio",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.6",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Tether",
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"test:dts": "tsc index.d.ts --noEmit --esModuleInterop --skipLibCheck",
|
|
11
11
|
"test:unit": "brittle-bare test/unit/*.test.js",
|
|
12
12
|
"test": "npm run test:unit && npm run test:integration",
|
|
13
|
-
"coverage:unit": "brittle-bare --coverage --cov-dir=coverage/unit test/unit/*.test.js &&
|
|
14
|
-
"coverage": "brittle-bare --coverage --cov-dir=coverage/unit test/unit/*.test.js &&
|
|
13
|
+
"coverage:unit": "brittle-bare --coverage --cov-dir=coverage/unit test/unit/*.test.js && mkdir -p .nyc_output && cp coverage/unit/coverage-final.json .nyc_output/out.json && npx nyc report --reporter=html --report-dir=coverage/html",
|
|
14
|
+
"coverage": "brittle-bare --coverage --cov-dir=coverage/unit test/unit/*.test.js && mkdir -p .nyc_output && cp coverage/unit/coverage-final.json .nyc_output/out.json && npx nyc report --reporter=html --report-dir=coverage/html",
|
|
15
15
|
"lint": "standard \"test/**/*.js\" \"*.js\" \"scripts/**/*.js\"",
|
|
16
16
|
"lint:fix": "standard --fix \"test/**/*.js\" \"*.js\" \"scripts/**/*.js\"",
|
|
17
17
|
"test:integration": "npm run test:integration:generate && brittle-bare test/integration/*.test.js",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"bare-os": "^3.6.2",
|
|
41
41
|
"bare-url": "^2.1.6",
|
|
42
42
|
"brittle": "^3.13.1",
|
|
43
|
-
"
|
|
43
|
+
"nyc": "^17.1.0",
|
|
44
44
|
"standard": "^17.1.2",
|
|
45
45
|
"typescript": "^5.3.0"
|
|
46
46
|
},
|
|
@@ -57,6 +57,12 @@
|
|
|
57
57
|
"bare-process": "^4.2.2",
|
|
58
58
|
"process": "npm:bare-process@^4.2.2"
|
|
59
59
|
},
|
|
60
|
+
"repository": {
|
|
61
|
+
"type": "git",
|
|
62
|
+
"url": "git+https://github.com/tetherto/qvac.git",
|
|
63
|
+
"directory": "packages/qvac-lib-decoder-audio"
|
|
64
|
+
},
|
|
60
65
|
"bugs": "https://github.com/tetherto/qvac/issues",
|
|
66
|
+
"homepage": "https://github.com/tetherto/qvac/tree/main/packages/qvac-lib-decoder-audio#readme",
|
|
61
67
|
"types": "index.d.ts"
|
|
62
68
|
}
|