diff --git a/components/settings/SettingToggles.tsx b/components/settings/SettingToggles.tsx index cc066d29..042fd524 100644 --- a/components/settings/SettingToggles.tsx +++ b/components/settings/SettingToggles.tsx @@ -1,7 +1,7 @@ import { Linking, Switch, TouchableOpacity, View } from "react-native"; import { Text } from "../common/Text"; -import { useAtom } from "jotai"; import { useSettings } from "@/utils/atoms/settings"; +import * as DropdownMenu from "zeego/dropdown-menu"; export const SettingToggles: React.FC = () => { const [settings, updateSettings] = useSettings(); @@ -55,6 +55,75 @@ export const SettingToggles: React.FC = () => { onValueChange={(value) => updateSettings({ usePopularPlugin: value })} /> + + + Force direct play + + This will always request direct play. This is good if you want to + try to stream movies you think the device supports. + + + updateSettings({ forceDirectPlay: value })} + /> + + + + Device profile + + A profile used for deciding what audio and video codecs the device + supports. + + + + + + {settings?.deviceProfile} + + + + Profiles + { + updateSettings({ deviceProfile: "Expo" }); + }} + > + Expo + + { + updateSettings({ deviceProfile: "Native" }); + }} + > + Native + + { + updateSettings({ deviceProfile: "Old" }); + }} + > + Old + + + + ); }; diff --git a/utils/atoms/settings.ts b/utils/atoms/settings.ts index d9dc618e..a558facf 100644 --- a/utils/atoms/settings.ts +++ b/utils/atoms/settings.ts @@ -7,6 +7,8 @@ type Settings = { forceLandscapeInVideoPlayer?: boolean; openFullScreenVideoPlayerByDefault?: boolean; usePopularPlugin?: boolean; + deviceProfile?: "Expo" | "Native" | "Old"; + forceDirectPlay?: boolean; }; /** @@ -27,6 +29,8 @@ const loadSettings = async (): Promise => { forceLandscapeInVideoPlayer: false, openFullScreenVideoPlayerByDefault: false, usePopularPlugin: false, + deviceProfile: "Expo", + forceDirectPlay: false, }; };