mirror of
https://github.com/zedeus/nitter.git
synced 2024-06-09 16:49:21 +00:00
Prefer mp4 to m3u8 for Video Playback
This allows video playback without Javascript and when proxying videos is turned off.
This commit is contained in:
parent
ecb6fe4162
commit
19fb6c9e78
|
@ -76,8 +76,8 @@ proc parseVideo(js: JsonNode): Video =
|
|||
views: js{"ext", "mediaStats", "r", "ok", "viewCount"}.getStr,
|
||||
available: js{"ext_media_availability", "status"}.getStr == "available",
|
||||
title: js{"ext_alt_text"}.getStr,
|
||||
durationMs: js{"video_info", "duration_millis"}.getInt
|
||||
# playbackType: mp4
|
||||
durationMs: js{"video_info", "duration_millis"}.getInt,
|
||||
playbackType: mp4
|
||||
)
|
||||
|
||||
with title, js{"additional_media_info", "title"}:
|
||||
|
|
|
@ -100,7 +100,7 @@ proc renderVideo*(video: Video; prefs: Prefs; path: string): VNode =
|
|||
renderVideoDisabled(video, path)
|
||||
else:
|
||||
let vid = video.variants.filterIt(it.contentType == video.playbackType)
|
||||
let source = getVidUrl(vid[0].url)
|
||||
let source = if prefs.proxyVideos: getVidUrl(vid[0].url) else: vid[0].url
|
||||
case video.playbackType
|
||||
of mp4:
|
||||
if prefs.muteVideos:
|
||||
|
|
Loading…
Reference in a new issue