Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hls-fetcher

Package Overview
Dependencies
Maintainers
17
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hls-fetcher - npm Package Compare versions

Comparing version 2.2.0 to 2.2.1

test/resources/windows.m3u8

7

CHANGELOG.md

@@ -0,1 +1,8 @@

<a name="2.2.1"></a>
## [2.2.1](https://github.com/videojs/hls-fetcher/compare/v2.2.0...v2.2.1) (2019-09-06)
### Bug Fixes
* windows paths and test console error ([#39](https://github.com/videojs/hls-fetcher/issues/39)) ([ae14253](https://github.com/videojs/hls-fetcher/commit/ae14253))
<a name="2.2.0"></a>

@@ -2,0 +9,0 @@ # [2.2.0](https://github.com/videojs/hls-fetcher/compare/v2.1.0...v2.2.0) (2019-09-05)

2

package.json
{
"name": "hls-fetcher",
"version": "2.2.0",
"version": "2.2.1",
"description": "Fetch HLS segments from an m3u8 playlist",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -132,3 +132,3 @@ /* eslint-disable no-console */

}
key.file = path.join(key.file, fsSanitize(path.basename(key.uri)));
key.file = path.join(key.file, path.basename(fsSanitize(key.uri)));

@@ -212,3 +212,3 @@ manifest.content = Buffer.from(manifest.content.toString().replace(

manifest.uri = uri;
manifest.file = path.join(basedir, fsSanitize(path.basename(uri)));
manifest.file = path.join(basedir, path.basename(fsSanitize(uri)));

@@ -223,3 +223,3 @@ // if we are not the master playlist

'manifest' + manifestIndex,
fsSanitize(path.basename(manifest.file))
path.basename(fsSanitize(manifest.file))
);

@@ -304,3 +304,3 @@ // get the real uri of this playlist

// put segments in manifest-name/segment-name.ts
s.file = path.join(path.dirname(manifest.file), fsSanitize(path.basename(s.uri)));
s.file = path.join(path.dirname(manifest.file), path.basename(fsSanitize(s.uri)));

@@ -307,0 +307,0 @@ if (!isAbsolute(s.uri)) {

@@ -27,3 +27,10 @@ /* eslint-env mocha */

describe('walkPlaylist', function() {
/* eslint-disable no-console */
beforeEach(function() {
this.oldError = console.error;
console.error = () => {};
});
afterEach(function() {
console.error = this.oldError;
if (!nock.isDone()) {

@@ -34,2 +41,3 @@ this.test.error(new Error('Not all nock interceptors were used!'));

});
/* eslint-enable no-console */

@@ -90,2 +98,18 @@ it('should return just top level error for bad m3u8 uri', function(done) {

it('should return just segments for m3u8 with windows paths', function(done) {
nock(TEST_URL)
.get('/test.m3u8')
.replyWithFile(200, `${process.cwd()}/test/resources/windows.m3u8`);
const options = {decrypt: false, basedir: '.', uri: TEST_URL + '/test.m3u8', requestRetryMaxAttempts: 0};
walker(options)
.then(function(resources) {
assert.equal(resources[1].file, 'chunk_0.ts');
assert.equal(resources[2].file, 'chunk_1.ts');
done();
});
});
it('should return correct paths for m3u8', function(done) {

@@ -92,0 +116,0 @@ nock(TEST_URL)

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc