Class: VideoDimensionsChangedEvent

Dispatched when the video dimensions of a published stream change.

On the Publisher, this event fires when the publisher's local <video> element detects a dimension change. When the publisher is actively publishing, this also updates the stream.videoDimensions property. Examples of what can cause the local video element to resize: resizing a captured screen-sharing window, rotating a mobile device (changing camera orientation), or calling Publisher.setPreferredResolution().

On the Subscriber, this event fires when the stream.videoDimensions property is updated by the publisher.

Properties

Name Type Description
newValue Object The new video dimensions (after the change). This object has two properties: height (the height, in pixels) and width (the width, in pixels).
oldValue Object The old video dimensions (before the change). This object has two properties: height (the old height, in pixels) and width (the old width, in pixels).
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: