The Session object dispatches a
streamPropertyChanged
event in the
following circumstances:
- A stream has started or stopped publishing audio or video (see
Publisher.publishAudio() and
Publisher.publishVideo()).
This change results from a call to the
publishAudio()
orpublishVideo()
methods of the Publish object. Note that a subscriber's video can be disabled or enabled for reasons other than the publisher disabling or enabling it. A Subscriber object dispatchesvideoDisabled
andvideoEnabled
events in all conditions that cause the subscriber's stream to be disabled or enabled. - The
videoDimensions
property of the Stream object has changed (see Stream.videoDimensions). - The
videoType
property of the Stream object has changed. This can happen in a stream published by a mobile device. (See Stream.videoType.)
Properties
Name | Type | Description |
---|---|---|
changedProperty |
String | The property of the stream that changed. This value
is either "hasAudio" , "hasVideo" , or "videoDimensions" . |
newValue |
Object | The new value of the property (after the change). |
oldValue |
Object | The old value of the property (before the change). |
stream |
Stream | The Stream object for which a property has changed. |
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.