forked from Ninjalama/streamyfin_mirror
iOS support
This commit is contained in:
1
app.json
1
app.json
@@ -77,6 +77,7 @@
|
||||
"com.reactnative.googlecast.RNGCExpandedControllerActivity": true
|
||||
}
|
||||
],
|
||||
["./plugins/withExpandedController.js"],
|
||||
[
|
||||
"expo-build-properties",
|
||||
{
|
||||
|
||||
20
plugins/withExpandedController.js
Normal file
20
plugins/withExpandedController.js
Normal file
@@ -0,0 +1,20 @@
|
||||
const { withAppDelegate } = require("@expo/config-plugins");
|
||||
|
||||
const withExpandedController = (config) => {
|
||||
return withAppDelegate(config, async (config) => {
|
||||
const contents = config.modResults.contents;
|
||||
|
||||
// Looking for the initialProps string inside didFinishLaunchingWithOptions,
|
||||
// and injecting expanded controller config.
|
||||
// Should be updated once there is an expo config option - see https://github.com/react-native-google-cast/react-native-google-cast/discussions/537
|
||||
const injectionIndex = contents.indexOf("self.initialProps = @{};");
|
||||
config.modResults.contents =
|
||||
contents.substring(0, injectionIndex) +
|
||||
`\n [GCKCastContext sharedInstance].useDefaultExpandedMediaControls = true; \n` +
|
||||
contents.substring(injectionIndex);
|
||||
|
||||
return config;
|
||||
});
|
||||
};
|
||||
|
||||
module.exports = withExpandedController;
|
||||
Reference in New Issue
Block a user