This topic includes the following sections:
To detect all exception events, add an event handlers for otrnError
and error
events:
<OTSession
apiKey={this.apiKey}
sessionId={this.sessionId}
token={this.token}
eventHandlers={{
sessionConnected: event => {
console.log('session connected', event);
},
error: event => {
console.log('error', event);
},
otrnError: event => {
console.log('otrnError', event);
},
};}>
{ /* ... */ }
</OTSession>
Inspector provides post-mortem diagnostic information about OpenTok sessions. Enter a session ID or a reported issue ID (see Reporting an issue) into Inspector to view raw information at stream and user levels to help pinpoint errors, failures, and quality issues.
For details, see the Inspector documentation.
The Vonage Video API Playground lets you easily connect to an OpenTok session in a web client. This can be useful in debugging and app that uses the Vonage Video React Native SDK (or another client SDK).
For details, see the Playground documentation.
You can call the reportIssue()
method of the OTSession obejct to programmatically report when your app experiences an issue. This method returns Promise that resolves with a an issue ID (string), which you can use with the Inspector tool or when the Vonage API support team.
// otSessionRef is an OTSession ref
otSessionRef.reportIssue()
.then((issueId) => console.log(issueId));
// You may want to use XMLHttpRequest to report this issue ID to a server
// that can store it in a database for later reference.