hlx-url-rewriter
Advanced tools
Comparing version 0.0.10 to 0.0.11
@@ -10,3 +10,2 @@ const path = require('path'); | ||
if (data.isMasterPlaylist) { | ||
rewriteUrl(data); | ||
const {variants, sessionDataList, sessionKeyList} = data; | ||
@@ -23,5 +22,6 @@ for (const variant of variants) { | ||
}); | ||
rewriteUrl(data); | ||
} else { | ||
rewriteUrls(data.segments, data); | ||
rewriteUrl(data); | ||
rewriteUrls(data.segments, data); | ||
} | ||
@@ -61,13 +61,4 @@ } else if (data.type === 'segment') { | ||
const obj = createUrl(uri, base); | ||
const scheme = 'file:'; | ||
if (obj.protocol === scheme) { | ||
const filePath = obj.pathname; | ||
if (base && uri.startsWith(scheme)) { | ||
const obj = createUrl(base); | ||
base = obj.pathname; | ||
console.log(`###path.relative(path.dirname(${base}), ${filePath})`); | ||
result = `/${path.relative(path.dirname(base), filePath)}`; | ||
} else { | ||
result = filePath; | ||
} | ||
if (obj.protocol === 'file:') { | ||
result = uri; | ||
} else { | ||
@@ -74,0 +65,0 @@ result = `${path.join(`/${obj.hostname}`, obj.pathname)}${obj.search}${obj.hash}`; |
{ | ||
"name": "hlx-url-rewriter", | ||
"version": "0.0.10", | ||
"version": "0.0.11", | ||
"description": "A transform stream to modify URLs contained in HLS playlists", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
6555
81