Implemented custom readable stream
This commit is contained in:
parent
78a25f9e1d
commit
0122a02fed
7 changed files with 88 additions and 1 deletions
8
examples/readable.js
Normal file
8
examples/readable.js
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
const fs = require('fs');
|
||||
const dest = fs.createWriteStream('./output');
|
||||
const { SRTReadStream } = require('../index.js');
|
||||
|
||||
const srt = new SRTReadStream('0.0.0.0', 1234);
|
||||
srt.listen(readStream => {
|
||||
readStream.pipe(dest);
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue