mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-01-15 23:59:08 +00:00
Moves TV-specific plugin configuration from static app.json to dynamic loading in app.config.js based on EXPO_TV environment variable. Ensures TV plugin only loads for TV builds while phone-specific plugins load for non-TV builds, preventing conflicts between different build targets.
24 lines
659 B
JavaScript
24 lines
659 B
JavaScript
module.exports = ({ config }) => {
|
|
if (process.env.EXPO_TV === "1") {
|
|
// Add TV-specific plugin for TV builds
|
|
config.plugins.push("@react-native-tvos/config-tv");
|
|
} else {
|
|
// Add non-TV specific plugins for phone builds
|
|
config.plugins.push("expo-background-task");
|
|
|
|
config.plugins.push([
|
|
"react-native-google-cast",
|
|
{ useDefaultExpandedMediaControls: true },
|
|
]);
|
|
|
|
// Add the background downloader plugin only for non-TV builds
|
|
config.plugins.push("./plugins/withRNBackgroundDownloader.js");
|
|
}
|
|
return {
|
|
android: {
|
|
googleServicesFile: process.env.GOOGLE_SERVICES_JSON,
|
|
},
|
|
...config,
|
|
};
|
|
};
|