fix: rethrow play error so allowPlaybackRef resets on failure

This commit is contained in:
AmitwalaH
2026-04-25 15:08:01 +05:30
parent 466fad399a
commit 657d55bd72
@@ -369,7 +369,10 @@ const VideoPlayback = forwardRef<VideoPlaybackRef, VideoPlaybackProps>(
if (!vid) return;
try {
allowPlaybackRef.current = true;
await vid.play().catch((err) => console.log("PLAY ERROR:", err));
await vid.play().catch((err) => {
console.log("PLAY ERROR:", err);
throw err;
});
} catch (error) {
allowPlaybackRef.current = false;
throw error;