mirror of
https://github.com/iv-org/invidious.git
synced 2025-07-20 12:28:29 +00:00
Add chapters track to player.ecr
This commit is contained in:
parent
59a1b7f583
commit
437476a5cb
@ -16,6 +16,7 @@ var options = {
|
|||||||
'remainingTimeDisplay',
|
'remainingTimeDisplay',
|
||||||
'Spacer',
|
'Spacer',
|
||||||
'captionsButton',
|
'captionsButton',
|
||||||
|
'ChaptersButton',
|
||||||
'audioTrackButton',
|
'audioTrackButton',
|
||||||
'qualitySelector',
|
'qualitySelector',
|
||||||
'playbackRateMenuButton',
|
'playbackRateMenuButton',
|
||||||
|
@ -191,6 +191,8 @@ module Invidious::Routes::Embed
|
|||||||
|
|
||||||
thumbnail = "/vi/#{video.id}/maxres.jpg"
|
thumbnail = "/vi/#{video.id}/maxres.jpg"
|
||||||
|
|
||||||
|
chapters = video.chapters
|
||||||
|
|
||||||
if params.raw
|
if params.raw
|
||||||
url = fmt_stream[0]["url"].as_s
|
url = fmt_stream[0]["url"].as_s
|
||||||
|
|
||||||
|
@ -158,6 +158,8 @@ module Invidious::Routes::Watch
|
|||||||
|
|
||||||
thumbnail = "/vi/#{video.id}/maxres.jpg"
|
thumbnail = "/vi/#{video.id}/maxres.jpg"
|
||||||
|
|
||||||
|
chapters = video.chapters
|
||||||
|
|
||||||
if params.raw
|
if params.raw
|
||||||
if params.listen
|
if params.listen
|
||||||
url = audio_streams[0]["url"].as_s
|
url = audio_streams[0]["url"].as_s
|
||||||
|
@ -64,6 +64,10 @@
|
|||||||
<% captions.each do |caption| %>
|
<% captions.each do |caption| %>
|
||||||
<track kind="captions" src="/api/v1/captions/<%= video.id %>?label=<%= caption.name %>" label="<%= caption.name %>">
|
<track kind="captions" src="/api/v1/captions/<%= video.id %>?label=<%= caption.name %>" label="<%= caption.name %>">
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
<% if !chapters.empty? %>
|
||||||
|
<track kind="chapters" src="/api/v1/chapters/<%= video.id %>">
|
||||||
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</video>
|
</video>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user