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

NDI Stream stops once Unity iOS app is minimized and reopened #144

Open
katemilleker opened this issue Mar 15, 2022 · 3 comments
Open

NDI Stream stops once Unity iOS app is minimized and reopened #144

katemilleker opened this issue Mar 15, 2022 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@katemilleker
Copy link

I've integrated KlakNDI into my Unity app to stream the screen of my iPad to another display screen. When the app is launched for the first time, the NDI stream from my iPad is received by an NDI receiver. Once the app is minimized, the NDI receivers lose the signal and source from the iPad (as expected). However, when the app is reopened from background, the stream is not resumed on the receiver and the NDI receivers can no longer find the source (the Unity iOS app + Game View on my tablet). I've tested with the NDI Studio Monitor and a TouchDesigner NDI In CHOP/TOP.

Is there something I can do to resume/restart the NDI Sender stream from the Unity app after the app has been minimized and reopened from the background?

NDI Sender component - Keep Alpha is off, Capture Method is Game View
Unity v.2019.4.35f1
KlakNDI v.2.0.3
iPad Pro (12.9-in), 5th Gen, iOS 15.3.1
TouchDesigner v.2021.16410

@keijiro keijiro self-assigned this Mar 16, 2022
@keijiro keijiro added the question Further information is requested label Mar 16, 2022
@keijiro
Copy link
Owner

keijiro commented Mar 16, 2022

If I remember correctly, it works without any special care. I wonder if it's an unknown issue.

@keijiro
Copy link
Owner

keijiro commented Mar 16, 2022

I wonder if it can be solved by manually disabling/enabling the sender component in OnApplicationPause.

https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnApplicationPause.html

@katemilleker
Copy link
Author

Unfortunately that doesn't fix the issue, the NDI source is still lost after minimizing the app. Debug Logs in XCode (not present in the script below) showed that OnApplicationPause and OnApplicationFocus were being called as expected when the app was minimized and reopened.

The "NDI Sender" GameObject:
NdiSenderGameobject

The new "Application Paused" GameObject:
ApplicationPausedGameobject

My script for toggling the sender component via OnApplicationPause/Select
ApplicationPausedCSharp

@keijiro keijiro added enhancement New feature or request and removed question Further information is requested labels Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants