When a new user joins the room or an existing user reloads the page, the timeout error while rendering the screen-sharing stream may be related to the createView timeout failures in the Azure Communication Services (ACS) Calling SDK. Here are some potential causes and recommended workarounds:
- Network Issues: If the video sender (the user sharing the screen) has network issues, it could lead to a failure in the video subscription for new users. Ensure that the sender has a stable network connection.
- Video Sender Dropped from Call: If the video sender unexpectedly drops from the call, other participants may not receive the video frames, leading to a timeout error. This can happen if the sender terminates the browser process instead of hanging up. Ensure that the sender properly ends the call.
- Retry Mechanism: Implement a retry mechanism for invoking the
createViewAPI. If a timeout occurs, continuously retry until it succeeds. This can help in scenarios where there are temporary network issues. - User Interface Notifications: Consider implementing a mechanism to notify users when the sender's browser goes to the background or when there are network issues. This can help manage expectations and improve the user experience.
- Monitor Network Quality: Monitor the network quality and media status. If the network performance degrades, you might want to automatically turn off incoming video streams to maintain call quality.
These strategies should help mitigate the timeout errors when rendering screen-sharing streams in your Electron app using the ACS Calling SDK.
References: