diff --git a/app/(auth)/player/direct-player.tsx b/app/(auth)/player/direct-player.tsx index 138a6c4a..3e16e554 100644 --- a/app/(auth)/player/direct-player.tsx +++ b/app/(auth)/player/direct-player.tsx @@ -43,6 +43,7 @@ import { View, AppState, AppStateStatus, + Platform, } from "react-native"; import { useSharedValue } from "react-native-reanimated"; import settings from "../(tabs)/(home)/settings"; @@ -448,7 +449,7 @@ export default function page() { position: "relative", flexDirection: "column", justifyContent: "center", - opacity: showControls ? 0.5 : 1, + opacity: showControls ? (Platform.OS === "android" ? 0.7 : 0.5) : 1, }} > = ({ setSubtitleTrack={setSubtitleTrack} setSubtitleURL={setSubtitleURL} > - {!mediaSource?.TranscodingUrl ? ( - - ) : ( - - )} + + {!mediaSource?.TranscodingUrl ? ( + + ) : ( + + )} + = ({ style={[ { position: "absolute", - top: 0, - right: 0, + top: insets.top, + right: insets.right, opacity: showControls ? 1 : 0, }, ]} @@ -579,7 +594,7 @@ export const Controls: React.FC = ({ { Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Light); - stop(); + router.back(); }} className="aspect-square flex flex-col bg-neutral-800/90 rounded-xl items-center justify-center p-2" > @@ -591,8 +606,8 @@ export const Controls: React.FC = ({ style={{ position: "absolute", top: "50%", // Center vertically - left: 0, - right: 0, + left: insets.left, + right: insets.right, flexDirection: "row", justifyContent: "space-between", alignItems: "center", @@ -705,9 +720,9 @@ export const Controls: React.FC = ({ style={[ { position: "absolute", - right: 0, - left: 0, - bottom: 0, + right: insets.right, + left: insets.left, + bottom: insets.bottom, }, ]} className={`flex flex-col p-4`} diff --git a/components/video-player/controls/dropdown/DropdownViewDirect.tsx b/components/video-player/controls/dropdown/DropdownViewDirect.tsx index 67212a27..238e9775 100644 --- a/components/video-player/controls/dropdown/DropdownViewDirect.tsx +++ b/components/video-player/controls/dropdown/DropdownViewDirect.tsx @@ -72,105 +72,93 @@ const DropdownViewDirect: React.FC = ({ }>(); return ( - - - - - - - - - - - Subtitle - - - {allSubtitleTracksForDirectPlay?.map((sub, idx: number) => ( - { - if ("deliveryUrl" in sub && sub.deliveryUrl) { - setSubtitleURL && - setSubtitleURL( - api?.basePath + sub.deliveryUrl, - sub.name - ); + + + + + + + + + + Subtitle + + + {allSubtitleTracksForDirectPlay?.map((sub, idx: number) => ( + { + if ("deliveryUrl" in sub && sub.deliveryUrl) { + setSubtitleURL && + setSubtitleURL(api?.basePath + sub.deliveryUrl, sub.name); - console.log( - "Set external subtitle: ", - api?.basePath + sub.deliveryUrl - ); - } else { - console.log("Set sub index: ", sub.index); - setSubtitleTrack && setSubtitleTrack(sub.index); - } - router.setParams({ - subtitleIndex: sub.index.toString(), - }); - console.log("Subtitle: ", sub); - }} - > - - {sub.name} - - - ))} - - - - - Audio - - - {audioTracks?.map((track, idx: number) => ( - { - setAudioTrack && setAudioTrack(track.index); - router.setParams({ - audioIndex: track.index.toString(), - }); - }} - > - - {track.name} - - - ))} - - - - - + console.log( + "Set external subtitle: ", + api?.basePath + sub.deliveryUrl + ); + } else { + console.log("Set sub index: ", sub.index); + setSubtitleTrack && setSubtitleTrack(sub.index); + } + router.setParams({ + subtitleIndex: sub.index.toString(), + }); + console.log("Subtitle: ", sub); + }} + > + + {sub.name} + + + ))} + + + + + Audio + + + {audioTracks?.map((track, idx: number) => ( + { + setAudioTrack && setAudioTrack(track.index); + router.setParams({ + audioIndex: track.index.toString(), + }); + }} + > + + {track.name} + + + ))} + + + + ); };