make sure in/out/position is <= duration, closes #696

This commit is contained in:
j 2023-07-08 14:09:23 +05:30
parent 51038b7c59
commit fd294baec9

View file

@ -31,6 +31,17 @@ pandora.ui.item = function() {
// fixme: layers have value, subtitles has text? // fixme: layers have value, subtitles has text?
isVideoView && Ox.extend(result.data, pandora.getVideoOptions(result.data)); isVideoView && Ox.extend(result.data, pandora.getVideoOptions(result.data));
if (isVideoView && result.data.duration) {
var videoPoints = pandora.user.ui.videoPoints[item], set = {};
['in', 'out', 'position'].forEach(point => {
if (videoPoints[point] > result.data.duration) {
set[point] = result.data.duration;
}
})
if (!Ox.isEmpty(set)) {
pandora.UI.set('videoPoints.' + item, Ox.extend(videoPoints[point], set[point]))
}
}
if (!result.data.rendered && [ if (!result.data.rendered && [
'clips', 'timeline', 'player', 'editor', 'map', 'calendar' 'clips', 'timeline', 'player', 'editor', 'map', 'calendar'