feat: playbacks
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user