Have you explored the newest version of the OpenTok platform? Check out OpenTok 2.0, built on top of WebRTC. Learn more

StreamPropertyChangedEvent class

The Session object dispatches a streamPropertyChanged event in the following circumstances:

  • When a publisher starts or stops publishing audio or video. This change causes the hasAudio or hasVideo property of the Stream object to change. This change results from a call to the publishAudio() or publishVideo() methods of the Publish object.
  • When the settings of the quality property of a stream are determined. For more information, see Stream.quality.

The StreamPropertyChangedEvent object defines the properties of the event object that is dispatched.

StreamPropertyChangedEvent properties

The StreamPropertyChangedEvent object has the following properties:

changedProperty (String) — The property of the stream that changed. This can be either "hasAudio", "hasVideo", or "quality".

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.

target (Object) — The Session object that dispatched the event.

type (String) — The type of event ("streamPropertyChanged").

See

Publisher.publishAudio()

Publisher.publishVideo()

Session events

Stream.hasAudio

Stream.hasVideo

Stream.quality

IRC Live Chat

Have a quick question? Chat with TokBox Support on IRC. Join chat