toast.fire({timer:10000,text:i18n.t('File not natively supported. Preview may have no audio or low quality. The final export will however be lossless with audio. You may convert it from the menu for a better preview.')});
toast.fire({timer:13000,text:i18n.t('File not natively supported. Preview may have no audio or low quality. The final export will however be lossless with audio. You may convert it from the menu for a better preview.')});
constshowPlaybackFailedMessage=()=>errorToast(i18n.t('Unable to playback this file. Try to convert to supported format from the menu'));
consttryCreateDummyVideo=useCallback(async()=>{
consttryCreateDummyVideo=useCallback(async()=>{
try{
try{
if(working)return;
if(working)return;
@ -843,7 +845,7 @@ const App = memo(() => {
awaitcreateDummyVideo(customOutDir,filePath);
awaitcreateDummyVideo(customOutDir,filePath);
}catch(err){
}catch(err){
console.error(err);
console.error(err);
errorToast(i18n.t('Failed to playback this file. Try to convert to supported format from the menu'));
showPlaybackFailedMessage();
}finally{
}finally{
setWorking();
setWorking();
}
}
@ -861,7 +863,7 @@ const App = memo(() => {
if(resetPlaybackRate)video.playbackRate=1;
if(resetPlaybackRate)video.playbackRate=1;
video.play().catch((err)=>{
video.play().catch((err)=>{
toast.fire({icon:'error',text:'Unable to play this file. Try to convert to supported format first'});
showPlaybackFailedMessage();
console.error(err);
console.error(err);
});
});
},[playing,filePath]);
},[playing,filePath]);
@ -1016,8 +1018,11 @@ const App = memo(() => {
}
}
}
}
//https://github.com/mifi/lossless-cut/issues/329
constextraIphoneMsg=isIphoneHevc(fileFormatData,mainStreams)?`${i18n.t('There is a known issue with cutting iPhone HEVC videos. The output file may not work in all players.')}`:'';
constextraStreamsMsg=exportExtraStreams?`${i18n.t('Unprocessable streams were exported as separate files.')}`:'';
constextraStreamsMsg=exportExtraStreams?`${i18n.t('Unprocessable streams were exported as separate files.')}`:'';
openDirToast({dirPath:outputDir,text:`${i18n.t('Done! Start-cutpoints may not be accurate. Make sure you test the output files in your desired player/editor before you delete the source files. If output does not look right, try to toggle "Keyframe cut" or try a different format. Output file(s) can be found at:')}${outputDir}.${extraStreamsMsg}`});
openDirToast({dirPath:outputDir,text:`${i18n.t('Done! Note: cutpoints may be inaccurate. Make sure you test the output files in your desired player/editor before you delete the source. If output does not look right, try to toggle "Keyframe cut" or try a different format.')}${extraIphoneMsg}${extraStreamsMsg}`,timer:15000});