Skip to content

Commit 44973df

Browse files
committed
extra comments
1 parent f2f89b3 commit 44973df

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

articles/communication-services/concepts/includes/best-practices-native.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,19 @@ When troubleshooting happens for voice or video calls, you're asked to provide a
8686
- [User Facing Diagnostics (UFD)](../voice-video-calling/user-facing-diagnostics.md) that can be used to examine various properties of a call to determine what the issue might be during the call that affects your customers.
8787
- [Media quality statistics](../voice-video-calling/media-quality-sdk.md) examine the low-level audio, video, and screen-sharing quality metrics for incoming and outgoing call metrics. We recommend that you collect the data and send it to your pipeline ingestion after your call ends.
8888

89+
## Error Handling
90+
91+
If there are any errors during the call or implementation, the methods return error objects containing error codes. It's crucial to use these error objects for proper error handling and to display alerts. The call states also return error codes to help identify the reason behind call failure. You can refer to [the troubleshooting guide](../troubleshooting-info.md), to resolve any issues.
92+
93+
### Managing Video Streams
94+
95+
Make sure to dispose of the `VideoStreamRendererView` when the video is no longer displayed on the UI. Use `VideoStreamType` to determine the type of the stream.
96+
8997
## General memory management
9098

9199
**Preallocate Resources**. Initialize your calling client and any necessary resources during your app's startup phase rather than on demand. This approach reduces latency when starting a call.
92100

93-
**Dispose Properly**. Ensure that all call objects are correctly disposed of after use to free up system resources and avoid memory leaks.
101+
**Dispose Properly**. Ensure that all call objects are correctly disposed of after use to free up system resources and avoid memory leaks. Make sure to unsubscribe from *events* preventing memory leaks.
94102

95103
## Camera or microphone being used by another process
96104

0 commit comments

Comments
 (0)