1
0
mirror of https://git.sr.ht/~cadence/cloudtube synced 2024-09-19 18:57:30 +00:00

Fix ?t start time parameter on videos

This commit is contained in:
Cadence Ember 2021-05-02 00:59:28 +12:00
parent 7023d0287c
commit c811a4aaf9
No known key found for this signature in database
GPG Key ID: BC1C2C61CF521B17
2 changed files with 6 additions and 1 deletions

View File

@ -160,6 +160,11 @@ module.exports = [
video.second__viewCountText = converters.viewCountToText(video.viewCount)
}
// apply media fragment to all sources
for (const format of formats) {
format.url += mediaFragment
}
// rewrite description
video.descriptionHtml = converters.rewriteVideoDescription(video.descriptionHtml, id)

View File

@ -25,7 +25,7 @@ block content
- const format = formats[0]
if format
video(controls preload="auto" width=format.second__width height=format.second__height data-itag=format.itag autoplay=continuous||autoplay)#video.video
source(src=format.url+mediaFragment type=format.type)
source(src=format.url type=format.type)
each t in video.captions
track(label=t.label kind="subtitles" srclang=t.languageCode src=t.url)
else