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