m3u8stream
Advanced tools
Comparing version 0.7.1 to 0.8.0
@@ -31,2 +31,7 @@ "use strict"; | ||
} | ||
const forwardEvents = (req) => { | ||
for (let event of ['abort', 'request', 'response', 'redirect', 'retry', 'reconnect']) { | ||
req.on(event, stream.emit.bind(stream, event)); | ||
} | ||
}; | ||
let currSegment; | ||
@@ -53,2 +58,3 @@ const streamQueue = new queue_1.default((req, callback) => { | ||
req.on('error', callback); | ||
forwardEvents(req); | ||
streamQueue.push(req, (err, size) => { | ||
@@ -104,2 +110,3 @@ downloaded += +size; | ||
currPlaylist.on('error', onError); | ||
forwardEvents(currPlaylist); | ||
const parser = currPlaylist.pipe(new Parser(options.id)); | ||
@@ -106,0 +113,0 @@ parser.on('starttime', (a) => { |
@@ -13,3 +13,3 @@ { | ||
], | ||
"version": "0.7.1", | ||
"version": "0.8.0", | ||
"repository": { | ||
@@ -25,2 +25,3 @@ "type": "git", | ||
"scripts": { | ||
"prepare": "tsc -p tsconfig.build.json", | ||
"build": "tsc -p tsconfig.build.json", | ||
@@ -31,14 +32,14 @@ "test": "nyc --extension .ts --reporter=lcov --reporter=text-summary npm run test:unit", | ||
"dependencies": { | ||
"miniget": "^1.6.1", | ||
"miniget": "^2.0.1", | ||
"sax": "^1.2.4" | ||
}, | ||
"devDependencies": { | ||
"@types/lolex": "^3.1.1", | ||
"@types/mocha": "^7.0.0", | ||
"@types/node": "^13.1.0", | ||
"@types/sax": "^1.0.1", | ||
"lolex": "^6.0.0", | ||
"@types/sinon": "^9.0.8", | ||
"mocha": "^7.0.1", | ||
"nock": "^12.0.0", | ||
"nyc": "^15.0.0", | ||
"sinon": "^9.2.0", | ||
"ts-node": "^8.4.1", | ||
@@ -45,0 +46,0 @@ "typescript": "^3.4.2" |
@@ -52,2 +52,6 @@ # node-m3u8stream | ||
#### miniget events | ||
All [miniget events](https://github.com/fent/node-miniget#event-redirect) are forwarded and can be listened to from the returned stream. | ||
### Limitations | ||
@@ -54,0 +58,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
48003
697
74
+ Addedminiget@2.1.0(transitive)
- Removedminiget@1.7.2(transitive)
Updatedminiget@^2.0.1