kopia lustrzana https://github.com/mifi/lossless-cut
fix a crash
rodzic
b3b4b6206c
commit
5346d412b9
|
@ -585,7 +585,10 @@ const App = memo(() => {
|
||||||
|
|
||||||
const onStopPlaying = useCallback(() => onPlayingChange(false), []);
|
const onStopPlaying = useCallback(() => onPlayingChange(false), []);
|
||||||
const onSartPlaying = useCallback(() => onPlayingChange(true), []);
|
const onSartPlaying = useCallback(() => onPlayingChange(true), []);
|
||||||
const onDurationChange = useCallback(e => setDuration(e.target.duration), []);
|
const onDurationChange = useCallback((e) => {
|
||||||
|
// Some files report duration infinity first, then proper duration later
|
||||||
|
if (e.target.duration !== Infinity) setDuration(e.target.duration);
|
||||||
|
}, []);
|
||||||
|
|
||||||
const onTimeUpdate = useCallback((e) => {
|
const onTimeUpdate = useCallback((e) => {
|
||||||
const { currentTime } = e.target;
|
const { currentTime } = e.target;
|
||||||
|
|
Ładowanie…
Reference in New Issue