mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-03-27 11:41:53 +00:00
Added use default audio
This commit is contained in:
@@ -2,6 +2,7 @@ import { TouchableOpacity, View, ViewProps } from "react-native";
|
||||
import * as DropdownMenu from "zeego/dropdown-menu";
|
||||
import { Text } from "../common/Text";
|
||||
import { useMedia } from "./MediaContext";
|
||||
import { Switch } from "react-native-gesture-handler";
|
||||
|
||||
interface Props extends ViewProps {}
|
||||
|
||||
@@ -72,6 +73,22 @@ export const AudioToggles: React.FC<Props> = ({ ...props }) => {
|
||||
</DropdownMenu.Content>
|
||||
</DropdownMenu.Root>
|
||||
</View>
|
||||
<View className="flex flex-col">
|
||||
<View className="flex flex-row items-center justify-between bg-neutral-900 p-4">
|
||||
<View className="flex flex-col">
|
||||
<Text className="font-semibold">Use Default Audio</Text>
|
||||
<Text className="text-xs opacity-50">
|
||||
Play default audio track regardless of language.
|
||||
</Text>
|
||||
</View>
|
||||
<Switch
|
||||
value={settings.playDefaultAudioTrack}
|
||||
onValueChange={(value) =>
|
||||
updateSettings({ playDefaultAudioTrack: value })
|
||||
}
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
|
||||
@@ -70,6 +70,7 @@ export const MediaProvider = ({ children }: { children: ReactNode }) => {
|
||||
"";
|
||||
|
||||
updatePayload.SubtitleMode = update?.subtitleMode;
|
||||
updatePayload.PlayDefaultAudioTrack = update?.playDefaultAudioTrack;
|
||||
|
||||
console.log("updatePayload", updatePayload);
|
||||
|
||||
@@ -119,6 +120,7 @@ export const MediaProvider = ({ children }: { children: ReactNode }) => {
|
||||
defaultSubtitleLanguage: subtitlePreference,
|
||||
defaultAudioLanguage: audioPreference,
|
||||
subtitleMode: user?.Configuration?.SubtitleMode,
|
||||
playDefaultAudioTrack: user?.Configuration?.PlayDefaultAudioTrack,
|
||||
});
|
||||
}, [user, cultures]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user