ExceptionEvent
The OT class dispatches exception events when the Vonage Video 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
code
Type: 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
Type: String
The error message.
target
Type: 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
Type: 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:
sessionDisconnect— See SessionDisconnectEvent.preventDefault().streamDestroyed— See StreamEvent.preventDefault().accessDialogOpened— See the accessDialogOpened event.accessDenied— See the accessDenied event.