mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
Use expo plugin for react-native-video
This commit is contained in:
parent
5108649bf0
commit
e6f4f51aea
@ -56,10 +56,6 @@ const config: ExpoConfig = {
|
|||||||
backgroundColor: "#eff1f5",
|
backgroundColor: "#eff1f5",
|
||||||
},
|
},
|
||||||
splash,
|
splash,
|
||||||
permissions: [
|
|
||||||
"android.permission.FOREGROUND_SERVICE",
|
|
||||||
"android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK",
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
updates: {
|
updates: {
|
||||||
url: "https://u.expo.dev/55de6b52-c649-4a15-9a45-569ff5ed036c",
|
url: "https://u.expo.dev/55de6b52-c649-4a15-9a45-569ff5ed036c",
|
||||||
@ -73,27 +69,16 @@ const config: ExpoConfig = {
|
|||||||
projectId: "55de6b52-c649-4a15-9a45-569ff5ed036c",
|
projectId: "55de6b52-c649-4a15-9a45-569ff5ed036c",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
plugins: ["expo-build-properties", "expo-localization"],
|
plugins: [
|
||||||
};
|
"expo-build-properties",
|
||||||
|
"expo-localization",
|
||||||
const withForegroundService = (c: ExpoConfig): ExpoConfig => {
|
[
|
||||||
return withAndroidManifest(c, async (config) => {
|
"react-native-video",
|
||||||
const manifest = config.modResults.manifest;
|
{
|
||||||
manifest.application![0].service ??= [];
|
enableNotificationControls: true,
|
||||||
manifest.application![0].service.push({
|
|
||||||
$: {
|
|
||||||
"android:name": "com.brentvatne.exoplayer.VideoPlaybackService",
|
|
||||||
"android:exported": "false",
|
|
||||||
"android:foregroundServiceType": "mediaPlayback",
|
|
||||||
},
|
},
|
||||||
"intent-filter": [
|
],
|
||||||
{
|
],
|
||||||
action: [{ $: { "android:name": "androidx.media3.session.MediaSessionService" } }],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
});
|
|
||||||
return config;
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default withForegroundService(config);
|
export default config;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user