Skip to content

Commit 25add41

Browse files
committed
Added logic to go back to previous screen once playback is finished.
1 parent 3668a8f commit 25add41

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

packages/shared-ui/src/screens/PlayerScreen.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,10 @@ export default function PlayerScreen() {
108108
onBuffer={setIsVideoBuffering}
109109
onProgress={setCurrentTime}
110110
onLoad={(duration) => (durationRef.current = duration)}
111-
onEnd={() => setPaused(true)}
111+
onEnd={() => {
112+
setPaused(true);
113+
navigation.goBack();
114+
}}
112115
/>
113116

114117
{!SHOW_NATIVE_CONTROLS && !!durationRef.current && (

0 commit comments

Comments
 (0)