Class: MediaStreamAvailableEvent

Defines an event object for the mediaStreamAvailable event dispatched by both the Publisher and Subscriber objects. The Publisher and Subscriber objects both dispatch a mediaStreamAvailable event when the MediaStream is available to be used in custom video elements. The Publisher and Subscriber objects should still be used to control all other aspects of the video API such as muting, disconnecting, and more.

Note that the audio will play through both the custom element and the Publisher or Subscriber widget. The custom elements should be muted to avoid echo.

Properties

Name Type Description
mediaStream MediaStream The MediaStream object.
See:

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: