Class StreamPropertyChangedEvent

Triggered by streamPropertyChanged (available for Session and StreamManager objects)

Hierarchy

  • Event
    • StreamPropertyChangedEvent

Properties

cancelable: boolean

Whether the event has a default behavior that may be prevented by calling preventDefault

changedProperty: ChangedPropertyType

The property of the stream that changed. This value is either "videoActive", "audioActive", "videoTrack", "audioTrack", "videoDimensions" or "filter"

newValue: Object

New value of the property (after change, current value)

oldValue: Object

Previous value of the property (before change)

Cause of the change on the stream's property:

  • For videoActive: "publishVideo"
  • For audioActive: "publishAudio"
  • For videoTrack: "trackReplaced"
  • For audioTrack: "trackReplaced"
  • For videoDimensions: "deviceRotated", "screenResized" or "trackReplaced"
  • For filter: "applyFilter", "execFilterMethod" or "removeFilter"
stream: Stream

The Stream whose property has changed. You can always identify the user publishing the changed stream by consulting property connection

The object that dispatched the event

type: string

The type of event. This is the same string you pass as first parameter when calling method on() of any object implementing EventDispatcher interface

Methods

  • Prevents the default behavior of the event. The following events have a default behavior:

    • sessionDisconnected: dispatched by Session object, automatically unsubscribes the leaving participant from every Subscriber object of the session (this includes closing the RTCPeerConnection and disposing all MediaStreamTracks) and also deletes any HTML video element associated to each Subscriber (only those created by OpenVidu Browser, either by passing a valid parameter as targetElement in method subscribe or by calling createVideoElement). For every video removed, each Subscriber object will also dispatch a videoElementDestroyed event.

    • streamDestroyed:

      • If dispatched by a Publisher (you have unpublished): automatically stops all media tracks and deletes any HTML video element associated to it (only those created by OpenVidu Browser, either by passing a valid parameter as targetElement in method initPublisher or by calling createVideoElement). For every video removed, the Publisher object will also dispatch a videoElementDestroyed event.
      • If dispatched by Session (other user has unpublished): automatically unsubscribes the proper Subscriber object from the session (this includes closing the RTCPeerConnection and disposing all MediaStreamTracks) and also deletes any HTML video element associated to that Subscriber (only those created by OpenVidu Browser, either by passing a valid parameter as targetElement in method subscribe or by calling createVideoElement). For every video removed, the Subscriber object will also dispatch a videoElementDestroyed event.

    Returns void

Generated using TypeDoc