1
0
mirror of https://git.sr.ht/~cadence/cloudtube synced 2024-11-22 07:37:29 +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) video.second__viewCountText = converters.viewCountToText(video.viewCount)
} }
// apply media fragment to all sources
for (const format of formats) {
format.url += mediaFragment
}
// rewrite description // rewrite description
video.descriptionHtml = converters.rewriteVideoDescription(video.descriptionHtml, id) video.descriptionHtml = converters.rewriteVideoDescription(video.descriptionHtml, id)

View File

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