thrimbletrimmer: Preserve trim timings when re-loading playlist

Useful if you've already cut the start
but want to extend the range of times before cutting the end.
pull/157/head
Mike Lang 5 years ago
parent a002619c4c
commit c9f2e8e0a5

@ -198,6 +198,17 @@ loadPlaylist = function(isEditor, startTrim, endTrim, defaultQuality) {
var range = getTimeRangeAsTimestamp();
var queryString = buildQuery(range);
// Preserve existing edit times
if (player) {
var discontinuities = mapDiscontinuities();
if (!startTrim) {
startTrim = getRealTimeForPlayerTime(discontinuities, player.trimmingControls().options.startTrim).replace('Z','');
}
if (!endTrim) {
endTrim = getRealTimeForPlayerTime(discontinuities, player.trimmingControls().options.endTrim).replace('Z','');
}
}
setupPlayer(isEditor, playlist + '?' + queryString, startTrim, endTrim);
//Get quality levels for advanced properties / download

Loading…
Cancel
Save