Suggestions

close search

Add Messaging, Voice, and Authentication to your apps with Vonage Communications APIs

Visit the Vonage API Developer Portal

ExceptionEvent

Properties Methods 

The OT class dispatches exception events when the OpenTok API encounters an exception (error). The ExceptionEvent object defines the properties of the event object that is dispatched.

Note that you set up a callback for the exception event by calling the OT.on() method.

Properties

Name Type Description
code Number The error code. The following is a list of error codes:

code title
1004 Authentication error
1005 Invalid Session ID
1006 Connect Failed
1007 Connect Rejected
1008 Connect Time-out
1009 Security Error
1010 Not Connected
1011 Invalid Parameter
1013 Connection Failed
1014 API Response Failure
1026 Terms of Service Violation: Export Compliance
1500 Unable to Publish
1520 Unable to Force Disconnect
1530 Unable to Force Unpublish
1535 Force Unpublish on Invalid Stream
2000 Internal Error
2010 Report Issue Failure

Check the message property for more details about the error.

message String The error message.
target Object The object that the event pertains to. For an exception event, this will be an object other than the OT object (such as a Session object or a Publisher object).
title String The error title.

Methods

Name Description
isDefaultPrevented() → {Boolean} Whether the default event behavior has been prevented via a call to preventDefault() (true) or not (false).
preventDefault() Prevents the default behavior associated with the event from taking place.

isDefaultPrevented() → {Boolean}

Whether the default event behavior has been prevented via a call to preventDefault() (true) or not (false). See preventDefault().
Returns:

preventDefault()

Prevents the default behavior associated with the event from taking place.

To see whether an event has a default behavior, check the cancelable property of the event object.

Call the preventDefault() method in the callback function for the event.

The following events have default behaviors: