The following methods are used to switch the RTC application to the background and vice versa. The methods allow you to configure whether to continue streaming or pause after the switch.
Moving Application to Background
Class: EnxRoom
Method:
- (void)stopVideoTracksOnApplicationBackground:(BOOL)flag
Parameter:
flag
– BOOL. Set to true to stop publishing Local Video Stream on moving the application to the background.
// To stop Video Track when application goes to Background [room stopVideoTracksOnApplicationBackground:true];
Moving Application to Foreground
Class: EnxRoom
Method:
- (void)startVideoTracksOnApplicationForeground:(BOOL)flag;
Parameter:
flag
– BOOL. Set to true to start publishing Local Video Stream on moving the application to the foreground.
// To resume Video Track when application comes back to Foreground [room startVideoTracksOnApplicationForeground:true];