From 36f1ea384d89294a85bc3b851aa014723df51e7c Mon Sep 17 00:00:00 2001 From: Fredrik Burmester Date: Sun, 25 Aug 2024 11:48:32 +0200 Subject: [PATCH] fix: return to fullscreen after pip --- components/CurrentlyPlayingBar.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/components/CurrentlyPlayingBar.tsx b/components/CurrentlyPlayingBar.tsx index bc05677f..a3276692 100644 --- a/components/CurrentlyPlayingBar.tsx +++ b/components/CurrentlyPlayingBar.tsx @@ -29,6 +29,7 @@ export const CurrentlyPlayingBar: React.FC = () => { setIsPlaying, isPlaying, videoRef, + presentFullscreenPlayer, onProgress, } = usePlayback(); @@ -182,6 +183,11 @@ export const CurrentlyPlayingBar: React.FC = () => { : undefined, }, }} + onRestoreUserInterfaceForPictureInPictureStop={() => { + setTimeout(() => { + presentFullscreenPlayer(); + }, 300); + }} onBuffer={(e) => e.isBuffering ? console.log("Buffering...") : null }