1
0
mirror of https://github.com/mifi/lossless-cut.git synced 2024-11-22 10:22:31 +01:00

disable change playback rate when canvas player enabled

This commit is contained in:
Mikael Finstad 2020-04-27 13:23:53 +08:00
parent 826cb5743c
commit 2cf4dfda75

View File

@ -1048,6 +1048,11 @@ const App = memo(() => {
}, [filePath, captureFormat, customOutDir, html5FriendlyPath, dummyVideoPath, outputDir, duration]);
const changePlaybackRate = useCallback((dir) => {
if (canvasPlayerEnabled) {
toast.fire({ title: i18n.t('Unable to playback rate right now'), timer: 1000 });
return;
}
const video = videoRef.current;
if (!playing) {
video.play();
@ -1056,7 +1061,7 @@ const App = memo(() => {
toast.fire({ title: `${i18n.t('Playback rate:')} ${Math.floor(newRate * 100)}%`, timer: 1000 });
video.playbackRate = newRate;
}
}, [playing]);
}, [playing, canvasPlayerEnabled]);
const getHtml5ifiedPath = useCallback((cod, fp, type) => getOutPath(cod, fp, `html5ified-${type}.mp4`), []);