fix(android): ensure pause is well tken in account after onEnd (#4147)

Issue linked to: https://github.com/TheWidlarzGroup/react-native-video/issues/2690
This original issue is not reproduced
This commit is contained in:
Olivier Bouillet 2024-09-06 15:11:33 +02:00 committed by GitHub
parent 809a730198
commit b2fd8d62a1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1261,10 +1261,7 @@ public class ReactExoplayerView extends FrameLayout implements
player.setPlayWhenReady(true); player.setPlayWhenReady(true);
} }
} else { } else {
// ensure playback is not ENDED, else it will trigger another ended event player.setPlayWhenReady(false);
if (player.getPlaybackState() != Player.STATE_ENDED) {
player.setPlayWhenReady(false);
}
} }
} }