* Revert "Fix broken video playback by forcing fmp4"
This reverts commit 52db03b73a
.
* Fix audio url in video m3u8
* Upgrade hls.js to 1.5.1 and use full version
This commit is contained in:
parent
52db03b73a
commit
cdff5e9b1c
5 changed files with 9 additions and 9 deletions
5
public/js/hls.light.min.js
vendored
5
public/js/hls.light.min.js
vendored
File diff suppressed because one or more lines are too long
5
public/js/hls.min.js
vendored
Normal file
5
public/js/hls.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
|
@ -82,6 +82,8 @@ proc proxifyVideo*(manifest: string; proxy: bool): string =
|
||||||
for line in manifest.splitLines:
|
for line in manifest.splitLines:
|
||||||
let url =
|
let url =
|
||||||
if line.startsWith("#EXT-X-MAP:URI"): line[16 .. ^2]
|
if line.startsWith("#EXT-X-MAP:URI"): line[16 .. ^2]
|
||||||
|
elif line.startsWith("#EXT-X-MEDIA") and "URI=" in line:
|
||||||
|
line[line.find("URI=") + 5 .. -1 + line.find("\"", start= 5 + line.find("URI="))]
|
||||||
else: line
|
else: line
|
||||||
if url.startsWith('/'):
|
if url.startsWith('/'):
|
||||||
let path = "https://video.twimg.com" & url
|
let path = "https://video.twimg.com" & url
|
||||||
|
|
|
@ -31,9 +31,7 @@ proc getHmac*(data: string): string =
|
||||||
|
|
||||||
proc getVidUrl*(link: string): string =
|
proc getVidUrl*(link: string): string =
|
||||||
if link.len == 0: return
|
if link.len == 0: return
|
||||||
let
|
let sig = getHmac(link)
|
||||||
link = link.replace("cmaf", "fmp4")
|
|
||||||
sig = getHmac(link)
|
|
||||||
if base64Media:
|
if base64Media:
|
||||||
&"/video/enc/{sig}/{encode(link, safe=true)}"
|
&"/video/enc/{sig}/{encode(link, safe=true)}"
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -73,7 +73,7 @@ proc renderHead*(prefs: Prefs; cfg: Config; req: Request; titleText=""; desc="";
|
||||||
link(rel="alternate", type="application/rss+xml", href=rss, title="RSS feed")
|
link(rel="alternate", type="application/rss+xml", href=rss, title="RSS feed")
|
||||||
|
|
||||||
if prefs.hlsPlayback:
|
if prefs.hlsPlayback:
|
||||||
script(src="/js/hls.light.min.js", `defer`="")
|
script(src="/js/hls.min.js", `defer`="")
|
||||||
script(src="/js/hlsPlayback.js", `defer`="")
|
script(src="/js/hlsPlayback.js", `defer`="")
|
||||||
|
|
||||||
if prefs.infiniteScroll:
|
if prefs.infiniteScroll:
|
||||||
|
|
Loading…
Reference in a new issue