mirror of
https://github.com/darksaid98/mediaplex.git
synced 2026-12-02 06:28:51 +00:00
0.0.0
This commit is contained in:
1 parent
8d6839244a
commit
dd706e7f23
14 files changed
+766
-8
No files matched your search
@@ -0,0 +1,24 @@
|
||||
const fs = require('fs');
|
||||
const { probeStream } = require('../lib/index.js');
|
||||
|
||||
const stream = fs.createReadStream(`${__dirname}/test.mp3`);
|
||||
|
||||
/**
|
||||
* @param {Buffer} chunk
|
||||
*/
|
||||
async function main() {
|
||||
const probeResult = await probeStream(stream);
|
||||
console.log(probeResult.result);
|
||||
/*
|
||||
{
|
||||
channels: 2,
|
||||
sampleRate: 44100,
|
||||
framesPerBlock: 0,
|
||||
codec: 4099,
|
||||
nFrames: 796032,
|
||||
duration: 18
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
main();
|
||||
Binary file not shown.
Reference in new issue
Block a user