minor tweak at onEnd

This commit is contained in:
Reinaldo Neto 2023-10-24 00:07:00 -03:00
parent 3805bc9c32
commit 6b6904ec63
1 changed files with 6 additions and 8 deletions

View File

@ -69,8 +69,7 @@ const AudioPlayer = ({
}; };
const onEnd = (data: AVPlaybackStatus) => { const onEnd = (data: AVPlaybackStatus) => {
if (data.isLoaded) { if (data.isLoaded && data.didJustFinish) {
if (data.didJustFinish) {
try { try {
setPaused(true); setPaused(true);
currentTime.value = 0; currentTime.value = 0;
@ -78,7 +77,6 @@ const AudioPlayer = ({
// do nothing // do nothing
} }
} }
}
}; };
const setPosition = async (time: number) => { const setPosition = async (time: number) => {