Class: VideoElementCreatedEvent

Dispatched by a Subscriber or Publisher object to indicate the video element (or object element in Internet Explorer) was created. Add a listener for this event when you set the insertDefaultUI option to false in the call to the OT.initPublisher() method or the Session.subscribe() method. The element property of the event object is a reference to the Publisher's video element (or the object element in Internet Explorer). Add it to the HTML DOM to display the video. (When you set the insertDefaultUI option to false, the video element is not inserted into the DOM automatically.)

Add a listener for this event only if you have set the insertDefaultUI option to false. If you have not set insertDefaultUI option to false, do not move the video element (or the object element containing the video in Internet Explorer) in the HTML DOM. Doing so causes the Publisher or Subscriber object to be destroyed.

Properties

Name Type Description
element Number A reference to the Publisher or Subscriber's video element (or in Internet Explorer the object element containing the video). Add it to the HTML DOM to display the video.

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: