Hey,
I have a react-native app,
When I connect to a channel/session, i save the channel and the sessionToken in the device storage,
So i can disconnect from a channel after i close the app and open it again using the session from the storage. that works fine!
my problem is:
I’m trying to save the mainStreamManager in the storage also,
so i can call the method “publishAudio(true)” after i close the app and open it again.
But i can’t do it.
What should i do?
Should i publishAudio from the server? Is there a way to do it?
Hi,
I don’t know what is happening exactly when the app is going to background and come back to foreground. I don’t know if the session closes or is still alive.
However, you could replace your mainStreamManager by a new one. Initializing another publisher and connect it to the session.
This could be enough to keep publishing your audio and video
How can i Initialize another publisher and set it without joining a channel?
should i use a new instance of openVidu?
i saw that,
When i restart the app the state get cleared,
Let’s say i am initializing another publisher,
How can i connect it to the session if i don’t have one as the state got cleared?