Initial hls video playback support

This commit is contained in:
Zed
2019-08-19 20:25:00 +02:00
parent bce76ab8d1
commit f5fef0ff3a
6 changed files with 45 additions and 13 deletions

View File

@@ -76,9 +76,10 @@ proc renderVideo(video: Video; prefs: Prefs): VNode =
video(poster=thumb, controls=""):
source(src=source, `type`="video/mp4")
of m3u8, vmap:
video(poster=thumb)
tdiv(class="video-overlay"):
p: text "Video playback not supported yet"
video(poster=thumb, data-url=source, data-autoload="false")
verbatim "<div class=\"video-overlay\" onclick=\"playVideo(this)\">"
verbatim "<div class=\"card-overlay-circle\">"
verbatim "<span class=\"card-overlay-triangle\"</span></div></div>"
else:
renderVideoDisabled(video)