-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add chapters support to Invidious #4111
base: master
Are you sure you want to change the base?
Conversation
Is there a reason you decided to create a completely new JSON API endpoint instead of just including it in the existing |
I'm not actually sure why I did that... good catch! Data for chapters should now be available in the standard |
Thanks! |
1 similar comment
This comment has been minimized.
This comment has been minimized.
a37a648
to
3e4eb64
Compare
<%- if start_in_seconds > 0 -%> | ||
<p data-onclick="jump_to_time" data-jump-time="<%=start_in_seconds%>"><%-= recode_length_seconds(start_in_seconds) -%></p> | ||
<%- else -%> | ||
<p data-onclick="jump_to_time" data-jump-time="<%=start_in_seconds%>">0:00</p> | ||
<%- end -%> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you instead change recode_length_seconds()
to return "0:00"
is the provided time is 0
? It also makes sense in all the other places that use that function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit hesitant to change that since Invidious also uses a 0 to represent a nil value when length information isn't available
any ETA on chapters within invidious environment? |
@VnkCCENcXH0c3AhnijQ0y7SBeZx27 They currently have other problems, like trying to keep Invidious alive, so I assume, this isn't very high up their agenda, understandably. |
Allows automatically jumping to specified time instead of reloading the page.
Prior to this commit we used an Array of Chapter structs to represent a video's chapters. However, as we often needed to apply operations on the entire sequence of chapters, multiple isolated functions had to be created and in turn clogged up the code. By grouping everything together under a chapters struct that stores a sequence of chapters, these functions can be grouped together, and can be simplifed due to instance variables containing the data that they need. Co-authored-by: Samantaz Fox <[email protected]>
36ed5d3
to
1432827
Compare
This PR adds a chapters menu to the player control bar and a separate widget within the description to select chapters along with their thumbnail similar to what's on YouTube. See screenshots below.
Unfortunately, we can't segment the progress bar into multiple chunks like what YouTube does yet. VideoJS doesn't support this natively and it doesn't look like there are any extensions that does this.
Related: videojs/video.js#8235
Closes chapters component of #2395