feat: playbacks

This commit is contained in:
2025-12-08 14:27:27 +01:00
parent b0cf4a20ab
commit c97fb0a856
3 changed files with 129 additions and 47 deletions
+19 -4
View File
@@ -63,7 +63,10 @@ const FullscreenIntroVideo = ({ url, visible = true, onClose }) => {
return;
}
const remaining = player.duration - currentTime;
if (Number.isFinite(remaining) && remaining <= CLOSE_THRESHOLD_SECONDS) {
if (
Number.isFinite(remaining) &&
remaining <= CLOSE_THRESHOLD_SECONDS
) {
handleClose();
}
}
@@ -75,7 +78,10 @@ const FullscreenIntroVideo = ({ url, visible = true, onClose }) => {
return;
}
const remaining = player.duration - (player.currentTime ?? 0);
if (Number.isFinite(remaining) && remaining <= CLOSE_THRESHOLD_SECONDS) {
if (
Number.isFinite(remaining) &&
remaining <= CLOSE_THRESHOLD_SECONDS
) {
handleClose();
}
}
@@ -99,6 +105,7 @@ const FullscreenIntroVideo = ({ url, visible = true, onClose }) => {
pointerEvents="box-none"
style={{
position: "absolute",
paddingHorizontal: 10,
top: 0,
left: 0,
right: 0,
@@ -112,8 +119,16 @@ const FullscreenIntroVideo = ({ url, visible = true, onClose }) => {
<VideoView
player={player}
nativeControls={false}
contentFit="cover"
style={{ position: "absolute", top: 0, bottom: 0, left: 0, right: 0 }}
contentFit="contain"
height="100%"
width="100%"
// style={{
// position: "absolute",
// top: 0,
// bottom: 0,
// left: 24,
// right: 24,
// }}
/>
<Pressable
onPress={handleClose}