mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-06-20 12:50:26 +01:00
feat: KSPlayer as an option for iOS + other improvements (#1266)
This commit is contained in:
committed by
GitHub
parent
d1795c9df8
commit
74d86b5d12
34
plugins/withExcludeMedia3Dash.js
Normal file
34
plugins/withExcludeMedia3Dash.js
Normal file
@@ -0,0 +1,34 @@
|
||||
const { withAppBuildGradle } = require("expo/config-plugins");
|
||||
|
||||
module.exports = function withExcludeMedia3Dash(config) {
|
||||
return withAppBuildGradle(config, (config) => {
|
||||
const contents = config.modResults.contents;
|
||||
|
||||
// Add exclusion for duplicate media3 modules before dependencies block
|
||||
const exclusionBlock = `
|
||||
configurations.all {
|
||||
// Exclude duplicate media3 modules to avoid conflict between react-native-video and react-native-track-player
|
||||
exclude group: 'androidx.media3', module: 'media3-exoplayer-dash'
|
||||
exclude group: 'androidx.media3', module: 'media3-exoplayer-smoothstreaming'
|
||||
exclude group: 'androidx.media3', module: 'media3-exoplayer-rtsp'
|
||||
}
|
||||
`;
|
||||
|
||||
// Check if exclusion already exists
|
||||
if (contents.includes("media3-exoplayer-dash")) {
|
||||
return config;
|
||||
}
|
||||
|
||||
// Insert before the dependencies block
|
||||
const dependenciesIndex = contents.indexOf("dependencies {");
|
||||
if (dependenciesIndex !== -1) {
|
||||
config.modResults.contents =
|
||||
contents.slice(0, dependenciesIndex) +
|
||||
exclusionBlock +
|
||||
"\n" +
|
||||
contents.slice(dependenciesIndex);
|
||||
}
|
||||
|
||||
return config;
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user