returni18n.t('Please input a valid duration. Example: {{example}}',{example});
returni18n.t('Please input a valid duration. Example: {{example}}',{example:exampleDuration});
},
});
@ -238,6 +239,37 @@ async function askForSegmentDuration(fileDuration) {
returnparseDuration(value);
}
exportasyncfunctionaskForShiftSegments(){
functionparseValue(value){
letparseableValue=value;
letsign=1;
if(parseableValue[0]==='-'){
parseableValue=parseableValue.substring(1);
sign=-1;
}
constduration=parseDuration(parseableValue);
if(duration!=null&&duration>0){
returnduration*sign;
}
returnundefined;
}
const{value}=awaitSwal.fire({
input:'text',
showCancelButton:true,
inputValue:'00:00:00.000',
text:i18n.t('Shift all segments on the timeline by this amount. Negative values will be shifted back, while positive value will be shifted forward in time.'),
inputValidator:(v)=>{
constparsed=parseValue(v);
if(parsed==null)returni18n.t('Please input a valid duration. Example: {{example}}',{example:exampleDuration});