mirror of
https://github.com/iv-org/invidious.git
synced 2025-11-01 21:22:02 +00:00
Add end marker continuation utility
This commit is contained in:
@@ -209,8 +209,13 @@ if (video_data.params.video_start > 0 || video_data.params.video_end > 0) {
|
||||
|
||||
player.markers({
|
||||
onMarkerReached: function (marker) {
|
||||
if (marker.text === 'End')
|
||||
player.loop() ? player.markers.prev('Start') : player.pause();
|
||||
if (marker.text === 'End') {
|
||||
if (video_data.ending_timestamp_seconds) {
|
||||
player.currentTime(player.duration());
|
||||
} else {
|
||||
player.loop() ? player.markers.prev('Start') : player.pause();
|
||||
}
|
||||
}
|
||||
},
|
||||
markers: markers
|
||||
});
|
||||
|
||||
@@ -140,6 +140,7 @@ function get_compilation(compid) {
|
||||
if (video_data.params.local !== video_data.preferences.local)
|
||||
url.searchParams.set('local', video_data.params.local);
|
||||
url.searchParams.set('t',video_data.starting_timestamp_seconds);
|
||||
url.searchParams.set('end',video_data.ending_timestamp_seconds);
|
||||
|
||||
location.assign(url.pathname + url.search);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user