@warren-bank/hls-proxy 3.4.4 → 3.4.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,6 +13,7 @@ const url_location_landmarks = {
13
13
  same_line: [
14
14
  '#EXT-X-MEDIA:',
15
15
  '#EXT-X-I-FRAME-STREAM-INF:',
16
+ '#EXT-X-IMAGE-STREAM-INF:',
16
17
  '#EXT-X-RENDITION-REPORT:',
17
18
  '#EXT-X-DATERANGE:',
18
19
  '#EXT-X-CONTENT-STEERING:'
@@ -38,11 +38,7 @@ const parse_req_url = function(params, req) {
38
38
 
39
39
  let url, url_lc, index
40
40
 
41
- url = base64_decode( decodeURIComponent( matches[2] ) ).trim()
42
-
43
- if (hooks && (hooks instanceof Object) && hooks.rewrite && (typeof hooks.rewrite === 'function'))
44
- url = hooks.rewrite(url)
45
-
41
+ url = base64_decode( decodeURIComponent( matches[2] ) ).trim()
46
42
  url_lc = url.toLowerCase()
47
43
  index = url_lc.indexOf('http')
48
44
 
@@ -54,6 +50,10 @@ const parse_req_url = function(params, req) {
54
50
 
55
51
  url = url.substring(0, index).trim()
56
52
  }
53
+
54
+ if (hooks && (hooks instanceof Object) && hooks.rewrite && (typeof hooks.rewrite === 'function'))
55
+ url = hooks.rewrite(url)
56
+
57
57
  result.url = url
58
58
  }
59
59
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@warren-bank/hls-proxy",
3
3
  "description": "Node.js server to proxy HLS video streams",
4
- "version": "3.4.4",
4
+ "version": "3.4.6",
5
5
  "scripts": {
6
6
  "start": "node hls-proxy/bin/hlsd.js",
7
7
  "sudo": "sudo node hls-proxy/bin/hlsd.js"