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

Name Type Description
code Number The error code. The following is a list of error codes:
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: