Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(react-native-google-cast): add suspendSessionsWhenBackgrounded option to IOS #231

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Bram-dc
Copy link

@Bram-dc Bram-dc commented Apr 17, 2024

Why

This option is to enable background streaming using react-native-google-cast.

https://github.com/react-native-google-cast/react-native-google-cast/blob/main/src/api/useCastSession.ts

This is primarily targeted at iOS which by default suspends sessions when backgrounded. Alternatively, you can set options.suspendSessionsWhenBackgrounded = false when initializing the CastContext in AppDelegate.

How

Added the option to the plugin :)

Test Plan

I do not have access to an IOS device, but I did change the jest test suite to also check if the file generated is correct. Someone should run this with the example app to verify that this option is not breaking the app.

Edit: I just did and it works correctly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant